am 07116b12: am 2c89b4b3: am dc4a88f7: Merge "Further fix on issue #16013164" into lmp-dev

* commit '07116b128e16169c990d973d3fafed3a9200a26e':
  Further fix on issue #16013164
This commit is contained in:
Dianne Hackborn
2014-07-23 01:40:31 +00:00
committed by Android Git Automerger

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);