diff options
author | James Dong <jdong@google.com> | 2009-11-05 19:09:58 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-05 19:09:58 -0800 |
commit | 99588d590f0965beb899606a79db0889601c7ec0 (patch) | |
tree | 75baf3b80a15fe9ef1aef6e4abcb78185d261cc8 | |
parent | 571529f82159a3205547a61d1b720b695dc066be (diff) | |
parent | 1e495da19f3f0061de38821a4ac733dca833b3eb (diff) | |
download | frameworks_base-99588d590f0965beb899606a79db0889601c7ec0.zip frameworks_base-99588d590f0965beb899606a79db0889601c7ec0.tar.gz frameworks_base-99588d590f0965beb899606a79db0889601c7ec0.tar.bz2 |
am 1e495da1: Merge change I4b03c2cd into eclair
Merge commit '1e495da19f3f0061de38821a4ac733dca833b3eb' into eclair-mr2
* commit '1e495da19f3f0061de38821a4ac733dca833b3eb':
Add windows media support check in MediaMetadataTest.java and MediaPlayerApiTest.java
2 files changed, 12 insertions, 4 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java index 1bf4958..ca60e8c 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java @@ -23,6 +23,7 @@ import android.test.suitebuilder.annotation.Suppress; import android.util.Log; import com.android.mediaframeworktest.MediaNames; +import com.android.mediaframeworktest.MediaProfileReader; /** * This metadata test suite test the basic functionality of the * MediaMetadataRetriever @@ -31,7 +32,7 @@ import com.android.mediaframeworktest.MediaNames; public class MediaMetadataTest extends AndroidTestCase { private static final String TAG = "MediaMetadataTest"; - + public static enum METADATA_EXPECTEDRESULT{ FILE_PATH,CD_TRACK, ALBUM, ARTIST, AUTHOR, COMPOSER, @@ -193,12 +194,17 @@ public class MediaMetadataTest extends AndroidTestCase { } private static void validateMetatData(int fileIndex, String meta_data_file[][]) { + Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]); + if ((meta_data_file[fileIndex][0].endsWith("wma") && !MediaProfileReader.getWMAEnable()) || + (meta_data_file[fileIndex][0].endsWith("wmv") && !MediaProfileReader.getWMVEnable())) { + Log.v(TAG, "Skip test since windows media is not supported"); + return; + } String value = null; MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY); try { retriever.setDataSource(meta_data_file[fileIndex][0]); - Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]); } catch(Exception e) { Log.v(TAG, "Failed: "+meta_data_file[fileIndex][0] + " " + e.toString()); //Set the test case failure whenever it failed to setDataSource diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java index 392d1d5..5725c44 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java @@ -242,8 +242,10 @@ public class MediaPlayerApiTest extends ActivityInstrumentationTestCase<MediaFra @LargeTest public void testWMA9SetLooping() throws Exception { - boolean isLoop = CodecTest.setLooping(MediaNames.WMA9); - assertTrue("WMA9 setLooping", isLoop); + if (isWMAEnable) { + boolean isLoop = CodecTest.setLooping(MediaNames.WMA9); + assertTrue("WMA9 setLooping", isLoop); + } } @LargeTest |