Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31cc60aa authored by Irem Uguz's avatar Irem Uguz Committed by Android (Google) Code Review
Browse files

Merge "Delete unused getEnforcingAdminsForRestriction function" into main

parents 5898a544 9b25a2f2
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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);

+0 −7
Original line number Diff line number Diff line
@@ -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