Show the bouncer at start up if the headless user flag is set
Test: Mojave
Bug: 79581497
Change-Id: I5bb4a3aa0ddf7c2eda925975976cf2e81076d68a
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
index ba265d8..f78e391 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
@@ -19,6 +19,8 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
+import android.content.pm.UserInfo;
+import android.util.Log;
import android.view.View;
import android.view.ViewStub;
@@ -60,6 +62,11 @@
}
public void show() {
+ // On a switch from the system user, don't show the user switcher
+ if (mUserManagerHelper.isHeadlessSystemUser() && mUserManagerHelper
+ .userIsSystemUser(mUserManagerHelper.getForegroundUserInfo())) {
+ return;
+ }
if (mShowing) {
return;
}