Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea250995 authored by Brian Lee's avatar Brian Lee
Browse files

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
parent f3d40ab5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment