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

Commit 395262cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Trim "android.permission." from permission name to reduce reporting footprint." into rvc-dev

parents 426b08e2 dbcf85e5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ public class StatsPullAtomService extends SystemService {
    private static final int MAX_BATTERY_STATS_HELPER_FREQUENCY_MS = 1000;
    private static final int CPU_TIME_PER_THREAD_FREQ_MAX_NUM_FREQUENCIES = 8;
    private static final int OP_FLAGS_PULLED = OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXIED;
    private static final String COMMON_PERMISSION_PREFIX = "android.permission.";

    private final Object mNetworkStatsLock = new Object();
    @GuardedBy("mNetworkStatsLock")
@@ -2627,6 +2628,10 @@ public class StatsPullAtomService extends SystemService {
                            continue;
                        }

                        if (permName.startsWith(COMMON_PERMISSION_PREFIX)) {
                            permName = permName.substring(COMMON_PERMISSION_PREFIX.length());
                        }

                        StatsEvent.Builder e = StatsEvent.newBuilder();
                        e.setAtomId(atomTag);
                        e.writeString(permName);