AI 144327: am: CL 144326 Start the thread that initializes the camera for the test under lock to make sure the monitor is notified after it has started waiting.
Original author: jmtrivi
Merged from: //branches/cupcake/...
Automated import of CL 144327
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
index c30db38..fa0986a 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
@@ -228,8 +228,8 @@
*/
@LargeTest
public void testTakePicture() throws Exception {
- initializeMessageLooper();
synchronized (lock) {
+ initializeMessageLooper();
try {
lock.wait(WAIT_FOR_COMMAND_TO_COMPLETE);
} catch(Exception e) {
@@ -250,8 +250,8 @@
*/
@LargeTest
public void testCheckPreview() throws Exception {
- initializeMessageLooper();
synchronized (lock) {
+ initializeMessageLooper();
try {
lock.wait(WAIT_FOR_COMMAND_TO_COMPLETE);
} catch(Exception e) {