Move Note Shortcut from Settings to SystemUI
* Moves the Note Shortcut showed on Widget Picker back to SystemUI.
* By placing everything inside SystemUI, we do not need to give special
privileges to System apps to by-pass any shortcut checks. That was
required due to multi-process communication.
Test: atest SystemUITests:NoteTaskControllerTest
Flag: not needed
Fixes: b/280431176
Change-Id: I8239e31a3767959f8ad9beeaefe6528f7fedae99
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index a27f113..88601c7 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -969,6 +969,22 @@
android:permission="android.permission.BIND_JOB_SERVICE"/>
<!-- region Note Task -->
+ <activity
+ android:name=".notetask.shortcut.CreateNoteTaskShortcutActivity"
+ android:enabled="false"
+ android:exported="true"
+ android:excludeFromRecents="true"
+ android:resizeableActivity="false"
+ android:theme="@android:style/Theme.NoDisplay"
+ android:label="@string/note_task_button_label"
+ android:icon="@drawable/ic_note_task_shortcut_widget">
+
+ <intent-filter>
+ <action android:name="android.intent.action.CREATE_SHORTCUT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<service android:name=".notetask.NoteTaskControllerUpdateService" />
<activity