Merge "Fix status bar disabling." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
504135b5ce
@@ -69,8 +69,15 @@ public class PanelBar extends FrameLayout {
|
|||||||
return mPanels.get((int)(N * x / getMeasuredWidth()));
|
return mPanels.get((int)(N * x / getMeasuredWidth()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouchEvent(MotionEvent event) {
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
// Allow subclasses to implement enable/disable semantics
|
||||||
|
if (!isEnabled()) return false;
|
||||||
|
|
||||||
// figure out which panel needs to be talked to here
|
// figure out which panel needs to be talked to here
|
||||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
mTouchingPanel = selectPanelForTouchX(event.getX());
|
mTouchingPanel = selectPanelForTouchX(event.getX());
|
||||||
|
|||||||
@@ -1309,10 +1309,6 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
|
|
||||||
mGestureRec.add(event);
|
mGestureRec.add(event);
|
||||||
|
|
||||||
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package com.android.systemui.statusbar.phone;
|
package com.android.systemui.statusbar.phone;
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
|
import android.app.StatusBarManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
@@ -69,6 +70,11 @@ public class PhoneStatusBarView extends PanelBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return ((mBar.mDisabled & StatusBarManager.DISABLE_EXPAND) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
|
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
|
||||||
if (super.onRequestSendAccessibilityEvent(child, event)) {
|
if (super.onRequestSendAccessibilityEvent(child, event)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user