Skip to content

Commit ec3f05e

Browse files
committed
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
1 parent fd8f6f2 commit ec3f05e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

policy/src/com/android/internal/policy/impl/GlobalActions.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import android.app.Activity;
2020
import android.app.AlertDialog;
21-
import android.app.StatusBarManager;
2221
import android.content.BroadcastReceiver;
2322
import android.content.Context;
2423
import android.content.DialogInterface;
@@ -57,8 +56,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
5756

5857
private static final String TAG = "GlobalActions";
5958

60-
private StatusBarManager mStatusBar;
61-
6259
private final Context mContext;
6360
private final AudioManager mAudioManager;
6461

@@ -103,13 +100,12 @@ public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned) {
103100
mKeyguardShowing = keyguardShowing;
104101
mDeviceProvisioned = isDeviceProvisioned;
105102
if (mDialog == null) {
106-
mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
107103
mDialog = createDialog();
108104
}
109105
prepareDialog();
110106

111-
mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
112107
mDialog.show();
108+
mDialog.getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_DISABLE_EXPAND);
113109
}
114110

115111
/**
@@ -249,7 +245,6 @@ private void prepareDialog() {
249245

250246
/** {@inheritDoc} */
251247
public void onDismiss(DialogInterface dialog) {
252-
mStatusBar.disable(StatusBarManager.DISABLE_NONE);
253248
}
254249

255250
/** {@inheritDoc} */

0 commit comments

Comments
 (0)