summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DragController.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-10-16 14:57:07 -0700
committerWinson Chung <winsonc@google.com>2013-10-16 14:57:19 -0700
commitdf95eb12a4d288ffa143a0c3db60e7e98f3e03b9 (patch)
tree1fd947769dc9d5e9009cb5792d87a80ec4188d2c /src/com/android/launcher3/DragController.java
parent51b9f6a5707047f9fe67e25256deecc9348dd35a (diff)
downloadandroid_packages_apps_Trebuchet-df95eb12a4d288ffa143a0c3db60e7e98f3e03b9.tar.gz
android_packages_apps_Trebuchet-df95eb12a4d288ffa143a0c3db60e7e98f3e03b9.tar.bz2
android_packages_apps_Trebuchet-df95eb12a4d288ffa143a0c3db60e7e98f3e03b9.zip
Ensuring disabled packages remove all components on the workspace. (Bug 11172454)
Diffstat (limited to 'src/com/android/launcher3/DragController.java')
-rw-r--r--src/com/android/launcher3/DragController.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/com/android/launcher3/DragController.java b/src/com/android/launcher3/DragController.java
index 5b5c35c5a..5e733f08b 100644
--- a/src/com/android/launcher3/DragController.java
+++ b/src/com/android/launcher3/DragController.java
@@ -16,6 +16,7 @@
package com.android.launcher3;
+import android.content.ComponentName;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
@@ -25,14 +26,8 @@ import android.graphics.Rect;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;
-import android.view.HapticFeedbackConstants;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.VelocityTracker;
-import android.view.View;
-import android.view.ViewConfiguration;
+import android.view.*;
import android.view.inputmethod.InputMethodManager;
-
import com.android.launcher3.R;
import java.util.ArrayList;
@@ -323,7 +318,7 @@ public class DragController {
}
endDrag();
}
- public void onAppsRemoved(ArrayList<AppInfo> appInfos, Context context) {
+ public void onAppsRemoved(final ArrayList<String> packageNames, ArrayList<AppInfo> appInfos) {
// Cancel the current drag if we are removing an app that we are dragging
if (mDragObject != null) {
Object rawDragInfo = mDragObject.dragInfo;
@@ -333,8 +328,9 @@ public class DragController {
// Added null checks to prevent NPE we've seen in the wild
if (dragInfo != null &&
dragInfo.intent != null) {
- boolean isSameComponent =
- dragInfo.intent.getComponent().equals(info.componentName);
+ ComponentName cn = dragInfo.intent.getComponent();
+ boolean isSameComponent = cn.equals(info.componentName) ||
+ packageNames.contains(cn.getPackageName());
if (isSameComponent) {
cancelDrag();
return;