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

Commit 0c46a5ec authored by Nate Myren's avatar Nate Myren Committed by Android Build Coastguard Worker
Browse files

Remove exception for Q- apps from app op validation

Bug: 417987184
Test: atest AppOpMemoryUsageTest
Flag: EXEMPT see bug
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:83315cc41301075335a31674f09a373c64e1ae18
Merged-In: I6f3d47bc2416d3a00d0b13f65370f4de6efe89db
Change-Id: I6f3d47bc2416d3a00d0b13f65370f4de6efe89db
parent da768ae6
Loading
Loading
Loading
Loading
+1 −14
Original line number Original line Diff line number Diff line
@@ -53,7 +53,6 @@ import static android.app.AppOpsManager.SAMPLING_STRATEGY_BOOT_TIME_SAMPLING;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_RARELY_USED;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_RARELY_USED;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_UNIFORM;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_UNIFORM;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_UNIFORM_OPS;
import static android.app.AppOpsManager.SAMPLING_STRATEGY_UNIFORM_OPS;
import static android.app.AppOpsManager.SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE;
import static android.app.AppOpsManager._NUM_OP;
import static android.app.AppOpsManager._NUM_OP;
import static android.app.AppOpsManager.extractFlagsFromKey;
import static android.app.AppOpsManager.extractFlagsFromKey;
import static android.app.AppOpsManager.extractUidStateFromKey;
import static android.app.AppOpsManager.extractUidStateFromKey;
@@ -3937,19 +3936,7 @@ public class AppOpsService extends IAppOpsService.Stub {
                    msg = "package " + packageName + " not found, can't check for "
                    msg = "package " + packageName + " not found, can't check for "
                            + "attributionTag " + attributionTag;
                            + "attributionTag " + attributionTag;
                }
                }

                try {
                    if (!mPlatformCompat.isChangeEnabledByPackageName(
                            SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE, packageName,
                            userId) || !mPlatformCompat.isChangeEnabledByUid(
                                    SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE,
                            callingUid)) {
                        // Do not override tags if overriding is not enabled for this package
                        isAttributionTagValid = true;
                    }
                Slog.e(TAG, msg);
                Slog.e(TAG, msg);
                } catch (RemoteException neverHappens) {
                }
            }
            }
        } finally {
        } finally {
            Binder.restoreCallingIdentity(ident);
            Binder.restoreCallingIdentity(ident);