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

Commit d20eacc0 authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Fix AppOps collection bug.

Confirmed by tests (will be submitted seraprately)
In situation when shell blames app for certain app_op, shell gets
PROXIED count increased while app gets PROXY count increased.

Bug: 143519689
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 10060
Change-Id: I9459c6fd42e8d9b11a8069d185472964b8816a8c
parent a38ba93e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.server.stats.pull;

import static android.app.AppOpsManager.OP_FLAG_SELF;
import static android.app.AppOpsManager.OP_FLAG_TRUSTED_PROXIED;
import static android.app.AppOpsManager.OP_FLAG_TRUSTED_PROXY;
import static android.content.pm.PackageInfo.REQUESTED_PERMISSION_GRANTED;
import static android.content.pm.PermissionInfo.PROTECTION_DANGEROUS;
import static android.os.Debug.getIonHeapsSizeKb;
@@ -187,7 +187,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 int OP_FLAGS_PULLED = OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXY;
    private static final String COMMON_PERMISSION_PREFIX = "android.permission.";

    private final Object mNetworkStatsLock = new Object();