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

Commit 705840a8 authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Cleanup flag and unused method

Bug: 266831522
Test: TH
Change-Id: I4bed3ceea5ce20facf1f234fdb6d74b3aae93c46
parent 095dd5ac
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -316,11 +316,6 @@ public abstract class DevicePolicyManagerInternal {
     */
    public abstract boolean isUserOrganizationManaged(@UserIdInt int userId);

    /**
     * Returns whether the application exemptions feature flag is enabled.
     */
    public abstract boolean isApplicationExemptionsFlagEnabled();

    /**
     * Returns a map of admin to {@link Bundle} map of restrictions set by the admins for the
     * provided {@code packageName} in the provided {@code userId}
+0 −32
Original line number Diff line number Diff line
@@ -885,10 +885,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            "enable_permission_based_access";
    private static final boolean DEFAULT_VALUE_PERMISSION_BASED_ACCESS_FLAG = false;
    // TODO(b/266831522) remove the flag after rollout.
    private static final String APPLICATION_EXEMPTIONS_FLAG = "application_exemptions";
    private static final boolean DEFAULT_APPLICATION_EXEMPTIONS_FLAG = true;
    private static final int RETRY_COPY_ACCOUNT_ATTEMPTS = 3;
    /**
@@ -3688,26 +3684,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        mDevicePolicyEngine.handleStartUser(userId);
    }
    void pushUserControlDisabledPackagesLocked(int userId) {
        final int targetUserId;
        final ActiveAdmin owner;
        if (getDeviceOwnerUserIdUncheckedLocked() == userId) {
            owner = getDeviceOwnerAdminLocked();
            targetUserId = UserHandle.USER_ALL;
        } else {
            owner = getProfileOwnerAdminLocked(userId);
            targetUserId = userId;
        }
        List<String> protectedPackages = (owner == null || owner.protectedPackages == null)
                ? null : owner.protectedPackages;
        mInjector.binderWithCleanCallingIdentity(() ->
                mInjector.getPackageManagerInternal().setOwnerProtectedPackages(
                        targetUserId, protectedPackages));
        mUsageStatsManagerInternal.setAdminProtectedPackages(new ArraySet(protectedPackages),
                targetUserId);
    }
    void handleUnlockUser(int userId) {
        startOwnerService(userId, "unlock-user");
        mDevicePolicyEngine.handleUnlockUser(userId);
@@ -15911,14 +15887,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            return getDeviceStateCache().isUserOrganizationManaged(userHandle);
        }
        @Override
        public boolean isApplicationExemptionsFlagEnabled() {
            return DeviceConfig.getBoolean(
                    NAMESPACE_DEVICE_POLICY_MANAGER,
                    APPLICATION_EXEMPTIONS_FLAG,
                    DEFAULT_APPLICATION_EXEMPTIONS_FLAG);
        }
        @Override
        public List<Bundle> getApplicationRestrictionsPerAdminForUser(
                String packageName, @UserIdInt int userId) {