Loading core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -11394,7 +11394,7 @@ package android.content { public class RestrictionsManager { method public static android.os.Bundle convertRestrictionsToBundle(java.util.List<android.content.RestrictionEntry>); method public android.content.Intent createLocalApprovalIntent(); method @Deprecated public android.os.Bundle getApplicationRestrictions(); method public android.os.Bundle getApplicationRestrictions(); method @NonNull @WorkerThread public java.util.List<android.os.Bundle> getApplicationRestrictionsPerAdmin(); method public java.util.List<android.content.RestrictionEntry> getManifestRestrictions(String); method public boolean hasRestrictionsProvider(); Loading Loading @@ -33858,7 +33858,7 @@ package android.os { public class UserManager { method public static android.content.Intent createUserCreationIntent(@Nullable String, @Nullable String, @Nullable String, @Nullable android.os.PersistableBundle); method @Deprecated @WorkerThread public android.os.Bundle getApplicationRestrictions(String); method @WorkerThread public android.os.Bundle getApplicationRestrictions(String); method public long getSerialNumberForUser(android.os.UserHandle); method @RequiresPermission(anyOf={"android.permission.MANAGE_USERS", "android.permission.CREATE_USERS"}) public int getUserCount(); method public long getUserCreationTime(android.os.UserHandle); core/java/android/content/RestrictionsManager.java +9 −7 Original line number Diff line number Diff line Loading @@ -427,11 +427,12 @@ public class RestrictionsManager { * @return the application restrictions as a Bundle. Returns null if there * are no restrictions. * * @deprecated Use {@link #getApplicationRestrictionsPerAdmin} instead. * Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, it is * possible for there to be multiple managing agents on the device with the ability to set * restrictions. This API will only to return the restrictions set by device policy controllers * (DPCs) * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. a Device Policy Controller (DPC) and a Supervision admin. * This API will only return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * * @see DevicePolicyManager */ Loading @@ -453,8 +454,8 @@ public class RestrictionsManager { * stable between multiple calls. * * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * * <p>Each {@link Bundle} consists of key-value pairs, as defined by the application, * where the types of values may be: Loading @@ -471,6 +472,7 @@ public class RestrictionsManager { * package. Returns an empty {@link List} if there are no saved restrictions. * * @see UserManager#KEY_RESTRICTIONS_PENDING * @see DevicePolicyManager */ @WorkerThread @UserHandleAware Loading core/java/android/os/UserManager.java +10 −8 Original line number Diff line number Diff line Loading @@ -5612,16 +5612,15 @@ public class UserManager { * * @see #KEY_RESTRICTIONS_PENDING * * @deprecated Use * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * This API will only to return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, it is * possible for there to be multiple managing agents on the device with the ability to set * restrictions. This API will only to return the restrictions set by device policy controllers * (DPCs) * * @see DevicePolicyManager */ @Deprecated @WorkerThread @UserHandleAware(enabledSinceTargetSdkVersion = Build.VERSION_CODES.TIRAMISU) public Bundle getApplicationRestrictions(String packageName) { Loading @@ -5634,12 +5633,15 @@ public class UserManager { } /** * @deprecated Use * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * This API will only to return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * * @hide */ @Deprecated @WorkerThread public Bundle getApplicationRestrictions(String packageName, UserHandle user) { try { Loading services/core/java/com/android/server/pm/UserManagerService.java +10 −6 Original line number Diff line number Diff line Loading @@ -5850,20 +5850,24 @@ public class UserManagerService extends IUserManager.Stub { } /** * @deprecated Use {@link * android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. This API will only to return * the restrictions set by the DPCs. To retrieve restrictions set by all agents, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. */ @Deprecated @Override public Bundle getApplicationRestrictions(String packageName) { return getApplicationRestrictionsForUser(packageName, UserHandle.getCallingUserId()); } /** * @deprecated Use {@link * android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. This API will only to return * the restrictions set by the DPCs. To retrieve restrictions set by all agents, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. */ @Deprecated @Override public Bundle getApplicationRestrictionsForUser(String packageName, @UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId Loading Loading
core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -11394,7 +11394,7 @@ package android.content { public class RestrictionsManager { method public static android.os.Bundle convertRestrictionsToBundle(java.util.List<android.content.RestrictionEntry>); method public android.content.Intent createLocalApprovalIntent(); method @Deprecated public android.os.Bundle getApplicationRestrictions(); method public android.os.Bundle getApplicationRestrictions(); method @NonNull @WorkerThread public java.util.List<android.os.Bundle> getApplicationRestrictionsPerAdmin(); method public java.util.List<android.content.RestrictionEntry> getManifestRestrictions(String); method public boolean hasRestrictionsProvider(); Loading Loading @@ -33858,7 +33858,7 @@ package android.os { public class UserManager { method public static android.content.Intent createUserCreationIntent(@Nullable String, @Nullable String, @Nullable String, @Nullable android.os.PersistableBundle); method @Deprecated @WorkerThread public android.os.Bundle getApplicationRestrictions(String); method @WorkerThread public android.os.Bundle getApplicationRestrictions(String); method public long getSerialNumberForUser(android.os.UserHandle); method @RequiresPermission(anyOf={"android.permission.MANAGE_USERS", "android.permission.CREATE_USERS"}) public int getUserCount(); method public long getUserCreationTime(android.os.UserHandle);
core/java/android/content/RestrictionsManager.java +9 −7 Original line number Diff line number Diff line Loading @@ -427,11 +427,12 @@ public class RestrictionsManager { * @return the application restrictions as a Bundle. Returns null if there * are no restrictions. * * @deprecated Use {@link #getApplicationRestrictionsPerAdmin} instead. * Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, it is * possible for there to be multiple managing agents on the device with the ability to set * restrictions. This API will only to return the restrictions set by device policy controllers * (DPCs) * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. a Device Policy Controller (DPC) and a Supervision admin. * This API will only return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * * @see DevicePolicyManager */ Loading @@ -453,8 +454,8 @@ public class RestrictionsManager { * stable between multiple calls. * * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * * <p>Each {@link Bundle} consists of key-value pairs, as defined by the application, * where the types of values may be: Loading @@ -471,6 +472,7 @@ public class RestrictionsManager { * package. Returns an empty {@link List} if there are no saved restrictions. * * @see UserManager#KEY_RESTRICTIONS_PENDING * @see DevicePolicyManager */ @WorkerThread @UserHandleAware Loading
core/java/android/os/UserManager.java +10 −8 Original line number Diff line number Diff line Loading @@ -5612,16 +5612,15 @@ public class UserManager { * * @see #KEY_RESTRICTIONS_PENDING * * @deprecated Use * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * This API will only to return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, it is * possible for there to be multiple managing agents on the device with the ability to set * restrictions. This API will only to return the restrictions set by device policy controllers * (DPCs) * * @see DevicePolicyManager */ @Deprecated @WorkerThread @UserHandleAware(enabledSinceTargetSdkVersion = Build.VERSION_CODES.TIRAMISU) public Bundle getApplicationRestrictions(String packageName) { Loading @@ -5634,12 +5633,15 @@ public class UserManager { } /** * @deprecated Use * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing apps on the device with the ability to set * restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin. * This API will only to return the restrictions set by the DPCs. To retrieve restrictions * set by all managing apps, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * * @hide */ @Deprecated @WorkerThread public Bundle getApplicationRestrictions(String packageName, UserHandle user) { try { Loading
services/core/java/com/android/server/pm/UserManagerService.java +10 −6 Original line number Diff line number Diff line Loading @@ -5850,20 +5850,24 @@ public class UserManagerService extends IUserManager.Stub { } /** * @deprecated Use {@link * android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. This API will only to return * the restrictions set by the DPCs. To retrieve restrictions set by all agents, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. */ @Deprecated @Override public Bundle getApplicationRestrictions(String packageName) { return getApplicationRestrictionsForUser(packageName, UserHandle.getCallingUserId()); } /** * @deprecated Use {@link * android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. * <p>Starting from Android version {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, * it is possible for there to be multiple managing agents on the device with the ability to set * restrictions, e.g. an Enterprise DPC and a Supervision admin. This API will only to return * the restrictions set by the DPCs. To retrieve restrictions set by all agents, use * {@link android.content.RestrictionsManager#getApplicationRestrictionsPerAdmin} instead. */ @Deprecated @Override public Bundle getApplicationRestrictionsForUser(String packageName, @UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId Loading