commit | 5754841869dca92d20c8b33caadbf4834e749f48 | [log] [tgz] |
---|---|---|
author | Keun young Park <keunyoung@google.com> | Fri Aug 30 09:38:52 2019 -0700 |
committer | Keun young Park <keunyoung@google.com> | Fri Sep 13 11:05:52 2019 -0700 |
tree | 820016d98f239805ce5d02ef6218f4ee20e377b0 | |
parent | 41aff609f1453288b8af31c1c604a3da5507a728 [diff] |
Add new createCar with CarServiceLifecycleListener - CarServiceLifecycleListener is always called regardless of car service already published through ServiceManager or not. Client is supposed to implement initialization code inside the listener. If client is calling it from main thread, initialization will happen inside the call if car service is already available or become available before wait timeout happens. - Removed explicit disconnect from default disconnect handler as car service should be bound for the client always unless client ask for disconnect. - Expanded CarTest for new API. Also added kitchen sink test to cover all three flavours available now. We will migrate to this one in the end and can drop all others. - Also refactored lock usage to single mLock as the current double locks does not bring much value. - Updated kitchensink selinux policy to allow access to car_service binder. For normal app, this is not necesaary. - TODO(b/140950043): Force crash if apps do not handle car service restart. But that will happen in longer term. Bug: 140309761 Test: run unit test: atest android.car.CarTest, run kitchen sink and check API connection run MDTest app and make sure that new API works with normal app. Change-Id: I5582e637cd3db0f57b0c61fae19ce0da29aea4b8
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.