diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2015-07-23 17:08:47 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2015-07-23 17:08:47 -0700 |
commit | 680c92febe88260b74f101838a9734b8e10a704c (patch) | |
tree | e3294c3b2b32cd3532fa9b239326b1aaaa79fc40 /src/com/android/launcher3/PendingAddItemInfo.java | |
parent | 494d2237b8d7b892902604c18098127e77372509 (diff) | |
parent | 13ef17a37e683b8ad5800e9f542b411180fbec2f (diff) | |
download | android_packages_apps_Trebuchet-680c92febe88260b74f101838a9734b8e10a704c.tar.gz android_packages_apps_Trebuchet-680c92febe88260b74f101838a9734b8e10a704c.tar.bz2 android_packages_apps_Trebuchet-680c92febe88260b74f101838a9734b8e10a704c.zip |
resolved conflicts for merge of 13ef17a3 to cw-e-dev
b/22609402
Change-Id: I3753db1f922923a6b462fa75a5c0d826e0413f95
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; } |