Stop enabling all disabled status bar features from GlobalActions. (DO NOT MERGE)
Leaky singleton bug! GlobalActions, recents, and the keyguard are all in the same process and therefore receive the same StatusBarManager instance. Therefore, their calls to enable() and disable() clobber one another. Bug: 5423182 Change-Id: Ie535d88f5a5bb940dabee5f1ac176027e1793c5c
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.internal.policy.impl;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.StatusBarManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@@ -57,8 +56,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
|
||||
|
||||
private static final String TAG = "GlobalActions";
|
||||
|
||||
private StatusBarManager mStatusBar;
|
||||
|
||||
private final Context mContext;
|
||||
private final AudioManager mAudioManager;
|
||||
|
||||
@@ -103,13 +100,12 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
|
||||
mKeyguardShowing = keyguardShowing;
|
||||
mDeviceProvisioned = isDeviceProvisioned;
|
||||
if (mDialog == null) {
|
||||
mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
|
||||
mDialog = createDialog();
|
||||
}
|
||||
prepareDialog();
|
||||
|
||||
mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
|
||||
mDialog.show();
|
||||
mDialog.getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_DISABLE_EXPAND);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,7 +245,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
mStatusBar.disable(StatusBarManager.DISABLE_NONE);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
Reference in New Issue
Block a user