Loading core/java/android/app/admin/DevicePolicyManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.StringDef; import android.annotation.SupportsCoexistence; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemService; Loading Loading @@ -8596,6 +8597,7 @@ public class DevicePolicyManager { * primary user, or a profile owner of an organization-owned managed profile or a holder of the * permission {@link android.Manifest.permission#SET_TIME_ZONE}. */ @SupportsCoexistence @RequiresPermission(value = SET_TIME_ZONE, conditional = true) public void setAutoTimeZoneEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setAutoTimeZone"); Loading Loading @@ -9665,6 +9667,7 @@ public class DevicePolicyManager { * @param activity The Activity that is added as default intent handler. * @throws SecurityException if {@code admin} is not a device or profile owner. */ @SupportsCoexistence public void addPersistentPreferredActivity(@NonNull ComponentName admin, IntentFilter filter, @NonNull ComponentName activity) { throwIfParentInstance("addPersistentPreferredActivity"); Loading Loading @@ -10624,6 +10627,7 @@ public class DevicePolicyManager { * profile owner of an organization-owned managed profile and the * list of permitted input method package names is not null or empty. */ @SupportsCoexistence public boolean setPermittedInputMethods( @NonNull ComponentName admin, List<String> packageNames) { if (mService != null) { Loading Loading @@ -11696,6 +11700,7 @@ public class DevicePolicyManager { * @see DeviceAdminReceiver#onLockTaskModeExiting(Context, Intent) * @see UserManager#DISALLOW_CREATE_WINDOWS */ @SupportsCoexistence public void setLockTaskPackages(@NonNull ComponentName admin, @NonNull String[] packages) throws SecurityException { throwIfParentInstance("setLockTaskPackages"); Loading Loading @@ -11764,6 +11769,7 @@ public class DevicePolicyManager { * affiliated user or profile, or the profile owner when no device owner is set. * @see #isAffiliatedUser **/ @SupportsCoexistence public void setLockTaskFeatures(@NonNull ComponentName admin, @LockTaskFeature int flags) { throwIfParentInstance("setLockTaskFeatures"); if (mService != null) { Loading Loading @@ -12267,6 +12273,7 @@ public class DevicePolicyManager { * @see #setDelegatedScopes * @see #DELEGATION_BLOCK_UNINSTALL */ @SupportsCoexistence public void setUninstallBlocked(@Nullable ComponentName admin, String packageName, boolean uninstallBlocked) { throwIfParentInstance("setUninstallBlocked"); Loading Loading @@ -12755,6 +12762,7 @@ public class DevicePolicyManager { * @see #setDelegatedScopes * @see #DELEGATION_PERMISSION_GRANT */ @SupportsCoexistence public boolean setPermissionGrantState(@NonNull ComponentName admin, @NonNull String packageName, @NonNull String permission, @PermissionGrantState int grantState) { Loading Loading @@ -15301,6 +15309,7 @@ public class DevicePolicyManager { * @param packages The package names for the apps. * @throws SecurityException if {@code admin} is not a device owner or a profile owner. */ @SupportsCoexistence public void setUserControlDisabledPackages(@NonNull ComponentName admin, @NonNull List<String> packages) { throwIfParentInstance("setUserControlDisabledPackages"); Loading
core/java/android/app/admin/DevicePolicyManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.StringDef; import android.annotation.SupportsCoexistence; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemService; Loading Loading @@ -8596,6 +8597,7 @@ public class DevicePolicyManager { * primary user, or a profile owner of an organization-owned managed profile or a holder of the * permission {@link android.Manifest.permission#SET_TIME_ZONE}. */ @SupportsCoexistence @RequiresPermission(value = SET_TIME_ZONE, conditional = true) public void setAutoTimeZoneEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setAutoTimeZone"); Loading Loading @@ -9665,6 +9667,7 @@ public class DevicePolicyManager { * @param activity The Activity that is added as default intent handler. * @throws SecurityException if {@code admin} is not a device or profile owner. */ @SupportsCoexistence public void addPersistentPreferredActivity(@NonNull ComponentName admin, IntentFilter filter, @NonNull ComponentName activity) { throwIfParentInstance("addPersistentPreferredActivity"); Loading Loading @@ -10624,6 +10627,7 @@ public class DevicePolicyManager { * profile owner of an organization-owned managed profile and the * list of permitted input method package names is not null or empty. */ @SupportsCoexistence public boolean setPermittedInputMethods( @NonNull ComponentName admin, List<String> packageNames) { if (mService != null) { Loading Loading @@ -11696,6 +11700,7 @@ public class DevicePolicyManager { * @see DeviceAdminReceiver#onLockTaskModeExiting(Context, Intent) * @see UserManager#DISALLOW_CREATE_WINDOWS */ @SupportsCoexistence public void setLockTaskPackages(@NonNull ComponentName admin, @NonNull String[] packages) throws SecurityException { throwIfParentInstance("setLockTaskPackages"); Loading Loading @@ -11764,6 +11769,7 @@ public class DevicePolicyManager { * affiliated user or profile, or the profile owner when no device owner is set. * @see #isAffiliatedUser **/ @SupportsCoexistence public void setLockTaskFeatures(@NonNull ComponentName admin, @LockTaskFeature int flags) { throwIfParentInstance("setLockTaskFeatures"); if (mService != null) { Loading Loading @@ -12267,6 +12273,7 @@ public class DevicePolicyManager { * @see #setDelegatedScopes * @see #DELEGATION_BLOCK_UNINSTALL */ @SupportsCoexistence public void setUninstallBlocked(@Nullable ComponentName admin, String packageName, boolean uninstallBlocked) { throwIfParentInstance("setUninstallBlocked"); Loading Loading @@ -12755,6 +12762,7 @@ public class DevicePolicyManager { * @see #setDelegatedScopes * @see #DELEGATION_PERMISSION_GRANT */ @SupportsCoexistence public boolean setPermissionGrantState(@NonNull ComponentName admin, @NonNull String packageName, @NonNull String permission, @PermissionGrantState int grantState) { Loading Loading @@ -15301,6 +15309,7 @@ public class DevicePolicyManager { * @param packages The package names for the apps. * @throws SecurityException if {@code admin} is not a device owner or a profile owner. */ @SupportsCoexistence public void setUserControlDisabledPackages(@NonNull ComponentName admin, @NonNull List<String> packages) { throwIfParentInstance("setUserControlDisabledPackages");