Enable Error Prone to detect obscure bugs.
We've been writing many new framework-specific Error Prone checkers
to help detect obscure platform bugs, and this change starts enabling
those checkers for more packages across the platform.
Bug: 155703208
Test: manual
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: I1db3412b0be40f6f78c68331ae01756887192071
diff --git a/Android.bp b/Android.bp
index f3225e2..586350d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,6 +14,37 @@
// Build the master framework library.
+// Defaults for platform code that runs inside system_server
+java_defaults {
+ name: "platform_service_defaults",
+ plugins: [
+ "error_prone_android_framework",
+ ],
+ errorprone: {
+ javacflags: [
+ "-Xep:AndroidFrameworkBinderIdentity:ERROR",
+ "-Xep:AndroidFrameworkCompatChange:ERROR",
+ "-Xep:AndroidFrameworkUid:ERROR",
+ ],
+ },
+}
+
+// Defaults for platform apps
+java_defaults {
+ name: "platform_app_defaults",
+ plugins: [
+ "error_prone_android_framework",
+ ],
+ errorprone: {
+ javacflags: [
+ // We're less worried about performance in app code
+ "-Xep:AndroidFrameworkEfficientCollections:OFF",
+ "-Xep:AndroidFrameworkEfficientParcelable:OFF",
+ "-Xep:AndroidFrameworkEfficientStrings:OFF",
+ ],
+ },
+}
+
// READ ME: ########################################################
//
// When updating this list of aidl files, consider if that aidl is