Fixing scrolling up in App Apps.

Done by scrolling only when scroll position is not zero. This way, the
scroll gesture can't close All Apps.

Bug: 110103162
Test: TaplTests suite
Change-Id: Icfe47d2bcc0210ae221df169d6c35cd1be10ff86
This commit is contained in:
Vadim Tryshev
2018-07-25 16:29:06 -07:00
parent 899c08aee8
commit ff3fa34a7a
6 changed files with 102 additions and 27 deletions

View File

@@ -21,6 +21,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Process;
import android.support.animation.DynamicAnimation;
import android.support.annotation.NonNull;
@@ -48,6 +49,7 @@ import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
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.userevent.nano.LauncherLogProto.Target;
@@ -549,4 +551,16 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
&& verticalFadingEdge);
}
}
@Override
public boolean performAccessibilityAction(int action, Bundle arguments) {
if (AccessibilityManagerCompat.processTestRequest(
mLauncher, "TAPL_GET_SCROLL", action, arguments,
response ->
response.putInt("scrollY", getActiveRecyclerView().getCurrentScrollY()))) {
return true;
}
return super.performAccessibilityAction(action, arguments);
}
}