Adopt O shortcut changes for Intent.ACTION_CREATE_SHORTCUT
If we're on O, use ShortcutManager's .createShortcutResultIntent
and return that to the launcher.
Move ShortcutIntentBuilder out of list package since it doesn't
really make sense in there. Also allows us to keep DynamicShortcuts'
methods package private.
Test: Manually verify shortcuts created by long pressing on the
home screen (Contacts 1x1 widgets) are the newer app shortcuts on O
and are legacy shortcuts on pre-O (L, M, and N).
Bug: 36032908
Change-Id: Ic78c21daf223b59b45cbc98ceea2726fc29c055c
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cd0b853..4adf6e7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -185,6 +185,8 @@
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustResize"
android:visibleToInstantApps="true">
+ <meta-data android:name="android.app.shortcuts.new_config"
+ android:value="true" />
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>