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
This commit is contained in:
@@ -108,7 +108,7 @@ public class WriteSettingsDetails extends AppInfoWithHeader implements OnPrefere
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean canWriteSettings(String pkgName) {
|
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);
|
mPackageInfo.applicationInfo.uid, pkgName);
|
||||||
if (result == AppOpsManager.MODE_ALLOWED) {
|
if (result == AppOpsManager.MODE_ALLOWED) {
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user