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

Commit 81be449b authored by Kholoud Mohamed's avatar Kholoud Mohamed
Browse files

Turn off policy size tracking changes

Bug: 325568907
Test: btest android.devicepolicy.cts.AccessibilityServicesTest
Change-Id: Ie91c3d93595ae25b9a113d2d7a0b8e3be02a8b3c
parent 2ceb1c52
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ final class DevicePolicyEngine {

        synchronized (mLock) {
            PolicyState<V> localPolicyState = getLocalPolicyStateLocked(policyDefinition, userId);
            if (devicePolicySizeTrackingEnabled()) {
            if (devicePolicySizeTrackingEnabled() && false) {
                if (!handleAdminPolicySizeLimit(localPolicyState, enforcingAdmin, value,
                        policyDefinition, userId)) {
                    return;
@@ -350,7 +350,7 @@ final class DevicePolicyEngine {
            }
            PolicyState<V> localPolicyState = getLocalPolicyStateLocked(policyDefinition, userId);

            if (devicePolicySizeTrackingEnabled()) {
            if (devicePolicySizeTrackingEnabled() && false) {
                decreasePolicySizeForAdmin(localPolicyState, enforcingAdmin);
            }

@@ -496,7 +496,7 @@ final class DevicePolicyEngine {

        synchronized (mLock) {
            PolicyState<V> globalPolicyState = getGlobalPolicyStateLocked(policyDefinition);
            if (devicePolicySizeTrackingEnabled()) {
            if (devicePolicySizeTrackingEnabled() && false) {
                if (!handleAdminPolicySizeLimit(globalPolicyState, enforcingAdmin, value,
                        policyDefinition, UserHandle.USER_ALL)) {
                    return;
@@ -568,7 +568,7 @@ final class DevicePolicyEngine {
        synchronized (mLock) {
            PolicyState<V> policyState = getGlobalPolicyStateLocked(policyDefinition);

            if (devicePolicySizeTrackingEnabled()) {
            if (devicePolicySizeTrackingEnabled() && false) {
                decreasePolicySizeForAdmin(policyState, enforcingAdmin);
            }

@@ -1892,7 +1892,7 @@ final class DevicePolicyEngine {

        private void writeEnforcingAdminSizeInner(TypedXmlSerializer serializer)
                throws IOException {
            if (devicePolicySizeTrackingEnabled()) {
            if (devicePolicySizeTrackingEnabled() && false) {
                if (mAdminPolicySize != null) {
                    for (int i = 0; i < mAdminPolicySize.size(); i++) {
                        int userId = mAdminPolicySize.keyAt(i);
@@ -1916,7 +1916,7 @@ final class DevicePolicyEngine {

        private void writeMaxPolicySizeInner(TypedXmlSerializer serializer)
                throws IOException {
            if (!devicePolicySizeTrackingEnabled()) {
            if (!devicePolicySizeTrackingEnabled() || true) {
                return;
            }
            serializer.startTag(/* namespace= */ null, TAG_MAX_POLICY_SIZE_LIMIT);
@@ -2081,7 +2081,7 @@ final class DevicePolicyEngine {

        private void readMaxPolicySizeInner(TypedXmlPullParser parser)
                throws XmlPullParserException, IOException {
            if (!devicePolicySizeTrackingEnabled()) {
            if (!devicePolicySizeTrackingEnabled() || true) {
                return;
            }
            mPolicySizeLimit = parser.getAttributeInt(/* namespace= */ null, ATTR_POLICY_SUM_SIZE);
+2 −2
Original line number Diff line number Diff line
@@ -24235,7 +24235,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    @Override
    public void setMaxPolicyStorageLimit(String callerPackageName, int storageLimit) {
        if (!devicePolicySizeTrackingEnabled()) {
        if (!devicePolicySizeTrackingEnabled() || true) {
            return;
        }
        CallerIdentity caller = getCallerIdentity(callerPackageName);
@@ -24247,7 +24247,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    @Override
    public int getMaxPolicyStorageLimit(String callerPackageName) {
        if (!devicePolicySizeTrackingEnabled()) {
        if (!devicePolicySizeTrackingEnabled() || true) {
            return -1;
        }
        CallerIdentity caller = getCallerIdentity(callerPackageName);