Disable user switching while resuming from Suspend to RAM

It is difficult to coordinate a user switch between VHAL and Car
Services. To avoid problems, we disable a switch while the system
is booting or (optionally) while the system is resuming from
Suspend to RAM.

If a vendor does this coordination, they can enable user switching
during resume by overlaying config_disableUserSwitchAfterResume with
false.

Bug: 144010270
Test: Updated CarPowerManagementServiceTest.testSleepEntryAndWakeUpForProcessing
Change-Id: I05e27dba15c6977f9b139c875ebb3ba74c5069ec
(cherry picked from commit 2a36d12f7649809c6fe1805bb4b2dc35e2933f22)
3 files changed
tree: 9ce059125358b5b93ef92ca50b383d7c45207c90
  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. EncryptionRunner/
  10. evs/
  11. FrameworkPackageStubs/
  12. obd2-lib/
  13. procfs-inspector/
  14. service/
  15. tests/
  16. tools/
  17. user/
  18. vehicle-hal-support-lib/
  19. .clang-format
  20. .gitignore
  21. Android.mk
  22. CleanSpec.mk
  23. OWNERS
  24. PREUPLOAD.cfg
  25. 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.