summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DragLayer.java
diff options
context:
space:
mode:
authorMatt Garnes <matt@cyngn.com>2014-07-02 14:16:58 -0700
committerMatt Garnes <matt@cyngn.com>2014-07-03 10:51:42 -0700
commit9381658f0b23d2e91762527f31a24dec4cd92883 (patch)
tree38f25cecf32bee7ecbfc27aa67be32a54263a20d /src/com/android/launcher3/DragLayer.java
parent3de1e805afc243c10721fb32c3eeac51e4d0bd33 (diff)
downloadandroid_packages_apps_Trebuchet-9381658f0b23d2e91762527f31a24dec4cd92883.tar.gz
android_packages_apps_Trebuchet-9381658f0b23d2e91762527f31a24dec4cd92883.tar.bz2
android_packages_apps_Trebuchet-9381658f0b23d2e91762527f31a24dec4cd92883.zip
Fix CMHome related bugs.
1. If "Search Panel" is enabled, when dragging an app icon to a new screen, the 'glow' effect for the next page will highlight the entire height of the screen instead of just the workspace view height as expected. This bug exists in launcher3 and GEL. Fixed here. 2. Older versions of the Google Search app do not respond to Intent.ACTION_ASSIST and can crash Trebuchet when it tries to launch Google Now that way. Instead, use searchManager.globalSearchActivity(), which matches the method we use to detect Google Now's presence anyway (+ being "search app" agnostic!) Change-Id: I5e5b3504272e2a2ca656accc32164d1ae9e52077
Diffstat (limited to 'src/com/android/launcher3/DragLayer.java')
-rw-r--r--src/com/android/launcher3/DragLayer.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java
index 3ff4293af..2dde8e402 100644
--- a/src/com/android/launcher3/DragLayer.java
+++ b/src/com/android/launcher3/DragLayer.java
@@ -826,7 +826,13 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
Workspace workspace = mLauncher.getWorkspace();
int width = getMeasuredWidth();
Rect childRect = new Rect();
- getDescendantRectRelativeToSelf(workspace.getChildAt(0), childRect);
+ int firstWorkspaceIndex = 0;
+ if (mLauncher.hasCustomContentToLeft() && workspace.getChildCount() > 1) {
+ firstWorkspaceIndex = 1;
+ }
+
+ getDescendantRectRelativeToSelf(workspace.getChildAt(firstWorkspaceIndex),
+ childRect);
int page = workspace.getNextPage();
final boolean isRtl = isLayoutRtl();