mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Update keyboard dismissal logic in the AllAppsTransitionController.
Dismissing the keyboard immediately interferes with the synchronized keyboard animation. Instead, we wait until the end of the animation and if it is successful (transition actually happened and wasn't interrupted) we hide the keyboard. This call does nothing if the keyboard was already hidden through the synchronized animation, and hides it otherwise. Bug: 234812580 Test: manual Change-Id: Idabbc707dd0244bdf75316777e945624a8e8bdfc
This commit is contained in:
@@ -232,7 +232,15 @@ public class AllAppsTransitionController
|
||||
// Reset pull back progress and alpha after switching states.
|
||||
ALL_APPS_PULL_BACK_TRANSLATION.set(this, 0f);
|
||||
ALL_APPS_PULL_BACK_ALPHA.set(this, 1f);
|
||||
mLauncher.getAppsView().getSearchUiManager().getEditText().hideKeyboard();
|
||||
|
||||
// We only want to close the keyboard if the animation has completed successfully.
|
||||
// The reason is that with keyboard sync, if the user swipes down from All Apps with
|
||||
// the keyboard open and then changes their mind and swipes back up, we want the
|
||||
// keyboard to remain open. However an onCancel signal is sent to the listeners
|
||||
// (success = false), so we need to check for that.
|
||||
if (success) {
|
||||
mLauncher.getAppsView().getSearchUiManager().getEditText().hideKeyboard();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user