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
This commit is contained in:
Winson Chung
2012-04-27 15:12:38 -07:00
parent 9cfcb39bff
commit 11a4937fbf
7 changed files with 35 additions and 25 deletions
@@ -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;
}
}
}
}