Merge "Adding null check for the case when user switcher is disabled (for example in retail mode)."

This commit is contained in:
Jovana Knezevic
2018-10-12 05:57:22 +00:00
committed by Android (Google) Code Review

View File

@@ -491,6 +491,10 @@ public class CarStatusBar extends StatusBar implements
@Override
public void onStateChanged(int newState) {
super.onStateChanged(newState);
if (mFullscreenUserSwitcher == null) {
return; // Not using the full screen user switcher.
}
if (newState == StatusBarState.FULLSCREEN_USER_SWITCHER) {
if (!mFullscreenUserSwitcher.isVisible()) {
// Current execution path continues to set state after this, thus we deffer the