mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well. - Delay the unstash when IME is closing, to align with the end of the IME exit transition - Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons - Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two). Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed Bug: 202511986 Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
This commit is contained in:
@@ -44,6 +44,7 @@ public class TaskbarDragLayerController {
|
||||
private final AnimatedFloat mKeyguardBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
||||
private final AnimatedFloat mNotificationShadeBgTaskbar = new AnimatedFloat(
|
||||
this::updateBackgroundAlpha);
|
||||
private final AnimatedFloat mImeBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
||||
// Used to hide our background color when someone else (e.g. ScrimView) is handling it.
|
||||
private final AnimatedFloat mBgOverride = new AnimatedFloat(this::updateBackgroundAlpha);
|
||||
|
||||
@@ -74,6 +75,7 @@ public class TaskbarDragLayerController {
|
||||
mBgTaskbar.value = 1;
|
||||
mKeyguardBgTaskbar.value = 1;
|
||||
mNotificationShadeBgTaskbar.value = 1;
|
||||
mImeBgTaskbar.value = 1;
|
||||
mBgOverride.value = 1;
|
||||
updateBackgroundAlpha();
|
||||
}
|
||||
@@ -108,6 +110,10 @@ public class TaskbarDragLayerController {
|
||||
return mNotificationShadeBgTaskbar;
|
||||
}
|
||||
|
||||
public AnimatedFloat getImeBgTaskbar() {
|
||||
return mImeBgTaskbar;
|
||||
}
|
||||
|
||||
public AnimatedFloat getOverrideBackgroundAlpha() {
|
||||
return mBgOverride;
|
||||
}
|
||||
@@ -119,7 +125,7 @@ public class TaskbarDragLayerController {
|
||||
private void updateBackgroundAlpha() {
|
||||
final float bgNavbar = mBgNavbar.value;
|
||||
final float bgTaskbar = mBgTaskbar.value * mKeyguardBgTaskbar.value
|
||||
* mNotificationShadeBgTaskbar.value;
|
||||
* mNotificationShadeBgTaskbar.value * mImeBgTaskbar.value;
|
||||
mLastSetBackgroundAlpha = mBgOverride.value * Math.max(bgNavbar, bgTaskbar);
|
||||
mTaskbarDragLayer.setTaskbarBackgroundAlpha(mLastSetBackgroundAlpha);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user