Merge "Add another PowerVR exception for FileSystemPermissionTest."
diff --git a/tests/tests/media/res/raw/testvideo.3gp b/tests/tests/media/res/raw/testvideo.3gp
index 1503272..8329311 100644
--- a/tests/tests/media/res/raw/testvideo.3gp
+++ b/tests/tests/media/res/raw/testvideo.3gp
Binary files differ
diff --git a/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java b/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
new file mode 100644
index 0000000..b090e27
--- /dev/null
+++ b/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.cts;
+
+import com.android.cts.media.R;
+
+import android.content.res.AssetFileDescriptor;
+import android.content.res.Resources;
+import android.media.MediaMetadataRetriever;
+import android.test.AndroidTestCase;
+
+public class MediaMetadataRetrieverTest extends AndroidTestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void test3gppMetadata() {
+ MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+
+ try {
+ Resources resources = getContext().getResources();
+ AssetFileDescriptor afd = resources.openRawResourceFd(R.raw.testvideo);
+
+ retriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
+
+ afd.close();
+ } catch (Exception e) {
+ fail("Unable to open file");
+ }
+
+ assertEquals("Title was other than expected",
+ "Title", retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE));
+
+ assertEquals("Artist was other than expected",
+ "UTF16LE エンディアン ",
+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ARTIST));
+
+ assertEquals("Album was other than expected",
+ "Test album",
+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM));
+
+ assertEquals("Track number was other than expected",
+ "10",
+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_CD_TRACK_NUMBER));
+
+ assertEquals("Year was other than expected",
+ "2013", retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_YEAR));
+
+ assertNull("Writer was unexpected present",
+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_WRITER));
+ }
+}
diff --git a/tests/tests/textureview/src/android/textureview/cts/GLProducerThread.java b/tests/tests/textureview/src/android/textureview/cts/GLProducerThread.java
index b3b1c3c..53f267a 100644
--- a/tests/tests/textureview/src/android/textureview/cts/GLProducerThread.java
+++ b/tests/tests/textureview/src/android/textureview/cts/GLProducerThread.java
@@ -133,6 +133,7 @@
}
void destroyGL() {
+ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
mEgl.eglDestroyContext(mEglDisplay, mEglContext);
mEgl.eglDestroySurface(mEglDisplay, mEglSurface);
mEglContext = EGL10.EGL_NO_CONTEXT;