Adding quick settings flag to sysui state am: 5b6a1fe8a8

am: dd26fafd8d

Change-Id: I26a14e895b243f5c3810da6fe25fcd2e2b9a9c81
This commit is contained in:
Winson Chung
2019-07-28 01:43:47 -07:00
committed by android-build-merger
4 changed files with 17 additions and 5 deletions

View File

@@ -82,11 +82,15 @@ public class QuickStepContract {
public static final int SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED = 1 << 9;
// The search feature is disabled (either by SUW/SysUI/device policy)
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)
@IntDef({SYSUI_STATE_SCREEN_PINNING,
SYSUI_STATE_NAV_BAR_HIDDEN,
SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
SYSUI_STATE_QUICK_SETTINGS_EXPANDED,
SYSUI_STATE_BOUNCER_SHOWING,
SYSUI_STATE_A11Y_BUTTON_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_NAV_BAR_HIDDEN) != 0 ? "navbar_hidden" : "");
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_OCCLUDED) != 0
? "keygrd_occluded" : "");
@@ -154,11 +159,13 @@ public class QuickStepContract {
* disabled.
*/
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
| SYSUI_STATE_NAV_BAR_HIDDEN
| SYSUI_STATE_BOUNCER_SHOWING
| SYSUI_STATE_SEARCH_DISABLED;
| SYSUI_STATE_SEARCH_DISABLED
| SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
if ((sysuiStateFlags & disableFlags) != 0) {
return true;
}

View File

@@ -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_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_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_SEARCH_DISABLED;
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();
updateSystemUiStateFlags();
}
@@ -725,6 +726,8 @@ public class NavigationBarView extends FrameLayout implements
if (mPanelView != null) {
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
mPanelView.isFullyExpanded() && !mPanelView.isInSettings(), displayId);
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED,
mPanelView.isInSettings(), displayId);
}
}

View File

@@ -46,7 +46,6 @@ import com.android.systemui.R;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import java.util.Objects;
@@ -279,7 +278,7 @@ public class PhoneStatusBarView extends PanelBar {
super.panelExpansionChanged(frac, expanded);
updateScrimFraction();
if ((frac == 0 || frac == 1) && mBar.getNavigationBarView() != null) {
mBar.getNavigationBarView().onPanelExpandedChange();
mBar.getNavigationBarView().onStatusBarPanelStateChanged();
}
}

View File

@@ -1510,6 +1510,9 @@ public class StatusBar extends SystemUI implements DemoMode,
mNotificationPanel.setStatusAccessibilityImportance(expanded
? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
: View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
if (getNavigationBarView() != null) {
getNavigationBarView().onStatusBarPanelStateChanged();
}
}
public boolean isWakeUpComingFromTouch() {