Avoid misleading log messages about failed to find key [v2]
If a user's CE storage requires a secret to unlock, then there's no need to try to unlock it without one. This avoids logging some misleading error messages on every boot, like: E vold : Failed to read from /data/misc/vold/user_keys/ce/0/current/keymaster_key_blob: No such file or directory E vold : Failed to find working ce key for user 0 E vold : Couldn't read key for 0 This is a fixed version of http://ag/13879239, which broke Resume on Reboot. Bug: 146206679 Test: Verified that the misleading log message is no longer present when booting a device with a PIN. Also on Cuttlefish, ran 'atest \ com.android.server.am.UserControllerTest \ com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken \ FrameworksServicesTests:RebootEscrowDataTest \ FrameworksServicesTests:LockSettingsServiceTests \ FrameworksServicesTests:RecoverySystemServiceTest \ FrameworksServicesTests:RebootEscrowManagerTests \ FrameworksServicesTests:RebootEscrowProviderServerBasedImplTests' Also on Cuttlefish, verified that Userspace Reboot wasn't broken: adb shell locksettings set-pin 1234 adb reboot adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_LOCKED adb shell input text 1234 adb shell input keyevent 66 adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_UNLOCKED adb reboot userspace adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_UNLOCKED adb logcat -d | grep 'CE storage' # shows "CE storage for users [0] is already unlocked" Also on Bramble, verified that Resume on Reboot wasn't broken: adb shell locksettings set-pin 1234 adb reboot adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_LOCKED adb shell cmd recovery request-lskf ota adb shell input text 1234 adb shell input keyevent 66 adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_UNLOCKED adb shell cmd recovery reboot-and-apply ota 1 adb shell dumpsys activity | grep 'User.*state=' # shows RUNNING_UNLOCKED Change-Id: I482ed8017f7bbc8f7d4fd5a2c0f58629317ce4ed
Loading
Please register or sign in to comment