Merge "Ensure beginTimeMillis is non-negative." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f2193638d7
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user