Merge "Use libbinderthreadstateutils."
diff --git a/apex/testing/Android.bp b/apex/testing/Android.bp
index 477c371..376d3e4 100644
--- a/apex/testing/Android.bp
+++ b/apex/testing/Android.bp
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-apex {
+apex_test {
     name: "test_com.android.media",
     manifest: "test_manifest.json",
     file_contexts: ":com.android.media-file_contexts",
@@ -20,7 +20,7 @@
     installable: false,
 }
 
-apex {
+apex_test {
     name: "test_com.android.media.swcodec",
     manifest: "test_manifest_codec.json",
     file_contexts: ":com.android.media.swcodec-file_contexts",
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index f130c9b..128ce8b 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -614,7 +614,8 @@
     CHECK(source.get() != NULL);
 
     const char *mime;
-    source->getFormat()->findCString(kKeyMIMEType, &mime);
+    sp<MetaData> meta = source->getFormat();
+    meta->findCString(kKeyMIMEType, &mime);
 
     if (Track::getFourCCForMime(mime) == NULL) {
         ALOGE("Unsupported mime '%s'", mime);
diff --git a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/EncoderTest.java b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/EncoderTest.java
index a5eda26..48e1422 100644
--- a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/EncoderTest.java
+++ b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/EncoderTest.java
@@ -102,7 +102,7 @@
     }
 
     @Test(timeout = PER_TEST_TIMEOUT_MS)
-    public void sampleEncoderTest() throws Exception {
+    public void testEncoder() throws Exception {
         int status;
         int frameSize;
         //Parameters for video
diff --git a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/ExtractorTest.java b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/ExtractorTest.java
index 6b7aad1..b31a72a 100644
--- a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/ExtractorTest.java
+++ b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/ExtractorTest.java
@@ -88,7 +88,7 @@
     }
 
     @Test
-    public void sampleExtractTest() throws IOException {
+    public void testExtractor() throws IOException {
         File inputFile = new File(mInputFilePath + mInputFileName);
         assertTrue("Cannot find " + mInputFileName + " in directory " + mInputFilePath,
                 inputFile.exists());
@@ -107,7 +107,7 @@
     }
 
     @Test
-    public void sampleExtractNativeTest() throws IOException {
+    public void testNativeExtractor() throws IOException {
         Native nativeExtractor = new Native();
         File inputFile = new File(mInputFilePath + mInputFileName);
         assertTrue("Cannot find " + mInputFileName + " in directory " + mInputFilePath,
diff --git a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/MuxerTest.java b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/MuxerTest.java
index 2efdba2..0221a7d 100644
--- a/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/MuxerTest.java
+++ b/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/MuxerTest.java
@@ -110,7 +110,7 @@
     }
 
     @Test
-    public void sampleMuxerTest() throws IOException {
+    public void testMuxer() throws IOException {
         File inputFile = new File(mInputFilePath + mInputFileName);
         assertTrue("Cannot find " + mInputFileName + " in directory " + mInputFilePath,
                 inputFile.exists());
@@ -159,7 +159,7 @@
     }
 
     @Test
-    public void sampleMuxerNativeTest() {
+    public void testNativeMuxer() {
         Native nativeMuxer = new Native();
         File inputFile = new File(mInputFilePath + mInputFileName);
         assertTrue("Cannot find " + mInputFileName + " in directory " + mInputFilePath,