diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-11-14 18:09:20 +0530 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-11-14 18:09:20 +0530 |
commit | b9c29d455e301d1b31b911a37eb3bec7e0e16865 (patch) | |
tree | d2b97f4ac95907148b38ef437b2084f3ef2ffd8b | |
parent | 6159c242bc610f13e4c7550ae8b15f25603f4b23 (diff) | |
download | android_packages_apps_Trebuchet-b9c29d455e301d1b31b911a37eb3bec7e0e16865.tar.gz android_packages_apps_Trebuchet-b9c29d455e301d1b31b911a37eb3bec7e0e16865.tar.bz2 android_packages_apps_Trebuchet-b9c29d455e301d1b31b911a37eb3bec7e0e16865.zip |
Fixing crash when uninstalling an app destroys the folder
Bug: 25666490
Bug: 25677822
Change-Id: Id71c04df0a5546ba95239ba2e3f7aabb697375a4
-rw-r--r-- | src/com/android/launcher3/Folder.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 9377bad6d..2b51d2cca 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -1144,10 +1144,10 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList // addInScreenFromBind() to ensure that hotseat items are placed correctly. mLauncher.getWorkspace().addInScreenFromBind(newIcon, mInfo.container, mInfo.screenId, mInfo.cellX, mInfo.cellY, mInfo.spanX, mInfo.spanY); - } - // Focus the newly created child - newIcon.requestFocus(); + // Focus the newly created child + newIcon.requestFocus(); + } } } }; @@ -1293,7 +1293,11 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList rearrangeChildren(); } if (getItemCount() <= 1) { - replaceFolderWithFinalItem(); + if (mInfo.opened) { + mLauncher.closeFolder(this, true); + } else { + replaceFolderWithFinalItem(); + } } } |