From 89f7de19c3d3a702545371779d4d706c1aaa9241 Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Tue, 30 Jun 2020 01:31:43 +0100 Subject: [PATCH] Promote NO_ISOLATED_STORAGE app op to SystemApi(MODULE_LIBRARIES) This app op was introduced to support --no-isolated-storage instrumentation flag in MediaProvider mainline module. Because it was very late in the release cycle, app op wasn't exposed as @SystemApi in rvc-dev, even though there CTS tests written around it, and MediaProvider module depends on it. To make things fair, expose it as @SystemApi. Test: atest CtsScopedStorageHostTest Bug: 159708202 Change-Id: Ifddf2cb920285eda5f859972937b0f9084fc32a3 --- api/module-lib-current.txt | 8 ++++++++ core/java/android/app/AppOpsManager.java | 4 ++++ non-updatable-api/module-lib-current.txt | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt index 1803be384389d..360e44ff055c2 100644 --- a/api/module-lib-current.txt +++ b/api/module-lib-current.txt @@ -1,4 +1,12 @@ // Signature format: 2.0 +package android.app { + + public class AppOpsManager { + field public static final String OPSTR_NO_ISOLATED_STORAGE = "android:no_isolated_storage"; + } + +} + package android.content.rollback { public class RollbackManagerFrameworkInitializer { diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 3ca5f0deba1bd..b40dd00538466 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -1461,8 +1461,12 @@ public class AppOpsManager { /** * AppOp granted to apps that we are started via {@code am instrument -e --no-isolated-storage} * + *

MediaProvider is the only component (outside of system server) that should care about this + * app op, hence {@code SystemApi.Client.MODULE_LIBRARIES}. + * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final String OPSTR_NO_ISOLATED_STORAGE = "android:no_isolated_storage"; /** {@link #sAppOpsToNote} not initialized yet for this op */ diff --git a/non-updatable-api/module-lib-current.txt b/non-updatable-api/module-lib-current.txt index c8406f199eddb..a5ca196ef5b42 100644 --- a/non-updatable-api/module-lib-current.txt +++ b/non-updatable-api/module-lib-current.txt @@ -1,4 +1,12 @@ // Signature format: 2.0 +package android.app { + + public class AppOpsManager { + field public static final String OPSTR_NO_ISOLATED_STORAGE = "android:no_isolated_storage"; + } + +} + package android.content.rollback { public class RollbackManagerFrameworkInitializer {