• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// OBEX library
2package {
3    default_applicable_licenses: ["obex_license"],
4}
5
6// Added automatically by a large-scale-change that took the approach of
7// 'apply every license found to every target'. While this makes sure we respect
8// every license restriction, it may not be entirely correct.
9//
10// e.g. GPL in an MIT project might only apply to the contrib/ directory.
11//
12// Please consider splitting the single license below into multiple licenses,
13// taking care not to lose any license_kind information, and overriding the
14// default license using the 'licenses: [...]' property on targets as needed.
15//
16// For unused files, consider creating a 'fileGroup' with "//visibility:private"
17// to attach the license to, and including a comment whether the files may be
18// used in the current project.
19// See: http://go/android-license-faq
20license {
21    name: "obex_license",
22    visibility: [":__subpackages__"],
23    license_kinds: [
24        "SPDX-license-identifier-Apache-2.0",
25        "SPDX-license-identifier-BSD",
26    ],
27    license_text: [
28        "LICENSE",
29    ],
30}
31
32java_library {
33    name: "com.android.obex",
34
35    srcs: ["**/*.java"],
36    apex_available: ["com.android.bt"],
37    sdk_version: "module_current",
38    min_sdk_version: "Tiramisu",
39
40    errorprone: {
41        enabled: true,
42        javacflags: [
43            "-Xep:AlmostJavadoc:ERROR",
44            "-Xep:AlreadyChecked:ERROR",
45            "-Xep:BadImport:ERROR",
46            "-Xep:CatchAndPrintStackTrace:ERROR",
47            "-Xep:CatchFail:ERROR",
48            "-Xep:CheckReturnValue:ERROR",
49            "-Xep:ClassCanBeStatic:ERROR",
50            "-Xep:DateFormatConstant:ERROR",
51            "-Xep:DirectInvocationOnMock:ERROR",
52            "-Xep:DuplicateBranches:ERROR",
53            "-Xep:EmptyBlockTag:ERROR",
54            "-Xep:EmptyCatch:ERROR",
55            "-Xep:EnumOrdinal:ERROR",
56            "-Xep:EqualsGetClass:ERROR",
57            "-Xep:EqualsHashCode:ERROR",
58            "-Xep:EqualsIncompatibleType:ERROR",
59            "-Xep:FallThrough:ERROR",
60            "-Xep:Finalize:ERROR",
61            "-Xep:ForEachIterable:ERROR",
62            "-Xep:FutureReturnValueIgnored:ERROR",
63            "-Xep:GuardedBy:ERROR",
64            "-Xep:HidingField:ERROR",
65            "-Xep:InconsistentHashCode:ERROR",
66            "-Xep:InlineFormatString:ERROR",
67            "-Xep:InlineMeInliner:ERROR",
68            "-Xep:InvalidBlockTag:ERROR",
69            "-Xep:InvalidInlineTag:ERROR",
70            "-Xep:InvalidParam:ERROR",
71            "-Xep:JavaUtilDate:ERROR",
72            "-Xep:JdkObsolete:ERROR",
73            "-Xep:LockOnNonEnclosingClassLiteral:ERROR",
74            "-Xep:LongFloatConversion:ERROR",
75            "-Xep:LoopOverCharArray:ERROR",
76            "-Xep:MethodCanBeStatic:ERROR",
77            "-Xep:MissingCasesInEnumSwitch:ERROR",
78            "-Xep:MixedMutabilityReturnType:ERROR",
79            "-Xep:MockNotUsedInProduction:ERROR",
80            "-Xep:ModifiedButNotUsed:ERROR",
81            "-Xep:ModifyCollectionInEnhancedForLoop:ERROR",
82            "-Xep:NarrowCalculation:ERROR",
83            "-Xep:NarrowingCompoundAssignment:ERROR",
84            "-Xep:NonApiType:ERROR",
85            "-Xep:NonAtomicVolatileUpdate:ERROR",
86            "-Xep:NonCanonicalType:ERROR",
87            "-Xep:NotJavadoc:ERROR",
88            "-Xep:NullablePrimitive:ERROR",
89            "-Xep:NullableVoid:ERROR",
90            "-Xep:ObjectEqualsForPrimitives:ERROR",
91            "-Xep:OperatorPrecedence:ERROR",
92            "-Xep:RedundantControlFlow:ERROR",
93            "-Xep:ReferenceEquality:ERROR",
94            "-Xep:ReturnAtTheEndOfVoidFunction:ERROR",
95            "-Xep:ReturnFromVoid:ERROR",
96            "-Xep:StaticAssignmentInConstructor:ERROR",
97            "-Xep:StaticGuardedByInstance:ERROR",
98            "-Xep:StringCaseLocaleUsage:ERROR",
99            "-Xep:StringCharset:ERROR",
100            "-Xep:SynchronizeOnNonFinalField:ERROR",
101            "-Xep:ThreadJoinLoop:ERROR",
102            "-Xep:ToStringReturnsNull:ERROR",
103            "-Xep:TruthConstantAsserts:ERROR",
104            "-Xep:TruthIncompatibleType:ERROR",
105            "-Xep:UndefinedEquals:ERROR",
106            "-Xep:UnnecessaryAssignment:ERROR",
107            "-Xep:UnnecessaryAsync:ERROR",
108            "-Xep:UnnecessaryStringBuilder:ERROR",
109            "-Xep:UnrecognisedJavadocTag:ERROR",
110            "-Xep:UnusedMethod:ERROR",
111            "-Xep:UnusedNestedClass:ERROR",
112            "-Xep:UnusedVariable:ERROR",
113            "-Xep:VariableNameSameAsType:ERROR",
114            "-Xep:WaitNotInLoop:ERROR",
115            "-Xep:WakelockReleasedDangerously:ERROR",
116        ],
117    },
118}
119