Merge "Refactor for AudioTrack/Record callback interface"
diff --git a/Android.bp b/Android.bp
index e003d69..a961572 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,31 +13,21 @@
 // limitations under the License.
 
 package {
-    default_applicable_licenses: ["frameworks_wilhelm_license"],
+    // See: http://go/android-license-faq
+    default_applicable_licenses: [
+        "Android-Apache-2.0",
+        "frameworks_wilhelm_license",
+    ],
 }
 
-// Added automatically by a large-scale-change that took the approach of
-// 'apply every license found to every target'. While this makes sure we respect
-// every license restriction, it may not be entirely correct.
-//
-// e.g. GPL in an MIT project might only apply to the contrib/ directory.
-//
-// Please consider splitting the single license below into multiple licenses,
-// taking care not to lose any license_kind information, and overriding the
-// default license using the 'licenses: [...]' property on targets as needed.
-//
-// For unused files, consider creating a 'fileGroup' with "//visibility:private"
-// to attach the license to, and including a comment whether the files may be
-// used in the current project.
-// See: http://go/android-license-faq
 license {
     name: "frameworks_wilhelm_license",
     visibility: [":__subpackages__"],
-    license_kinds: [
-        "SPDX-license-identifier-Apache-2.0",
-        "SPDX-license-identifier-MIT",
+    license_kinds: ["SPDX-license-identifier-MIT"],
+    license_text: [
+        "include/OMXAL/NOTICE",
+        "include/SLES/NOTICE",
     ],
-    // large-scale-change unable to identify any license_text files
 }
 
 ndk_headers {
diff --git a/src/Android.bp b/src/Android.bp
index 827b4a4..49e282b 100644
--- a/src/Android.bp
+++ b/src/Android.bp
@@ -1,11 +1,9 @@
 package {
     // See: http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // all of the 'license_kinds' from "frameworks_wilhelm_license"
-    // to get the below license kinds:
-    //   SPDX-license-identifier-Apache-2.0
-    //   SPDX-license-identifier-MIT
-    default_applicable_licenses: ["frameworks_wilhelm_license"],
+    default_applicable_licenses: [
+        "Android-Apache-2.0",
+        "frameworks_wilhelm_license",  // MIT
+    ],
 }
 
 cc_library_static {
@@ -211,6 +209,7 @@
         "jni_headers",
         "libmediametrics_headers",
         "libOpenSLES_headers",
+        "libstagefright_mpeg2support_headers",
         "media_plugin_headers",
     ],
 
@@ -246,10 +245,6 @@
         "libstagefright_http_support",
     ],
 
-    include_dirs: [
-        "frameworks/av/media/libstagefright/mpeg2ts",
-    ],
-
     export_shared_lib_headers: [
         "libmedia",
         "libstagefright",
diff --git a/src/android/android_StreamPlayer.cpp b/src/android/android_StreamPlayer.cpp
index 1bef4a5..7ad1f37 100644
--- a/src/android/android_StreamPlayer.cpp
+++ b/src/android/android_StreamPlayer.cpp
@@ -23,10 +23,9 @@
 #include <media/IMediaPlayerService.h>
 #include <media/stagefright/foundation/ADebug.h>
 #include <media/stagefright/foundation/MediaKeys.h>
+#include <mpeg2ts/ATSParser.h>
 #include <binder/IPCThreadState.h>
 
-#include <ATSParser.h>
-
 //--------------------------------------------------------------------------------------------------
 namespace android {
 
diff --git a/tests/Android.bp b/tests/Android.bp
index 9241d9e..a219706 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -1,12 +1,10 @@
 // Build the unit tests.
 package {
     // See: http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // all of the 'license_kinds' from "frameworks_wilhelm_license"
-    // to get the below license kinds:
-    //   SPDX-license-identifier-Apache-2.0
-    //   SPDX-license-identifier-MIT
-    default_applicable_licenses: ["frameworks_wilhelm_license"],
+    default_applicable_licenses: [
+        "Android-Apache-2.0",
+        "frameworks_wilhelm_license",  // MIT
+    ],
 }
 
 cc_test {
diff --git a/tests/examples/Android.bp b/tests/examples/Android.bp
index 9603c26..8a0d0e4 100644
--- a/tests/examples/Android.bp
+++ b/tests/examples/Android.bp
@@ -2,12 +2,10 @@
 
 package {
     // See: http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // all of the 'license_kinds' from "frameworks_wilhelm_license"
-    // to get the below license kinds:
-    //   SPDX-license-identifier-Apache-2.0
-    //   SPDX-license-identifier-MIT
-    default_applicable_licenses: ["frameworks_wilhelm_license"],
+    default_applicable_licenses: [
+        "Android-Apache-2.0",
+        "frameworks_wilhelm_license",  // MIT
+    ],
 }
 
 cc_test {
diff --git a/tests/mimeUri/Android.bp b/tests/mimeUri/Android.bp
index 5e6fafd..994914d 100644
--- a/tests/mimeUri/Android.bp
+++ b/tests/mimeUri/Android.bp
@@ -2,12 +2,10 @@
 
 package {
     // See: http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // all of the 'license_kinds' from "frameworks_wilhelm_license"
-    // to get the below license kinds:
-    //   SPDX-license-identifier-Apache-2.0
-    //   SPDX-license-identifier-MIT
-    default_applicable_licenses: ["frameworks_wilhelm_license"],
+    default_applicable_licenses: [
+        "Android-Apache-2.0",
+        "frameworks_wilhelm_license",  // MIT
+    ],
 }
 
 cc_test {