Adjust default system formatter

* Apply checkstyle hook to known Java directories
* Apply clang-format hook to C and C++ header and sources only

Test: upload CL
Tag: #refactor
Change-Id: Iab475fd8b8be4ce1f4a8e41d0cb0b3bde77b5141
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index b396ce2..3f1b70e 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -7,11 +7,14 @@
 
 [Builtin Hooks Options]
 rustfmt = --config-path=rustfmt.toml
+# Only turn on clang-format check for C and C++ headers and sources
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp,hpp
 
 [Hook Scripts]
 checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
                   -fw android/app/src/com/android/bluetooth/
                       android/app/lib/mapapi/com/android/bluetooth/mapapi/
                       android/app/tests/src/com/android/bluetooth/
+                      framework/
 aosp_first = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} ${PREUPLOAD_FILES}
 yapf_hook = ./system/tools/scripts/yapf_checker.py