Merge "Set CTS Version to 4.0_r1" into ics-mr0
diff --git a/tests/expectations/knownfailures.txt b/tests/expectations/knownfailures.txt
index fb4782b..844e5b9 100644
--- a/tests/expectations/knownfailures.txt
+++ b/tests/expectations/knownfailures.txt
@@ -4,8 +4,12 @@
   bug: 5513533
 },
 {
-  name: "android.hardware.cts.CameraTest#testFocusDistances",
-  bug: 5473673
+  name: "android.hardware.cts.CameraGLTest#testSetPreviewTextureBothCallbacks",
+  bug: 5534460
+},
+{
+  name: "android.hardware.cts.CameraGLTest#testSetPreviewTexturePreviewCallback",
+  bug: 5534170
 },
 {
   name: "android.hardware.cts.CameraTest#testVideoSnapshot",
@@ -58,20 +62,15 @@
   bug: 5051682
 },
 {
-  names: [
-    "libcore.java.net.OldCookieHandlerTest#test_CookieHandler",
-    "libcore.java.net.ConcurrentCloseTest#test_read",
-    "libcore.java.security.ProviderTest#test_Provider_getServices",
-    "libcore.java.text.DecimalFormatTest#testBigDecimalBug1897917",
-    "libcore.java.text.DecimalFormatTest#testBigDecimalTestBigIntWithMultiplier",
-    "libcore.java.text.OldDecimalFormatTest",
-    "libcore.java.text.OldDecimalFormatTestICU",
-    "libcore.java.util.logging.OldFormatterTest",
-    "libcore.java.net.URLConnectionTest#testServerClosesSocket"
-  ],
-  bug: 5498103
+  name: "libcore.java.net.URLConnectionTest#testServerClosesSocket",
+  bug: 5534202
 },
 {
+  name: "dalvik.system.DexClassLoaderTest#test_twoJar_callInstanceMethod",
+  bug: 5534165
+},
+{
+  description: "Test exceeds Tradefed's 10 minute timeout",
   name: "libcore.java.security.KeyPairGeneratorTest",
   bug: 5513723
 },
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
index e557c52..9947592 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
@@ -109,7 +109,7 @@
      * from the time setDisplay() was called
      */
     public void testVideoSurfaceResetting() throws Exception {
-        final int tolerance = 70;
+        final int tolerance = 150;
         final int seekPos = 1500;
 
         playVideoTest(R.raw.testvideo, 352, 288);
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/testtype/InstrumentationApkTest.java b/tools/tradefed-host/src/com/android/cts/tradefed/testtype/InstrumentationApkTest.java
index e911403..809696a 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/testtype/InstrumentationApkTest.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/testtype/InstrumentationApkTest.java
@@ -75,9 +75,13 @@
             Log.d(LOG_TAG, String.format("Installing %s on %s", apkFileName,
                     getDevice().getSerialNumber()));
             try {
-                getDevice().installPackage(mCtsBuild.getTestApp(apkFileName), true);
+                String installCode = getDevice().installPackage(mCtsBuild.getTestApp(apkFileName),
+                        true);
+                Assert.assertNull(String.format("Failed to install %s on %s. Reason: %s",
+                        apkFileName, getDevice().getSerialNumber(), installCode), installCode);
+
             } catch (FileNotFoundException e) {
-                Log.e(LOG_TAG, e);
+                Assert.fail(String.format("Could not find file %s", apkFileName));
             }
         }
         super.run(listener);