Adding quick settings flag to sysui state
am: 5b6a1fe8a8
Change-Id: I87960941a5b9a0c8950574df345ebd3e390b5727
This commit is contained in:
@@ -82,11 +82,15 @@ public class QuickStepContract {
|
|||||||
public static final int SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED = 1 << 9;
|
public static final int SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED = 1 << 9;
|
||||||
// The search feature is disabled (either by SUW/SysUI/device policy)
|
// The search feature is disabled (either by SUW/SysUI/device policy)
|
||||||
public static final int SYSUI_STATE_SEARCH_DISABLED = 1 << 10;
|
public static final int SYSUI_STATE_SEARCH_DISABLED = 1 << 10;
|
||||||
|
// The notification panel is expanded and interactive (either locked or unlocked), and the
|
||||||
|
// quick settings is not expanded
|
||||||
|
public static final int SYSUI_STATE_QUICK_SETTINGS_EXPANDED = 1 << 11;
|
||||||
|
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@IntDef({SYSUI_STATE_SCREEN_PINNING,
|
@IntDef({SYSUI_STATE_SCREEN_PINNING,
|
||||||
SYSUI_STATE_NAV_BAR_HIDDEN,
|
SYSUI_STATE_NAV_BAR_HIDDEN,
|
||||||
SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
|
SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
|
||||||
|
SYSUI_STATE_QUICK_SETTINGS_EXPANDED,
|
||||||
SYSUI_STATE_BOUNCER_SHOWING,
|
SYSUI_STATE_BOUNCER_SHOWING,
|
||||||
SYSUI_STATE_A11Y_BUTTON_CLICKABLE,
|
SYSUI_STATE_A11Y_BUTTON_CLICKABLE,
|
||||||
SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE,
|
SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE,
|
||||||
@@ -106,6 +110,7 @@ public class QuickStepContract {
|
|||||||
str.add((flags & SYSUI_STATE_SEARCH_DISABLED) != 0 ? "search_disabled" : "");
|
str.add((flags & SYSUI_STATE_SEARCH_DISABLED) != 0 ? "search_disabled" : "");
|
||||||
str.add((flags & SYSUI_STATE_NAV_BAR_HIDDEN) != 0 ? "navbar_hidden" : "");
|
str.add((flags & SYSUI_STATE_NAV_BAR_HIDDEN) != 0 ? "navbar_hidden" : "");
|
||||||
str.add((flags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0 ? "notif_visible" : "");
|
str.add((flags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0 ? "notif_visible" : "");
|
||||||
|
str.add((flags & SYSUI_STATE_QUICK_SETTINGS_EXPANDED) != 0 ? "qs_visible" : "");
|
||||||
str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING) != 0 ? "keygrd_visible" : "");
|
str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING) != 0 ? "keygrd_visible" : "");
|
||||||
str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0
|
str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED) != 0
|
||||||
? "keygrd_occluded" : "");
|
? "keygrd_occluded" : "");
|
||||||
@@ -154,11 +159,13 @@ public class QuickStepContract {
|
|||||||
* disabled.
|
* disabled.
|
||||||
*/
|
*/
|
||||||
public static boolean isAssistantGestureDisabled(int sysuiStateFlags) {
|
public static boolean isAssistantGestureDisabled(int sysuiStateFlags) {
|
||||||
// Disable when in screen pinning, immersive, the bouncer is showing, or search is disabled
|
// Disable when in quick settings, screen pinning, immersive, the bouncer is showing,
|
||||||
|
// or search is disabled
|
||||||
int disableFlags = SYSUI_STATE_SCREEN_PINNING
|
int disableFlags = SYSUI_STATE_SCREEN_PINNING
|
||||||
| SYSUI_STATE_NAV_BAR_HIDDEN
|
| SYSUI_STATE_NAV_BAR_HIDDEN
|
||||||
| SYSUI_STATE_BOUNCER_SHOWING
|
| SYSUI_STATE_BOUNCER_SHOWING
|
||||||
| SYSUI_STATE_SEARCH_DISABLED;
|
| SYSUI_STATE_SEARCH_DISABLED
|
||||||
|
| SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||||
if ((sysuiStateFlags & disableFlags) != 0) {
|
if ((sysuiStateFlags & disableFlags) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON;
|
|||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
||||||
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SEARCH_DISABLED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SEARCH_DISABLED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.isGesturalMode;
|
import static com.android.systemui.shared.system.QuickStepContract.isGesturalMode;
|
||||||
@@ -707,7 +708,7 @@ public class NavigationBarView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPanelExpandedChange() {
|
public void onStatusBarPanelStateChanged() {
|
||||||
updateSlippery();
|
updateSlippery();
|
||||||
updateSystemUiStateFlags();
|
updateSystemUiStateFlags();
|
||||||
}
|
}
|
||||||
@@ -725,6 +726,8 @@ public class NavigationBarView extends FrameLayout implements
|
|||||||
if (mPanelView != null) {
|
if (mPanelView != null) {
|
||||||
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
|
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
|
||||||
mPanelView.isFullyExpanded() && !mPanelView.isInSettings(), displayId);
|
mPanelView.isFullyExpanded() && !mPanelView.isInSettings(), displayId);
|
||||||
|
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED,
|
||||||
|
mPanelView.isInSettings(), displayId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import com.android.systemui.R;
|
|||||||
import com.android.systemui.plugins.DarkIconDispatcher;
|
import com.android.systemui.plugins.DarkIconDispatcher;
|
||||||
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
|
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
|
||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
import com.android.systemui.statusbar.policy.HeadsUpManager;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -279,7 +278,7 @@ public class PhoneStatusBarView extends PanelBar {
|
|||||||
super.panelExpansionChanged(frac, expanded);
|
super.panelExpansionChanged(frac, expanded);
|
||||||
updateScrimFraction();
|
updateScrimFraction();
|
||||||
if ((frac == 0 || frac == 1) && mBar.getNavigationBarView() != null) {
|
if ((frac == 0 || frac == 1) && mBar.getNavigationBarView() != null) {
|
||||||
mBar.getNavigationBarView().onPanelExpandedChange();
|
mBar.getNavigationBarView().onStatusBarPanelStateChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1510,6 +1510,9 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
mNotificationPanel.setStatusAccessibilityImportance(expanded
|
mNotificationPanel.setStatusAccessibilityImportance(expanded
|
||||||
? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||||
: View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
|
: View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
|
||||||
|
if (getNavigationBarView() != null) {
|
||||||
|
getNavigationBarView().onStatusBarPanelStateChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWakeUpComingFromTouch() {
|
public boolean isWakeUpComingFromTouch() {
|
||||||
|
|||||||
Reference in New Issue
Block a user