From 7cb2cdc9990622ad7d4d938c8dbf4aa7c52ccace Mon Sep 17 00:00:00 2001 From: Harsh Date: Thu, 2 Mar 2023 00:52:29 +0530 Subject: [PATCH 1/5] Launcher3: PageIndicatorDots: null pointer Exception Change-Id: If061189aae5638d5a3861ec300d58f04bb2bb12c Signed-off-by: Sipun Ku Mahanta --- .../android/launcher3/pageindicators/PageIndicatorDots.java | 4 ++++ 1 file changed, 4 insertions(+) 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; From dd58c34ea9713762451f65aea035bb58019de99b Mon Sep 17 00:00:00 2001 From: tejasvp25 Date: Thu, 9 Mar 2023 13:37:37 +0000 Subject: [PATCH 2/5] Launcher3: Add ACCESS_SURFACE_FLINGER permission to manifest Fixes 06-21 09:27:41.679 447 986 E SurfaceFlinger: Only WindowManager is allowed to use eEarlyWakeup[Start|End] flags Signed-off-by: Sipun Ku Mahanta --- AndroidManifest-common.xml | 1 + 1 file changed, 1 insertion(+) 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 @@ + From fed0660ac628dea832d5e6759a5a3325ddc7828f Mon Sep 17 00:00:00 2001 From: Tommy Webb Date: Mon, 16 Jan 2023 18:48:09 -0500 Subject: [PATCH 3/5] Launcher3: Hide scrollbar when searching All Apps There's nothing to scroll when searching, so hide the scrollbar. Change-Id: Ia04d5d3fe87c573c93856bc4223c92ccfb33c619 Signed-off-by: Sipun Ku Mahanta --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 1 + .../launcher3/allapps/BaseAllAppsContainerView.java | 7 +++++++ 2 files changed, 8 insertions(+) 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); From 975ee4cf1b0043e24b7035f5c4378ed5d69bf0e5 Mon Sep 17 00:00:00 2001 From: Anle Pan Date: Fri, 14 Apr 2023 14:13:23 +0000 Subject: [PATCH 4/5] Launcher3: Fix monkey crash in createSurfaceParams it will appear a null object reference crash in quickstep lanch when monkey test, make a non-null judgement before use to avoid crash Change-Id: I0d92a9c3fa4d5836247b40c96a262c35eb6c1ea9 Signed-off-by: Anle Pan Signed-off-by: Pranav Vashi Signed-off-by: Sipun Ku Mahanta --- .../src/com/android/quickstep/util/TaskViewSimulator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; From cd18d047b5d95bac3f51a8d66dae99a961b79d81 Mon Sep 17 00:00:00 2001 From: Shen Lin Date: Mon, 13 Mar 2023 17:46:42 +0800 Subject: [PATCH 5/5] Launcher3: Fix crash in SurfaceTransactionApplier Calling getViewRootImpl on a targetView is nullable, so we'd add a null check here before getting its SurfaceControl. Bug: 273143527 Test: manual Change-Id: I245bc553ca32cf5b86978f826cfb2ca92def84d7 Signed-off-by: Pranav Vashi Signed-off-by: Sipun Ku Mahanta --- .../com/android/quickstep/util/SurfaceTransactionApplier.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }