diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2015-07-21 17:01:26 -0700 |
---|---|---|
committer | Ed Heyl <edheyl@google.com> | 2015-07-22 11:31:04 -0700 |
commit | e612775922ec9f8cc4e5cb976bc62b3312a3de0e (patch) | |
tree | 96beaf07307486f6491f022da63ebe381765d1a8 /src/com/android/launcher3/PendingAddItemInfo.java | |
parent | a83129f0bc778fd1ccd799bd8cfa40270f632e1d (diff) | |
download | android_packages_apps_Trebuchet-e612775922ec9f8cc4e5cb976bc62b3312a3de0e.tar.gz android_packages_apps_Trebuchet-e612775922ec9f8cc4e5cb976bc62b3312a3de0e.tar.bz2 android_packages_apps_Trebuchet-e612775922ec9f8cc4e5cb976bc62b3312a3de0e.zip |
resolved conflicts for merge of 13ef17a3 to mnc-dr-dev
b/22609402
Change-Id: I140cf972d57e14737a6f91c0b4a8ec6c7ff1af2b
Diffstat (limited to 'src/com/android/launcher3/PendingAddItemInfo.java')
-rw-r--r-- | src/com/android/launcher3/PendingAddItemInfo.java | 87 |
1 files changed, 6 insertions, 81 deletions
diff --git a/src/com/android/launcher3/PendingAddItemInfo.java b/src/com/android/launcher3/PendingAddItemInfo.java index 967cc928e..1aaf85bbd 100644 --- a/src/com/android/launcher3/PendingAddItemInfo.java +++ b/src/com/android/launcher3/PendingAddItemInfo.java @@ -16,92 +16,17 @@ package com.android.launcher3; -import android.appwidget.AppWidgetHostView; -import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; -import android.content.pm.ActivityInfo; -import android.os.Bundle; -import android.os.Parcelable; /** - * We pass this object with a drag from the customization tray + * Meta data that is used for deferred binding. + * e.g., this object is used to pass information on dragable targets when they are dropped onto + * the workspace from another container. */ -class PendingAddItemInfo extends ItemInfo { +public class PendingAddItemInfo extends ItemInfo { + /** * The component that will be created. */ - ComponentName componentName; -} - -class PendingAddShortcutInfo extends PendingAddItemInfo { - - ActivityInfo shortcutActivityInfo; - - public PendingAddShortcutInfo(ActivityInfo activityInfo) { - shortcutActivityInfo = activityInfo; - } - - @Override - public String toString() { - return "Shortcut: " + shortcutActivityInfo.packageName; - } -} - -class PendingAddWidgetInfo extends PendingAddItemInfo { - int minWidth; - int minHeight; - int minResizeWidth; - int minResizeHeight; - int previewImage; - int icon; - AppWidgetProviderInfo info; - AppWidgetHostView boundWidget; - Bundle bindOptions = null; - - // Any configuration data that we want to pass to a configuration activity when - // starting up a widget - String mimeType; - Parcelable configurationData; - - public PendingAddWidgetInfo(AppWidgetProviderInfo i, String dataMimeType, Parcelable data) { - itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET; - this.info = i; - componentName = i.provider; - minWidth = i.minWidth; - minHeight = i.minHeight; - minResizeWidth = i.minResizeWidth; - minResizeHeight = i.minResizeHeight; - previewImage = i.previewImage; - icon = i.icon; - if (dataMimeType != null && data != null) { - mimeType = dataMimeType; - configurationData = data; - } - } - - // Copy constructor - public PendingAddWidgetInfo(PendingAddWidgetInfo copy) { - minWidth = copy.minWidth; - minHeight = copy.minHeight; - minResizeWidth = copy.minResizeWidth; - minResizeHeight = copy.minResizeHeight; - previewImage = copy.previewImage; - icon = copy.icon; - info = copy.info; - boundWidget = copy.boundWidget; - mimeType = copy.mimeType; - configurationData = copy.configurationData; - componentName = copy.componentName; - itemType = copy.itemType; - spanX = copy.spanX; - spanY = copy.spanY; - minSpanX = copy.minSpanX; - minSpanY = copy.minSpanY; - bindOptions = copy.bindOptions == null ? null : (Bundle) copy.bindOptions.clone(); - } - - @Override - public String toString() { - return "Widget: " + componentName.toShortString(); - } + public ComponentName componentName; } |