mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Hide taskbar background when notification shade is expanded
- In 3 button mode, don't hide the background but do ensure nav buttons are translated down when swiping to notificaitons from the home screen Test: swipe down notifications, background hides in 0 button mode but not in 3 button mode Fixes: 199163951 Change-Id: Ic70adc7d67b2ab7c92a2d5d846b9b259d1bd7bfc
This commit is contained in:
@@ -25,6 +25,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_Q
|
||||
import static com.android.systemui.shared.system.WindowManagerWrapper.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
|
||||
import static com.android.systemui.shared.system.WindowManagerWrapper.ITYPE_EXTRA_NAVIGATION_BAR;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
@@ -328,10 +329,9 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
mControllers.navbarButtonsViewController.updateStateForSysuiFlags(systemUiStateFlags);
|
||||
mControllers.taskbarViewController.setImeIsVisible(
|
||||
mControllers.navbarButtonsViewController.isImeVisible());
|
||||
boolean panelExpanded = (systemUiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0;
|
||||
boolean inSettings = (systemUiStateFlags & SYSUI_STATE_QUICK_SETTINGS_EXPANDED) != 0;
|
||||
mControllers.taskbarViewController.setNotificationShadeIsExpanded(
|
||||
panelExpanded || inSettings);
|
||||
int shadeExpandedFlags = SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED
|
||||
| SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||
onNotificationShadeExpandChanged((systemUiStateFlags & shadeExpandedFlags) != 0);
|
||||
mControllers.taskbarViewController.setRecentsButtonDisabled(
|
||||
mControllers.navbarButtonsViewController.isRecentsDisabled());
|
||||
mControllers.stashedHandleViewController.setIsHomeButtonDisabled(
|
||||
@@ -341,6 +341,21 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
mControllers.taskbarScrimViewController.updateStateForSysuiFlags(systemUiStateFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides the taskbar icons and background when the notication shade is expanded.
|
||||
*/
|
||||
private void onNotificationShadeExpandChanged(boolean isExpanded) {
|
||||
float alpha = isExpanded ? 0 : 1;
|
||||
AnimatorSet anim = new AnimatorSet();
|
||||
anim.play(mControllers.taskbarViewController.getTaskbarIconAlpha().getProperty(
|
||||
TaskbarViewController.ALPHA_INDEX_NOTIFICATION_EXPANDED).animateToValue(alpha));
|
||||
if (!isThreeButtonNav()) {
|
||||
anim.play(mControllers.taskbarDragLayerController.getNotificationShadeBgTaskbar()
|
||||
.animateToValue(alpha));
|
||||
}
|
||||
anim.start();
|
||||
}
|
||||
|
||||
public void onRotationProposal(int rotation, boolean isValid) {
|
||||
mControllers.rotationButtonController.onRotationProposal(rotation, isValid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user