commit | 5414f62f72af433b9e86e8aef9b046c0bf7af291 | [log] [tgz] |
---|---|---|
author | Jordan Jozwiak <jjoz@google.com> | Wed Feb 26 15:57:42 2020 -0800 |
committer | Jordan Jozwiak <jjoz@google.com> | Thu Mar 05 17:09:42 2020 -0800 |
tree | f500a87934b8521af863df14b93af482d7a16c7c | |
parent | a525827bea154d8b14ebf21f5e036b3069c5735f [diff] |
Fix gaze service creation through intent The zero arg constructor is necessary to so that bindServiceAsUser can properly start the service. The GazeSupplier can't assume that it will get a Context from a constructor, so I made some changes related to that. The additional tests are related to this instantion: - GazeDriverAwarenessSupplier test validates that the service can be created from an intent, which requires a zero arg constructor. - Driver Distraction Service test that validates that the strings specified in the config are all services that can be bound to with the proper binder type. - Driver Distraction Service test that validates the init logic, and tests that the service attempts to bind to the services declared in the config. There's no end-to-end test here. I'd like to have one, but that may be better suited for a CTS test. Bug: 150327895 Test: atest DriverDistractionExperimentalFeatureServiceTest Change-Id: I5a81ee3e3f7659a042656575d31de3d9a299abb1
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.