Introduce KeyboardStateManager to maintain keyboardstate as show or hide.

- Add a feature flag for IME Latency logging.

- Removed mShowImeAfterFirstLayout from ExtendedEditText.

   http://ag/1414509 added `mShowImeAfterFirstLayout`and cl description
   says "Show IME when search query != null after rotation".

   I verified the behavior by turning on "Allow home screen rotation".
   Keyboard is not getting dismissed on rotation in AA+ screen in a-z list
   or even in the search screen.
   Video : https://drive.google.com/file/d/1BWUTrW9OSEo6ojErj8INMwjFCPArVD4B/view?usp=sharing&resourcekey=0-SXTcKyUw1wCSi8Bm37ktow

Bug: 240192346
Test: Manual.

Verified by setting `ENABLE_KEYBOARD_TRANSITION_SYNC` to false and for
following usecases.

- All apps entry with ime enabled, scrolling a-z list to hide keyboard
- Folder name change - showing and dismissing keyboard
- Toast entry from Allapps and QSB - showing and dismissing keyboard

Change-Id: I1a6b5759b8e71e77744f58677b6d1b73e2f633e8
This commit is contained in:
Anushree Ganjam committed 2022-09-09 04:32:33 +00:00
1 parent 94a54203f3
commit a461660fa8
6 files changed
+92 -17

No files matched your search

@@ -56,6 +56,7 @@ public class StatsLogManager implements ResourceBasedOverride {
private InstanceId mInstanceId;
protected @Nullable ActivityContext mActivityContext = null;
private KeyboardStateManager mKeyboardStateManager;
/**
* Returns event enum based on the two state transition information when swipe
@@ -816,6 +817,16 @@ public class StatsLogManager implements ResourceBasedOverride {
return logger;
}
/**
* Returns a singleton KeyboardStateManager.
*/
public KeyboardStateManager keyboardStateManager() {
if (mKeyboardStateManager == null) {
mKeyboardStateManager = new KeyboardStateManager();
}
return mKeyboardStateManager;
}
protected StatsLogger createLogger() {
return new StatsLogger() {
};