commit | ee220034b5e0f43bb1327e55ba3623cb0f5e363d | [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 11:52:48 2019 -0700 |
tree | 5b498d368c1603ccbc1d72819ed5a8928d4c88ef | |
parent | 27522b054264fef7a749627faf047e40bf85d87a [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). Merged-In: Id515a42041fb7000d2bcd48af9931b33dc1f9fdd 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.