diff options
author | Winson Chung <winsonc@google.com> | 2013-12-09 17:19:02 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-09 17:19:02 -0800 |
commit | fe2fb82657d52c17c9a09fb74e140b80db634a8c (patch) | |
tree | e380d787a12678fc779908d97cbd9c4691ac4723 /src/com/android | |
parent | cace67f7ddf467e649604a8b08aa582ce5c33532 (diff) | |
parent | d65fb393595cb093936c7d5d0d54b0511430aa9d (diff) | |
download | android_packages_apps_Trebuchet-fe2fb82657d52c17c9a09fb74e140b80db634a8c.tar.gz android_packages_apps_Trebuchet-fe2fb82657d52c17c9a09fb74e140b80db634a8c.tar.bz2 android_packages_apps_Trebuchet-fe2fb82657d52c17c9a09fb74e140b80db634a8c.zip |
am d65fb393: Merge "Revert "Fixing crash in empty folders. (Bug 11627191)"" into jb-ub-now-jolly-elf
* commit 'd65fb393595cb093936c7d5d0d54b0511430aa9d':
Revert "Fixing crash in empty folders. (Bug 11627191)"
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 15 | ||||
-rw-r--r-- | src/com/android/launcher3/FolderInfo.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 5 |
3 files changed, 6 insertions, 18 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 9637bbb48..bbe6af2f6 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -408,15 +408,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList mFolderName.setText(""); } updateItemLocationsInDatabase(); - - // In case any children didn't come across during loading, clean up the folder accordingly - mFolderIcon.post(new Runnable() { - public void run() { - if (getItemCount() <= 1) { - replaceFolderWithFinalItem(); - } - } - }); } /** @@ -835,7 +826,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList View v = list.get(i); ItemInfo info = (ItemInfo) v.getTag(); LauncherModel.moveItemInDatabase(mLauncher, info, mInfo.id, 0, - info.cellX, info.cellY); + info.cellX, info.cellY); } } @@ -1084,7 +1075,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList public void run() { CellLayout cellLayout = mLauncher.getCellLayout(mInfo.container, mInfo.screenId); - View child = null; + View child = null; // Move the item from the folder to the workspace, in the position of the folder if (getItemCount() == 1) { ShortcutInfo finalItem = mInfo.contents.get(0); @@ -1114,8 +1105,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList View finalChild = getItemAt(0); if (finalChild != null) { mFolderIcon.performDestroyAnimation(finalChild, onCompleteRunnable); - } else { - onCompleteRunnable.run(); } mDestroyed = true; } diff --git a/src/com/android/launcher3/FolderInfo.java b/src/com/android/launcher3/FolderInfo.java index d45e4e47b..bb5ae8200 100644 --- a/src/com/android/launcher3/FolderInfo.java +++ b/src/com/android/launcher3/FolderInfo.java @@ -16,10 +16,10 @@ package com.android.launcher3; -import android.content.ContentValues; - import java.util.ArrayList; +import android.content.ContentValues; + /** * Represents a folder containing shortcuts or apps. */ diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index a69617ac7..74f28b304 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -584,9 +584,8 @@ public class LauncherModel extends BroadcastReceiver { // as in Workspace.onDrop. Here, we just add/remove them from the list of items // that are on the desktop, as appropriate ItemInfo modelItem = sBgItemsIdMap.get(itemId); - if (modelItem != null && - (modelItem.container == LauncherSettings.Favorites.CONTAINER_DESKTOP || - modelItem.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT)) { + if (modelItem.container == LauncherSettings.Favorites.CONTAINER_DESKTOP || + modelItem.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { switch (modelItem.itemType) { case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION: case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT: |