diff options
Diffstat (limited to 'core/java/android/content')
| -rw-r--r-- | core/java/android/content/ComponentCallbacks2.java | 6 | ||||
| -rw-r--r-- | core/java/android/content/Intent.java | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/core/java/android/content/ComponentCallbacks2.java b/core/java/android/content/ComponentCallbacks2.java index 85294dd00c9c..a3b4e5efb583 100644 --- a/core/java/android/content/ComponentCallbacks2.java +++ b/core/java/android/content/ComponentCallbacks2.java @@ -88,7 +88,11 @@ public interface ComponentCallbacks2 extends ComponentCallbacks { * should never compare to exact values of the level, since new intermediate * values may be added -- you will typically want to compare if the value * is greater or equal to a level you are interested in. - * + * + * <p>To retrieve the processes current trim level at any point, you can + * use {@link android.app.ActivityManager#getMyMemoryState + * ActivityManager.getMyMemoryState(RunningAppProcessInfo)}. + * * @param level The context of the trim, giving a hint of the amount of * trimming the application may like to perform. May be * {@link #TRIM_MEMORY_COMPLETE}, {@link #TRIM_MEMORY_MODERATE}, diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 665333693e1a..d0d9bd6c5e30 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1624,8 +1624,20 @@ public class Intent implements Parcelable, Cloneable { /** * Broadcast Action: The current system wallpaper has changed. See * {@link android.app.WallpaperManager} for retrieving the new wallpaper. - */ - @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + * This should <em>only</em> be used to determine when the wallpaper + * has changed to show the new wallpaper to the user. You should certainly + * never, in response to this, change the wallpaper or other attributes of + * it such as the suggested size. That would be crazy, right? You'd cause + * all kinds of loops, especially if other apps are doing similar things, + * right? Of course. So please don't do this. + * + * @deprecated Modern applications should use + * {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WALLPAPER + * WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER} to have the wallpaper + * shown behind their UI, rather than watching for this broadcast and + * rendering the wallpaper on their own. + */ + @Deprecated @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_WALLPAPER_CHANGED = "android.intent.action.WALLPAPER_CHANGED"; /** * Broadcast Action: The current device {@link android.content.res.Configuration} |
