Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a7efa45 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 24789 into eclair

* changes:
  	modified:   tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java 	modified:   tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java Fix the m4a1 duration and the also fix the random_seek time error in the stress test.
parents a28948d7 147a0c27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ public class MediaNames {
          null, null, "231180", "1", null},
      {"/sdcard/media_api/metaDataTestMedias/M4A/Jaws Of Life_ver1.m4a", "1/8", "Suspended Animation",
          "John Petrucci", null, null, "20070510T125223.000Z", 
          "13", "Jaws Of Life", "2005", "19815424", "1", "m4a composer"},
          "13", "Jaws Of Life", "2005", "449329", "1", "m4a composer"},
      {"/sdcard/media_api/metaDataTestMedias/M4V/sample_iPod.m4v", null, null, 
          null, null, null, "20051220T202015.000Z", 
          null, null, null, "85500", "2", null},
+7 −1
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
        int video_duration = MediaNames.VIDEO_H263_AAC_DURATION;
        int random_play_time = 0;
        int random_seek_time = 0;
        int random_no_of_seek = 0;

        mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
        try {
@@ -106,8 +107,13 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
                mp.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder());
                mp.prepare();
                mp.start();
                random_no_of_seek = generator.nextInt(10);
                // make sure the seek at least run once.
                if (random_no_of_seek == 0) {
                    random_no_of_seek = 1;
                }
                // Random seek and play
                for (int j = 0; j < generator.nextInt(10); j++) {
                for (int j = 0; j < random_no_of_seek; j++) {
                    random_play_time =
                        generator.nextInt(video_duration / 2);
                    Log.v(TAG, "Play time = " + random_play_time);