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

Commit 12954d50 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Only check op in Settings UI

noteOp should only used if the data protected by the app-op was
accessed. If you only want to know the state, use checkOp.

Test: TH
Bug: 136595429
Change-Id: I2b53ad413c10a71feb9c94848aef2f9f38f851d8
parent 87c0179c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class WriteSettingsDetails extends AppInfoWithHeader implements OnPrefere
    }

    private boolean canWriteSettings(String pkgName) {
        int result = mAppOpsManager.noteOpNoThrow(AppOpsManager.OP_WRITE_SETTINGS,
        int result = mAppOpsManager.checkOpNoThrow(AppOpsManager.OP_WRITE_SETTINGS,
                mPackageInfo.applicationInfo.uid, pkgName);
        if (result == AppOpsManager.MODE_ALLOWED) {
            return true;