commit | c8c565a523d51be265af66c6a335119b2aa6854a | [log] [tgz] |
---|---|---|
author | Keun young Park <keunyoung@google.com> | Fri Oct 11 16:13:34 2019 -0700 |
committer | Keun young Park <keunyoung@google.com> | Fri Oct 18 08:58:53 2019 -0700 |
tree | 7b2eb45ad63f353d6899a96ca69a0fad0a2b74ca | |
parent | c90a6ad5feb4f0afd17ca73ba4e81986d91c441f [diff] |
Force car service crash handling to client - If client handles car service crash by using ServiceConnection or CarServiceLifecycleListener, client is left alive. - If client does not handle it, crash the client when car service crashes. This was partially done before by throwing RuntimeException for failed binder calls or some **wrong** disconnection handling in Car*Managers but it will crash relabily in service connection handler instead. - All binder call failure will no longer return RuntimeException as service connection handler will crash the client or client should re-do initialization anyway. - Refactored CarManagerBase to provide common utilities so that exception handling can be done in a single place. - Client should throw away all old Car*Manager and does not need to make any cleanup call for old objects. Old Car*Manager objects should clean things up by itself. - Car*Manager clean all listeners / callbacks passed from client so that those are not potentially leaked. Bug: 142543455 Bug: 142541056 Test: kill car service and check if clients using non-handling clients are crashed and handling clients are not crashing. Kitchensink carapi page can be used for this. Runs all automated tests (car api, unit, car service test). Change-Id: Id515a42041fb7000d2bcd48af9931b33dc1f9fdd
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.