Fix crash in CarPowerManagementService

ag/9718627 moved the logic for when we call getInitialUser().  This was
causing us to try to get the initial user before the first user was
created on initial boot.

This CL updates the logic to only try to get the initial user when
running the resume flow.

Bug: 144802294
Test: Flash and check logcat for crash.  100% repro before change, 0%
repro after change.
Change-Id: If500c1ccdb9655c46edb1745b007186757db0f2b
(cherry picked from qt-qpr1-dev commit 6c4dbb6986d81bc645a22c330cb3fda98710dfc8)
1 file changed
tree: f0acabf8f37c764ab7f1edbbb647b9979bed670d
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-lib/
  4. car-maps-placeholder/
  5. car-systemtest-lib/
  6. car-test-lib/
  7. car-usb-handler/
  8. car_product/
  9. computepipe/
  10. EncryptionRunner/
  11. evs/
  12. experimental/
  13. FrameworkPackageStubs/
  14. obd2-lib/
  15. procfs-inspector/
  16. service/
  17. tests/
  18. tools/
  19. user/
  20. vehicle-hal-support-lib/
  21. .clang-format
  22. .gitignore
  23. Android.mk
  24. CleanSpec.mk
  25. OWNERS
  26. PREUPLOAD.cfg
  27. README.md
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.