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

Commit 6703323c authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Remove separate OpIds for logging and enforce op ids instead.

Bug: 143519689
Test: atest UidAtomTests
Change-Id: Ia1897c9c2ffa11547ec09f899a45cfed9b7b0d5d
parent ef66c5fa
Loading
Loading
Loading
Loading
+120 −226

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -1705,7 +1705,7 @@ public final class ActiveServices {
                    if (acceptances > 0 ||  rejections > 0) {
                    if (acceptances > 0 ||  rejections > 0) {
                        FrameworkStatsLog.write(
                        FrameworkStatsLog.write(
                                FrameworkStatsLog.FOREGROUND_SERVICE_APP_OP_SESSION_ENDED,
                                FrameworkStatsLog.FOREGROUND_SERVICE_APP_OP_SESSION_ENDED,
                                mProcessRecord.uid, AppOpsManager.opToLoggingId(op),
                                mProcessRecord.uid, op,
                                modeToEnum(mAppOpModes.get(op)),
                                modeToEnum(mAppOpModes.get(op)),
                                acceptances, rejections
                                acceptances, rejections
                        );
                        );
+2 −2
Original line number Original line Diff line number Diff line
@@ -2901,7 +2901,7 @@ public class StatsPullAtomService extends SystemService {
                        e.setAtomId(atomTag);
                        e.setAtomId(atomTag);
                        e.writeInt(uid);
                        e.writeInt(uid);
                        e.writeString(packageOps.getPackageName());
                        e.writeString(packageOps.getPackageName());
                        e.writeInt(op.getLoggingOpCode());
                        e.writeInt(op.getOpCode());
                        e.writeLong(op.getForegroundAccessCount(OP_FLAGS_PULLED));
                        e.writeLong(op.getForegroundAccessCount(OP_FLAGS_PULLED));
                        e.writeLong(op.getBackgroundAccessCount(OP_FLAGS_PULLED));
                        e.writeLong(op.getBackgroundAccessCount(OP_FLAGS_PULLED));
                        e.writeLong(op.getForegroundRejectCount(OP_FLAGS_PULLED));
                        e.writeLong(op.getForegroundRejectCount(OP_FLAGS_PULLED));
@@ -3044,7 +3044,7 @@ public class StatsPullAtomService extends SystemService {
        if (atomTag == FrameworkStatsLog.ATTRIBUTED_APP_OPS) {
        if (atomTag == FrameworkStatsLog.ATTRIBUTED_APP_OPS) {
            e.writeString(attributionTag);
            e.writeString(attributionTag);
        }
        }
        e.writeInt(op.getLoggingOpCode());
        e.writeInt(op.getOpCode());
        e.writeLong(op.getForegroundAccessCount(OP_FLAGS_PULLED));
        e.writeLong(op.getForegroundAccessCount(OP_FLAGS_PULLED));
        e.writeLong(op.getBackgroundAccessCount(OP_FLAGS_PULLED));
        e.writeLong(op.getBackgroundAccessCount(OP_FLAGS_PULLED));
        e.writeLong(op.getForegroundRejectCount(OP_FLAGS_PULLED));
        e.writeLong(op.getForegroundRejectCount(OP_FLAGS_PULLED));