Loading
Ensure main user is not null before registering settings observer
In the previous change we added settings observer on the main user to listen to autolock preference changes. However, auto-devices do not have main user and hence getMainUser() will return null. This can cause failures while registering for the settings observer. This changes fixes this issue by adding null checks before registering the observer. Test: Tested manually Bug: 321084663 Change-Id: I29e9c5a03fbf9c6587db7a6f132f7f70204dc012