Removed unnecessarily call to unlock system user.
When CarServiceHelper boots, it needs to unlock the user 0 (system), which it currently does by making 2 calls to IActivityManager: startUserInBackground(0, false), then unlockUser(0, null, null, null) (the nulls in the second call mean no credentials). But the second call is redundant, as UserController's startUserInternal() already tries to unlock the user (using null credentials) at the end - although this second call is harmless right now (other than making an unnecessary IPC call), it makes it harder to refactor the user boot workflow. This change also refactored the logic to unlock the system user in a new method, which not only is clear (no nested if statements), but makes it easier to trace the underlying calls. Bug: 133242016 Bug: 128904478 Bug: 132111956 Test: manual verification # it boots! Test: atest CarServiceTest Merged-In: I52f1303471ad34ea1ab3b7d44a3be42907f7350a Change-Id: I52f1303471ad34ea1ab3b7d44a3be42907f7350a (cherry picked from commit 33bc18fb39e0a54884198339977ad3fb6aa0030b)
Loading