diff options
author | Winson <winsonc@google.com> | 2015-09-24 18:26:44 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-24 18:26:44 +0000 |
commit | 1f832f85d59600fc4c212dec51a5112a6b7427d5 (patch) | |
tree | cff01910ab1179c35343d1825133c24755b8807c /src/com/android/launcher3 | |
parent | bba140270f13f8caccfabed04c5af836635810ec (diff) | |
parent | 2949fb5b16a07259e221c5c04470e90c8afb4ea8 (diff) | |
download | android_packages_apps_Trebuchet-1f832f85d59600fc4c212dec51a5112a6b7427d5.tar.gz android_packages_apps_Trebuchet-1f832f85d59600fc4c212dec51a5112a6b7427d5.tar.bz2 android_packages_apps_Trebuchet-1f832f85d59600fc4c212dec51a5112a6b7427d5.zip |
am 2949fb5b: Fixing talk-back folder icon removal regression.
* commit '2949fb5b16a07259e221c5c04470e90c8afb4ea8':
Fixing talk-back folder icon removal regression.
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/DeleteDropTarget.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/Folder.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 9 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 4 |
5 files changed, 10 insertions, 11 deletions
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java index 76e14f51c..9b65a7127 100644 --- a/src/com/android/launcher3/DeleteDropTarget.java +++ b/src/com/android/launcher3/DeleteDropTarget.java @@ -73,7 +73,7 @@ public class DeleteDropTarget extends ButtonDropTarget { // Remove the item from launcher and the db, we can ignore the containerInfo in this call // because we already remove the drag view from the folder (if the drag originated from // a folder) in Folder.beginDrag() - launcher.removeItem(view, null, item, true /* deleteFromDb */); + launcher.removeItem(view, item, true /* deleteFromDb */); launcher.getWorkspace().stripEmptyScreens(); return true; } diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index be4d04f93..099194ca5 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -248,7 +248,7 @@ public class FocusHelper { } } else if (isDeleteKeyChord(e)) { matrix = FocusLogic.createSparseMatrix(iconLayout); - launcher.removeItem(v, null, itemInfo, true /* deleteFromDb */); + launcher.removeItem(v, itemInfo, true /* deleteFromDb */); } else { // For other KEYCODE_DPAD_LEFT and KEYCODE_DPAD_RIGHT navigation, do not use the // matrix extended with hotseat. @@ -342,7 +342,7 @@ public class FocusHelper { } } else if (isDeleteKeyChord(e)) { matrix = FocusLogic.createSparseMatrix(iconLayout); - launcher.removeItem(v, null, itemInfo, true /* deleteFromDb */); + launcher.removeItem(v, itemInfo, true /* deleteFromDb */); } else { matrix = FocusLogic.createSparseMatrix(iconLayout); } diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index ff65d3098..5c4df7426 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -1125,7 +1125,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList // Remove the folder if (getItemCount() <= 1) { - mLauncher.removeItem(mFolderIcon, null, mInfo, true /* deleteFromDb */); + mLauncher.removeItem(mFolderIcon, mInfo, true /* deleteFromDb */); if (mFolderIcon instanceof DropTarget) { mDragController.removeDropTarget((DropTarget) mFolderIcon); } diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 3b3479047..40c6df145 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2340,16 +2340,15 @@ public class Launcher extends Activity * Unbinds the view for the specified item, and removes the item and all its children. * * @param v the view being removed. - * @param containerInfo the {@link FolderInfo} container of this view (can be null). * @param itemInfo the {@link ItemInfo} for this view. * @param deleteFromDb whether or not to delete this item from the db. */ - public boolean removeItem(View v, FolderInfo containerInfo, ItemInfo itemInfo, - boolean deleteFromDb) { + public boolean removeItem(View v, ItemInfo itemInfo, boolean deleteFromDb) { if (itemInfo instanceof ShortcutInfo) { // Remove the shortcut from the folder before removing it from launcher - if (containerInfo != null) { - containerInfo.remove((ShortcutInfo) itemInfo); + FolderInfo folderInfo = sFolders.get(itemInfo.container); + if (folderInfo != null) { + folderInfo.remove((ShortcutInfo) itemInfo); } else { mWorkspace.removeWorkspaceItem(v); } diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index d3fc69ec8..d923c2016 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1105,7 +1105,7 @@ public class Workspace extends PagedView if (lahv != null && lahv.isReinflateRequired()) { // Remove and rebind the current widget (which was inflated in the wrong // orientation), but don't delete it from the database - mLauncher.removeItem(lahv, null, info, false /* deleteFromDb */); + mLauncher.removeItem(lahv, info, false /* deleteFromDb */); mLauncher.bindAppWidget(info); } } @@ -4441,7 +4441,7 @@ public class Workspace extends PagedView if (info.hostView instanceof PendingAppWidgetHostView) { // Remove and rebind the current widget, but don't delete it from the database PendingAppWidgetHostView view = (PendingAppWidgetHostView) info.hostView; - mLauncher.removeItem(view, null, info, false /* deleteFromDb */); + mLauncher.removeItem(view, info, false /* deleteFromDb */); mLauncher.bindAppWidget(info); } } |