| Bob Badour | 92ecf7c | 2021-02-12 18:05:29 -0800 | [diff] [blame] | 1 | package { |
| Etienne Ruffieux | 917abc3 | 2022-02-28 14:07:17 +0000 | [diff] [blame] | 2 | default_visibility: [":__subpackages__"], |
| Bob Badour | 92ecf7c | 2021-02-12 18:05:29 -0800 | [diff] [blame] | 3 | default_applicable_licenses: ["system_bt_license"], |
| William Escande | d77d9d1 | 2025-08-11 14:21:21 -0700 | [diff] [blame] | 4 | default_team: "trendy_team_bluetooth", |
| Bob Badour | 92ecf7c | 2021-02-12 18:05:29 -0800 | [diff] [blame] | 5 | } |
| 6 | |
| 7 | // Added automatically by a large-scale-change that took the approach of |
| 8 | // 'apply every license found to every target'. While this makes sure we respect |
| 9 | // every license restriction, it may not be entirely correct. |
| 10 | // |
| 11 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 12 | // |
| 13 | // Please consider splitting the single license below into multiple licenses, |
| 14 | // taking care not to lose any license_kind information, and overriding the |
| 15 | // default license using the 'licenses: [...]' property on targets as needed. |
| 16 | // |
| 17 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 18 | // to attach the license to, and including a comment whether the files may be |
| 19 | // used in the current project. |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 22 | name: "system_bt_license", |
| 23 | visibility: [":__subpackages__"], |
| 24 | license_kinds: [ |
| 25 | "SPDX-license-identifier-Apache-2.0", |
| 26 | "SPDX-license-identifier-BSD", |
| 27 | "SPDX-license-identifier-MIT", |
| 28 | "legacy_unencumbered", |
| 29 | ], |
| 30 | license_text: [ |
| 31 | "NOTICE", |
| 32 | ], |
| 33 | } |
| 34 | |
| Jack He | cac30a2 | 2018-08-28 18:28:55 -0700 | [diff] [blame] | 35 | filegroup { |
| Thomas Girardier | 21e6e03 | 2025-02-12 21:39:33 -0800 | [diff] [blame] | 36 | name: "BluetoothGTestConfigTemplate", |
| Colin Cross | 03e29e5 | 2019-05-23 14:12:59 -0700 | [diff] [blame] | 37 | srcs: [ |
| Thomas Girardier | 21e6e03 | 2025-02-12 21:39:33 -0800 | [diff] [blame] | 38 | "BluetoothGTestTemplate.xml", |
| 39 | ], |
| 40 | } |
| 41 | |
| 42 | filegroup { |
| 43 | name: "BluetoothRustTestConfigTemplate", |
| 44 | srcs: [ |
| 45 | "BluetoothRustTestTemplate.xml", |
| Colin Cross | 03e29e5 | 2019-05-23 14:12:59 -0700 | [diff] [blame] | 46 | ], |
| Jack He | cac30a2 | 2018-08-28 18:28:55 -0700 | [diff] [blame] | 47 | } |
| David Duarte | a84ffd1 | 2023-03-28 17:58:57 +0000 | [diff] [blame] | 48 | |
| David Duarte | 4043a70 | 2023-06-04 16:44:03 +0000 | [diff] [blame] | 49 | // This default contains properties that should be common to all the cc targets |
| 50 | // developed by the Bluetooth team. |
| 51 | // |
| 52 | // Be careful when adding new properties here: |
| 53 | // - The option should not impact negatively any target, for example "-Wno-*" |
| 54 | // options should not be added here but instead on every targets needing |
| 55 | // them to avoid allowing adding new warnings in targets that didn't contained |
| 56 | // them (you can use the bpmodify tool to ease the work of adding this warning |
| 57 | // everywhere) and also allows cleaning them one at a time. |
| 58 | // |
| 59 | // - The option should apply to all the c/c++ code developed by the Bluetooth team: |
| 60 | // test, tools, fuzzers, etc, not only production targets, if you need to add an option |
| 61 | // for a subset of Bluetooth cc targets you should look at the defaults including this |
| 62 | // defaults like "fluoride_defaults" and "gd_defaults". |
| 63 | // |
| 64 | // - Try to keep the name as precise as possible to document to the dependent of what |
| 65 | // this default contains. This also means that if you add a new option that isn't |
| 66 | // documented by the name of this default, rename it. |
| 67 | // |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 68 | // - Try avoiding adding option that would not fit "future" targets, for example dependencies, |
| David Duarte | 4043a70 | 2023-06-04 16:44:03 +0000 | [diff] [blame] | 69 | // even if every modules of Bluetooth depends on a specific dependency it should be left out |
| 70 | // from this default to not push it for future targets that might not need it. |
| 71 | cc_defaults { |
| 72 | name: "bluetooth_cflags", |
| 73 | cflags: [ |
| 74 | "-Wall", |
| 75 | "-Werror", |
| 76 | "-Wextra", |
| Henri Chataing | 22f5e11 | 2024-09-21 01:20:25 +0000 | [diff] [blame] | 77 | "-Wmissing-prototypes", |
| William Escande | 2729718 | 2023-10-09 17:15:04 -0700 | [diff] [blame] | 78 | // Override global.go that demote the error to a warning |
| David Duarte | c8d2a49 | 2024-04-11 18:02:38 +0000 | [diff] [blame] | 79 | "-Werror=format", |
| William Escande | 2729718 | 2023-10-09 17:15:04 -0700 | [diff] [blame] | 80 | "-Werror=reorder-init-list", |
| Henri Chataing | 55c29e1 | 2025-08-26 23:14:31 +0000 | [diff] [blame] | 81 | "-Werror=unused-variable", |
| Henri Chataing | 90bcf25 | 2025-02-13 19:04:05 +0000 | [diff] [blame] | 82 | "-Wthread-safety", |
| David Duarte | 4043a70 | 2023-06-04 16:44:03 +0000 | [diff] [blame] | 83 | ], |
| David Duarte | 19954d1 | 2023-08-01 14:07:56 +0000 | [diff] [blame] | 84 | c_std: "c99", |
| Myles Watson | dbd43e7 | 2024-02-15 11:02:58 -0800 | [diff] [blame] | 85 | cpp_std: "c++20", |
| David Duarte | 4043a70 | 2023-06-04 16:44:03 +0000 | [diff] [blame] | 86 | } |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 87 | |
| Henri Chataing | ee8f000 | 2025-08-11 15:30:48 -0700 | [diff] [blame] | 88 | // Base configuration for Bluetooth fuzz targets. |
| 89 | cc_defaults { |
| 90 | name: "bluetooth_fuzz_config", |
| 91 | fuzz_config: { |
| 92 | componentid: 27441, // Android > Android OS & Apps > Systems > bluetooth |
| 93 | fuzzed_code_usage: "shipped", |
| 94 | service_privilege: "privileged", |
| 95 | vector: "remote", |
| 96 | users: "single_user", |
| 97 | cc: [ |
| 98 | "android-bluetooth-security@google.com", |
| 99 | "android-security-assurance-redteam@google.com", |
| 100 | ], |
| 101 | hotlists: [ |
| 102 | "3705175", // ASA Red Team Discovered Issues |
| 103 | "4593311", // Ittiam Fuzzer Bug |
| 104 | "4810445", // ASA Red Team: Bluetooth Engagement Issues |
| 105 | ], |
| 106 | acknowledgement: [ |
| 107 | "Android Bluetooth Team of Google", |
| 108 | "Android Red Team of Google", |
| 109 | ], |
| 110 | }, |
| 111 | } |
| 112 | |
| Henri Chataing | 31dba77 | 2024-10-18 14:33:17 -0700 | [diff] [blame] | 113 | // List of tidy checks that are enabled for cc targets. |
| 114 | // Note that the goal is not to enable all checks, many of them will |
| 115 | // appear as noise especially in the modernize-* range. |
| 116 | bluetooth_tidy_checks = [ |
| 117 | "-*", |
| 118 | "misc-*", |
| 119 | |
| Henri Chataing | 98a8a5c | 2025-04-08 22:46:23 +0000 | [diff] [blame] | 120 | // Checks for unused and missing includes. |
| 121 | // Should be enabled as an alternative to IWYU, but currently generates |
| 122 | // too many warnings. |
| 123 | "-misc-include-cleaner", |
| 124 | |
| Henri Chataing | 31dba77 | 2024-10-18 14:33:17 -0700 | [diff] [blame] | 125 | // This check implements detection of local variables which could be declared |
| 126 | // as const but are not. |
| 127 | "-misc-const-correctness", |
| Henri Chataing | 693806a | 2024-10-23 20:45:34 +0000 | [diff] [blame] | 128 | |
| 129 | // Finds classes that contain non-static data members in addition to user-declared |
| 130 | // non-static member functions and diagnose all data members declared with a |
| 131 | // non-public access specifier. |
| 132 | "-misc-non-private-member-variables-in-classes", |
| Henri Chataing | 31dba77 | 2024-10-18 14:33:17 -0700 | [diff] [blame] | 133 | ] |
| 134 | |
| 135 | // This default tidy checks that will be run against all the cc targets |
| 136 | // developed by the Bluetooth team. |
| 137 | cc_defaults { |
| 138 | name: "bluetooth_tidy", |
| 139 | tidy: true, |
| 140 | tidy_checks: bluetooth_tidy_checks, |
| 141 | tidy_checks_as_errors: bluetooth_tidy_checks, |
| 142 | } |
| 143 | |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 144 | java_defaults { |
| 145 | name: "bluetooth_errorprone_rules", |
| 146 | errorprone: { |
| 147 | enabled: true, |
| 148 | javacflags: [ |
| 149 | "-Xep:AlmostJavadoc:ERROR", |
| 150 | "-Xep:AlreadyChecked:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 151 | "-Xep:AmbiguousMethodReference:ERROR", |
| Ömer Faruk Yılmaz | 88ec13f | 2025-02-25 06:20:08 +0000 | [diff] [blame] | 152 | "-Xep:ArrayRecordComponent:ERROR", |
| William Escande | 685846c | 2025-05-02 10:41:22 -0700 | [diff] [blame] | 153 | "-Xep:AssignmentExpression:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 154 | "-Xep:AttemptedNegativeZero:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 155 | "-Xep:BadImport:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 156 | "-Xep:BadInstanceof:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 157 | "-Xep:CatchAndPrintStackTrace:ERROR", |
| 158 | "-Xep:CatchFail:ERROR", |
| 159 | "-Xep:CheckReturnValue:ERROR", |
| 160 | "-Xep:ClassCanBeStatic:ERROR", |
| 161 | "-Xep:DateFormatConstant:ERROR", |
| 162 | "-Xep:DirectInvocationOnMock:ERROR", |
| William Escande | f4c2914 | 2024-12-11 18:36:09 -0800 | [diff] [blame] | 163 | "-Xep:DuplicateBranches:ERROR", |
| William Escande | 8c511f6 | 2025-07-30 18:42:21 -0700 | [diff] [blame] | 164 | "-Xep:EffectivelyPrivate:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 165 | "-Xep:EmptyBlockTag:ERROR", |
| 166 | "-Xep:EmptyCatch:ERROR", |
| William Escande | 023cccb | 2024-10-17 17:56:01 -0700 | [diff] [blame] | 167 | "-Xep:EnumOrdinal:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 168 | "-Xep:EqualsGetClass:ERROR", |
| 169 | "-Xep:EqualsHashCode:ERROR", |
| 170 | "-Xep:EqualsIncompatibleType:ERROR", |
| 171 | "-Xep:FallThrough:ERROR", |
| Ömer Faruk Yılmaz | 4e1dfbd | 2025-04-15 08:49:51 +0000 | [diff] [blame] | 172 | // "-Xep:FieldCanBeFinal:ERROR", // TODO: b/410743019 - enable this check |
| William Escande | 4e24ffe | 2025-02-20 19:02:10 -0800 | [diff] [blame] | 173 | "-Xep:FieldCanBeLocal:ERROR", |
| William Escande | d4ada32 | 2025-02-20 18:55:31 -0800 | [diff] [blame] | 174 | "-Xep:FieldCanBeStatic:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 175 | "-Xep:Finalize:ERROR", |
| William Escande | 0f45ca0 | 2025-02-20 18:21:32 -0800 | [diff] [blame] | 176 | "-Xep:ForEachIterable:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 177 | "-Xep:FutureReturnValueIgnored:ERROR", |
| 178 | "-Xep:GuardedBy:ERROR", |
| 179 | "-Xep:HidingField:ERROR", |
| 180 | "-Xep:InconsistentHashCode:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 181 | "-Xep:IncrementInForLoopAndHeader:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 182 | "-Xep:InlineFormatString:ERROR", |
| 183 | "-Xep:InlineMeInliner:ERROR", |
| William Escande | edd0da0 | 2025-07-01 11:38:26 -0700 | [diff] [blame] | 184 | "-Xep:IntLiteralCast:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 185 | "-Xep:InvalidBlockTag:ERROR", |
| 186 | "-Xep:InvalidInlineTag:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 187 | "-Xep:InvalidLink:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 188 | "-Xep:InvalidParam:ERROR", |
| William Escande | e7a434f | 2025-05-02 22:44:22 -0700 | [diff] [blame] | 189 | "-Xep:JUnit4EmptyMethods:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 190 | "-Xep:JavaLangClash:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 191 | "-Xep:JavaUtilDate:ERROR", |
| 192 | "-Xep:JdkObsolete:ERROR", |
| 193 | "-Xep:LockOnNonEnclosingClassLiteral:ERROR", |
| 194 | "-Xep:LongFloatConversion:ERROR", |
| 195 | "-Xep:LoopOverCharArray:ERROR", |
| William Escande | 0f45ca0 | 2025-02-20 18:21:32 -0800 | [diff] [blame] | 196 | "-Xep:MethodCanBeStatic:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 197 | "-Xep:MissingCasesInEnumSwitch:ERROR", |
| William Escande | edd9e9f | 2025-05-13 15:09:40 -0700 | [diff] [blame] | 198 | "-Xep:MissingDefault:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 199 | "-Xep:MixedMutabilityReturnType:ERROR", |
| 200 | "-Xep:MockNotUsedInProduction:ERROR", |
| 201 | "-Xep:ModifiedButNotUsed:ERROR", |
| 202 | "-Xep:ModifyCollectionInEnhancedForLoop:ERROR", |
| 203 | "-Xep:NarrowCalculation:ERROR", |
| 204 | "-Xep:NarrowingCompoundAssignment:ERROR", |
| 205 | "-Xep:NonApiType:ERROR", |
| 206 | "-Xep:NonAtomicVolatileUpdate:ERROR", |
| William Escande | 6626b1a | 2025-04-07 17:21:47 -0700 | [diff] [blame] | 207 | "-Xep:NonCanonicalStaticMemberImport:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 208 | "-Xep:NonCanonicalType:ERROR", |
| 209 | "-Xep:NotJavadoc:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 210 | "-Xep:NullOptional:ERROR", |
| 211 | "-Xep:NullableOptional:ERROR", |
| William Escande | 5cd9c5e | 2024-10-23 16:43:14 -0700 | [diff] [blame] | 212 | "-Xep:NullablePrimitive:ERROR", |
| 213 | "-Xep:NullableVoid:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 214 | "-Xep:ObjectEqualsForPrimitives:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 215 | // "-Xep:ObjectToString:ERROR", // Wrongfully reporting errors |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 216 | "-Xep:OperatorPrecedence:ERROR", |
| William Escande | 8ead8b1 | 2024-12-11 19:14:47 -0800 | [diff] [blame] | 217 | "-Xep:RedundantControlFlow:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 218 | "-Xep:ReferenceEquality:ERROR", |
| 219 | "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", |
| Antoine SOULIER | 0dc741f | 2024-08-21 18:07:29 +0000 | [diff] [blame] | 220 | "-Xep:ReturnFromVoid:ERROR", |
| William Escande | 0b7dd7f | 2025-02-19 16:00:51 -0800 | [diff] [blame] | 221 | "-Xep:SelfAssertion:ERROR", |
| William Escande | 62a85d8 | 2025-06-28 21:57:39 -0700 | [diff] [blame] | 222 | "-Xep:StatementSwitchToExpressionSwitch:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 223 | "-Xep:StaticAssignmentInConstructor:ERROR", |
| 224 | "-Xep:StaticGuardedByInstance:ERROR", |
| 225 | "-Xep:StringCaseLocaleUsage:ERROR", |
| 226 | "-Xep:StringCharset:ERROR", |
| William Escande | 004fcbc | 2025-05-02 10:44:01 -0700 | [diff] [blame] | 227 | "-Xep:StringConcatToTextBlock:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 228 | // "-Xep:StringSplitter:ERROR", // Not enabled in android platform |
| William Escande | edd9e9f | 2025-05-13 15:09:40 -0700 | [diff] [blame] | 229 | "-Xep:SwitchDefault:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 230 | "-Xep:SynchronizeOnNonFinalField:ERROR", |
| William Escande | 55cf6ca | 2025-02-13 15:59:15 -0800 | [diff] [blame] | 231 | "-Xep:ThreadJoinLoop:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 232 | "-Xep:ToStringReturnsNull:ERROR", |
| William Escande | edd9e9f | 2025-05-13 15:09:40 -0700 | [diff] [blame] | 233 | "-Xep:TraditionalSwitchExpression:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 234 | "-Xep:TruthAssertExpected:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 235 | "-Xep:TruthConstantAsserts:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 236 | "-Xep:TruthGetOrDefault:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 237 | "-Xep:TruthIncompatibleType:ERROR", |
| 238 | "-Xep:UndefinedEquals:ERROR", |
| 239 | "-Xep:UnnecessaryAssignment:ERROR", |
| 240 | "-Xep:UnnecessaryAsync:ERROR", |
| William Escande | edd9e9f | 2025-05-13 15:09:40 -0700 | [diff] [blame] | 241 | "-Xep:UnnecessaryBreakInSwitch:ERROR", |
| 242 | "-Xep:UnnecessaryDefaultInEnumSwitch:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 243 | "-Xep:UnnecessaryStringBuilder:ERROR", |
| 244 | "-Xep:UnrecognisedJavadocTag:ERROR", |
| 245 | "-Xep:UnusedMethod:ERROR", |
| 246 | "-Xep:UnusedNestedClass:ERROR", |
| William Escande | 1559299 | 2025-02-26 17:43:01 -0800 | [diff] [blame] | 247 | "-Xep:UnusedTypeParameter:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 248 | "-Xep:UnusedVariable:ERROR", |
| William Escande | edd9e9f | 2025-05-13 15:09:40 -0700 | [diff] [blame] | 249 | "-Xep:UseEnumSwitch:ERROR", |
| William Escande | 57679d5 | 2024-10-28 14:23:27 -0700 | [diff] [blame] | 250 | "-Xep:VariableNameSameAsType:ERROR", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 251 | "-Xep:WaitNotInLoop:ERROR", |
| 252 | "-Xep:WakelockReleasedDangerously:ERROR", |
| 253 | |
| 254 | // Exclude generated files |
| 255 | "-XepExcludedPaths:.*/srcjars/.*", |
| 256 | |
| William Escande | bed62da | 2024-10-21 14:16:20 -0700 | [diff] [blame] | 257 | // The @InlineMe annotation could be made available, but it would |
| William Escande | 57679d5 | 2024-10-28 14:23:27 -0700 | [diff] [blame] | 258 | // apply on external facing API. This is not desired. |
| 259 | // For more context, see https://r.android.com/3303475 |
| William Escande | bed62da | 2024-10-21 14:16:20 -0700 | [diff] [blame] | 260 | "-Xep:InlineMeSuggester:OFF", |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 261 | ], |
| 262 | }, |
| 263 | } |
| 264 | |
| 265 | java_defaults { |
| 266 | name: "bluetooth_framework_errorprone_rules", |
| 267 | defaults: ["bluetooth_errorprone_rules"], |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 268 | errorprone: { |
| William Escande | c7480a1 | 2024-11-12 11:51:59 -0800 | [diff] [blame] | 269 | extra_check_modules: ["error_prone_android_framework"], |
| 270 | |
| William Escande | 2256094 | 2024-09-18 16:44:36 -0700 | [diff] [blame] | 271 | javacflags: [ |
| 272 | "-Xep:AndroidFrameworkBinderIdentity:ERROR", |
| 273 | "-Xep:AndroidFrameworkBluetoothPermission:ERROR", |
| 274 | "-Xep:AndroidFrameworkCompatChange:ERROR", |
| 275 | "-Xep:AndroidFrameworkEfficientParcelable:ERROR", |
| 276 | "-Xep:AndroidFrameworkEfficientStrings:ERROR", |
| 277 | "-Xep:AndroidFrameworkPendingIntentMutability:ERROR", |
| 278 | "-Xep:AndroidFrameworkRequiresPermission:ERROR", |
| 279 | "-Xep:AndroidFrameworkRethrowFromSystem:ERROR", |
| 280 | "-Xep:AndroidFrameworkTargetSdk:ERROR", |
| 281 | "-Xep:AndroidHideInComments:ERROR", |
| 282 | |
| 283 | // After fixing this errorprone, we decided to not merge the change. |
| 284 | // It is not very readable and the benefits are minimal when looking |
| 285 | // at the size of the maps used in the Bluetooth application. |
| 286 | // See https://r.android.com/3200511 |
| 287 | "-Xep:AndroidFrameworkEfficientCollections:OFF", |
| 288 | |
| 289 | // Does not look pertinent in our situation |
| 290 | "-Xep:AndroidFrameworkEfficientXml:OFF", |
| 291 | ], |
| 292 | }, |
| 293 | } |
| William Escande | aa2964e | 2025-04-03 14:29:20 -0700 | [diff] [blame] | 294 | |
| 295 | java_defaults { |
| 296 | name: "bluetooth_lint_rules", |
| 297 | lint: { |
| 298 | error_checks: [ |
| 299 | "Autofill", |
| 300 | "DefaultLocale", |
| 301 | "DuplicateDefinition", |
| 302 | // "ExportedContentProvider", // TODO: b/289445022 - enable this check |
| 303 | // "ExportedReceiver", // TODO: b/289445022 - enable this check |
| 304 | // "ExportedService", // TODO: b/289445022 - enable this check |
| 305 | "ExtraText", |
| 306 | "ExtraTranslation", |
| 307 | "GestureBackNavigation", |
| 308 | "GuardedLogInvocation", |
| 309 | "HandlerLeak", |
| 310 | "InflateParams", |
| 311 | // "InvalidPermission", // TODO: b/289445022 - enable this check |
| 312 | "LabelFor", |
| 313 | "MissingClass", |
| 314 | // "MissingVersion", // TODO: b/289445022 - enable this check |
| 315 | "MonochromeLauncherIcon", |
| 316 | "NewApi", |
| 317 | "ObsoleteSdkInt", |
| 318 | // "QueryAllPackagesPermission", // TODO: b/289445022 - enable this check |
| 319 | "Recycle", |
| 320 | "RtlHardcoded", |
| 321 | "RtlSymmetry", |
| 322 | "ScrollViewSize", |
| 323 | "SetTextI18n", |
| 324 | "SimpleDateFormat", |
| 325 | "StaticFieldLeak", |
| 326 | "StringFormatCount", |
| 327 | "StringFormatInvalid", |
| 328 | "TextFields", |
| 329 | "TypographyEllipsis", |
| 330 | "UseSparseArrays", |
| 331 | "UseValueOf", |
| 332 | "VectorPath", |
| 333 | "VisibleForTests", |
| 334 | "Wakelock", |
| 335 | "WakelockTimeout", |
| 336 | ], |
| 337 | extra_check_modules: ["BluetoothLintChecker"], |
| 338 | }, |
| 339 | } |