mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Adding support for new APIs in O related to configurable shortcuts
> Config activities can now return PinItemRequest which can be used to pin deep shortcuts Bug: 33584624 Change-Id: Ic0df436bd79e069615b9d60d24eb7594b824b2da
This commit is contained in:
@@ -17,6 +17,9 @@ import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.compat.AppWidgetManagerCompat;
|
||||
import com.android.launcher3.compat.LauncherAppsCompat;
|
||||
import com.android.launcher3.compat.ShortcutConfigActivityInfo;
|
||||
import com.android.launcher3.compat.UserManagerCompat;
|
||||
import com.android.launcher3.config.ProviderConfig;
|
||||
import com.android.launcher3.util.MultiHashMap;
|
||||
import com.android.launcher3.util.Preconditions;
|
||||
@@ -70,9 +73,9 @@ public class WidgetsModel {
|
||||
}
|
||||
|
||||
// Shortcuts
|
||||
for (ResolveInfo info :
|
||||
pm.queryIntentActivities(new Intent(Intent.ACTION_CREATE_SHORTCUT), 0)) {
|
||||
widgetsAndShortcuts.add(new WidgetItem(info, pm));
|
||||
for (ShortcutConfigActivityInfo info : LauncherAppsCompat.getInstance(context)
|
||||
.getCustomShortcutActivityList()) {
|
||||
widgetsAndShortcuts.add(new WidgetItem(info));
|
||||
}
|
||||
setWidgetsAndShortcuts(widgetsAndShortcuts, context);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user