Show Launcher's widget picker in an activity.
Bug: 307306823
Test: atest Launcher3Tests
Flag: NA
Change-Id: I28ef731abcdf1bd44c66366d42a135912dbcc5be
diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml
index 82f8ebe..db46508 100644
--- a/quickstep/AndroidManifest.xml
+++ b/quickstep/AndroidManifest.xml
@@ -43,6 +43,10 @@
<uses-permission android:name="android.permission.SYSTEM_APPLICATION_OVERLAY" />
+ <!-- Permission required to start a WidgetPickerActivity. -->
+ <permission android:name="${packageName}.permission.START_WIDGET_PICKER_ACTIVITY"
+ android:protectionLevel="signature|privileged" />
+
<application android:backupAgent="com.android.launcher3.LauncherBackupAgent"
android:fullBackupOnly="true"
android:fullBackupContent="@xml/backupscheme"
@@ -133,6 +137,20 @@
</intent-filter>
</activity>
+ <activity android:name="com.android.launcher3.WidgetPickerActivity"
+ android:theme="@style/WidgetPickerActivityTheme"
+ android:excludeFromRecents="true"
+ android:autoRemoveFromRecents="true"
+ android:showOnLockScreen="true"
+ android:launchMode="singleTop"
+ android:exported="true"
+ android:permission="android.permission.START_WIDGET_PICKER_ACTIVITY">
+ <intent-filter>
+ <action android:name="android.intent.action.PICK" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
</application>
</manifest>