diff options
| author | 2019-06-28 21:06:12 -0700 | |
|---|---|---|
| committer | 2019-06-28 21:06:12 -0700 | |
| commit | 92eb0205a23658d5f188cf536b237a56de0eb77d (patch) | |
| tree | eddb52052a26ed1e7224842eb0c702c86459f476 | |
| parent | 45983c90c25dd3b0ba7362d79b6b856182473d13 (diff) | |
| parent | 4f7f78cce51a131db4b9dee5c946e1a34544cb55 (diff) | |
Merge "Disable historical appops" into qt-dev am: 16128cc7a2
am: 4f7f78cce5
Change-Id: I0ebc8196a2b8cfbd45cb77b2e3affc2b5e649888
| -rw-r--r-- | services/core/java/com/android/server/appop/HistoricalRegistry.java | 6 | ||||
| -rw-r--r-- | services/tests/servicestests/src/com/android/server/appop/AppOpsServiceTest.java | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/appop/HistoricalRegistry.java b/services/core/java/com/android/server/appop/HistoricalRegistry.java index 9cf342c0e4fb..35fbfe1d4044 100644 --- a/services/core/java/com/android/server/appop/HistoricalRegistry.java +++ b/services/core/java/com/android/server/appop/HistoricalRegistry.java @@ -150,9 +150,11 @@ final class HistoricalRegistry { /** * Whether history is enabled. + * + * <p>The feature is permanently disabled in Android Q */ @GuardedBy("mInMemoryLock") - private int mMode = AppOpsManager.HISTORICAL_MODE_ENABLED_ACTIVE; + private final int mMode = AppOpsManager.HISTORICAL_MODE_DISABLED; /** * This granularity has been chosen to allow clean delineation for intervals @@ -451,6 +453,7 @@ final class HistoricalRegistry { void setHistoryParameters(@HistoricalMode int mode, long baseSnapshotInterval, long intervalCompressionMultiplier) { + /* synchronized (mOnDiskLock) { synchronized (mInMemoryLock) { // NOTE: We allow this call if persistence is not initialized as @@ -479,6 +482,7 @@ final class HistoricalRegistry { } } } + */ } void offsetHistory(long offsetMillis) { diff --git a/services/tests/servicestests/src/com/android/server/appop/AppOpsServiceTest.java b/services/tests/servicestests/src/com/android/server/appop/AppOpsServiceTest.java index 552058f6e8c2..71661452d800 100644 --- a/services/tests/servicestests/src/com/android/server/appop/AppOpsServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/appop/AppOpsServiceTest.java @@ -46,6 +46,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -242,6 +243,7 @@ public class AppOpsServiceTest { assertThat(getLoggedOps()).isNull(); } + @Ignore("Historical appops are disabled in Android Q") @Test public void testPackageRemovedHistoricalOps() throws InterruptedException { mAppOpsService.setMode(OP_READ_SMS, mMyUid, mMyPackageName, MODE_ALLOWED); |