diff options
author | Winson Chung <winsonc@google.com> | 2012-04-27 15:12:38 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-04-27 15:15:11 -0700 |
commit | 11a4937fbff0dbc50fb022513dc3b6c643154445 (patch) | |
tree | a602fc06eae7006b840fc84c47c1497f15a6619c /src/com/android/launcher2/DragController.java | |
parent | 9cfcb39bffaffe2123cc6e6a39b4e32ee440fda5 (diff) | |
download | android_packages_apps_Trebuchet-11a4937fbff0dbc50fb022513dc3b6c643154445.tar.gz android_packages_apps_Trebuchet-11a4937fbff0dbc50fb022513dc3b6c643154445.tar.bz2 android_packages_apps_Trebuchet-11a4937fbff0dbc50fb022513dc3b6c643154445.zip |
Fixing issue where shortcuts and widgets were not being removed when the package was uninstalled (Bug 2657997, Bug 6335843)
- Also fixes issue if we are dragging a shortcut/widget and it is removed.
- Also exposes App Info for shortcuts and widgets
Change-Id: I3bd5056f50f20e8b277dde6456df26eac815bcde
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r-- | src/com/android/launcher2/DragController.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java index c9bebe3c5..4be4e8f7b 100644 --- a/src/com/android/launcher2/DragController.java +++ b/src/com/android/launcher2/DragController.java @@ -380,10 +380,13 @@ public class DragController { // Added null checks to prevent NPE we've seen in the wild if (dragInfo != null && dragInfo.intent != null && - info.intent != null && - dragInfo.intent.getComponent().equals(info.intent.getComponent())) { - cancelDrag(); - return; + info.intent != null) { + boolean isSamePackage = dragInfo.intent.getPackage().equals( + info.intent.getPackage()); + if (isSamePackage) { + cancelDrag(); + return; + } } } } |