Further fix on issue #16013164

Dumb dumb dumb copy/paste error when moving the
uid checking up out of the function.

Change-Id: I01513ccd80750b724dbfa8d9d7d171819c6b959b
This commit is contained in:
Dianne Hackborn
2014-07-22 16:29:04 -07:00
parent 368c5adaf7
commit b64afe1706

View File

@@ -371,11 +371,10 @@ public class AppOpsService extends IAppOpsService.Stub {
@Override
public void setMode(int code, int uid, String packageName, int mode) {
if (Binder.getCallingPid() == Process.myPid()) {
return;
if (Binder.getCallingPid() != Process.myPid()) {
mContext.enforcePermission(android.Manifest.permission.UPDATE_APP_OPS_STATS,
Binder.getCallingPid(), Binder.getCallingUid(), null);
}
mContext.enforcePermission(android.Manifest.permission.UPDATE_APP_OPS_STATS,
Binder.getCallingPid(), Binder.getCallingUid(), null);
verifyIncomingOp(code);
ArrayList<Callback> repCbs = null;
code = AppOpsManager.opToSwitch(code);