Hide task bar icons when notification shade is expanded

Fixes: 199163951
Test: manual
Change-Id: Id2556aa5f08db55059c95d8c13cdc4d46b7d8c55
This commit is contained in:
Tracy Zhou
2021-09-16 21:28:47 -07:00
parent d8bbdce598
commit 3d458313de
3 changed files with 25 additions and 4 deletions

View File

@@ -49,7 +49,8 @@ public class TaskbarViewController {
public static final int ALPHA_INDEX_KEYGUARD = 2;
public static final int ALPHA_INDEX_STASH = 3;
public static final int ALPHA_INDEX_RECENTS_DISABLED = 4;
private static final int NUM_ALPHA_CHANNELS = 5;
public static final int ALPHA_INDEX_NOTIFICATION_EXPANDED = 5;
private static final int NUM_ALPHA_CHANNELS = 6;
private final TaskbarActivityContext mActivity;
private final TaskbarView mTaskbarView;
@@ -106,6 +107,16 @@ public class TaskbarViewController {
mTaskbarView.setTouchesEnabled(!isImeVisible);
}
/**
* Should be called when the notification shade is expanded, so we can hide taskbar icons as
* well. Note that we are animating icons to appear / disappear.
*/
public void setNotificationShadeIsExpanded(boolean isNotificationShadeExpanded) {
mTaskbarIconAlpha.getProperty(ALPHA_INDEX_NOTIFICATION_EXPANDED)
.animateToValue(isNotificationShadeExpanded ? 0 : 1)
.start();
}
/**
* Should be called when the recents button is disabled, so we can hide taskbar icons as well.
*/