commit | b90719d3bf85bfe0389dd929f880587b1d6bc1bc | [log] [tgz] |
---|---|---|
author | Jim Kaye <jameskaye@google.com> | Tue Nov 26 09:35:47 2019 -0800 |
committer | Jim Kaye <jameskaye@google.com> | Fri Dec 20 16:51:38 2019 +0000 |
tree | 10c00542d621fb05c16d702a909327e377fbd641 | |
parent | dd94e5538d3804cd8146b2246f197855fe89d247 [diff] |
Allow "suspend" after a "shutdown" command is canceled CarPowerManagementService needs to re-evaluate whether to power down or suspend for each "shutdown" command. Otherwise it will remember a previous power down command, even if that command is canceled. By re-evaluating, it makes takes the correct action, regardless of previous commands. Fixes: 144786716 Test: Added CarPowerManagementServiceTest.testShutdownCancel Test: Added CarPowerManagementServiceTest.testShutdownOnSuspend Test: Added CarPowerManagementServiceTest.testSuspend Merged-In: Id856e5d8546e38a7f3d568b5f871b9e945d95773 Change-Id: Id856e5d8546e38a7f3d568b5f871b9e945d95773 (cherry picked from commit cc1f7fb852230159e0daec9c40bbc8348078f46c)
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.