summaryrefslogtreecommitdiff
path: root/libs/input/SpriteController.cpp
diff options
context:
space:
mode:
author Jigar Thakkar <jigarthakkar@google.com> 2024-01-19 00:04:56 +0000
committer Jigar Thakkar <jigarthakkar@google.com> 2024-01-19 00:59:19 +0000
commit951af9e121f6975d1e7e3cb70d6a78e39e3bfaba (patch)
treef8cc4fed8580f13a95c0e8f93a17624acd76c002 /libs/input/SpriteController.cpp
parenta5eafaafd90b8853e21f035bb3aefb4dda1ca215 (diff)
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
Diffstat (limited to 'libs/input/SpriteController.cpp')
0 files changed, 0 insertions, 0 deletions