De-flake and clean up CarPowerManagementServiceTest

Two of the tests are flakey, this seems related to test setup
behavior specific to these two tests. After recent refactoring,
it is not needed to set a power-state listener. Removing that
eliminates the uniqueness of the flakey tests.

This CL also removes some unnecessary method parameters and
clarifies some logic.

Fixes: 154927360
Test: 'atest CarPowerManagementServiceTest' on emulator
Change-Id: I85a84e4714ec0c294456d49c61da5a3a4d565977
1 file changed
tree: 60cf6b9e3350cda31ac6af26b885cdbea22551f6
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-internal-lib/
  4. car-lib/
  5. car-maps-placeholder/
  6. car-systemtest-lib/
  7. car-test-lib/
  8. car-usb-handler/
  9. car_product/
  10. computepipe/
  11. EncryptionRunner/
  12. evs/
  13. experimental/
  14. FrameworkPackageStubs/
  15. obd2-lib/
  16. procfs-inspector/
  17. service/
  18. surround_view/
  19. tests/
  20. tools/
  21. user/
  22. vehicle-hal-support-lib/
  23. watchdog/
  24. .clang-format
  25. .gitignore
  26. Android.mk
  27. CleanSpec.mk
  28. CPPLINT.cfg
  29. OWNERS
  30. PREUPLOAD.cfg
  31. 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.