Merge "Ensure beginTimeMillis is non-negative." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-09 06:20:00 +00:00
committed by Android (Google) Code Review
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();
AppOpsManager.HistoricalOpsRequest histOpsRequest =
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(
OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXIED).build();
appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR,

View File

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