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

Commit db5f78ed authored by Stanislav Zholnin's avatar Stanislav Zholnin Committed by Android (Google) Code Review
Browse files

Merge "Fix the bug where AppOps information was saved multiple times in...

Merge "Fix the bug where AppOps information was saved multiple times in StatsCompanionService pullAppOps method which was overflowing Binder and prevented any log collection from Device"
parents 32b5ded8 a700d28f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2079,9 +2079,6 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
            HistoricalOps histOps = ops.get(EXTERNAL_STATS_SYNC_TIMEOUT_MILLIS,
                    TimeUnit.MILLISECONDS);

            StatsLogEventWrapper e = new StatsLogEventWrapper(StatsLog.APP_OPS, elapsedNanos,
                    wallClockNanos);

            for (int uidIdx = 0; uidIdx < histOps.getUidCount(); uidIdx++) {
                final HistoricalUidOps uidOps = histOps.getUidOpsAt(uidIdx);
                final int uid = uidOps.getUid();
@@ -2089,6 +2086,9 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
                    final HistoricalPackageOps packageOps = uidOps.getPackageOpsAt(pkgIdx);
                    for (int opIdx = 0; opIdx < packageOps.getOpCount(); opIdx++) {
                        final AppOpsManager.HistoricalOp op  = packageOps.getOpAt(opIdx);
                        StatsLogEventWrapper e = new StatsLogEventWrapper(StatsLog.APP_OPS,
                                elapsedNanos, wallClockNanos);

                        e.writeInt(uid);
                        e.writeString(packageOps.getPackageName());
                        e.writeInt(op.getOpCode());