diff options
| author | 2021-05-11 12:03:44 +0100 | |
|---|---|---|
| committer | 2021-05-11 11:06:02 +0000 | |
| commit | 3a2903b945b3c62394ae8df78bf68f3026c4ac0d (patch) | |
| tree | 35e8cf309ae89c555855f36ce5b9965efcfed3dc | |
| parent | f0cf73d84be390fed0cb888afcc4dbccf21fe751 (diff) | |
Fix race condition in DiscreteRegistry test set up.
Fix: 187471134
Test: atest android.app.appops.cts.DiscreteAppopsTest
Change-Id: Ife71625711083edce6505cc3963ba51c7e8ff590
| -rw-r--r-- | services/core/java/com/android/server/appop/HistoricalRegistry.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/appop/HistoricalRegistry.java b/services/core/java/com/android/server/appop/HistoricalRegistry.java index 55560150d53a..35e8d34ce185 100644 --- a/services/core/java/com/android/server/appop/HistoricalRegistry.java +++ b/services/core/java/com/android/server/appop/HistoricalRegistry.java @@ -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) { |