Merge "Do not assume presence of status bar service in GlobalActions"

This commit is contained in:
TreeHugger Robot
2017-03-23 21:38:56 +00:00
committed by Android (Google) Code Review

View File

@@ -43,7 +43,11 @@ class GlobalActions implements GlobalActionsListener {
mLegacyGlobalActions = new LegacyGlobalActions(context, windowManagerFuncs,
this::onGlobalActionsDismissed);
mStatusBarInternal = LocalServices.getService(StatusBarManagerInternal.class);
mStatusBarInternal.setGlobalActionsListener(this);
// Some form factors do not have a status bar.
if (mStatusBarInternal != null) {
mStatusBarInternal.setGlobalActionsListener(this);
}
}
public void showDialog(boolean keyguardShowing, boolean deviceProvisioned) {