File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
packages/SystemUI/src/com/android/systemui/statusbar/phone Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff 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 ());
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1717package com .android .systemui .statusbar .phone ;
1818
1919import android .app .ActivityManager ;
20+ import android .app .StatusBarManager ;
2021import android .content .Context ;
2122import android .content .res .Configuration ;
2223import 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 )) {
You can’t perform that action at this time.
0 commit comments