Skip to content

Commit b4238e0

Browse files
author
Jim Miller
committed
Fix 6483412: Disable search from navbar while SUW is running
This fixes a problem where navbar gestures were enabled during SetupWizard. There's no clear signal for handling this in StatusBar since there are a number of flags that we might use to determine the availability of the search gesture. However, the UI design generally calls for the gesture to be available when the home button is visible, so I think it makes sense to start with that and enable others as we encounter issues. Change-Id: I7b37964ae5b51bf803d5808605f1afe694a88464
1 parent 776627b commit b4238e0

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ protected void updateExpansionStates() {
751751
protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime);
752752
protected abstract void updateExpandedViewPos(int expandedPosition);
753753
protected abstract int getExpandedViewMaxHeight();
754-
protected abstract boolean isStatusBarExpanded();
754+
protected abstract boolean shouldDisableNavbarGestures();
755755

756756
protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) {
757757
return parent.indexOfChild(entry.row) == 0;

packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void setOrientation(int orientation) {
5353
}
5454

5555
public boolean onInterceptTouchEvent(MotionEvent event) {
56-
if (mBar.isStatusBarExpanded()) {
56+
if (mBar.shouldDisableNavbarGestures()) {
5757
return false;
5858
}
5959
switch (event.getAction()) {

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,8 +2111,8 @@ protected void haltTicker() {
21112111
}
21122112

21132113
@Override
2114-
protected boolean isStatusBarExpanded() {
2115-
return mExpanded;
2114+
protected boolean shouldDisableNavbarGestures() {
2115+
return mExpanded || (mDisabled & StatusBarManager.DISABLE_HOME) != 0;
21162116
}
21172117
}
21182118

packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,8 +1620,9 @@ protected void updateExpandedViewPos(int expandedPosition) {
16201620
}
16211621

16221622
@Override
1623-
protected boolean isStatusBarExpanded() {
1624-
return mNotificationPanel.getVisibility() == View.VISIBLE;
1623+
protected boolean shouldDisableNavbarGestures() {
1624+
return mNotificationPanel.getVisibility() == View.VISIBLE
1625+
|| (mDisabled & StatusBarManager.DISABLE_HOME) != 0;
16251626
}
16261627
}
16271628

0 commit comments

Comments
 (0)