Loading TEST_MAPPING +30 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,22 @@ ] } ], "presubmit-pm": [ { "name": "PackageManagerServiceServerTests", "options": [ { "include-annotation": "android.platform.test.annotations.Presubmit" }, { "exclude-annotation": "androidx.test.filters.FlakyTest" }, { "exclude-annotation": "org.junit.Ignore" } ] } ], "presubmit": [ { "name": "ManagedProvisioningTests", Loading Loading @@ -167,6 +183,20 @@ "exclude-annotation": "org.junit.Ignore" } ] }, { "name": "PackageManagerServiceServerTests", "options": [ { "include-annotation": "android.platform.test.annotations.Presubmit" }, { "exclude-annotation": "androidx.test.filters.FlakyTest" }, { "exclude-annotation": "org.junit.Ignore" } ] } ] } core/api/current.txt +4 −4 Original line number Diff line number Diff line Loading @@ -7216,8 +7216,8 @@ package android.app { method public android.content.Intent getCropAndSetWallpaperIntent(android.net.Uri); method public int getDesiredMinimumHeight(); method public int getDesiredMinimumWidth(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getDrawable(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getFastDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method @Nullable public android.app.WallpaperColors getWallpaperColors(int); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.os.ParcelFileDescriptor getWallpaperFile(int); Loading @@ -7226,8 +7226,8 @@ package android.app { method public boolean hasResourceWallpaper(@RawRes int); method public boolean isSetWallpaperAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable peekFastDrawable(); method @Nullable public android.graphics.drawable.Drawable peekDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable peekFastDrawable(); method public void removeOnColorsChangedListener(@NonNull android.app.WallpaperManager.OnColorsChangedListener); method public void sendWallpaperCommand(android.os.IBinder, String, int, int, int, android.os.Bundle); method @RequiresPermission(android.Manifest.permission.SET_WALLPAPER) public void setBitmap(android.graphics.Bitmap) throws java.io.IOException; core/java/android/app/WallpaperManager.java +82 −0 Original line number Diff line number Diff line Loading @@ -786,6 +786,7 @@ public class WallpaperManager { * is not able to access the wallpaper. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, true, FLAG_SYSTEM, cmProxy); Loading @@ -797,6 +798,29 @@ public class WallpaperManager { return null; } /** * Retrieve the requested wallpaper; if * no wallpaper is set, the requested built-in static wallpaper is returned. * This is returned as an * abstract Drawable that you can install in a View to display whatever * wallpaper the user has currently set. * <p> * This method can return null if the requested wallpaper is not available, if * wallpapers are not supported in the current user, or if the calling app is not * permitted to access the requested wallpaper. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the requested wallpaper, * or {@code null} if the requested wallpaper does not exist or if the calling application * is not able to access the wallpaper. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getDrawable(@SetWallpaperFlags int which) { return getDrawable(); } /** * Obtain a drawable for the built-in static system wallpaper. */ Loading Loading @@ -1018,6 +1042,7 @@ public class WallpaperManager { * @return Returns a Drawable object that will draw the wallpaper or a * null pointer if these is none. */ @Nullable public Drawable peekDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, false, FLAG_SYSTEM, cmProxy); Loading @@ -1029,6 +1054,23 @@ public class WallpaperManager { return null; } /** * Retrieve the requested wallpaper; if there is no wallpaper set, * a null pointer is returned. This is returned as an * abstract Drawable that you can install in a View to display whatever * wallpaper the user has currently set. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the wallpaper or a null pointer if these * is none. * @hide */ @Nullable public Drawable peekDrawable(@SetWallpaperFlags int which) { return peekDrawable(); } /** * Like {@link #getDrawable()}, but the returned Drawable has a number * of limitations to reduce its overhead as much as possible. It will Loading @@ -1043,6 +1085,7 @@ public class WallpaperManager { * @return Returns a Drawable object that will draw the wallpaper. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getFastDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, true, FLAG_SYSTEM, cmProxy); Loading @@ -1052,6 +1095,28 @@ public class WallpaperManager { return null; } /** * Like {@link #getFastDrawable(int)}, but the returned Drawable has a number * of limitations to reduce its overhead as much as possible. It will * never scale the wallpaper (only centering it if the requested bounds * do match the bitmap bounds, which should not be typical), doesn't * allow setting an alpha, color filter, or other attributes, etc. The * bounds of the returned drawable will be initialized to the same bounds * as the wallpaper, so normally you will not need to touch it. The * drawable also assumes that it will be used in a context running in * the same density as the screen (not in density compatibility mode). * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the wallpaper. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getFastDrawable(@SetWallpaperFlags int which) { return getFastDrawable(); } /** * Like {@link #getFastDrawable()}, but if there is no wallpaper set, * a null pointer is returned. Loading @@ -1060,6 +1125,7 @@ public class WallpaperManager { * wallpaper or a null pointer if these is none. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable peekFastDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, false, FLAG_SYSTEM, cmProxy); Loading @@ -1069,6 +1135,22 @@ public class WallpaperManager { return null; } /** * Like {@link #getFastDrawable()}, but if there is no wallpaper set, * a null pointer is returned. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns an optimized Drawable object that will draw the * wallpaper or a null pointer if these is none. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable peekFastDrawable(@SetWallpaperFlags int which) { return peekFastDrawable(); } /** * Whether the wallpaper supports Wide Color Gamut or not. * @param which The wallpaper whose image file is to be retrieved. Must be a single Loading core/java/android/hardware/display/AmbientDisplayConfiguration.java +5 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class AmbientDisplayConfiguration { private static final String TAG = "AmbientDisplayConfig"; private final Context mContext; private final boolean mAlwaysOnByDefault; private final boolean mPickupGestureEnabledByDefault; /** Copied from android.provider.Settings.Secure since these keys are hidden. */ private static final String[] DOZE_SETTINGS = { Loading @@ -65,6 +66,8 @@ public class AmbientDisplayConfiguration { public AmbientDisplayConfiguration(Context context) { mContext = context; mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled); mPickupGestureEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled); } /** @hide */ Loading Loading @@ -95,7 +98,8 @@ public class AmbientDisplayConfiguration { /** @hide */ public boolean pickupGestureEnabled(int user) { return boolSettingDefaultOn(Settings.Secure.DOZE_PICK_UP_GESTURE, user) return boolSetting(Settings.Secure.DOZE_PICK_UP_GESTURE, user, mPickupGestureEnabledByDefault ? 1 : 0) && dozePickupSensorAvailable(); } Loading core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -9224,6 +9224,14 @@ public final class Settings { */ public static final int DOCK_SETUP_PAUSED = 2; /** * Indicates that the user has been prompted to start dock setup. * One of the possible states for {@link #DOCK_SETUP_STATE}. * * @hide */ public static final int DOCK_SETUP_PROMPTED = 3; /** * Indicates that the user has completed dock setup. * One of the possible states for {@link #DOCK_SETUP_STATE}. Loading @@ -9238,6 +9246,7 @@ public final class Settings { DOCK_SETUP_NOT_STARTED, DOCK_SETUP_STARTED, DOCK_SETUP_PAUSED, DOCK_SETUP_PROMPTED, DOCK_SETUP_COMPLETED }) public @interface DockSetupState { Loading Loading
TEST_MAPPING +30 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,22 @@ ] } ], "presubmit-pm": [ { "name": "PackageManagerServiceServerTests", "options": [ { "include-annotation": "android.platform.test.annotations.Presubmit" }, { "exclude-annotation": "androidx.test.filters.FlakyTest" }, { "exclude-annotation": "org.junit.Ignore" } ] } ], "presubmit": [ { "name": "ManagedProvisioningTests", Loading Loading @@ -167,6 +183,20 @@ "exclude-annotation": "org.junit.Ignore" } ] }, { "name": "PackageManagerServiceServerTests", "options": [ { "include-annotation": "android.platform.test.annotations.Presubmit" }, { "exclude-annotation": "androidx.test.filters.FlakyTest" }, { "exclude-annotation": "org.junit.Ignore" } ] } ] }
core/api/current.txt +4 −4 Original line number Diff line number Diff line Loading @@ -7216,8 +7216,8 @@ package android.app { method public android.content.Intent getCropAndSetWallpaperIntent(android.net.Uri); method public int getDesiredMinimumHeight(); method public int getDesiredMinimumWidth(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getDrawable(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getFastDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method @Nullable public android.app.WallpaperColors getWallpaperColors(int); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.os.ParcelFileDescriptor getWallpaperFile(int); Loading @@ -7226,8 +7226,8 @@ package android.app { method public boolean hasResourceWallpaper(@RawRes int); method public boolean isSetWallpaperAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable peekFastDrawable(); method @Nullable public android.graphics.drawable.Drawable peekDrawable(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) public android.graphics.drawable.Drawable peekFastDrawable(); method public void removeOnColorsChangedListener(@NonNull android.app.WallpaperManager.OnColorsChangedListener); method public void sendWallpaperCommand(android.os.IBinder, String, int, int, int, android.os.Bundle); method @RequiresPermission(android.Manifest.permission.SET_WALLPAPER) public void setBitmap(android.graphics.Bitmap) throws java.io.IOException;
core/java/android/app/WallpaperManager.java +82 −0 Original line number Diff line number Diff line Loading @@ -786,6 +786,7 @@ public class WallpaperManager { * is not able to access the wallpaper. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, true, FLAG_SYSTEM, cmProxy); Loading @@ -797,6 +798,29 @@ public class WallpaperManager { return null; } /** * Retrieve the requested wallpaper; if * no wallpaper is set, the requested built-in static wallpaper is returned. * This is returned as an * abstract Drawable that you can install in a View to display whatever * wallpaper the user has currently set. * <p> * This method can return null if the requested wallpaper is not available, if * wallpapers are not supported in the current user, or if the calling app is not * permitted to access the requested wallpaper. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the requested wallpaper, * or {@code null} if the requested wallpaper does not exist or if the calling application * is not able to access the wallpaper. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getDrawable(@SetWallpaperFlags int which) { return getDrawable(); } /** * Obtain a drawable for the built-in static system wallpaper. */ Loading Loading @@ -1018,6 +1042,7 @@ public class WallpaperManager { * @return Returns a Drawable object that will draw the wallpaper or a * null pointer if these is none. */ @Nullable public Drawable peekDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, false, FLAG_SYSTEM, cmProxy); Loading @@ -1029,6 +1054,23 @@ public class WallpaperManager { return null; } /** * Retrieve the requested wallpaper; if there is no wallpaper set, * a null pointer is returned. This is returned as an * abstract Drawable that you can install in a View to display whatever * wallpaper the user has currently set. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the wallpaper or a null pointer if these * is none. * @hide */ @Nullable public Drawable peekDrawable(@SetWallpaperFlags int which) { return peekDrawable(); } /** * Like {@link #getDrawable()}, but the returned Drawable has a number * of limitations to reduce its overhead as much as possible. It will Loading @@ -1043,6 +1085,7 @@ public class WallpaperManager { * @return Returns a Drawable object that will draw the wallpaper. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getFastDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, true, FLAG_SYSTEM, cmProxy); Loading @@ -1052,6 +1095,28 @@ public class WallpaperManager { return null; } /** * Like {@link #getFastDrawable(int)}, but the returned Drawable has a number * of limitations to reduce its overhead as much as possible. It will * never scale the wallpaper (only centering it if the requested bounds * do match the bitmap bounds, which should not be typical), doesn't * allow setting an alpha, color filter, or other attributes, etc. The * bounds of the returned drawable will be initialized to the same bounds * as the wallpaper, so normally you will not need to touch it. The * drawable also assumes that it will be used in a context running in * the same density as the screen (not in density compatibility mode). * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns a Drawable object that will draw the wallpaper. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable getFastDrawable(@SetWallpaperFlags int which) { return getFastDrawable(); } /** * Like {@link #getFastDrawable()}, but if there is no wallpaper set, * a null pointer is returned. Loading @@ -1060,6 +1125,7 @@ public class WallpaperManager { * wallpaper or a null pointer if these is none. */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable peekFastDrawable() { final ColorManagementProxy cmProxy = getColorManagementProxy(); Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, false, FLAG_SYSTEM, cmProxy); Loading @@ -1069,6 +1135,22 @@ public class WallpaperManager { return null; } /** * Like {@link #getFastDrawable()}, but if there is no wallpaper set, * a null pointer is returned. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return Returns an optimized Drawable object that will draw the * wallpaper or a null pointer if these is none. * @hide */ @RequiresPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) @Nullable public Drawable peekFastDrawable(@SetWallpaperFlags int which) { return peekFastDrawable(); } /** * Whether the wallpaper supports Wide Color Gamut or not. * @param which The wallpaper whose image file is to be retrieved. Must be a single Loading
core/java/android/hardware/display/AmbientDisplayConfiguration.java +5 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class AmbientDisplayConfiguration { private static final String TAG = "AmbientDisplayConfig"; private final Context mContext; private final boolean mAlwaysOnByDefault; private final boolean mPickupGestureEnabledByDefault; /** Copied from android.provider.Settings.Secure since these keys are hidden. */ private static final String[] DOZE_SETTINGS = { Loading @@ -65,6 +66,8 @@ public class AmbientDisplayConfiguration { public AmbientDisplayConfiguration(Context context) { mContext = context; mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled); mPickupGestureEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled); } /** @hide */ Loading Loading @@ -95,7 +98,8 @@ public class AmbientDisplayConfiguration { /** @hide */ public boolean pickupGestureEnabled(int user) { return boolSettingDefaultOn(Settings.Secure.DOZE_PICK_UP_GESTURE, user) return boolSetting(Settings.Secure.DOZE_PICK_UP_GESTURE, user, mPickupGestureEnabledByDefault ? 1 : 0) && dozePickupSensorAvailable(); } Loading
core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -9224,6 +9224,14 @@ public final class Settings { */ public static final int DOCK_SETUP_PAUSED = 2; /** * Indicates that the user has been prompted to start dock setup. * One of the possible states for {@link #DOCK_SETUP_STATE}. * * @hide */ public static final int DOCK_SETUP_PROMPTED = 3; /** * Indicates that the user has completed dock setup. * One of the possible states for {@link #DOCK_SETUP_STATE}. Loading @@ -9238,6 +9246,7 @@ public final class Settings { DOCK_SETUP_NOT_STARTED, DOCK_SETUP_STARTED, DOCK_SETUP_PAUSED, DOCK_SETUP_PROMPTED, DOCK_SETUP_COMPLETED }) public @interface DockSetupState { Loading