summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-06-07 17:05:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-06-07 17:05:19 +0000
commit4c395f23673f9a42b51ce7b47be0940ce846e03d (patch)
treed6392527fa26e6bb6c30526313183f1fccc548e1 /src/com/android/launcher3/dragndrop
parent033f4ea716e295b34c58d4c59c891e45805c2f0d (diff)
parent47328fd53f43fd0c2ed14ad925dd04483f9229a0 (diff)
downloadandroid_packages_apps_Trebuchet-4c395f23673f9a42b51ce7b47be0940ce846e03d.tar.gz
android_packages_apps_Trebuchet-4c395f23673f9a42b51ce7b47be0940ce846e03d.tar.bz2
android_packages_apps_Trebuchet-4c395f23673f9a42b51ce7b47be0940ce846e03d.zip
Merge "Removing the SearchDropTarget bar as it no longer contains the QSB" into ub-launcher3-calgary
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r--src/com/android/launcher3/dragndrop/DragLayer.java30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index 318c67de8..4efcb3d5b 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -29,7 +29,6 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.DragEvent;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -52,7 +51,7 @@ import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherAppWidgetHostView;
import com.android.launcher3.PinchToOverviewListener;
import com.android.launcher3.R;
-import com.android.launcher3.SearchDropTargetBar;
+import com.android.launcher3.DropTargetBar;
import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
@@ -184,31 +183,17 @@ public class DragLayer extends InsettableFrameLayout {
private boolean isEventOverFolderTextRegion(Folder folder, MotionEvent ev) {
getDescendantRectRelativeToSelf(folder.getEditTextRegion(), mHitRect);
- if (mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
- return true;
- }
- return false;
+ return mHitRect.contains((int) ev.getX(), (int) ev.getY());
}
private boolean isEventOverFolder(Folder folder, MotionEvent ev) {
getDescendantRectRelativeToSelf(folder, mHitRect);
- if (mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
- return true;
- }
- return false;
+ return mHitRect.contains((int) ev.getX(), (int) ev.getY());
}
private boolean isEventOverDropTargetBar(MotionEvent ev) {
- getDescendantRectRelativeToSelf(mLauncher.getSearchDropTargetBar(), mHitRect);
- if (mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
- return true;
- }
-
- getDescendantRectRelativeToSelf(mLauncher.getAppInfoDropTargetBar(), mHitRect);
- if (mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
- return true;
- }
- return false;
+ getDescendantRectRelativeToSelf(mLauncher.getDropTargetBar(), mHitRect);
+ return mHitRect.contains((int) ev.getX(), (int) ev.getY());
}
private boolean handleTouchDown(MotionEvent ev, boolean intercept) {
@@ -356,7 +341,7 @@ public class DragLayer extends InsettableFrameLayout {
return super.onRequestSendAccessibilityEvent(child, event);
}
- if (isInAccessibleDrag() && child instanceof SearchDropTargetBar) {
+ if (isInAccessibleDrag() && child instanceof DropTargetBar) {
return super.onRequestSendAccessibilityEvent(child, event);
}
// Skip propagating onRequestSendAccessibilityEvent all for other children
@@ -374,8 +359,7 @@ public class DragLayer extends InsettableFrameLayout {
childrenForAccessibility.add(currentFolder);
if (isInAccessibleDrag()) {
- childrenForAccessibility.add(mLauncher.getSearchDropTargetBar());
- childrenForAccessibility.add(mLauncher.getAppInfoDropTargetBar());
+ childrenForAccessibility.add(mLauncher.getDropTargetBar());
}
} else {
super.addChildrenForAccessibility(childrenForAccessibility);