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

Commit 529f2402 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:c4287772ec8b80b3d1b456a8f5339b8e89506a08
Merged-In: I6f3d47bc2416d3a00d0b13f65370f4de6efe89db
Change-Id: I6f3d47bc2416d3a00d0b13f65370f4de6efe89db
parent e086bd9b
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -54,7 +54,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_UNIFORM;
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.UID_STATE_NONEXISTENT;
import static android.app.AppOpsManager.WATCH_FOREGROUND_CHANGES;
import static android.app.AppOpsManager._NUM_OP;
@@ -4692,19 +4691,7 @@ public class AppOpsService extends IAppOpsService.Stub {
                    msg = "package " + packageName + " not found, can't check for "
                            + "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);
                } catch (RemoteException neverHappens) {
                }
            }
        } finally {
            Binder.restoreCallingIdentity(ident);