Always change the container when dropping in icon
I was being cautios on my previous fix for this same isse, cautios because I'm modifying an object by reference That's why I was only updating the container when the icon being dropped was PendingAddShortcutInfo but we can change the container on every icon (we don't need to in the Widget case which is the other if statement), we can be sure it is a safe operation because we later update the info anyway rendering the previous info invalid. Fix: 413784315 Test: WIP Flag: EXEMPT bug fix Change-Id: I60ecdb52be1c7bf0584cb1c74ee15b85961e5012
This commit is contained in:
@@ -2907,6 +2907,9 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
} else {
|
||||
// This is for other drag/drop cases, like dragging from All Apps
|
||||
mLauncher.getStateManager().goToState(NORMAL, SPRING_LOADED_EXIT_DELAY);
|
||||
// TODO(b/414409465) We could just create a new info making a copy with all the new
|
||||
// needed values instead of choosing on each case what to modify.
|
||||
info.container = container;
|
||||
View view = mLauncher.getItemInflater().inflateItem(info, cellLayout);
|
||||
d.dragInfo = info = (ItemInfo) view.getTag();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user