Assigned
Status Update
Comments
ra...@google.com <ra...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Android build
Which Android build are you using? (e.g. UQ1A.240205.002)
Device used
Which device did you use to reproduce this issue?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:https://developer.android.com/studio/debug/bug-report#bugreportdevice
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
Android build
Which Android build are you using? (e.g. UQ1A.240205.002)
Device used
Which device did you use to reproduce this issue?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
Description
According to the Android Direct Boot documentation and other more general docs, a device receives LOCKED_BOOT_COMPLETED when the device boots in a "locked" state, before the user unlocks the screen. Upon unlock, the device will then receive the "regular" ACTION_BOOT_COMPLETED.
During development and testing I was seeing odd behavior where LOCKED_BOOT_COMPLETED was received after a device with no screen lock (screen lock set to "none") was restarted. Often, the "BOOT_COMPLETED" broadcast was also received, usually immediately after the locked boot one.
To isolate this behavior I made a simple single-purpose app for testing this, consisting of an empty MainActivity, and a broadcastReceiver class ("LockBootReceiver") to which, in the AndroidManifest, is assigned the intent-filters for LOCKED_BOOT_COMPLETED and BOOT_COMPLETED. The receiver simply logs what intent is received, and, to clarify which one further, has an if/then block checking for if LOCKED_BOOT_COMPLETED or BOOT_COMPLETED is received.
This is the logging result after rebooting with no lock screen (i.e. the device boots straight to the main screen) -
2025-02-24 12:53:53.967 5312-5312 LockBootReceiver com.quintech.lockboot I onReceive: android.intent.action.LOCKED_BOOT_COMPLETED
2025-02-24 12:53:53.968 5312-5312 LockBootReceiver com.quintech.lockboot I received LOCKED_BOOT_COMPLETED
2025-02-24 12:53:56.987 5312-5312 LockBootReceiver com.quintech.lockboot I onReceive: android.intent.action.BOOT_COMPLETED
2025-02-24 12:53:56.987 5312-5312 LockBootReceiver com.quintech.lockboot I received BOOT_COMPLETED
Additionally, I see similar behavior when the screen lock is set to "Swipe" in settings - after a device reboot, while still in the "lock" screen (for swipe, not pin or password) the device receives LOCKED_BOOT_COMPLETED followed immediately by BOOT_COMPLETED
Is this correct behavior?