diff --git a/api/current.txt b/api/current.txt index fcf927afc0267..4b90ed12910a5 100644 --- a/api/current.txt +++ b/api/current.txt @@ -6891,7 +6891,7 @@ package android.app.admin { method public int getMaximumFailedPasswordsForWipe(@Nullable android.content.ComponentName); method public long getMaximumTimeToLock(@Nullable android.content.ComponentName); method @NonNull public java.util.List getMeteredDataDisabledPackages(@NonNull android.content.ComponentName); - method @ColorInt public int getOrganizationColor(@NonNull android.content.ComponentName); + method @Deprecated @ColorInt public int getOrganizationColor(@NonNull android.content.ComponentName); method @Nullable public CharSequence getOrganizationName(@NonNull android.content.ComponentName); method public java.util.List getOverrideApns(@NonNull android.content.ComponentName); method @NonNull public android.app.admin.DevicePolicyManager getParentProfileInstance(@NonNull android.content.ComponentName); @@ -7023,7 +7023,7 @@ package android.app.admin { method public void setMaximumTimeToLock(@NonNull android.content.ComponentName, long); method @NonNull public java.util.List setMeteredDataDisabledPackages(@NonNull android.content.ComponentName, @NonNull java.util.List); method public void setNetworkLoggingEnabled(@Nullable android.content.ComponentName, boolean); - method public void setOrganizationColor(@NonNull android.content.ComponentName, int); + method @Deprecated public void setOrganizationColor(@NonNull android.content.ComponentName, int); method public void setOrganizationName(@NonNull android.content.ComponentName, @Nullable CharSequence); method public void setOverrideApnsEnabled(@NonNull android.content.ComponentName, boolean); method @NonNull public String[] setPackagesSuspended(@NonNull android.content.ComponentName, @NonNull String[], boolean); diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 8073982ef7451..9a89dadbc8abb 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -10258,7 +10258,10 @@ public class DevicePolicyManager { * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param color The 24bit (0xRRGGBB) representation of the color to be used. * @throws SecurityException if {@code admin} is not a profile owner. + * @deprecated From {@link android.os.Build.VERSION_CODES#R}, the organization color is never + * used as the background color of the confirm credentials screen. */ + @Deprecated public void setOrganizationColor(@NonNull ComponentName admin, int color) { throwIfParentInstance("setOrganizationColor"); try { @@ -10280,7 +10283,10 @@ public class DevicePolicyManager { * @RequiresPermission(allOf = { * Manifest.permission.MANAGE_USERS, * Manifest.permission.INTERACT_ACROSS_USERS_FULL}) + * @deprecated From {@link android.os.Build.VERSION_CODES#R}, the organization color is never + * used as the background color of the confirm credentials screen. */ + @Deprecated public void setOrganizationColorForUser(@ColorInt int color, @UserIdInt int userId) { try { // always enforce alpha channel to have 100% opacity @@ -10298,7 +10304,10 @@ public class DevicePolicyManager { * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @return The 24bit (0xRRGGBB) representation of the color to be used. * @throws SecurityException if {@code admin} is not a profile owner. + * @deprecated From {@link android.os.Build.VERSION_CODES#R}, the organization color is never + * used as the background color of the confirm credentials screen. */ + @Deprecated public @ColorInt int getOrganizationColor(@NonNull ComponentName admin) { throwIfParentInstance("getOrganizationColor"); try { @@ -10314,7 +10323,10 @@ public class DevicePolicyManager { * * @param userHandle The user id of the user we're interested in. * @return The 24bit (0xRRGGBB) representation of the color to be used. + * @deprecated From {@link android.os.Build.VERSION_CODES#R}, the organization color is never + * used as the background color of the confirm credentials screen. */ + @Deprecated public @ColorInt int getOrganizationColorForUser(int userHandle) { try { return mService.getOrganizationColorForUser(userHandle);