From 43a5cc701163dcbf9ad3d44879eae07c243a359d Mon Sep 17 00:00:00 2001 From: MrSluffy Date: Sat, 22 Jun 2024 15:12:51 +0800 Subject: [PATCH] Fixed keyboard disappear on empty search - Closes : #4095 --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 6195aa685e2..6c660df61e1 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -544,17 +544,12 @@ public void onActivePageChanged(int currentActivePage) { // Will be called at the end of the animation. return; } - if (currentActivePage != SEARCH) { - mActivityContext.hideKeyboard(); - } if (mAH.get(currentActivePage).mRecyclerView != null) { mAH.get(currentActivePage).mRecyclerView.bindFastScrollbar(mFastScroller); } // Header keeps track of active recycler view to properly render header // protection. mHeader.setActiveRV(currentActivePage); - reset(true /* animate */, !isSearching() /* exitSearch */); - mWorkManager.onActivePageChanged(currentActivePage); } @@ -846,7 +841,7 @@ public int getFloatingSearchBarRestingMarginBottom() { */ public int getFloatingSearchBarRestingMarginStart() { DeviceProfile dp = mActivityContext.getDeviceProfile(); - return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mContext); + return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mActivityContext); } /** @@ -862,7 +857,7 @@ public int getFloatingSearchBarRestingMarginStart() { */ public int getFloatingSearchBarRestingMarginEnd() { DeviceProfile dp = mActivityContext.getDeviceProfile(); - return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mContext); + return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mActivityContext); } private void layoutBelowSearchContainer(View v, boolean includeTabsMargin) {