diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index 3bd647a80f..75f621e81d 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -44,6 +44,7 @@
+
diff --git a/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java b/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
index 95473dc39a..cac3668547 100644
--- a/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
+++ b/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
@@ -50,7 +50,8 @@ public class SurfaceTransactionApplier extends ReleaseCheck {
*/
public SurfaceTransactionApplier(View targetView) {
mTargetViewRootImpl = targetView.getViewRootImpl();
- mBarrierSurfaceControl = mTargetViewRootImpl.getSurfaceControl();
+ mBarrierSurfaceControl =
+ mTargetViewRootImpl != null ? mTargetViewRootImpl.getSurfaceControl() : null;
mApplyHandler = new Handler(this::onApplyMessage);
setCanRelease(true);
}
diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
index 04af19f729..f1cebb7b79 100644
--- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
+++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
@@ -367,7 +367,9 @@ public void apply(TransformParams params) {
mInversePositionMatrix.mapRect(mTempRectF);
mTempRectF.roundOut(mTmpCropRect);
- params.applySurfaceParams(params.createSurfaceParams(this));
+ if (params.getTargetSet() != null) {
+ params.applySurfaceParams(params.createSurfaceParams(this));
+ }
if (!DEBUG) {
return;
diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
index fd6bdefb60..348e0d05b8 100644
--- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
@@ -122,6 +122,7 @@ private void animateToSearchState(boolean goingToSearch, long durationMs) {
// Fade out the button to pause work apps.
mWorkManager.onActivePageChanged(SEARCH);
}
+ setScrollbarVisibility(!goingToSearch);
mSearchTransitionController.animateToSearchState(goingToSearch, durationMs,
/* onEndRunnable = */ () -> {
mIsSearching = goingToSearch;
diff --git a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
index 1addfd292d..9da8724092 100644
--- a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
@@ -621,6 +621,13 @@ protected void rebindAdapters(boolean force) {
mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.SEARCH).mRecyclerView);
}
+ protected void setScrollbarVisibility(boolean visible) {
+ final RecyclerViewFastScroller scrollbar = getScrollBar();
+ if (scrollbar != null) {
+ scrollbar.setVisibility(visible ? VISIBLE : GONE);
+ }
+ }
+
protected void updateSearchResultsVisibility() {
if (isSearching()) {
getSearchRecyclerView().setVisibility(VISIBLE);
diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorDots.java b/src/com/android/launcher3/pageindicators/PageIndicatorDots.java
index c324ce3cf5..369ac68510 100644
--- a/src/com/android/launcher3/pageindicators/PageIndicatorDots.java
+++ b/src/com/android/launcher3/pageindicators/PageIndicatorDots.java
@@ -173,6 +173,10 @@ public void setScroll(int currentScroll, int totalScroll) {
mTotalScroll = totalScroll;
int scrollPerPage = totalScroll / (mNumPages - 1);
+ if (scrollPerPage == 0) {
+ return;
+ }
+
int pageToLeft = currentScroll / scrollPerPage;
int pageToLeftScroll = pageToLeft * scrollPerPage;
int pageToRightScroll = pageToLeftScroll + scrollPerPage;