Remove QUERY_ALL_PACKAGES permission from ThemePicker
Remove QUERY_ALL_PACKAGES permission from ThemePicker by using queries
element in AndroidManifest.
Bug: 185219719
Test: Manual
Change-Id: Id7947b36012667f9af30d099ea7c2852e4f1f0d6
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d5f3c8b..68eb4be 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -8,7 +8,31 @@
<uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_COMPONENT" />
- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
+
+ <queries>
+ <!-- Specific intents Wallpaper picker query for -->
+ <!-- Intent filter with action SET_WALLPAPER -->
+ <intent>
+ <action android:name="android.intent.action.SET_WALLPAPER" />
+ </intent>
+ <!-- Intent filter with action GET_CONTENT and data's mimeType as "image/*" -->
+ <intent>
+ <action android:name="android.intent.action.GET_CONTENT" />
+ <data android:mimeType="image/*" />
+ </intent>
+ <!-- Intent filter with action VIEW -->
+ <intent>
+ <action android:name="android.intent.action.VIEW" />
+ </intent>
+ <!-- Intent filter with action WallpaperService (live wallpaper interface) -->
+ <intent>
+ <action android:name="android.service.wallpaper.WallpaperService" />
+ </intent>
+ <!-- Intent filter with action used to discover partner -->
+ <intent>
+ <action android:name="com.android.launcher3.action.PARTNER_CUSTOMIZATION" />
+ </intent>
+ </queries>
<application
tools:replace="android:icon,android:name"