From 336c6669b0c1cbb1a0d56f2c3c4759f4498a8758 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Fri, 25 Aug 2023 16:56:30 -0700 Subject: [PATCH 1/2] Remove unnecessary hide keyboard call in onKeyPreIme. The default handling of back in this preIme case already closes the keyboard if we return false, so adding it before our own key handling was stomping on our existing syncronized keyboard. We should still handle other cases where the system ime animation coincides with our control, but we at least shouldn't force it on ourselves. This fixes the back issue in 3 button mode, and also closes all apps on the first back gesture as intended (if you hadn't entered 0 state that is). Demo after fix: https://drive.google.com/file/d/1pK18iEdgxQ0HQmilAMFzn66LVyCH5Ma1/view?usp=drive_link&resourcekey=0-kW4BOC-Pj-wZ_DZL51z6Rg Bug: 270144901 Bug: 277738379 Test: Manual with 3 button mode and gesture nav, with always on keyboard on and off Flag: N/A Change-Id: I9b1c525494b49cde3307df8b0a73d6143ac9c616 --- src/com/android/launcher3/ExtendedEditText.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/com/android/launcher3/ExtendedEditText.java b/src/com/android/launcher3/ExtendedEditText.java index 3c90408c0e..8ec5c18393 100644 --- a/src/com/android/launcher3/ExtendedEditText.java +++ b/src/com/android/launcher3/ExtendedEditText.java @@ -74,14 +74,9 @@ public class ExtendedEditText extends EditText { @Override public boolean onKeyPreIme(int keyCode, KeyEvent event) { // If this is a back key, propagate the key back to the listener - if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) { - if (TextUtils.isEmpty(getText())) { - hideKeyboard(); - } - if (mBackKeyListener != null) { - return mBackKeyListener.onBackKey(); - } - return false; + if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP + && mBackKeyListener != null) { + return mBackKeyListener.onBackKey(); } return super.onKeyPreIme(keyCode, event); } From f7193e14690c332994e0e77a694b5970586ecf0b Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Wed, 30 Aug 2023 18:48:39 -0700 Subject: [PATCH 2/2] Removing unused screen records Bug: 187761685, 195673272 Test: presubmit Flag: N/A Change-Id: I87711d246660d917cf7e09ac4ffd714149563e52 --- .../tests/src/com/android/quickstep/TaplTestsQuickstep.java | 1 - tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 1 - 2 files changed, 2 deletions(-) diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java index 40d0ac72ce..25f90caa3e 100644 --- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java @@ -185,7 +185,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @NavigationModeSwitch @PortraitLandscape - @ScreenRecord // b/195673272 @PlatinumTest(focusArea = "launcher") public void testOverviewActions() throws Exception { // Experimenting for b/165029151: diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java index 585ecccc23..59037a8d0f 100644 --- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java @@ -158,7 +158,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { } @Test - @ScreenRecord public void testPressHomeOnAllAppsContextMenu() throws Exception { final AllApps allApps = mLauncher.getWorkspace().switchToAllApps(); allApps.freeze();