diff options
Diffstat (limited to 'src/com/cyanogenmod/trebuchet')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java | 31 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Hotseat.java | 42 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/ItemInfo.java | 14 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Launcher.java | 115 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherAction.java | 50 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherActionInfo.java | 19 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherModel.java | 26 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherProvider.java | 34 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/PagedViewWidget.java | 12 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/PendingAddItemInfo.java | 7 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 22 |
11 files changed, 269 insertions, 103 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java index 070bfed..e4bb84a 100644 --- a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java +++ b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java @@ -658,6 +658,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen AppWidgetManager.getInstance(mLauncher).getInstalledProviders(); Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT); List<ResolveInfo> shortcuts = mPackageManager.queryIntentActivities(shortcutsIntent, 0); + List<LauncherActionInfo> launcherActions = LauncherAction.getAllActions(mLauncher); for (AppWidgetProviderInfo widget : widgets) { if (widget.minWidth > 0 && widget.minHeight > 0) { // Ensure that all widgets we show can be added on a workspace of this size @@ -678,6 +679,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } } mWidgets.addAll(shortcuts); + mWidgets.addAll(launcherActions); Collections.sort(mWidgets, new LauncherModel.WidgetAndShortcutNameComparator(mPackageManager)); updatePageCounts(); @@ -1438,9 +1440,21 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen return preview; } - private Bitmap getWidgetPreview(ComponentName provider, int previewImage, - int iconId, int cellHSpan, int cellVSpan, int maxWidth, - int maxHeight) { + private Bitmap getShortcutPreview(LauncherActionInfo info) { + int offset = 0; + int bitmapSize = mAppIconSize; + Bitmap preview = Bitmap.createBitmap(bitmapSize, bitmapSize, Config.ARGB_8888); + + final Resources res = getContext().getResources(); + + // Render the icon + Drawable icon = res.getDrawable(info.drawable); + renderDrawableToBitmap(icon, preview, offset, offset, mAppIconSize, mAppIconSize); + return preview; + } + + private Bitmap getWidgetPreview(ComponentName provider, int previewImage, int iconId, + int cellHSpan, int cellVSpan, int maxWidth, int maxHeight) { // Load the preview image if possible String packageName = provider.getPackageName(); if (maxWidth < 0) maxWidth = Integer.MAX_VALUE; @@ -1611,6 +1625,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen info.activityInfo.name); widget.applyFromResolveInfo(mPackageManager, info); widget.setTag(createItemInfo); + } else if (rawInfo instanceof LauncherActionInfo) { + // Fill in the actions information + LauncherActionInfo info = (LauncherActionInfo) rawInfo; + createItemInfo = new PendingAddActionInfo(); + ((PendingAddActionInfo)createItemInfo).action = info.action; + createItemInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; + widget.applyFromLauncherActionInfo(info); + widget.setTag(createItemInfo); } widget.setOnClickListener(this); widget.setOnLongClickListener(this); @@ -1699,6 +1721,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // Fill in the shortcuts information ResolveInfo info = (ResolveInfo) rawInfo; images.add(getShortcutPreview(info, data.maxImageWidth, data.maxImageHeight)); + } else if (rawInfo instanceof LauncherActionInfo) { + LauncherActionInfo info = (LauncherActionInfo) rawInfo; + images.add(getShortcutPreview(info)); } } } diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java index 10a7623..cc287bd 100644 --- a/src/com/cyanogenmod/trebuchet/Hotseat.java +++ b/src/com/cyanogenmod/trebuchet/Hotseat.java @@ -29,9 +29,6 @@ import android.widget.FrameLayout; import com.cyanogenmod.trebuchet.R; public class Hotseat extends FrameLayout { - @SuppressWarnings("unused") - private static final String TAG = "Trebuchet.Hotseat"; - private Launcher mLauncher; private CellLayout mContent; @@ -92,9 +89,6 @@ public class Hotseat extends FrameLayout { int getCellYFromOrder(int rank) { return hasVerticalHotseat() ? (mContent.getCountY() - (rank + 1)) : 0; } - public boolean isAllAppsButtonRank(int rank) { - return rank == mAllAppsButtonRank; - } @Override protected void onFinishInflate() { @@ -110,41 +104,5 @@ public class Hotseat extends FrameLayout { void resetLayout() { mContent.removeAllViewsInLayout(); - - // Add the Apps button - Context context = getContext(); - LayoutInflater inflater = LayoutInflater.from(context); - BubbleTextView allAppsButton = (BubbleTextView) - inflater.inflate(R.layout.application, mContent, false); - allAppsButton.setCompoundDrawablesWithIntrinsicBounds(null, - context.getResources().getDrawable(R.drawable.all_apps_button_icon), null, null); - allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label)); - allAppsButton.setOnTouchListener(new View.OnTouchListener() { - @Override - public boolean onTouch(View v, MotionEvent event) { - if (mLauncher != null && - (event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) { - mLauncher.onTouchDownAllAppsButton(v); - } - return false; - } - }); - - allAppsButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(android.view.View v) { - if (mLauncher != null) { - mLauncher.onClickAllAppsButton(v); - } - } - }); - - // Note: We do this to ensure that the hotseat is always laid out in the orientation of - // the hotseat in order regardless of which orientation they were added - int x = getCellXFromOrder(mAllAppsButtonRank); - int y = getCellYFromOrder(mAllAppsButtonRank); - CellLayout.LayoutParams lp = new CellLayout.LayoutParams(x,y,1,1); - lp.canReorder = false; - mContent.addViewToCellLayout(allAppsButton, -1, 0, lp, true); } } diff --git a/src/com/cyanogenmod/trebuchet/ItemInfo.java b/src/com/cyanogenmod/trebuchet/ItemInfo.java index 34c7364..794903c 100644 --- a/src/com/cyanogenmod/trebuchet/ItemInfo.java +++ b/src/com/cyanogenmod/trebuchet/ItemInfo.java @@ -28,14 +28,14 @@ import java.io.IOException; * Represents an item in the launcher. */ class ItemInfo { - + static final int NO_ID = -1; - + /** * The id in the settings database for this item */ long id = NO_ID; - + /** * One of {@link LauncherSettings.Favorites#ITEM_TYPE_APPLICATION}, * {@link LauncherSettings.Favorites#ITEM_TYPE_SHORTCUT}, @@ -43,20 +43,20 @@ class ItemInfo { * {@link LauncherSettings.Favorites#ITEM_TYPE_APPWIDGET}. */ int itemType; - + /** - * The id of the container that holds this item. For the desktop, this will be + * The id of the container that holds this item. For the desktop, this will be * {@link LauncherSettings.Favorites#CONTAINER_DESKTOP}. For the all applications folder it * will be {@link #NO_ID} (since it is not stored in the settings DB). For user folders * it will be the id of the folder. */ long container = NO_ID; - + /** * Iindicates the screen in which the shortcut appears. */ int screen = -1; - + /** * Indicates the X position of the associated cell. */ diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java index e43029d..5446740 100644 --- a/src/com/cyanogenmod/trebuchet/Launcher.java +++ b/src/com/cyanogenmod/trebuchet/Launcher.java @@ -149,6 +149,8 @@ public final class Launcher extends Activity static final String EXTRA_SHORTCUT_DUPLICATE = "duplicate"; + static final String ACTION_LAUNCHER = "com.cyanogenmod.trebuchet.LAUNCHER_ACTION"; + static final int MAX_SCREEN_COUNT = 7; static final int DEFAULT_SCREEN = 2; @@ -1248,6 +1250,79 @@ public final class Launcher extends Activity resetAddInfo(); } + private void addAction(LauncherAction.Action action) { + int[] cellXY = mPendingAddInfo.dropPos; + int cellX = mPendingAddInfo.cellX; + int cellY = mPendingAddInfo.cellY; + long container = mPendingAddInfo.container; + int screen = mPendingAddInfo.screen; + CellLayout layout = getCellLayout(container, screen); + + boolean foundCellSpan = false; + + Intent data = createActionIntent(action); + + ShortcutInfo info = mModel.infoFromShortcutIntent(this, data, null); + if (info == null) { + return; + } + final View view = createShortcut(info); + + if (cellX >= 0 && cellY >= 0) { + if (cellXY == null) { + cellXY = new int[2]; + } + cellXY[0] = cellX; + cellXY[1] = cellY; + + foundCellSpan = true; + + // If appropriate, either create a folder or add to an existing folder + if (mWorkspace.createUserFolderIfNecessary(view, container, layout, cellXY, 0, + true, null,null)) { + return; + } + DragObject dragObject = new DragObject(); + dragObject.dragInfo = info; + if (mWorkspace.addToExistingFolderIfNecessary(view, layout, cellXY, 0, dragObject, + true)) { + return; + } + } else if (cellXY != null) { + // when dragging and dropping, just find the closest free spot + int[] result = layout.findNearestVacantArea(cellXY[0], cellXY[1], 1, 1, cellXY); + foundCellSpan = (result != null); + } else { + foundCellSpan = layout.findCellForSpan(cellXY, 1, 1); + } + + if (!foundCellSpan) { + showOutOfSpaceMessage(isHotseatLayout(layout)); + return; + } + + LauncherModel.addItemToDatabase(this, info, container, screen, cellXY[0], cellXY[1], false); + + if (!mRestoring) { + mWorkspace.addInScreen(view, container, screen, cellXY[0], cellXY[1], 1, 1, + isWorkspaceLocked()); + } + } + + private Intent createActionIntent(LauncherAction.Action action) { + Intent data = new Intent(Intent.ACTION_MAIN); + Intent intent = new Intent(ACTION_LAUNCHER); + intent.addCategory(Intent.CATEGORY_HOME); + intent.setClassName(this, this.getClass().getName()); + intent.putExtra(Intent.EXTRA_TEXT, action.toString()); + data.putExtra(Intent.EXTRA_SHORTCUT_NAME, + getResources().getString(LauncherAction.Action.getString(action))); + data.putExtra(Intent.EXTRA_SHORTCUT_INTENT, intent); + data.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, + Intent.ShortcutIconResource.fromContext(this, LauncherAction.Action.getDrawable(action))); + return data; + } + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -1480,6 +1555,18 @@ public final class Launcher extends Activity processIntent.run(); } + } else if (ACTION_LAUNCHER.equals(intent.getAction())) { + Bundle extras = intent.getExtras(); + if (extras == null) { + return; + } + String actionString = extras.getString(Intent.EXTRA_TEXT); + LauncherAction.Action action = LauncherAction.Action.valueOf(actionString); + switch (action) { + case AllApps: + showAllApps(true); + break; + } } } @@ -1760,6 +1847,30 @@ public final class Launcher extends Activity } /** + * Process action from drop. + * + * @param action The launcher action + * @param screen The screen where it should be added + * @param cell The cell it should be added to, optional + * @param position The location on the screen where it was dropped, optional + */ + void processActionFromDrop(LauncherAction.Action action, long container, int screen, + int[] cell, int[] loc) { + resetAddInfo(); + mPendingAddInfo.container = container; + mPendingAddInfo.screen = screen; + mPendingAddInfo.dropPos = loc; + + if (cell != null) { + mPendingAddInfo.cellX = cell[0]; + mPendingAddInfo.cellY = cell[1]; + } + + addAction(action); + exitSpringLoadedDragModeDelayed(true, true, null); + } + + /** * Process a shortcut drop. * * @param componentName The name of the component @@ -2472,10 +2583,6 @@ public final class Launcher extends Activity return (mState == State.APPS_CUSTOMIZE) || (mOnResumeState == State.APPS_CUSTOMIZE); } - public boolean isAllAppsButtonRank(int rank) { - return mHotseat.isAllAppsButtonRank(rank); - } - /** * Helper method for the cameraZoomIn/cameraZoomOut animations * @param view The view being animated diff --git a/src/com/cyanogenmod/trebuchet/LauncherAction.java b/src/com/cyanogenmod/trebuchet/LauncherAction.java new file mode 100644 index 0000000..04f9bdf --- /dev/null +++ b/src/com/cyanogenmod/trebuchet/LauncherAction.java @@ -0,0 +1,50 @@ +package com.cyanogenmod.trebuchet; + +import android.content.Context; +import android.content.res.Resources; + +import java.util.ArrayList; +import java.util.List; + +public class LauncherAction { + + public enum Action { + AllApps; + int getString() { + return getString(this); + } + int getDrawable() { + return getDrawable(this); + } + static int getString(Action action) { + switch (action) { + case AllApps: + return R.string.all_apps_button_label; + default: + return -1; + } + } + static int getDrawable(Action action) { + switch (action) { + case AllApps: + return R.drawable.ic_allapps; + default: + return -1; + } + } + } + + public static List<LauncherActionInfo> getAllActions(Context context) { + List<LauncherActionInfo> actions = new ArrayList<LauncherActionInfo>(); + + final Resources res = context.getResources(); + + LauncherActionInfo allAppsAction = new LauncherActionInfo(); + allAppsAction.action = Action.AllApps; + allAppsAction.drawable = Action.getDrawable(Action.AllApps); + allAppsAction.title = res.getString(Action.getString(Action.AllApps)); + actions.add(allAppsAction); + + return actions; + } +} diff --git a/src/com/cyanogenmod/trebuchet/LauncherActionInfo.java b/src/com/cyanogenmod/trebuchet/LauncherActionInfo.java new file mode 100644 index 0000000..f808ebe --- /dev/null +++ b/src/com/cyanogenmod/trebuchet/LauncherActionInfo.java @@ -0,0 +1,19 @@ +package com.cyanogenmod.trebuchet; + +class LauncherActionInfo { + + /* + * The launcher action + */ + LauncherAction.Action action; + + /* + * The drawable for the launcher action + */ + int drawable; + + /* + * The title for the launcher action + */ + String title; +} diff --git a/src/com/cyanogenmod/trebuchet/LauncherModel.java b/src/com/cyanogenmod/trebuchet/LauncherModel.java index 8fd446c..abdb484 100644 --- a/src/com/cyanogenmod/trebuchet/LauncherModel.java +++ b/src/com/cyanogenmod/trebuchet/LauncherModel.java @@ -159,7 +159,6 @@ public class LauncherModel extends BroadcastReceiver { public void bindAppsRemoved(ArrayList<String> packageNames, boolean permanent); public void bindPackagesUpdated(); public boolean isAllAppsVisible(); - public boolean isAllAppsButtonRank(int rank); public void bindSearchablesChanged(); public void onPageBoundSynchronously(int page); } @@ -1174,11 +1173,6 @@ public class LauncherModel extends BroadcastReceiver { private boolean checkItemPlacement(ItemInfo occupied[][][], ItemInfo item) { int containerIndex = item.screen; if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { - // Return early if we detect that an item is under the hotseat button - if (mCallbacks == null || mCallbacks.get().isAllAppsButtonRank(item.screen)) { - return false; - } - // We use the last index to refer to the hotseat and the screen as the rank, so // test and update the occupied state accordingly if (occupied[Launcher.MAX_SCREEN_COUNT][item.screen][0] != null) { @@ -2533,17 +2527,25 @@ public class LauncherModel extends BroadcastReceiver { if (mLabelCache.containsKey(a)) { labelA = mLabelCache.get(a); } else { - labelA = (a instanceof AppWidgetProviderInfo) ? - ((AppWidgetProviderInfo) a).label : - ((ResolveInfo) a).loadLabel(mPackageManager).toString(); + if (a instanceof AppWidgetProviderInfo) { + labelA = ((AppWidgetProviderInfo) a).label; + } else if (a instanceof ResolveInfo) { + labelA = ((ResolveInfo) a).loadLabel(mPackageManager).toString(); + } else { + labelA = ((LauncherActionInfo) a).title; + } mLabelCache.put(a, labelA); } if (mLabelCache.containsKey(b)) { labelB = mLabelCache.get(b); } else { - labelB = (b instanceof AppWidgetProviderInfo) ? - ((AppWidgetProviderInfo) b).label : - ((ResolveInfo) b).loadLabel(mPackageManager).toString(); + if (b instanceof AppWidgetProviderInfo) { + labelB = ((AppWidgetProviderInfo) b).label; + } else if (b instanceof ResolveInfo) { + labelB = ((ResolveInfo) b).loadLabel(mPackageManager).toString(); + } else { + labelB = ((LauncherActionInfo) b).title; + } mLabelCache.put(b, labelB); } return mCollator.compare(labelA, labelB); diff --git a/src/com/cyanogenmod/trebuchet/LauncherProvider.java b/src/com/cyanogenmod/trebuchet/LauncherProvider.java index 3d90922..e4227c3 100644 --- a/src/com/cyanogenmod/trebuchet/LauncherProvider.java +++ b/src/com/cyanogenmod/trebuchet/LauncherProvider.java @@ -66,7 +66,7 @@ public class LauncherProvider extends ContentProvider { private static final String DATABASE_NAME = "launcher.db"; - private static final int DATABASE_VERSION = 12; + private static final int DATABASE_VERSION = 13; static final String AUTHORITY = "com.cyanogenmod.trebuchet.settings"; @@ -480,18 +480,6 @@ public class LauncherProvider extends ContentProvider { version = 8; } - if (version < 9) { - // The max id is not yet set at this point (onUpgrade is triggered in the ctor - // before it gets a change to get set, so we need to read it here when we use it) - if (mMaxId == -1) { - mMaxId = initializeMaxId(db); - } - - // Add default hotseat icons - loadFavorites(db, R.xml.update_workspace); - version = 9; - } - // We bumped the version three time during JB, once to update the launch flags, once to // update the override for the default launch animation and once to set the mimetype // to improve startup performance @@ -503,6 +491,18 @@ public class LauncherProvider extends ContentProvider { version = 12; } + if (version < 13) { + // The max id is not yet set at this point (onUpgrade is triggered in the ctor + // before it gets a change to get set, so we need to read it here when we use it) + if (mMaxId == -1) { + mMaxId = initializeMaxId(db); + } + + // Add default hotseat icons + loadFavorites(db, R.xml.update_workspace); + version = 13; + } + if (version != DATABASE_VERSION) { Log.w(TAG, "Destroying all old data."); db.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITES); @@ -825,14 +825,6 @@ public class LauncherProvider extends ContentProvider { String x = a.getString(R.styleable.Favorite_x); String y = a.getString(R.styleable.Favorite_y); - // If we are adding to the hotseat, the screen is used as the position in the - // hotseat. This screen can't be at position 0 because AllApps is in the - // zeroth position. - if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT - && Integer.valueOf(screen) == allAppsButtonRank) { - throw new RuntimeException("Invalid screen position for hotseat item"); - } - values.clear(); values.put(LauncherSettings.Favorites.CONTAINER, container); values.put(LauncherSettings.Favorites.SCREEN, screen); diff --git a/src/com/cyanogenmod/trebuchet/PagedViewWidget.java b/src/com/cyanogenmod/trebuchet/PagedViewWidget.java index 5f2b800..b821b6f 100644 --- a/src/com/cyanogenmod/trebuchet/PagedViewWidget.java +++ b/src/com/cyanogenmod/trebuchet/PagedViewWidget.java @@ -127,6 +127,18 @@ public class PagedViewWidget extends LinearLayout { } } + public void applyFromLauncherActionInfo(LauncherActionInfo info) { + mIsAppWidget = false; + final ImageView image = (ImageView) findViewById(R.id.widget_preview); + image.setContentDescription(getContext().getResources().getString(info.action.getString())); + final TextView name = (TextView) findViewById(R.id.widget_name); + name.setText(info.title); + final TextView dims = (TextView) findViewById(R.id.widget_dims); + if (dims != null) { + dims.setText(String.format(mDimensionsFormatString, 1, 1)); + } + } + public int[] getPreviewSize() { final ImageView i = (ImageView) findViewById(R.id.widget_preview); int[] maxSize = new int[2]; diff --git a/src/com/cyanogenmod/trebuchet/PendingAddItemInfo.java b/src/com/cyanogenmod/trebuchet/PendingAddItemInfo.java index f0bdeb5..2020c6d 100644 --- a/src/com/cyanogenmod/trebuchet/PendingAddItemInfo.java +++ b/src/com/cyanogenmod/trebuchet/PendingAddItemInfo.java @@ -21,6 +21,7 @@ import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; import android.content.pm.ActivityInfo; import android.os.Bundle; +import android.content.Intent; import android.os.Parcelable; /** @@ -46,6 +47,12 @@ class PendingAddShortcutInfo extends PendingAddItemInfo { return "Shortcut: " + shortcutActivityInfo.packageName; } } +class PendingAddActionInfo extends PendingAddItemInfo { + /** + * The launcher action + */ + LauncherAction.Action action; +} class PendingAddWidgetInfo extends PendingAddItemInfo { int minWidth; diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 4219e2b..08b0e7a 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -2678,18 +2678,7 @@ public class Workspace extends SmoothPagedView // Don't accept the drop if there's no room for the item if (!foundCell) { - // Don't show the message if we are dropping on the AllApps button and the hotseat - // is full - boolean isHotseat = mLauncher.isHotseatLayout(dropTargetLayout); - if (mTargetCell != null && isHotseat) { - Hotseat hotseat = mLauncher.getHotseat(); - if (hotseat.isAllAppsButtonRank( - hotseat.getOrderInHotseat(mTargetCell[0], mTargetCell[1]))) { - return false; - } - } - - mLauncher.showOutOfSpaceMessage(isHotseat); + mLauncher.showOutOfSpaceMessage(mLauncher.isHotseatLayout(dropTargetLayout)); return false; } } @@ -3740,8 +3729,13 @@ public class Workspace extends SmoothPagedView container, screen, mTargetCell, span, null); break; case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT: - mLauncher.processShortcutFromDrop(pendingInfo.componentName, - container, screen, mTargetCell, null); + if (pendingInfo instanceof PendingAddActionInfo) { + mLauncher.processActionFromDrop(((PendingAddActionInfo)pendingInfo).action, + container, screen, mTargetCell, null); + } else { + mLauncher.processShortcutFromDrop(pendingInfo.componentName, + container, screen, mTargetCell, null); + } break; default: throw new IllegalStateException("Unknown item type: " + |