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
protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime);
protected abstract void updateExpandedViewPos(int expandedPosition);
protected abstract int getExpandedViewMaxHeight();
- protected abstract boolean isStatusBarExpanded();
+ protected abstract boolean shouldDisableNavbarGestures();
protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) {
return parent.indexOfChild(entry.row) == 0;
}
public boolean onInterceptTouchEvent(MotionEvent event) {
- if (mBar.isStatusBarExpanded()) {
+ if (mBar.shouldDisableNavbarGestures()) {
return false;
}
switch (event.getAction()) {
}
@Override
- protected boolean isStatusBarExpanded() {
- return mExpanded;
+ protected boolean shouldDisableNavbarGestures() {
+ return mExpanded || (mDisabled & StatusBarManager.DISABLE_HOME) != 0;
}
}
}
@Override
- protected boolean isStatusBarExpanded() {
- return mNotificationPanel.getVisibility() == View.VISIBLE;
+ protected boolean shouldDisableNavbarGestures() {
+ return mNotificationPanel.getVisibility() == View.VISIBLE
+ || (mDisabled & StatusBarManager.DISABLE_HOME) != 0;
}
}