am b84ace51: Merge "Fixed a crash where onTouch might have been called too early" into mnc-dev
* commit 'b84ace51b21b9b1d422e96ed023ef3860ca0710d': Fixed a crash where onTouch might have been called too early
This commit is contained in:
@@ -634,7 +634,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
|
|
||||||
mStatusBarWindow = (StatusBarWindowView) View.inflate(context,
|
mStatusBarWindow = (StatusBarWindowView) View.inflate(context,
|
||||||
R.layout.super_status_bar, null);
|
R.layout.super_status_bar, null);
|
||||||
mStatusBarWindow.mService = this;
|
mStatusBarWindow.setService(this);
|
||||||
mStatusBarWindow.setOnTouchListener(new View.OnTouchListener() {
|
mStatusBarWindow.setOnTouchListener(new View.OnTouchListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class StatusBarWindowView extends FrameLayout {
|
|||||||
|
|
||||||
private int mRightInset = 0;
|
private int mRightInset = 0;
|
||||||
|
|
||||||
PhoneStatusBar mService;
|
private PhoneStatusBar mService;
|
||||||
private final Paint mTransparentSrcPaint = new Paint();
|
private final Paint mTransparentSrcPaint = new Paint();
|
||||||
|
|
||||||
public StatusBarWindowView(Context context, AttributeSet attrs) {
|
public StatusBarWindowView(Context context, AttributeSet attrs) {
|
||||||
@@ -124,14 +124,22 @@ public class StatusBarWindowView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onAttachedToWindow () {
|
protected void onFinishInflate() {
|
||||||
super.onAttachedToWindow();
|
super.onFinishInflate();
|
||||||
|
|
||||||
mStackScrollLayout = (NotificationStackScrollLayout) findViewById(
|
mStackScrollLayout = (NotificationStackScrollLayout) findViewById(
|
||||||
R.id.notification_stack_scroller);
|
R.id.notification_stack_scroller);
|
||||||
mNotificationPanel = (NotificationPanelView) findViewById(R.id.notification_panel);
|
mNotificationPanel = (NotificationPanelView) findViewById(R.id.notification_panel);
|
||||||
mDragDownHelper = new DragDownHelper(getContext(), this, mStackScrollLayout, mService);
|
|
||||||
mBrightnessMirror = findViewById(R.id.brightness_mirror);
|
mBrightnessMirror = findViewById(R.id.brightness_mirror);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setService(PhoneStatusBar service) {
|
||||||
|
mService = service;
|
||||||
|
mDragDownHelper = new DragDownHelper(getContext(), this, mStackScrollLayout, mService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onAttachedToWindow () {
|
||||||
|
super.onAttachedToWindow();
|
||||||
|
|
||||||
// We really need to be able to animate while window animations are going on
|
// We really need to be able to animate while window animations are going on
|
||||||
// so that activities may be started asynchronously from panel animations
|
// so that activities may be started asynchronously from panel animations
|
||||||
|
|||||||
Reference in New Issue
Block a user