Skip to content

Commit 504135b

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Fix status bar disabling." into jb-mr1-dev
2 parents 7bf70dd + 1e8feef commit 504135b

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@ public PanelView selectPanelForTouchX(float x) {
6969
return mPanels.get((int)(N * x / getMeasuredWidth()));
7070
}
7171

72+
public boolean isEnabled() {
73+
return true;
74+
}
75+
7276
@Override
7377
public boolean onTouchEvent(MotionEvent event) {
78+
// Allow subclasses to implement enable/disable semantics
79+
if (!isEnabled()) return false;
80+
7481
// figure out which panel needs to be talked to here
7582
if (event.getAction() == MotionEvent.ACTION_DOWN) {
7683
mTouchingPanel = selectPanelForTouchX(event.getX());

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,10 +1309,6 @@ boolean interceptTouchEvent(MotionEvent event) {
13091309

13101310
mGestureRec.add(event);
13111311

1312-
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
1313-
return false;
1314-
}
1315-
13161312
return false;
13171313
}
13181314

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.android.systemui.statusbar.phone;
1818

1919
import android.app.ActivityManager;
20+
import android.app.StatusBarManager;
2021
import android.content.Context;
2122
import android.content.res.Configuration;
2223
import android.content.res.Resources;
@@ -69,6 +70,11 @@ public void addPanel(PanelView pv) {
6970
}
7071
}
7172

73+
@Override
74+
public boolean isEnabled() {
75+
return ((mBar.mDisabled & StatusBarManager.DISABLE_EXPAND) == 0);
76+
}
77+
7278
@Override
7379
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
7480
if (super.onRequestSendAccessibilityEvent(child, event)) {

0 commit comments

Comments
 (0)