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

Commit 2a81a231 authored by Sam Mortimer's avatar Sam Mortimer
Browse files

Frameworks AppOps: fix allow/reject counting

Was missing from the original counters commit:
http://review.cyanogenmod.org/#/c/57352/

Change-Id: I9c180ff132077f21426a36f2ceb7d23a054d7ae4
parent 37820a16
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -600,12 +600,14 @@ public class AppOpsService extends IAppOpsService.Stub {
                if (DEBUG) Log.d(TAG, "noteOperation: reject #" + op.mode + " for code "
                        + switchCode + " (" + code + ") uid " + uid + " package " + packageName);
                op.rejectTime = System.currentTimeMillis();
                op.ignoredCount++;
                return switchOp.mode;
            }
            if (DEBUG) Log.d(TAG, "noteOperation: allowing code " + code + " uid " + uid
                    + " package " + packageName);
            op.time = System.currentTimeMillis();
            op.rejectTime = 0;
            op.allowedCount++;
            return AppOpsManager.MODE_ALLOWED;
        }
    }
@@ -629,6 +631,7 @@ public class AppOpsService extends IAppOpsService.Stub {
                if (DEBUG) Log.d(TAG, "startOperation: reject #" + op.mode + " for code "
                        + switchCode + " (" + code + ") uid " + uid + " package " + packageName);
                op.rejectTime = System.currentTimeMillis();
                op.ignoredCount++;
                return switchOp.mode;
            }
            if (DEBUG) Log.d(TAG, "startOperation: allowing code " + code + " uid " + uid
@@ -636,6 +639,7 @@ public class AppOpsService extends IAppOpsService.Stub {
            if (op.nesting == 0) {
                op.time = System.currentTimeMillis();
                op.rejectTime = 0;
                op.allowedCount++;
                op.duration = -1;
            }
            op.nesting++;