Merge "Ensure beginTimeMillis is non-negative." into rvc-dev am: f2193638d7 am: 52bac0ab85

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

Change-Id: I4d41fb84f0970ea622b4c9457fd3b3db82558bdc
This commit is contained in:
TreeHugger Robot
2020-06-09 06:43:43 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 2 deletions

View File

@@ -6035,7 +6035,7 @@ public class AppOpsService extends IAppOpsService.Stub {
List<String> runtimeAppOpsList = getRuntimeAppOpsList(); List<String> runtimeAppOpsList = getRuntimeAppOpsList();
AppOpsManager.HistoricalOpsRequest histOpsRequest = AppOpsManager.HistoricalOpsRequest histOpsRequest =
new AppOpsManager.HistoricalOpsRequest.Builder( new AppOpsManager.HistoricalOpsRequest.Builder(
Instant.now().minus(7, ChronoUnit.DAYS).toEpochMilli(), Math.max(Instant.now().minus(7, ChronoUnit.DAYS).toEpochMilli(), 0),
Long.MAX_VALUE).setOpNames(runtimeAppOpsList).setFlags( Long.MAX_VALUE).setOpNames(runtimeAppOpsList).setFlags(
OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXIED).build(); OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXIED).build();
appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR, appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR,

View File

@@ -3519,7 +3519,7 @@ public class StatsPullAtomService extends SystemService {
CompletableFuture<HistoricalOps> ops = new CompletableFuture<>(); CompletableFuture<HistoricalOps> ops = new CompletableFuture<>();
HistoricalOpsRequest histOpsRequest = HistoricalOpsRequest histOpsRequest =
new HistoricalOpsRequest.Builder( new HistoricalOpsRequest.Builder(
Instant.now().minus(1, ChronoUnit.DAYS).toEpochMilli(), Math.max(Instant.now().minus(1, ChronoUnit.DAYS).toEpochMilli(), 0),
Long.MAX_VALUE).setFlags( Long.MAX_VALUE).setFlags(
OP_FLAGS_PULLED).build(); OP_FLAGS_PULLED).build();
appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR, ops::complete); appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR, ops::complete);