commit | d22857cacd276e2907ed79f44ee75ccf5fb20a09 | [log] [tgz] |
---|---|---|
author | Jordan Jozwiak <jjoz@google.com> | Fri Jan 17 12:26:42 2020 -0800 |
committer | Jordan Jozwiak <jjoz@google.com> | Fri Feb 21 23:26:26 2020 +0000 |
tree | ad661bbfb7355cf846a9fc74147d1ef43e7d12bd | |
parent | f1f3961cdafa1ba368b5f4b1dbab1e16e85dbfb1 [diff] |
Allow settings a freeform string restriction mode Allow OEMs to create any restriction mode they want, as identified by its string. Previously we were hard-coding integer values, such as passenger mode. We realized this wasn't going to be scalable as OEMs started requesting modes for "teen" and different autonomy levels. This change is backward-compatible with the existing XML config. - Change APIs from using hard-coded IntDefs to Strings - XML configuration is the same, but parsing logic needs to change - Use a new JSON format to make it more readable and still efficient - Backward compatible with original schema Bug: 147762570 Test: atest CarServiceTest && atest AndroidCarApiTest Change-Id: Id97512f351ef12b65b42285540a51b295a257a43 Merged-In: Id97512f351ef12b65b42285540a51b295a257a43 (cherry picked from commit 0b0cf28bd1ae479ddfdc99d3cdd9a104cb79c04b)
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.