[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/StatsD

Added SPDX-license-identifier-Apache-2.0 to:
  aidl/Android.bp
  apex/Android.bp
  apex/testing/Android.bp
  apex/tests/libstatspull/Android.bp
  bin/Android.bp
  bin/tools/localtools/Android.bp
  framework/Android.bp
  framework/test/Android.bp
  lib/libstatspull/Android.bp
  lib/libstatssocket/Android.bp
  service/Android.bp
  tests/Android.bp
  tests/apps/statsdapp/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I071c6f395246b2b1bdec480d1b97900eecd27408
diff --git a/aidl/Android.bp b/aidl/Android.bp
index f66cf7c..8fd9b2f 100644
--- a/aidl/Android.bp
+++ b/aidl/Android.bp
@@ -13,6 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 filegroup {
     name: "framework-statsd-aidl-sources",
     srcs: ["**/*.aidl"],
diff --git a/apex/Android.bp b/apex/Android.bp
index 765a44c..0624390 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 apex {
     name: "com.android.os.statsd",
     defaults: ["com.android.os.statsd-defaults"],
diff --git a/apex/testing/Android.bp b/apex/testing/Android.bp
index a9cd0cc..e521326 100644
--- a/apex/testing/Android.bp
+++ b/apex/testing/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 apex_test {
     name: "test_com.android.os.statsd",
     visibility: [
diff --git a/apex/tests/libstatspull/Android.bp b/apex/tests/libstatspull/Android.bp
index 05b3e04..82dba72 100644
--- a/apex/tests/libstatspull/Android.bp
+++ b/apex/tests/libstatspull/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "LibStatsPullTests",
     static_libs: [
diff --git a/bin/Android.bp b/bin/Android.bp
index 5fb1c1a..25dd710 100644
--- a/bin/Android.bp
+++ b/bin/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_defaults {
     name: "statsd_defaults",
 
diff --git a/bin/tools/localtools/Android.bp b/bin/tools/localtools/Android.bp
index 69a43a8..a0c9fd9 100644
--- a/bin/tools/localtools/Android.bp
+++ b/bin/tools/localtools/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_binary_host {
     name: "statsd_localdrive",
     manifest: "localdrive_manifest.txt",
@@ -43,4 +47,3 @@
         "guava",
     ],
 }
-
diff --git a/framework/Android.bp b/framework/Android.bp
index 50e3230..ebc3d0a 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -13,7 +13,8 @@
 // limitations under the License.
 
 package {
-    default_visibility: [ ":__pkg__" ]
+    default_visibility: [ ":__pkg__" ],
+    default_applicable_licenses: ["Android-Apache-2.0"],
 }
 
 genrule {
@@ -108,4 +109,3 @@
         "//packages/modules/StatsD/apex:__subpackages__",
     ],
 }
-
diff --git a/framework/test/Android.bp b/framework/test/Android.bp
index 5cc5647..45b58d1 100644
--- a/framework/test/Android.bp
+++ b/framework/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "FrameworkStatsdTest",
     sdk_version: "module_current",
diff --git a/lib/libstatspull/Android.bp b/lib/libstatspull/Android.bp
index 54ef7a8..5f29f16 100644
--- a/lib/libstatspull/Android.bp
+++ b/lib/libstatspull/Android.bp
@@ -17,6 +17,10 @@
 // ==========================================================
 // Native library to register a pull atom callback with statsd
 // ==========================================================
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_defaults {
     name: "libstatspull_defaults",
     srcs: [
diff --git a/lib/libstatssocket/Android.bp b/lib/libstatssocket/Android.bp
index a6ea185..695eb4d 100644
--- a/lib/libstatssocket/Android.bp
+++ b/lib/libstatssocket/Android.bp
@@ -17,6 +17,10 @@
 // =========================================================================
 // Native library to write stats log to statsd socket on Android R and later
 // =========================================================================
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_defaults {
     name: "libstatssocket_defaults",
     srcs: [
diff --git a/service/Android.bp b/service/Android.bp
index df0ccfc..7f8f741 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 filegroup {
     name: "service-statsd-sources",
     srcs: [
diff --git a/tests/Android.bp b/tests/Android.bp
index 386606b..6b4fe1b 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test_host {
     name: "CtsStatsdHostTestCases",
 
diff --git a/tests/apps/statsdapp/Android.bp b/tests/apps/statsdapp/Android.bp
index 6e0ef51..61ee52c 100644
--- a/tests/apps/statsdapp/Android.bp
+++ b/tests/apps/statsdapp/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_library_shared {
     name: "liblmkhelper",
     srcs: ["jni/alloc_stress_activity.cpp"],