mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Remove scrim view alpha when bubble manage menu is shown.
Updated logic for taskbar scrim view alpha calculation, setting it to 0 when bubble manage menu is shown. Fixes: 337169457 Flag: NONE Test: Visual. For gesture navigation: 1) On foldable phone while device is being folded expand any bubble, click mange button, then unfold. Observe no scrim view is visible. 2) Enable persistent taskbar, pull down the notification shade then swipe it back up while bubbles are open. 3) Enable persistent taskbar, pull down the notification shade then swipe it back up while bubbles and mange menu is open. 4) Enable persistent taskbar. Fold device. Open bubble and click manage button. Unfold device. Observe no scrim view is visible. For 3 button navigation 1) Unfold the device, press the home key, pull down the notification shade then swipe it back up while bubbles are open. 2) Unfold the device, press the home key, pull down the notification shade then swipe it back up while bubbles and mange menu is open. 3) Fold device, open bubble and click manage button. Unfold device. Observe no scrim view is visible. Change-Id: Ic011ae9bd11801a479062cc51c60377823a926fb
This commit is contained in:
@@ -103,14 +103,20 @@ public class TaskbarScrimViewController implements TaskbarControllers.LoggableTa
|
||||
}
|
||||
|
||||
private float getScrimAlpha() {
|
||||
final boolean isPersistentTaskBarVisible =
|
||||
mTaskbarVisible && !DisplayController.isTransientTaskbar(mScrimView.getContext());
|
||||
final boolean manageMenuExpanded =
|
||||
(mSysUiStateFlags & SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED) != 0;
|
||||
return manageMenuExpanded
|
||||
// When manage menu shows there's the first scrim and second scrim so figure out
|
||||
// what the total transparency would be.
|
||||
? (BUBBLE_EXPANDED_SCRIM_ALPHA + (BUBBLE_EXPANDED_SCRIM_ALPHA
|
||||
* (1 - BUBBLE_EXPANDED_SCRIM_ALPHA)))
|
||||
: shouldShowScrim() ? BUBBLE_EXPANDED_SCRIM_ALPHA : 0;
|
||||
if (isPersistentTaskBarVisible && manageMenuExpanded) {
|
||||
// When manage menu shows for persistent task bar there's the first scrim and second
|
||||
// scrim so figure out what the total transparency would be.
|
||||
return BUBBLE_EXPANDED_SCRIM_ALPHA
|
||||
+ (BUBBLE_EXPANDED_SCRIM_ALPHA * (1 - BUBBLE_EXPANDED_SCRIM_ALPHA));
|
||||
} else if (shouldShowScrim()) {
|
||||
return BUBBLE_EXPANDED_SCRIM_ALPHA;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void showScrim(boolean showScrim, float alpha, boolean skipAnim) {
|
||||
|
||||
Reference in New Issue
Block a user