Fix NPE encountered after setting LSKF for remote lockscreen validation
`getContext()` in `onChosenLockSaveFinished` will return `null` if the `ConfirmDeviceCredentialBaseFragment` was recreated (such as due to device rotation). This was due to the older `ConfirmDeviceCredentialBaseFragment` getting detached and the `SaveAndFinishWorker.Listener` still referring to the now detached fragment. We have to update the listener to the newly created fragment. This change was tested by going through the remote lockscreen validation flow and ensuring that the LSKF is properly set and finishes cleanly after having rotated/(un)folded my device after inputting the LSKF. Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password Test: Manual Bug: 393644953 Flag: EXEMPT bugfix Change-Id: I1e382a53adb9930949b669ac296483f52e30ee02
Loading
Please register or sign in to comment