Add PlatformCompat feature for DocumentUI
- Whitelist PlatformCompat permissions for DocumentsUI
- Add documents-ui-compat-config into Android.bp
Bug: 141600225
Test: build and boot to home
Test: tools/tradefederation/core/tests/run_tradefed_tests.sh \
--class com.google.android.asit.DeviceBootTestTest
Change-Id: Iedf73faf497a4ea055b33f68dc0b7097f306791d
diff --git a/Android.bp b/Android.bp
index 4a1f96e..5e068ee 100644
--- a/Android.bp
+++ b/Android.bp
@@ -481,6 +481,7 @@
"framework-platform-compat-config",
"libcore-platform-compat-config",
"services-platform-compat-config",
+ "documents-ui-compat-config",
],
static_libs: [
// If MimeMap ever becomes its own APEX, then this dependency would need to be removed
diff --git a/data/etc/com.android.documentsui.xml b/data/etc/com.android.documentsui.xml
index 0ffaa21..b6671db 100644
--- a/data/etc/com.android.documentsui.xml
+++ b/data/etc/com.android.documentsui.xml
@@ -18,6 +18,8 @@
<privapp-permissions package="com.android.documentsui">
<permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
- <permission name="android.permission.MODIFY_QUIET_MODE"/>
+ <!-- Permissions required for reading and logging compat changes -->
+ <permission name="android.permission.LOG_COMPAT_CHANGE"/>
+ <permission name="android.permission.READ_COMPAT_CHANGE_CONFIG"/>
</privapp-permissions>
</permissions>