Loading core/java/android/app/admin/DevicePolicyManager.java +0 −28 Original line number Diff line number Diff line Loading @@ -12652,34 +12652,6 @@ public class DevicePolicyManager { return null; } /** * Returns the list of {@link EnforcingAdmin}s who have set this restriction. * * <p>Note that for {@link #POLICY_SUSPEND_PACKAGES} it returns the PO or DO to keep the * behavior the same as before the bug fix for b/192245204. * * <p>This API is only callable by the system UID * * @param userId The user for whom to retrieve the information. * @param restriction The restriction enforced by admins. It could be any user restriction or * policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA} and * {@link DevicePolicyManager#POLICY_DISABLE_SCREEN_CAPTURE}. * * @hide */ public @NonNull Set<EnforcingAdmin> getEnforcingAdminsForRestriction(int userId, @NonNull String restriction) { if (mService != null) { try { return new HashSet<>(mService.getEnforcingAdminsForRestriction( userId, restriction)); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return null; } /** * Hide or unhide packages. When a package is hidden it is unavailable for use, but the data and * actual package file remain. This function can be called by a device owner, profile owner, or core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,6 @@ interface IDevicePolicyManager { Intent createAdminSupportIntent(in String restriction); Bundle getEnforcingAdminAndUserDetails(int userId, String restriction); EnforcingAdmin getEnforcingAdmin(int userId, String identifier); List<EnforcingAdmin> getEnforcingAdminsForRestriction(int userId, String restriction); boolean setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden, boolean parent); boolean isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean parent); Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −7 Original line number Diff line number Diff line Loading @@ -16507,13 +16507,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { return getEnforcingAdminInternal(userId, identifier); } @Override public List<android.app.admin.EnforcingAdmin> getEnforcingAdminsForRestriction( int userId, String restriction) { Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity())); return new ArrayList<>(getEnforcingAdminsForRestrictionInternal(userId, restriction)); } /** * @param restriction The restriction enforced by admin. It could be any user restriction or * policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA} and Loading
core/java/android/app/admin/DevicePolicyManager.java +0 −28 Original line number Diff line number Diff line Loading @@ -12652,34 +12652,6 @@ public class DevicePolicyManager { return null; } /** * Returns the list of {@link EnforcingAdmin}s who have set this restriction. * * <p>Note that for {@link #POLICY_SUSPEND_PACKAGES} it returns the PO or DO to keep the * behavior the same as before the bug fix for b/192245204. * * <p>This API is only callable by the system UID * * @param userId The user for whom to retrieve the information. * @param restriction The restriction enforced by admins. It could be any user restriction or * policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA} and * {@link DevicePolicyManager#POLICY_DISABLE_SCREEN_CAPTURE}. * * @hide */ public @NonNull Set<EnforcingAdmin> getEnforcingAdminsForRestriction(int userId, @NonNull String restriction) { if (mService != null) { try { return new HashSet<>(mService.getEnforcingAdminsForRestriction( userId, restriction)); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return null; } /** * Hide or unhide packages. When a package is hidden it is unavailable for use, but the data and * actual package file remain. This function can be called by a device owner, profile owner, or
core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,6 @@ interface IDevicePolicyManager { Intent createAdminSupportIntent(in String restriction); Bundle getEnforcingAdminAndUserDetails(int userId, String restriction); EnforcingAdmin getEnforcingAdmin(int userId, String identifier); List<EnforcingAdmin> getEnforcingAdminsForRestriction(int userId, String restriction); boolean setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden, boolean parent); boolean isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean parent); Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −7 Original line number Diff line number Diff line Loading @@ -16507,13 +16507,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { return getEnforcingAdminInternal(userId, identifier); } @Override public List<android.app.admin.EnforcingAdmin> getEnforcingAdminsForRestriction( int userId, String restriction) { Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity())); return new ArrayList<>(getEnforcingAdminsForRestrictionInternal(userId, restriction)); } /** * @param restriction The restriction enforced by admin. It could be any user restriction or * policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA} and