summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ItemInfo.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-06-12 20:04:41 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-06-30 10:26:49 -0700
commitaa8ef119f18864f4ab41c12f9c2ad6d7f643a0a9 (patch)
treebb41b9a8e806633a0917cc50e4b443ea994dbe6b /src/com/android/launcher3/ItemInfo.java
parentc08c350193f66c523b9c1f0879b55bb7bba80541 (diff)
downloadandroid_packages_apps_Trebuchet-aa8ef119f18864f4ab41c12f9c2ad6d7f643a0a9.tar.gz
android_packages_apps_Trebuchet-aa8ef119f18864f4ab41c12f9c2ad6d7f643a0a9.tar.bz2
android_packages_apps_Trebuchet-aa8ef119f18864f4ab41c12f9c2ad6d7f643a0a9.zip
Refactoring ItemInfo
> Changing dragObject to ItemInfo > Removing dropPos which is always null > Removing requiresDbUpdate which is only used in CellLayout Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
Diffstat (limited to 'src/com/android/launcher3/ItemInfo.java')
-rw-r--r--src/com/android/launcher3/ItemInfo.java29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/com/android/launcher3/ItemInfo.java b/src/com/android/launcher3/ItemInfo.java
index f7e0ea488..4bc501987 100644
--- a/src/com/android/launcher3/ItemInfo.java
+++ b/src/com/android/launcher3/ItemInfo.java
@@ -24,8 +24,6 @@ import android.graphics.Bitmap;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.compat.UserManagerCompat;
-import java.util.Arrays;
-
/**
* Represents an item in the launcher.
*/
@@ -35,14 +33,14 @@ public class ItemInfo {
* Intent extra to store the profile. Format: UserHandle
*/
static final String EXTRA_PROFILE = "profile";
-
+
public static final int NO_ID = -1;
-
+
/**
* The id in the settings database for this item
*/
public long id = NO_ID;
-
+
/**
* One of {@link LauncherSettings.Favorites#ITEM_TYPE_APPLICATION},
* {@link LauncherSettings.Favorites#ITEM_TYPE_SHORTCUT},
@@ -50,20 +48,20 @@ public class ItemInfo {
* {@link LauncherSettings.Favorites#ITEM_TYPE_APPWIDGET}.
*/
public 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.
*/
public long container = NO_ID;
-
+
/**
* Iindicates the screen in which the shortcut appears.
*/
public long screenId = -1;
-
+
/**
* Indicates the X position of the associated cell.
*/
@@ -100,11 +98,6 @@ public class ItemInfo {
public int rank = 0;
/**
- * Indicates that this item needs to be updated in the db
- */
- public boolean requiresDbUpdate = false;
-
- /**
* Title of the item
*/
public CharSequence title;
@@ -114,11 +107,6 @@ public class ItemInfo {
*/
public CharSequence contentDescription;
- /**
- * The position of the item in a drag-and-drop operation.
- */
- public int[] dropPos = null;
-
public UserHandleCompat user;
public ItemInfo() {
@@ -194,7 +182,6 @@ public class ItemInfo {
public String toString() {
return "Item(id=" + this.id + " type=" + this.itemType + " container=" + this.container
+ " screen=" + screenId + " cellX=" + cellX + " cellY=" + cellY + " spanX=" + spanX
- + " spanY=" + spanY + " dropPos=" + Arrays.toString(dropPos)
- + " user=" + user + ")";
+ + " spanY=" + spanY + " user=" + user + ")";
}
}