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

Commit d367370b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix AppOps estimation call time out." into rvc-dev am: d26ded47 am: 9662b11f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11675077

Change-Id: If6257ed81ae10e6154e8debd6b988d3b32f01775
parents 3bccad39 9662b11f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3319,8 +3319,8 @@ public class StatsPullAtomService extends SystemService {
                        public void run() {
                            try {
                                estimateAppOpsSamplingRate();
                            } catch (Exception e) {
                                Slog.e(TAG, "AppOps sampling ratio estimation failed");
                            } catch (Throwable e) {
                                Slog.e(TAG, "AppOps sampling ratio estimation failed: ", e);
                                synchronized (mAppOpsSamplingRateLock) {
                                    mAppOpsSamplingRate = min(mAppOpsSamplingRate, 10);
                                }
@@ -3361,7 +3361,7 @@ public class StatsPullAtomService extends SystemService {
                        Instant.now().minus(1, ChronoUnit.DAYS).toEpochMilli(),
                        Long.MAX_VALUE).setFlags(
                        OP_FLAGS_PULLED).build();
        appOps.getHistoricalOps(histOpsRequest, mContext.getMainExecutor(), ops::complete);
        appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR, ops::complete);
        HistoricalOps histOps = ops.get(EXTERNAL_STATS_SYNC_TIMEOUT_MILLIS,
                TimeUnit.MILLISECONDS);
        List<AppOpEntry> opsList =