Fix race condition in DiscreteRegistry test set up.

Fix: 187471134
Test: atest android.app.appops.cts.DiscreteAppopsTest
Change-Id: Ife71625711083edce6505cc3963ba51c7e8ff590
This commit is contained in:
Stanislav Zholnin
2021-05-11 12:03:44 +01:00
parent f0cf73d84b
commit 3a2903b945

View File

@@ -555,8 +555,6 @@ final class HistoricalRegistry {
}
if (mMode == AppOpsManager.HISTORICAL_MODE_ENABLED_PASSIVE) {
mDiscreteRegistry.setDebugMode(true);
} else {
mDiscreteRegistry.setDebugMode(false);
}
}
if (mBaseSnapshotInterval != baseSnapshotInterval) {
@@ -627,6 +625,7 @@ final class HistoricalRegistry {
}
setHistoryParameters(DEFAULT_MODE, DEFAULT_SNAPSHOT_INTERVAL_MILLIS,
DEFAULT_COMPRESSION_STEP);
mDiscreteRegistry.setDebugMode(false);
}
void clearHistory(int uid, String packageName) {