diff options
| author | 2024-06-10 23:56:33 +0000 | |
|---|---|---|
| committer | 2024-06-12 17:06:14 +0000 | |
| commit | c34cb133bd1035d83b475e947f7f23c88a3cbc6b (patch) | |
| tree | a3922d51cc514c9b5fe1e25f86a76bb83711a5a2 | |
| parent | 7e1f38a7a0517371bb1d50c41320870478fae3fb (diff) | |
Status bar does not show up after boot
Only hide the keyguard is the boot has been completed. This can happen
since some targets like automotive, expect that a new user would always
be in the locked state. Since during the first boot, the device has not
been provisioned yet, it is assumed that the keyguard is shown. This
problem happens since we get the keyguardGoingAway calls but there is
nothing to animate since the device has not booted up yet.
Flag: NONE (bugfix)
Bug: 339702465
Test: manual
1. lunch gcar_md_x86_64-trunk_staging-userdebug
2. Boot the device
3. Verify that the status bar is shown
4. Reboot the device
5. Verify that the status bar is shown.
Change-Id: I8724a406d8b988f842010aebdd923390609e0483
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 5 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index d6fd354d8544..e59dab6e9b06 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -177,6 +177,8 @@ import com.android.systemui.util.time.SystemClock; import com.android.systemui.wallpapers.data.repository.WallpaperRepository; import com.android.wm.shell.keyguard.KeyguardTransitions; +import dagger.Lazy; + import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -186,7 +188,6 @@ import java.util.Objects; import java.util.concurrent.Executor; import java.util.function.Consumer; -import dagger.Lazy; import kotlinx.coroutines.CoroutineDispatcher; /** @@ -2980,7 +2981,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, && mPM.isInteractive(), WakeAndUnlockUpdateReason.HIDE); } - if ((mShowing && !mOccluded) || mUnlockingAndWakingFromDream) { + if (mBootCompleted && ((mShowing && !mOccluded) || mUnlockingAndWakingFromDream)) { if (mUnlockingAndWakingFromDream) { Log.d(TAG, "hiding keyguard before waking from dream"); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java index 6b1d39a6b278..03afcb77d88f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java @@ -1240,6 +1240,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.start(); mViewMediator.registerCentralSurfaces(mCentralSurfaces, null, null, null, null); + mViewMediator.onBootCompleted(); } private void captureKeyguardStateControllerCallback() { |