summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-03-06 00:10:32 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-03-06 00:10:32 +0000
commit30ac30bf3fefd389f20c981ae5fb69a54a97f0e2 (patch)
tree80bae4a6a1fd8d347fc189597300c10b6b1fe4dd
parenta8ee6aa0d811540f794f004d73da0d1cd21a8ae7 (diff)
parentacf0a5da0bcb0c1d0ce918699a764c3b256b496e (diff)
downloadandroid_packages_apps_Trebuchet-30ac30bf3fefd389f20c981ae5fb69a54a97f0e2.tar.gz
android_packages_apps_Trebuchet-30ac30bf3fefd389f20c981ae5fb69a54a97f0e2.tar.bz2
android_packages_apps_Trebuchet-30ac30bf3fefd389f20c981ae5fb69a54a97f0e2.zip
Snap for 6268127 from acf0a5da0bcb0c1d0ce918699a764c3b256b496e to qt-qpr3-release
Change-Id: I37ba2768a859ab913d8ee1220bcfc4032286a96f
-rw-r--r--src/com/android/launcher3/allapps/AllAppsContainerView.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 37ee24850..2d5b04058 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -26,14 +26,18 @@ import android.os.Process;
import android.text.Selection;
import android.text.SpannableStringBuilder;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
-
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.StringRes;
+import androidx.dynamicanimation.animation.DynamicAnimation;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import com.android.launcher3.AppInfo;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
@@ -45,11 +49,11 @@ import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
-import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.Utilities;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.keyboard.FocusedItemDecorator;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ItemInfoMatcher;
@@ -60,13 +64,6 @@ import com.android.launcher3.views.BottomUserEducationView;
import com.android.launcher3.views.RecyclerViewFastScroller;
import com.android.launcher3.views.SpringRelativeLayout;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.StringRes;
-import androidx.dynamicanimation.animation.DynamicAnimation;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
/**
* The all apps view container.
*/
@@ -200,7 +197,10 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
// The AllAppsContainerView houses the QSB and is hence visible from the Workspace
// Overview states. We shouldn't intercept for the scrubber in these cases.
- if (!mLauncher.isInState(LauncherState.ALL_APPS)) return false;
+ if (!mLauncher.isInState(LauncherState.ALL_APPS)) {
+ mTouchHandler = null;
+ return false;
+ }
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
AllAppsRecyclerView rv = getActiveRecyclerView();
@@ -219,6 +219,16 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
@Override
public boolean onTouchEvent(MotionEvent ev) {
+ if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ AllAppsRecyclerView rv = getActiveRecyclerView();
+ if (rv != null && rv.getScrollbar()
+ .isHitInParent(ev.getX(), ev.getY(), mFastScrollerOffset)) {
+ mTouchHandler = rv.getScrollbar();
+ } else {
+ mTouchHandler = null;
+ }
+ }
+
if (mTouchHandler != null) {
mTouchHandler.handleTouchEvent(ev, mFastScrollerOffset);
return true;