resolved conflicts for merge of 4992891b to klp-modular-dev

Change-Id: I8859d8d92c487c6636d7e442cee0a1dade40c9cc
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index f0e6c56..418742c 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -17,8 +17,8 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.android.cts.verifier"
-      android:versionCode="3"
-      android:versionName="4.4_r3">
+      android:versionCode="1"
+      android:versionName="4.4W_r4">
 
     <!-- Using 10+ for more complete NFC support... -->
     <uses-sdk android:minSdkVersion="12"></uses-sdk>
@@ -27,6 +27,7 @@
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.BLUETOOTH" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    <uses-permission android:name="android.permission.BODY_SENSORS"/>
     <uses-permission android:name="android.permission.CAMERA" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
@@ -577,6 +578,18 @@
                        android:value="android.hardware.sensor.gyroscope"/>
         </activity>
 
+        <activity android:name=".sensors.HeartRateMonitorTestActivity"
+                  android:label="@string/snsr_heartrate_test"
+                  android:screenOrientation="nosensor">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.cts.intent.category.MANUAL_TEST" />
+            </intent-filter>
+            <meta-data android:name="test_category" android:value="@string/test_category_sensors" />
+            <meta-data android:name="test_required_features"
+                       android:value="android.hardware.sensor.heartrate" />
+        </activity>
+
         <!-- Disable the test until calibration routine is verified -->
         <!--activity android:name=".sensors.MagneticFieldMeasurementTestActivity"
                   android:label="@string/snsr_mag_m_test"
diff --git a/apps/CtsVerifier/res/layout/snsr_hrm.xml b/apps/CtsVerifier/res/layout/snsr_hrm.xml
new file mode 100644
index 0000000..506ba9f
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_hrm.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2014 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
+  -->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+    <include android:id="@+id/pass_fail_buttons"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            layout="@layout/pass_fail_buttons" />
+
+    <TextView android:id="@+id/sensor_value"
+              android:background="@drawable/gray_bubble"
+              android:drawablePadding="10dip"
+              android:layout_above="@+id/sensor_accuracy_value"
+              android:layout_centerInParent="true"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:layout_marginBottom="10dip"
+              android:paddingLeft="10dip"
+              android:paddingRight="10dip"
+              android:paddingTop="5dip"
+              android:paddingBottom="5dip"
+              android:textSize="28dip"
+        />
+
+    <TextView android:id="@+id/sensor_accuracy_value"
+              android:background="@drawable/gray_bubble"
+              android:drawablePadding="10dip"
+              android:layout_above="@+id/pass_fail_buttons"
+              android:layout_centerInParent="true"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:layout_marginBottom="10dip"
+              android:paddingLeft="10dip"
+              android:paddingRight="10dip"
+              android:paddingTop="5dip"
+              android:paddingBottom="5dip"
+              android:textSize="28dip"
+        />
+
+</RelativeLayout>
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 00ff965..d93649e 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -410,6 +410,12 @@
     <string name="snsr_gyro_test_degrees_message">These values looks like degrees per second. These should be radians per second!</string>
     <string name="snsr_gyro_m_test">Gyroscope Measurement Test</string>
 
+    <!-- Heart Rate -->
+    <string name="snsr_heartrate_test">Heart Rate Test</string>
+    <string name="snsr_heartrate_test_info">This test verifies that the heart rate monitor is working properly.\n\nWait for at least 1 minute before verifying.\n\nVerify that the resting heart rate is between 0 and 100.</string>
+    <string name="snsr_heartrate_test_no_heartrate_title">No heart rate monitor?</string>
+    <string name="snsr_heartrate_test_no_heartrate_message">It doesn\'t seem like you have a heart rate monitor, so you don\'t need to run this test.</string>
+
     <!-- Magnetic Field -->
     <string name="snsr_mag_m_test">Magnetic Field Measurement Tests</string>
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java b/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
index e7bf70d..ef80b5d 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
@@ -23,8 +23,11 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.DialogInterface.OnCancelListener;
+import android.content.pm.PackageManager;
 import android.database.Cursor;
 import android.os.Bundle;
+import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -86,6 +89,25 @@
     }
 
     public static class Activity extends android.app.Activity implements PassFailActivity {
+        private WakeLock mWakeLock;
+
+        @Override
+        protected void onResume() {
+            super.onResume();
+            if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+                mWakeLock = ((PowerManager) getSystemService(Context.POWER_SERVICE))
+                        .newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "PassFailButtons");
+                mWakeLock.acquire();
+            }
+        }
+
+        @Override
+        protected void onPause() {
+            super.onPause();
+            if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+                mWakeLock.release();
+            }
+        }
 
         @Override
         public void setPassFailButtonClickListeners() {
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
index 6b87261..581121e 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
@@ -188,6 +188,10 @@
             new Feature(PackageManager.FEATURE_SENSOR_STEP_DETECTOR, false),
     };
 
+    public static final Feature[] ALL_KITKAT_WATCH_FEATURES = {
+            new Feature(PackageManager.FEATURE_SENSOR_HEART_RATE, false),
+    };
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -218,6 +222,9 @@
 
         // add features from latest to last so that the latest requirements are put in the set first
         int apiVersion = Build.VERSION.SDK_INT;
+        if (apiVersion >= Build.VERSION_CODES.KITKAT_WATCH) {
+            Collections.addAll(features, ALL_KITKAT_WATCH_FEATURES);
+        }
         if (apiVersion >= Build.VERSION_CODES.KITKAT) {
             Collections.addAll(features, ALL_KITKAT_FEATURES);
         }
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/HeartRateMonitorTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/HeartRateMonitorTestActivity.java
new file mode 100644
index 0000000..3a48e3c
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/HeartRateMonitorTestActivity.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2014 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 com.android.cts.verifier.sensors;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.TextView;
+
+import com.android.cts.verifier.PassFailButtons;
+import com.android.cts.verifier.R;
+
+/**
+ * CTS Verifier case for verifying correct integration of heart rate monitor.
+ * If a user is wearing a device with an HRM, the value is between <> and <>
+ */
+public class HeartRateMonitorTestActivity extends PassFailButtons.Activity {
+    private SensorManager mSensorManager;
+    private Sensor mSensor;
+    private SensorListener mSensorListener;
+    private AlertDialog mNoHeartRateWarningDialog;
+    private TextView mSensorText;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.snsr_hrm);
+        setInfoResources(R.string.snsr_heartrate_test, R.string.snsr_heartrate_test_info, 0);
+        setPassFailButtonClickListeners();
+
+        mSensorText = (TextView) findViewById(R.id.sensor_value);
+
+        mSensorManager = (SensorManager) getApplicationContext().getSystemService(
+                Context.SENSOR_SERVICE);
+        mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE);
+        mSensorListener = new SensorListener();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        if (!mSensorManager.registerListener(mSensorListener, mSensor,
+                SensorManager.SENSOR_DELAY_UI)) {
+            showNoHeartRateWarningDialog();
+            PassFailButtons.setTestResultAndFinish(this, getTestId(), getTestDetails(), true);
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        mSensorManager.unregisterListener(mSensorListener, mSensor);
+    }
+
+    private void showNoHeartRateWarningDialog() {
+        if (mNoHeartRateWarningDialog == null) {
+            mNoHeartRateWarningDialog = new AlertDialog.Builder(this)
+                    .setIcon(android.R.drawable.ic_dialog_alert)
+                    .setTitle(R.string.snsr_heartrate_test_no_heartrate_title)
+                    .setMessage(R.string.snsr_heartrate_test_no_heartrate_message)
+                    .setPositiveButton(android.R.string.ok, null)
+                    .create();
+        }
+        if (!mNoHeartRateWarningDialog.isShowing()) {
+            mNoHeartRateWarningDialog.show();
+        }
+    }
+
+    private class SensorListener implements SensorEventListener {
+        private static final double MIN_HEART_RATE = 40;
+        private static final double MAX_HEART_RATE = 200;
+        @Override
+        public void onSensorChanged(SensorEvent sensorEvent) {
+            float value = sensorEvent.values[0];
+            if (value > MAX_HEART_RATE || value < MIN_HEART_RATE) {
+                updateWidgets(value, sensorEvent.accuracy, R.drawable.fs_error);
+            } else {
+                updateWidgets(value, sensorEvent.accuracy, R.drawable.fs_good);
+            }
+        }
+
+        void updateWidgets(float value, float accuracy, int icon) {
+            TextView sensorText = (TextView) findViewById(R.id.sensor_value);
+            TextView sensorAccuracyText = (TextView) findViewById(R.id.sensor_accuracy_value);
+
+            sensorText.setText(String.format("%+.2f", value));
+            sensorText.setCompoundDrawablesWithIntrinsicBounds(0, 0, icon, 0);
+            sensorAccuracyText.setText(String.format("%+.2f", accuracy));
+        }
+
+        @Override
+        public void onAccuracyChanged(Sensor sensor, int i) {
+        }
+    }
+}
diff --git a/apps/cts-usb-accessory/Android.mk b/apps/cts-usb-accessory/Android.mk
index c4d014f..76022a1 100644
--- a/apps/cts-usb-accessory/Android.mk
+++ b/apps/cts-usb-accessory/Android.mk
@@ -26,7 +26,10 @@
 
 LOCAL_MODULE := cts-usb-accessory
 
-LOCAL_C_INCLUDES += bionic/libc/kernel/common
+LOCAL_C_INCLUDES += \
+	bionic/libc/kernel/uapi \
+	bionic/libc/kernel/uapi/asm-$(HOST_ARCH) \
+
 LOCAL_STATIC_LIBRARIES := libusbhost libcutils
 LOCAL_LDLIBS += -lpthread
 LOCAL_CFLAGS := -g -O0
diff --git a/hostsidetests/aadb/src/com/android/cts/aadb/TestDeviceFuncTest.java b/hostsidetests/aadb/src/com/android/cts/aadb/TestDeviceFuncTest.java
index 8257602..ceb9072 100644
--- a/hostsidetests/aadb/src/com/android/cts/aadb/TestDeviceFuncTest.java
+++ b/hostsidetests/aadb/src/com/android/cts/aadb/TestDeviceFuncTest.java
@@ -30,12 +30,17 @@
 import com.android.tradefed.util.RunUtil;
 import com.android.tradefed.util.StreamUtil;
 
+import java.awt.image.BufferedImage;
+
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.InputStream;
 import java.io.IOException;
 
+import javax.imageio.ImageIO;
+
 /**
  * Functional tests for adb connection
  * <p/>
@@ -328,22 +333,21 @@
     /**
      * Basic test for {@link TestDevice#getScreenshot()}.
      * <p/>
-     * Grab a screenshot, save it to a file, and perform a cursory size check to ensure its valid.
+     * Grab a screenshot and perform a cursory size check to ensure its valid.
      */
     public void testGetScreenshot() throws DeviceNotAvailableException, IOException {
-        CLog.i(LOG_TAG, "testGetScreenshot");
         InputStreamSource source = getDevice().getScreenshot();
         assertNotNull(source);
-        File tmpPngFile = FileUtil.createTempFile("screenshot", ".png");
+        InputStream inputStream = source.createInputStream();
         try {
-            FileUtil.writeToFile(source.createInputStream(), tmpPngFile);
-            CLog.i("Created file at %s", tmpPngFile.getAbsolutePath());
-            assertTrue("Saved png file is less than 16K - is it invalid?",
-                    tmpPngFile.length() > 16*1024);
-            // TODO: add more stringent checks
+            BufferedImage screenshotImage = ImageIO.read(inputStream);
+            CLog.i(LOG_TAG, "testGetScreenshot w=%d, h=%d",
+                    screenshotImage.getWidth(), screenshotImage.getHeight());
+            assertTrue(screenshotImage.getWidth() > 0);
+            assertTrue(screenshotImage.getHeight() > 0);
         } finally {
-            FileUtil.deleteFile(tmpPngFile);
-            source.cancel();
+            StreamUtil.cancel(source);
+            StreamUtil.close(inputStream);
         }
     }
 
diff --git a/suite/audio_quality/lib/src/audio/AudioProtocol.cpp b/suite/audio_quality/lib/src/audio/AudioProtocol.cpp
index c3457f5..25c1422 100644
--- a/suite/audio_quality/lib/src/audio/AudioProtocol.cpp
+++ b/suite/audio_quality/lib/src/audio/AudioProtocol.cpp
@@ -18,8 +18,8 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include <UniquePtr.h>
 #include <utils/StrongPointer.h>
-#include <utils/UniquePtr.h>
 
 #include "audio/Buffer.h"
 #include "Log.h"
diff --git a/suite/audio_quality/lib/src/audio/RemoteAudio.cpp b/suite/audio_quality/lib/src/audio/RemoteAudio.cpp
index 1156173..d9b7c51 100644
--- a/suite/audio_quality/lib/src/audio/RemoteAudio.cpp
+++ b/suite/audio_quality/lib/src/audio/RemoteAudio.cpp
@@ -86,7 +86,7 @@
         return false;
     }
     LOGD("adding fd %d to polling", mSocket.getFD());
-    mLooper->addFd(mSocket.getFD(), EIdSocket, ALOOPER_EVENT_INPUT, socketRxCallback, this);
+    mLooper->addFd(mSocket.getFD(), EIdSocket, android::Looper::EVENT_INPUT, socketRxCallback, this);
     wakeClient(true);
     while(!mExitRequested) {
         mLooper->pollOnce(10000);
@@ -138,7 +138,7 @@
 int RemoteAudio::socketRxCallback(int fd, int events, void* data)
 {
     RemoteAudio* self = reinterpret_cast<RemoteAudio*>(data);
-    if (events & ALOOPER_EVENT_INPUT) {
+    if (events & android::Looper::EVENT_INPUT) {
         //LOGD("socketRxCallback input");
         if (!self->handlePacket()) { //error, stop polling
             LOGE("socketRxCallback, error in packet, stopping polling");
diff --git a/suite/cts/deviceTests/browserbench/Android.mk b/suite/cts/deviceTests/browserbench/Android.mk
index 6b241a9..6fdb06d 100644
--- a/suite/cts/deviceTests/browserbench/Android.mk
+++ b/suite/cts/deviceTests/browserbench/Android.mk
@@ -26,7 +26,7 @@
 
 LOCAL_PACKAGE_NAME := CtsDeviceBrowserBench
 
-LOCAL_SDK_VERSION := 16
+LOCAL_SDK_VERSION := current
 
 include $(BUILD_CTS_PACKAGE)
 
diff --git a/suite/cts/deviceTests/browserbench/src/com/android/cts/browser/BrowserBenchTest.java b/suite/cts/deviceTests/browserbench/src/com/android/cts/browser/BrowserBenchTest.java
index 997f730..81e6a21 100644
--- a/suite/cts/deviceTests/browserbench/src/com/android/cts/browser/BrowserBenchTest.java
+++ b/suite/cts/deviceTests/browserbench/src/com/android/cts/browser/BrowserBenchTest.java
@@ -16,7 +16,9 @@
 
 package com.android.cts.browser;
 
+import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.cts.util.WatchDog;
 import android.net.Uri;
 import android.provider.Browser;
@@ -124,6 +126,10 @@
 
     @TimeoutReq(minutes = 60)
     public void testOctane() throws InterruptedException {
+        if (!hasWebViewFeature(getContext())) {
+            Log.w(TAG, "Skipping testOctane");
+            return;
+        }
         String url = mWebServer.getAssetUrl(OCTANE_START_FILE) + "?auto=1";
         final int kRepeat = 5;
         doTest(url, ResultType.LOWER_BETTER, ResultUnit.MS,
@@ -167,4 +173,9 @@
             numberToProcess++;
         }
     }
+
+    private static boolean hasWebViewFeature(Context context) {
+        // Query the system property that determines if there is a functional WebView on the device
+        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WEBVIEW);
+    }
 }
diff --git a/suite/cts/deviceTests/simplecpu/src/com/android/cts/simplecpu/SimpleCpuTest.java b/suite/cts/deviceTests/simplecpu/src/com/android/cts/simplecpu/SimpleCpuTest.java
index 7485abe..ce0feac 100644
--- a/suite/cts/deviceTests/simplecpu/src/com/android/cts/simplecpu/SimpleCpuTest.java
+++ b/suite/cts/deviceTests/simplecpu/src/com/android/cts/simplecpu/SimpleCpuTest.java
@@ -76,7 +76,7 @@
     }
 
     // will exceed L2
-    @TimeoutReq(minutes = 20)
+    @TimeoutReq(minutes = 30)
     public void testMatrixMultiplication600() {
         doMatrixMultiplication(NUMBER_REPEAT, 600);
     }
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index b65ded0..29caf33 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -74,6 +74,7 @@
     <uses-permission android:name="android.permission.NFC" />
     <uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
     <uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
+    <uses-permission android:name="android.permission.BLUETOOTH" />
 
     <!-- Used for PackageManager test, don't delete this INTERNET permission -->
     <uses-permission android:name="android.permission.INTERNET" />
@@ -117,6 +118,9 @@
     <!-- Used for Transmit IR Test -->
     <uses-permission android:name="android.permission.TRANSMIT_IR" />
 
+    <!-- Used for SystemFeatures Test -->
+    <uses-permission android:name="android.permission.BODY_SENSORS"/>
+
     <!-- Used for PackageManager test, don't delete this permission-tree -->
     <permission-tree android:name="com.android.cts.stub.permission.TEST_DYNAMIC"
                     android:label="Test Tree"/>
@@ -665,7 +669,8 @@
         </activity>
 
         <activity android:name="android.app.cts.InstrumentationTestActivity"
-            android:label="InstrumentationTestActivity">
+                  android:theme="@style/Theme_NoSwipeDismiss"
+                  android:label="InstrumentationTestActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -857,7 +862,8 @@
         </activity>
 
         <activity android:name="android.app.cts.DialogStubActivity"
-            android:label="DialogStubActivity">
+                  android:theme="@style/Theme_NoSwipeDismiss"
+                  android:label="DialogStubActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
diff --git a/tests/expectations/knownfailures.txt b/tests/expectations/knownfailures.txt
index cd7f2d1..adefd76 100644
--- a/tests/expectations/knownfailures.txt
+++ b/tests/expectations/knownfailures.txt
@@ -33,5 +33,156 @@
   name: "android.hardware.cts.SensorIntegrationTests#testSensorsWithSeveralClients",
   name: "android.hardware.cts.SensorIntegrationTests#testSensorsMovingRates",
   bug: 11352697
+},
+{
+  name: "android.app.cts.DownloadManagerTest#testDownloadManager",
+  name: "android.app.cts.DownloadManagerTest#testDownloadManagerDestination",
+  name: "android.app.cts.DownloadManagerTest#testDownloadManagerDestinationExtension",
+  name: "android.app.cts.DownloadManagerTest#testMinimumDownload",
+  name: "android.content.cts.ContentResolverSyncTestCase#testCallMultipleAccounts",
+  name: "android.content.cts.ContentResolverSyncTestCase#testCancelSync",
+  name: "android.content.cts.ContentResolverSyncTestCase#testRequestSync",
+  bug: 14657953
+},
+{
+  name: "android.app.cts.DialogTest#testTouchEvent",
+  bug: 15455341
+},
+{
+  name: "android.database.sqlite.cts.SQLiteQueryBuilderTest#testSetProjectionMap",
+  bug: 12475524
+},
+{
+  name: "android.keystore.cts.KeyChainTest#testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported",
+  bug: 15314696
+},
+{
+  name: "android.location.cts.LocationManagerTest",
+  name: "android.location.cts.LocationProviderTest",
+  bug: 15748237
+},
+{
+  name: "android.media.cts.AudioEffectTest",
+  bug: 15081808
+},
+{
+  name: "android.media.cts.AudioManagerTest#testMusicActive",
+  name: "android.media.cts.AudioManagerTest#testVolume",
+  bug: 15319269
+},
+{
+  name: "android.media.cts.AudioTrackTest#testGetTimestamp",
+  bug: 15320704
+},
+{
+  name: "android.media.cts.BassBoostTest",
+  name: "android.media.cts.EnvReverbTest",
+  name: "android.media.cts.EqualizerTest",
+  bug: 15163233
+},
+{
+  name: "android.media.cts.DecoderTest",
+  bug: 15163143
+},
+{
+  name: "android.media.cts.MediaPlayerFlakyNetworkTest",
+  bug: 15350295
+},
+{
+  name: "android.media.cts.MediaPlayerTest",
+  bug: 15321806
+},
+{
+  name: "android.media.cts.PresetReverbTest",
+  bug: 15338282
+},
+{
+  name: "android.media.cts.RingtoneManagerTest",
+  bug: 15343572
+},
+{
+  name: "android.media.cts.SoundPoolAacTest",
+  name: "android.media.cts.SoundPoolOggTest",
+  bug: 15350147
+},
+{
+  name: "android.media.cts.StreamingMediaPlayerTest",
+  bug: 15321207
+},
+{
+  name: "android.media.cts.VirtualizerTest",
+  bug: 15381765
+},
+{
+  name: "android.mediastress.cts.H263QcifLongPlayerTest",
+  name: "android.mediastress.cts.H264R480x360AacShortPlayerTest",
+  name: "android.mediastress.cts.Vp8R480x360LongPlayerTest",
+  bug: 15081769
+},
+{
+  name: "android.net.cts.ConnectivityManagerTest#testGetActiveNetworkInfo",
+  bug: 15087784
+},
+{
+  name: "android.media.cts.MediaCodecListTest#testIsAVCBaselineProfileSupported",
+  name: "android.media.cts.MediaCodecListTest#testIsH263BaselineProfileSupported",
+  name: "android.media.cts.MediaCodecListTest#testIsM4VSimpleProfileSupported",
+  name: "android.media.cts.MediaCodecListTest#testRequiredMediaCodecList",
+  bug: 15433903
+},
+{
+  name: "com.android.cts.uiautomatortest.CtsUiAutomatorTest",
+  bug: 15093828
+},
+{
+  name: "android.media.cts.RingtoneTest#testRingtone",
+  bug: 15343572
+},
+{
+  name: "android.media.cts.VisualizerTest",
+  bug: 15381765
+},
+{
+  name: "android.mediastress.cts.H263QcifShortPlayerTest",
+  name: "android.mediastress.cts.Vp8R480x360ShortPlayerTest",
+  bug: 15081769
+},
+{
+  name: "android.speech.tts.cts.TextToSpeechTest",
+  bug: 15082733
+},
+{
+  name: "android.net.cts.DnsTest#testDnsWorks",
+  name: "android.net.cts.SSLCertificateSocketFactoryTest",
+  name: "android.net.wifi.cts.NsdManagerTest#testAndroidTestCaseSetupProperly",
+  bug: 15004618
+},
+{
+  name: "android.media.cts.AudioRecord_BufferSizeTest#testGetMinBufferSize",
+  bug: 15319578
+},
+{
+  name: "android.media.cts.AudioRecordTest#testAudioRecordOP",
+  bug: 15340791
+},
+{
+  name: "android.text.cts.BoringLayoutTest#testScale",
+  bug: 15134518
+},
+{
+  name: "android.media.cts.MediaRecorderTest#testOnErrorListener",
+  name: "android.media.cts.MediaRecorderTest#testOnInfoListener",
+  name: "android.media.cts.MediaRecorderTest#testRecorderAudio",
+  name: "android.media.cts.MediaRecorderTest#testRecordingAudioInRawFormats",
+  name: "android.media.cts.MediaRecorderTest#testSetMaxDuration",
+  bug: 15106730
+},
+{
+  name: "android.widget.cts.TextViewTest#testTextAttr",
+  bug: 15131296
+},
+{
+  name: "android.permission.cts.NoSystemFunctionPermissionTest#testSetWallpaper",
+  bug: 15383108
 }
 ]
diff --git a/tests/plans/CTS-flaky.xml b/tests/plans/CTS-flaky.xml
deleted file mode 100644
index c0d74ce..0000000
--- a/tests/plans/CTS-flaky.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<TestPlan version="1.0">
-  <Entry uri="android.app" exclude="android.app.cts.SystemFeaturesTest#testTelephonyFeatures;android.app.cts.InstrumentationTest#testCallActivityOnResume;android.app.cts.ActivityManagerRecentTaskInfoTest#testWriteToParcel;android.app.cts.InstrumentationTest#testMisc;android.app.cts.DialogTest#testSetContentView;android.app.cts.ServiceTest#testLocalBindAutoClassPermissionGranted;android.app.cts.ActivityManager_RunningAppProcessInfoTest#testAndroidTestCaseSetupProperly;android.app.cts.AlertDialog_BuilderTest#testSetSingleChoiceItemsWithParamInt;android.app.cts.LocalActivityManagerTest#testConstructor;android.app.cts.ActivityManager_RunningServiceInfoTest#testDescribeContents;android.app.cts.DialogTest#testTakeKeyEvents;android.app.cts.LifecycleTest#testBasic;android.app.cts.NotificationTest#testConstructor;android.app.cts.ActivityManagerMemoryInfoTest#testWriteToParcel;android.app.cts.DialogTest#testConstructor_protectedCancellable;android.app.cts.ProgressDialogTest#testIncrementProgressBy;android.app.cts.ApplicationTest#testApplication;android.app.cts.InstrumentationTest#testSendKeySync;android.app.cts.LocalActivityManagerTest#testDispatchCreate;android.app.cts.AlertDialogTest#testAlertDialogDeprecatedAPI;android.app.cts.AlertDialog_BuilderTest#testSetSingleChoiceItemsWithParamCursor;android.app.cts.InstrumentationTest#testCallActivityOnRestart;android.app.backup.cts.BackupAgentTest#testBackupAgent;android.app.cts.AlertDialog_BuilderTest#testSetSingleChoiceItemsWithParamCharSequence;android.app.cts.ActivityManager_RunningServiceInfoTest#testAndroidTestCaseSetupProperly;android.app.cts.ServiceTest#testLocalBindAutoAction;android.app.cts.DialogTest#testSetFeatureDrawableUri;android.app.cts.KeyguardManagerKeyguardLockTest#testDisableKeyguard;android.app.cts.LaunchTest#testClearTopWhilResumed;android.app.cts.WallpaperManagerTest#testSuggestDesiredDimensions;android.app.cts.SystemFeaturesTest#testLiveWallpaperFeature;android.app.cts.InstrumentationTest#testCallActivityOnUserLeaving;android.app.cts.AlertDialog_BuilderTest#testSetCancelable;android.app.cts.AlertDialogTest#testAlertDialogTheme;android.app.cts.PendingIntentTest#testGetBroadcast;android.app.cts.ActivityManager_RunningServiceInfoTest#testWriteToParcel;android.app.cts.InstrumentationTest#testGetComponentName;android.app.backup.cts.FileBackupHelperTest#testAndroidTestCaseSetupProperly;android.app.cts.DownloadManagerTest#testAndroidTestCaseSetupProperly;android.app.cts.SystemFeaturesTest#testTouchScreenFeatures;android.app.cts.AlarmManagerTest#testAlarmTriggersImmediatelyIfSetTimeIsNegative;android.app.cts.ActivityManagerMemoryInfoTest#testReadFromParcel;android.app.cts.NotificationTest#testAndroidTestCaseSetupProperly;android.app.cts.AlertDialog_BuilderTest#testSetOnCancelListener;android.app.cts.ServiceTest#testLocalBindClass;android.app.cts.ServiceTest#testLocalStartClass;android.app.cts.LauncherActivity_ListItemTest#testConstructor;android.app.cts.InstrumentationTest#testCallActivityOnCreate;android.app.cts.PendingIntentTest#testSendWithParamContextIntIntent;android.app.cts.InstrumentationTest#testSendPointerSync;android.app.cts.DialogTest#testRequestWindowFeature;android.app.cts.LocalActivityManagerTest#testDispatchPauseFalse;android.app.cts.Instrumentation_ActivityResultTest#testActivityResultOp;android.app.cts.ProgressDialogTest#testOnStartCreateStop;android.app.cts.AlertDialog_BuilderTest#testSetNegativeButtonWithParamInt;android.app.cts.KeyguardManagerKeyguardLockTest#testReenableKeyguard;android.app.cts.DialogTest#testShow;android.app.cts.ActivityManagerMemoryInfoTest#testDescribeContents;android.app.cts.SystemFeaturesTest#testFeatureNamespaces;android.app.cts.PendingIntent_CanceledExceptionTest#testConstructor;android.app.cts.AlertDialog_BuilderTest#testSetPositiveButtonWithParamInt;android.app.cts.PendingIntentTest#testSendWithParamInt;android.app.cts.PendingIntentTest#testGetActivity;android.app.cts.AlertDialog_BuilderTest#testSetCursor;android.app.cts.ActivityManagerProcessErrorStateInfoTest#testWriteToParcel;android.app.cts.AlertDialog_BuilderTest#testConstructor;android.app.cts.LocalActivityManagerTest#testDispatchDestroy;android.app.cts.DownloadManagerTest#testDownloadManager;android.app.cts.ServiceTest#testLocalBindAction;android.app.cts.LocalActivityManagerTest#testSaveInstanceState;android.app.cts.LifecycleTest#testTabDialog;android.app.cts.LaunchTest#testLocalActivity;android.app.cts.AlertDialog_BuilderTest#testSetInverseBackgroundForced;android.app.cts.SystemFeaturesTest#testLocationFeatures;android.app.cts.DialogTest#testOnStartCreateStop;android.app.cts.ActivityManagerRecentTaskInfoTest#testReadFromParcel;android.app.cts.ServiceTest#testLocalStartClassPermissions;android.app.cts.ServiceTest#testLocalUnbindTwice;android.app.cts.ActivityManagerProcessErrorStateInfoTest#testConstructor;android.app.cts.DialogTest#testSetFeatureDrawableResource;android.app.cts.ProgressDialogTest#testAccessProgress;android.app.cts.DialogTest#testTrackballEvent;android.app.cts.AlertDialog_BuilderTest#testSetSingleChoiceItems;android.app.cts.LaunchTest#testColdActivity;android.app.cts.ActivityManagerTest#testGetMemoryInfo;android.app.cts.PendingIntentTest#testAndroidTestCaseSetupProperly;android.app.cts.DialogTest#testOnContentChanged;android.app.cts.SearchManagerTest#testSetOnDismissListener;android.app.cts.InstrumentationTest#testContext;android.app.cts.LauncherActivity_IconResizerTest#testIconResizer;android.app.cts.DialogTest#testCancel_listener;android.app.cts.ActivityManagerTest#testIsUserAMonkey;android.app.cts.NotificationManagerTest#testCancelAll;android.app.cts.ActivityGroupTest#testAndroidTestCaseSetupProperly;android.app.cts.AlertDialog_BuilderTest#testCreate;android.app.cts.SystemFeaturesTest#testUsbAccessory;android.app.cts.ActivityManagerRecentTaskInfoTest#testDescribeContents;android.app.cts.ActivityManagerRunningTaskInfoTest#testDescribeContents;android.app.cts.AlertDialog_BuilderTest#testDisableCancelable;android.app.cts.InstrumentationTest#testSendKeyDownUpSync;android.app.cts.ActivityManagerRunningTaskInfoTest#testConstructor;android.app.cts.TimePickerDialogTest#testUpdateTime;android.app.cts.ActivityManagerRunningTaskInfoTest#testReadFromParcel;android.app.cts.ProgressDialogTest#testSetProgressStyle;android.app.cts.InstrumentationTest#testMonitor;android.app.cts.AliasActivityTest#testAliasActivity;android.app.cts.InstrumentationTest#testSendTrackballEventSync;android.app.cts.LifecycleTest#testScreen;android.app.cts.AlarmManagerTest#testCancel;android.app.cts.ActivityGroupTest#testTabDialog;android.app.cts.PendingIntentTest#testDescribeContents;android.app.cts.DialogTest#testOnSearchRequested;android.app.cts.SearchManagerTest#testSetOnCancelListener;android.app.cts.ProgressDialogTest#testAccessMax;android.app.cts.PendingIntentTest#testGetTargetPackage;android.app.cts.SystemFeaturesTest#testWifiFeature;android.app.cts.ActivityManagerRecentTaskInfoTest#testAndroidTestCaseSetupProperly;android.app.cts.DialogTest#testSetFeatureDrawableAlpha;android.app.cts.DialogTest#testSetTitle;android.app.cts.FragmentTest#testInstantiateNonFragment;android.app.cts.DialogTest#testSetDismissMessage;android.app.cts.PendingIntentTest#testWriteToParcel;android.app.cts.ActivityManagerMemoryInfoTest#testAndroidTestCaseSetupProperly;android.app.cts.AlertDialog_BuilderTest#testSetNeutralButtonWithParamCharSequence;android.app.cts.NotificationTest#testToString;android.app.cts.LaunchTest#testColdScreen;android.app.cts.AlertDialogTest#testAlertDialog;android.app.cts.SystemFeaturesTest#testSensorFeatures;android.app.cts.ProgressDialogTest#testShow1;android.app.cts.AlertDialog_BuilderTest#testSetNeutralButtonWithParamInt;android.app.cts.ActivityManagerRunningTaskInfoTest#testWriteToParcel;android.app.cts.ProgressDialogTest#testShow2;android.app.cts.ProgressDialogTest#testShow3;android.app.cts.ProgressDialogTest#testShow4;android.app.cts.InstrumentationTest#testCallActivityOnStart;android.app.cts.PendingIntentTest#testCancel;android.app.cts.InstrumentationTest#testConstructor;android.app.cts.ProgressDialogTest#testSetIndeterminate;android.app.cts.AlertDialog_BuilderTest#testShow;android.app.cts.AlertDialog_BuilderTest#testSetIconWithParamDrawable;android.app.cts.AlarmManagerTest#testSetTypes;android.app.cts.AlarmManagerTest#testSetInexactRepeating;android.app.cts.PendingIntentTest#testSendWithParamIntOnFinishedHandler;android.app.backup.cts.FileBackupHelperTest#testConstructor;android.app.cts.Instrumentation_ActivityResultTest#testAndroidTestCaseSetupProperly;android.app.cts.DownloadManagerTest#testDownloadManagerDestinationExtension;android.app.cts.LaunchTest#testClearTopInCreate;android.app.cts.InstrumentationTest#testRunOnMainSync;android.app.cts.DialogTest#testOnKeyDownKeyUp;android.app.cts.ServiceTest#testLocalStartActionPermissions;android.app.cts.KeyguardManagerTest#testInKeyguardRestrictedInputMode;android.app.cts.DialogTest#testConstructor;android.app.cts.AlertDialogTest#testCallback;android.app.cts.ActivityManagerTest#testGetRunningTasks;android.app.cts.ProgressDialogTest#testIncrementSecondaryProgressBy;android.app.cts.DialogTest#testAccessOwnerActivity;android.app.cts.LifecycleTest#testTabScreen;android.app.cts.TimePickerDialogTest#testOnRestoreInstanceState;android.app.cts.ActivityGroupTest#testTabBasic;android.app.cts.ServiceTest#testAndroidTestCaseSetupProperly;android.app.cts.PendingIntentTest#testSendWithParamContextIntIntentOnFinishedHandler;android.app.backup.cts.BackupManagerTest#testBackupManager;android.app.cts.ActivityManagerRecentTaskInfoTest#testConstructor;android.app.cts.DialogTest#testOnWindowFocusChanged;android.app.cts.DialogTest#testGetCurrentFocus;android.app.cts.TabActivityTest#testChildTitleCallback;android.app.cts.DialogTest#testSetOnDismissListener_listener;android.app.cts.ServiceTest#testLocalStartAction;android.app.cts.AlertDialog_BuilderTest#testSetMultiChoiceItemsWithParamInt;android.app.cts.DialogTest#testGetLayoutInflater;android.app.cts.InstrumentationTest#testInvokeContextMenuAction;android.app.cts.InstrumentationTest#testProfiling;android.app.cts.IntentServiceTest#testIntentServiceLifeCycle;android.app.cts.ProgressDialogTest#testAccessSecondaryProgress;android.app.cts.NotificationManagerTest#testAndroidTestCaseSetupProperly;android.app.backup.cts.BackupAgentTest#testAndroidTestCaseSetupProperly;android.app.cts.ActivityManagerTest#testGetProcessInErrorState;android.app.cts.SearchManagerTest#testStopSearch;android.app.cts.NotificationTest#testSetLatestEventInfo;android.app.cts.DialogTest#testSetCancellable_false;android.app.cts.PendingIntentTest#testSend;android.app.cts.LocalActivityManagerTest#testDispatchResume;android.app.cts.AlertDialog_BuilderTest#testSetViewCustom;android.app.cts.InstrumentationTest#testInvokeMenuActionSync;android.app.cts.DialogTest#testOnSaveInstanceState;android.app.cts.DialogTest#testOnKeyMultiple;android.app.cts.ActivityGroupTest#testTabScreen;android.app.cts.InstrumentationTest#testCallActivityOnSaveInstanceState;android.app.cts.ActivityManagerTest#testGetDeviceConfigurationInfo;android.app.cts.NotificationTest#testWriteToParcel;android.app.cts.InstrumentationTest#testWaitForIdle;android.app.cts.InstrumentationTest#testCallActivityOnStop;android.app.cts.InstrumentationTest#testSendCharacterSync;android.app.cts.TimePickerDialogTest#testOnTimeChanged;android.app.cts.PendingIntentTest#testEquals;android.app.cts.AlertDialog_BuilderTest#testSetIconWithParamInt;android.app.cts.DialogTest#testContextMenu;android.app.cts.SystemFeaturesTest#testBluetoothFeature;android.app.cts.ExpandableListActivityTest#testView;android.app.cts.AlarmManagerTest#testSetRepeating;android.app.cts.ActivityManager_RunningServiceInfoTest#testReadFromParcel;android.app.cts.ServiceTest#testLocalBindActionPermissions;android.app.cts.LocalActivityManagerTest#testDispatchStop;android.app.cts.LauncherActivity_ListItemTest#testAndroidTestCaseSetupProperly;android.app.cts.InstrumentationTest#testNewApplication;android.app.cts.LaunchTest#testForwardResult;android.app.cts.ProgressDialogTest#testSetMessage;android.app.cts.ActivityManagerTest#testGetRunningServices;android.app.cts.AlertDialogTest#testCustomAlertDialogView;android.app.backup.cts.SharedPreferencesBackupHelperTest#testConstructor;android.app.cts.LifecycleTest#testTabBasic;android.app.cts.FragmentTest#testInstantiateFragment;android.app.cts.ActivityManager_RunningAppProcessInfoTest#testRunningAppProcessInfo;android.app.cts.AlertDialogTest#testAlertDialogNotCancelable;android.app.cts.AlertDialog_BuilderTest#testSetItemsWithParamCharSequence;android.app.cts.ActivityManagerProcessErrorStateInfoTest#testDescribeContents;android.app.cts.DialogTest#testConstructor_protectedNotCancellable;android.app.cts.ExpandableListActivityTest#testSelect;android.app.cts.SystemFeaturesTest#testScreenFeatures;android.app.cts.LauncherActivityTest#testLaunchActivity;android.app.cts.LaunchTest#testAndroidTestCaseSetupProperly;android.app.cts.LifecycleTest#testAndroidTestCaseSetupProperly;android.app.cts.NotificationTest#testDescribeContents;android.app.cts.DialogTest#testOnWindowAttributesChanged;android.app.cts.ServiceTest#testLocalBindAutoActionPermissionGranted;android.app.cts.InstrumentationTest#testCallActivityOnPostCreate;android.app.cts.AlertDialogTest#testAlertDialogDeprecatedAPIWithMessage;android.app.cts.AlertDialog_BuilderTest#testSetPositiveButtonWithParamCharSequence;android.app.cts.AlarmManagerTest#testAndroidTestCaseSetupProperly;android.app.cts.AlertDialog_BuilderTest#testSetView;android.app.cts.ActivityManager_RunningServiceInfoTest#testConstructor;android.app.cts.InstrumentationTest#testPerformanceSnapshot;android.app.cts.InstrumentationTest#testCallApplicationOnCreate;android.app.cts.DialogTest#testSetFeatureDrawable;android.app.cts.AliasActivityTest#testAndroidTestCaseSetupProperly;android.app.cts.PendingIntentTest#testGetService;android.app.cts.IntentServiceTest#testIntents;android.app.cts.AlertDialog_BuilderTest#testSetOnItemSelectedListener;android.app.cts.LifecycleTest#testDialog;android.app.cts.DownloadManagerTest#testDownloadManagerDestination;android.app.cts.WallpaperManagerTest#testAndroidTestCaseSetupProperly;android.app.cts.ExpandableListActivityTest#testAndroidTestCaseSetupProperly;android.app.cts.InstrumentationTest#testNewActivity;android.app.cts.ProgressDialogTest#testSetProgressDrawable;android.app.backup.cts.BackupManagerTest#testAndroidTestCaseSetupProperly;android.app.cts.InstrumentationTest#testAllocCounting;android.app.cts.LocalActivityManagerTest#testRemoveAllActivities;android.app.cts.ServiceTest#testLocalBindAutoClass;android.app.backup.cts.BackupAgentHelperTest#testBackupAgentHelper;android.app.cts.ActivityManagerProcessErrorStateInfoTest#testReadFromParcel;android.app.cts.PendingIntent_CanceledExceptionTest#testAndroidTestCaseSetupProperly;android.app.cts.TimePickerDialogTest#testOnClick;android.app.cts.AlertDialog_BuilderTest#testSetOnKeyListener;android.app.cts.DialogTest#testTouchEvent;android.app.cts.ProgressDialogTest#testProgressDialog1;android.app.cts.InstrumentationTest#testCallActivityOnRestoreInstanceState;android.app.cts.ProgressDialogTest#testProgressDialog2;android.app.cts.InstrumentationTest#testCallActivityOnPause;android.app.cts.AlertDialog_BuilderTest#testSetMultiChoiceItemsWithParamCharSequence;android.app.cts.SystemFeaturesTest#testCameraFeatures;android.app.cts.ServiceTest#testLocalBindClassPermissions;android.app.cts.ActivityManagerTest#testGetRecentTasks;android.app.cts.SystemFeaturesTest#testNfcFeatures;android.app.cts.AlertDialogTest#testCustomAlertDialog;android.app.cts.SystemFeaturesTest#testSipFeatures;android.app.cts.InstrumentationTest#testSendStringSync;android.app.cts.ActivityManagerRunningTaskInfoTest#testAndroidTestCaseSetupProperly;android.app.cts.TabActivityTest#testTabActivity;android.app.cts.KeyguardManagerTest#testNewKeyguardLock;android.app.cts.NotificationManagerTest#testCancel;android.app.cts.AlertDialog_BuilderTest#testSetMultiChoiceItemsWithParamCursor;android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass;android.app.cts.ActivityManagerTest#testGetRunningAppProcesses;android.app.cts.AlertDialog_BuilderTest#testSetAdapter;android.app.cts.AlertDialog_BuilderTest#testSetItemsWithParamInt;android.app.cts.DialogTest#testCancel_noListener;android.app.cts.DialogTest#testDispatchKeyEvent;android.app.cts.LaunchTest#testLocalScreen;android.app.cts.ActivityManagerTest#testRestartPackage;android.app.cts.FragmentTest#testAndroidTestCaseSetupProperly;android.app.cts.InstrumentationTest#testCallActivityOnNewIntent;android.app.cts.NotificationManagerTest#testNotify;android.app.cts.LocalActivityManagerTest#testDispatchPauseTrue;android.app.cts.ActivityManagerProcessErrorStateInfoTest#testAndroidTestCaseSetupProperly;android.app.backup.cts.BackupAgentHelperTest#testAndroidTestCaseSetupProperly;android.app.cts.ProgressDialogTest#testSetIndeterminateDrawable;android.app.backup.cts.SharedPreferencesBackupHelperTest#testAndroidTestCaseSetupProperly;android.app.cts.DownloadManagerTest#testMinimumDownload;android.app.cts.PendingIntentTest#testReadAndWritePendingIntentOrNullToParcel;android.app.cts.DialogTest#testSetOnDismissListener_noListener;android.app.cts.KeyguardManagerTest#testExitKeyguardSecurely;android.app.cts.AlertDialog_BuilderTest#testSetNegativeButtonWithParamCharSequence;android.app.cts.DialogTest#testSetCancelable_true;android.app.cts.Instrumentation_ActivityMonitorTest#testActivityMonitor;android.app.cts.LocalActivityManagerTest#testStartActivity;android.app.cts.IntentServiceTest#testAndroidTestCaseSetupProperly;android.app.cts.ActionBarTest#testAddTab;android.app.cts.DialogTest#testSetCancelMessage;android.app.cts.TimePickerDialogTest#testSaveInstanceState" />
-  <Entry uri="android.hardware" exclude="android.hardware.consumerir.cts.ConsumerIrTest#test_hasIrEmitter;android.hardware.consumerir.cts.ConsumerIrTest#test_getCarrierFrequencies;android.hardware.consumerir.cts.ConsumerIrTest#test_transmit;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceCaptureBurst;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceRepeatingBurst;android.hardware.cts.CameraGLTest#testSetPreviewTextureTextureCallback;android.hardware.cts.CameraTest#test3ALockInteraction;android.hardware.cts.CameraTest#testAutoExposureLock;android.hardware.cts.CameraTest#testAutoWhiteBalanceLock;android.hardware.cts.CameraTest#testCancelAutofocus;android.hardware.cts.CameraTest#testDisplayOrientation;android.hardware.cts.CameraTest#testEnableShutterSound;android.hardware.cts.CameraTest#testFaceDetection;android.hardware.cts.CameraTest#testFocusAreas;android.hardware.cts.CameraTest#testFocusDistances;android.hardware.cts.CameraTest#testGetParameterDuringFocus;android.hardware.cts.CameraTest#testInvalidParameters;android.hardware.cts.CameraTest#testJpegCallbackStartPreview;android.hardware.cts.CameraTest#testJpegExif;android.hardware.cts.CameraTest#testJpegThumbnailSize;android.hardware.cts.CameraTest#testLockUnlock;android.hardware.cts.CameraTest#testMeteringAreas;android.hardware.cts.CameraTest#testMultiCameraRelease;android.hardware.cts.CameraTest#testMultipleCameras;android.hardware.cts.CameraTest#testParameters;android.hardware.cts.CameraTest#testPreviewCallbackWithBuffer;android.hardware.cts.CameraTest#testPreviewCallbackWithPicture;android.hardware.cts.CameraTest#testPreviewFormats;android.hardware.cts.CameraTest#testPreviewFpsRange;android.hardware.cts.CameraTest#testPreviewPictureSizesCombination;android.hardware.cts.CameraTest#testRecordingHint;android.hardware.cts.CameraTest#testSceneMode;android.hardware.cts.CameraTest#testSetOneShotPreviewCallback;android.hardware.cts.CameraTest#testSetPreviewDisplay;android.hardware.cts.CameraTest#testTakePicture;android.hardware.camera2.cts.ImageReaderTest#testImageReaderInvalidAccessTest;android.hardware.cts.SensorAccelerometerTest#testEventJittering;android.hardware.cts.SensorGyroscopeTest#testEventsArriveInOrder;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableJpegSizes;android.hardware.cts.SensorAccelerometerTest#testCanReceiveBatchEvents;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorOrientation;android.hardware.camera2.cts.CameraCharacteristicsTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorMagneticFieldTest#testUpdateRate;android.hardware.cts.SensorAccelerometerTest#testNotTriggerSensor;android.hardware.cts.SensorAccelerometerTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorAccelerometerTest#testCanReceiveEvents;android.hardware.cts.SensorMagneticFieldTest#testVarianceWhileStatic;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoHyperfocalDistance;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerOpenCamerasSerially;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceCreateCaptureBuilder;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableProcessedMinDurations;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidFlashInfoAvailable;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoShadingMapSize;android.hardware.cts.LowRamDeviceTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorTest#testSensorOperations;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAwbAvailableModes;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorBaseGainFactor;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorInfoPhysicalSize;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidInfoSupportedHardwareLevel;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidJpegAvailableThumbnailSizes;android.hardware.cts.SensorGyroscopeTest#testNotTriggerSensor;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensFacing;android.hardware.cts.Camera_ParametersTest#testAccessMethods;android.hardware.cts.SensorMagneticFieldTest#testCanRegisterListener;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableFormats;android.hardware.cts.SensorTest#testBatchAndFlush;android.hardware.cts.SensorGyroscopeTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorMagneticFieldTest#testCanReceiveEvents;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAvailableEffects;android.hardware.camera2.cts.CameraManagerTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorGyroscopeTest#testSeveralClientsBatching;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAeAvailableAntibandingModes;android.hardware.cts.GeomagneticFieldTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorAccelerometerTest#testStartStopRepeatedly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAfAvailableModes;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorMaxAnalogSensitivity;android.hardware.cts.SensorTest#testRequestTriggerWithNonTriggerSensor;android.hardware.cts.SensorMagneticFieldTest#testBatchEventsArriveInOrder;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoMinimumFocusDistance;android.hardware.cts.SensorTest#testValuesForAllSensors;android.hardware.cts.SensorMagneticFieldTest#testCanReceiveBatchEvents;android.hardware.cts.SensorAccelerometerTest#testUpdateRate;android.hardware.cts.SensorMagneticFieldTest#testStartStopRepeatedly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlMaxRegions;android.hardware.cts.SensorMagneticFieldTest#testAndroidTestCaseSetupProperly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAeCompensationRange;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidRequestMaxNumOutputStreams;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorInfoSensitivityRange;android.hardware.cts.SensorMagneticFieldTest#testNotTriggerSensor;android.hardware.cts.SensorGyroscopeTest#testBatchEventsArriveInOrder;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerInvalidDevice;android.hardware.cts.LowRamDeviceTest#testLowRamProductProperty;android.hardware.cts.SensorTest#testCancelTriggerWithNonTriggerSensor;android.hardware.cts.SensorMagneticFieldTest#testEventsArriveInOrder;android.hardware.cts.SensorMagneticFieldTest#testMaxFrequency;android.hardware.cts.SensorAccelerometerTest#testSeveralClientsBatching;android.hardware.cts.SensorMagneticFieldTest#testEventJittering;android.hardware.cts.SensorGyroscopeTest#testEventValidity;android.hardware.camera2.cts.ImageReaderTest#testImageReaderFromCameraRaw;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAeCompensationStep;android.hardware.cts.SensorMagneticFieldTest#testSeveralClientsBatching;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetCameraCharacteristics;android.hardware.cts.SensorAccelerometerTest#testCanRegisterListener;android.hardware.camera2.cts.ImageReaderTest#testImageReaderFromCameraFlexibleYuv;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAvailableVideoStabilizationModes;android.hardware.cts.SensorGyroscopeTest#testStartStopRepeatedly;android.hardware.cts.SensorAccelerometerTest#testEventsArriveInOrder;android.hardware.cts.SensorMagneticFieldTest#testRegisterForBatchingZeroReport;android.hardware.cts.SensorGyroscopeTest#testCanRegisterListener;android.hardware.cts.SensorGyroscopeTest#testMaxFrequency;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableProcessedSizes;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAeAvailableTargetFpsRanges;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidTonemapMaxCurvePoints;android.hardware.cts.SensorGyroscopeTest#testCanReceiveEvents;android.hardware.cts.SensorTest#testRegisterTwiceWithSameSensor;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoAvailableOpticalStabilization;android.hardware.camera2.cts.ImageReaderTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorMagneticFieldTest#testSeveralClients;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerOpenCameraTwice;android.hardware.cts.SensorMagneticFieldTest#testStartStopBatchingRepeatedly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableMaxDigitalZoom;android.hardware.cts.SensorAccelerometerTest#testBatchEventsArriveInOrder;android.hardware.camera2.cts.CameraDeviceTest#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorAccelerometerTest#testRegisterForBatchingZeroReport;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidStatisticsInfoMaxFaceCount;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidControlAvailableSceneModes;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorInfoActiveArraySize;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorInfoMaxFrameDuration;android.hardware.cts.SensorAccelerometerTest#testStartStopBatchingRepeatedly;android.hardware.cts.SensorGyroscopeTest#testEventJittering;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceCapture;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidSensorInfoExposureTimeRange;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoAvailableFocalLengths;android.hardware.cts.SensorGyroscopeTest#testCanReceiveBatchEvents;android.hardware.cts.SensorTest#testLegacySensorOperations;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerListener;android.hardware.cts.GeomagneticFieldTest#testGeomagneticField;android.hardware.cts.SensorGyroscopeTest#testSeveralClients;android.hardware.cts.SensorGyroscopeTest#testStartStopBatchingRepeatedly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoAvailableFilterDensities;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceSetErrorListener;android.hardware.cts.SensorGyroscopeTest#testRegisterForBatchingZeroReport;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetDeviceIdList;android.hardware.cts.SensorAccelerometerTest#testMaxFrequency;android.hardware.camera2.cts.CameraManagerTest#testCameraManagerOpenAllCameras;android.hardware.cts.SensorAccelerometerTest#testSeveralClients;android.hardware.cts.SensorGyroscopeTest#testVarianceWhileStatic;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidScalerAvailableJpegMinDurations;android.hardware.cts.SensorTest#testAndroidTestCaseSetupProperly;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidStatisticsInfoAvailableFaceDetectModes;android.hardware.camera2.cts.CameraCharacteristicsTest#testCameraCharacteristicsAndroidLensInfoAvailableApertures;android.hardware.cts.SensorAccelerometerTest#testEventValidity;android.hardware.cts.SensorAccelerometerTest#testUpdateBatchRate;android.hardware.cts.SensorAccelerometerTest#testVarianceWhileStatic;android.hardware.cts.SensorGyroscopeTest#testUpdateBatchRate;android.hardware.cts.SensorGyroscopeTest#testUpdateRate;android.hardware.cts.SensorMagneticFieldTest#testEventValidity;android.hardware.cts.SensorMagneticFieldTest#testUpdateBatchRate;android.hardware.cts.SensorTest#testRegisterWithTriggerSensor;android.hardware.cts.Camera_SizeTest#testConstructor" />
-  <Entry uri="android.media" exclude="android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Stereo_24kbps_22050Hz;android.media.cts.AudioPreProcessingTest#test2_1AecCreateAndRelease;android.media.cts.MediaCodecTest#testConcurrentAudioVideoEncodings;android.media.cts.EnvReverbTest#test2_0SetEnabledGetEnabled;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToBufferQVGA;android.media.cts.AudioTrackTest#testSetLoopPointsStartTooFar;android.media.cts.RingtoneManagerTest#testStopPreviousRingtone;android.media.cts.EnvReverbTest#test1_3Reflections;android.media.cts.MediaPlayerTest#testGapless3;android.media.cts.MediaPlayerTest#testGapless2;android.media.cts.MediaPlayerTest#testGapless1;android.media.cts.BassBoostTest#testAndroidTestCaseSetupProperly;android.media.cts.EnvReverbTest#test3_1EnableStatusListener;android.media.cts.ExtractDecodeEditEncodeMuxTest#testExtractDecodeEditEncodeMuxQVGA;android.media.cts.MediaRecorderTest#testRecorderCamera;android.media.cts.MediaPlayerTest#testGetTrackInfo;android.media.cts.MediaDrmMockTest#testIsCryptoSchemeNotSupported;android.media.cts.AudioPreProcessingTest#testAndroidTestCaseSetupProperly;android.media.cts.DecodeEditEncodeTest#testVideoEditQCIF;android.media.cts.MediaPlayerTest#testDeselectTrack;android.media.cts.AudioEffectTest#test3_7SetParameterAfterRelease;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Mono_24kbps_22050Hz;android.media.cts.AudioEffectTest#test4_2ControlStatusListener;android.media.cts.StreamingMediaPlayerTest#testHTTP_MPEG4SP_AAC_Video1;android.media.cts.StreamingMediaPlayerTest#testHTTP_MPEG4SP_AAC_Video2;android.media.cts.JetPlayerTest#testLoadJetFromFd;android.media.cts.MediaDrmMockTest#testProvideProvisionResponse;android.media.cts.JetPlayerTest#testQueueJetSegmentMuteArray;android.media.cts.StreamingMediaPlayerTest#testPlayOggStream;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1350kbps_25fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.SoundPoolAacTest#testAndroidTestCaseSetupProperly;android.media.cts.PresetReverbTest#test3_2ParameterChangedListener;android.media.cts.MediaDrmMockTest#testNullPropertyString;android.media.cts.AudioEffectTest#test3_2SetParameterIntShort;android.media.cts.AudioRecord_BufferSizeTest#testGetMinBufferSize;android.media.cts.AudioEffectTest#test3_0SetParameterByteArrayByteArray;android.media.cts.MediaScannerConnectionTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1000kbps_30fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.AudioTrackTest#testWriteShortSizeTooBig;android.media.cts.AudioTrackTest#testGetMinBufferSizeTooLowSR;android.media.cts.AudioEffectTest#test1_1ConstructorFromUuid;android.media.cts.ToneGeneratorTest#testSyncGenerate;android.media.cts.AudioEffectTest#test1_3GetEnabledAfterRelease;android.media.cts.BassBoostTest#test1_1Properties;android.media.cts.SoundPoolOggTest#testLoadMore;android.media.cts.AudioEffectTest#test1_7AuxiliaryOnAudioTrack;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Stereo_128kbps_11025Hz;android.media.cts.MediaCodecListTest#testMediaCodecXmlFileExist;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1000kbps_25fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.VisualizerTest#test2_1ListenerCapture;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Stereo_24kbps_11025Hz;android.media.cts.StreamingMediaPlayerTest#testPlayMp3Stream2;android.media.cts.StreamingMediaPlayerTest#testPlayMp3Stream1;android.media.cts.MediaPlayerTest#testPlayNullSource;android.media.cts.VirtualizerTest#testAndroidTestCaseSetupProperly;android.media.cts.EncodeVirtualDisplayWithCompositionTest#testSingleVirtualDisplay;android.media.cts.DecoderTest#testDecodeOgg;android.media.cts.MediaRecorderTest#testOnErrorListener;android.media.cts.EnvReverbTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioTrackTest#testSetPlaybackRate;android.media.cts.AudioManagerTest#testVibrateNotification;android.media.cts.AudioManagerTest#testAccessMode;android.media.cts.EqualizerTest#test1_4SetBandLevelAfterRelease;android.media.cts.MediaPlayerTest#testPlayVideo;android.media.cts.MediaCodecTest#testSignalSurfaceEOS;android.media.cts.VisualizerTest#test0_0ConstructorAndRelease;android.media.cts.DecoderTest#testDecodeFlac;android.media.cts.MediaDrmMockTest#testEventWithSessionAndData;android.media.cts.MediaScannerConnectionTest#testMediaScannerConnection;android.media.cts.AudioTrackTest#testConstructorMono8MusicStatic;android.media.cts.AudioManagerTest#testMicrophoneMute;android.media.cts.MediaDrmMockTest#testMissingPropertyString;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Stereo_128kbps_22050Hz;android.media.cts.AudioTrackTest#testConstructorStereo16MusicStream;android.media.cts.Vp8EncoderTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaDrmMockTest#testQueryKeyStatus;android.media.cts.BassBoostTest#test3_2ParameterChangedListener;android.media.cts.AudioManagerTest#testVibrateRinger;android.media.cts.AudioManagerTest#testMusicActive;android.media.cts.DecoderTest#testCodecResetsVP8WithoutSurface;android.media.cts.MediaPlayerTest#testRecordedVideoPlayback90;android.media.cts.MediaPlayerFlakyNetworkTest#test_S3P00001;android.media.cts.AudioTrackTest#testGetMinBufferSizeTooHighSR;android.media.cts.CamcorderProfileTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Stereo_128kbps_11025Hz;android.media.cts.AudioManagerTest#testVolume;android.media.cts.MediaMuxerTest#testAudioOnly;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Stereo_128kbps_22050Hz;android.media.cts.AudioEffectTest#test1_6AuxiliaryOnMediaPlayerFailure;android.media.cts.DecoderTest#testCodecResetsMpeg4WithSurface;android.media.cts.AudioEffectTest#test4_1setParameterLowerPriority;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_500kbps_30fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.DecoderTest#testCodecResetsVP8WithSurface;android.media.cts.CamcorderProfileTest#testGet;android.media.cts.DecoderTest#testDecodeMonoM4a;android.media.cts.MediaRecorderTest#testSetCamera;android.media.cts.AudioTrackTest#testSetGetPlaybackRate;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromSurfaceToSurfaceQVGA;android.media.cts.EnvReverbTest#testAndroidTestCaseSetupProperly;android.media.cts.DecoderTest#testFlush;android.media.cts.AudioEffectTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Mono_24kbps_11025Hz;android.media.cts.DecoderTest#testDecodeMp3Lame;android.media.cts.EncoderTest#testAMRNBEncoders;android.media.cts.MediaScannerTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaCodecListTest#testRequiredMediaCodecList;android.media.cts.DecoderTest#testCodecResetsMpeg4WithoutSurface;android.media.cts.MediaRecorderTest#testGetAudioSourceMax;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_500kbps_25fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.AudioTrackTest#testSetLoopPointsLoopTooLong;android.media.cts.EqualizerTest#test1_1BandFrequency;android.media.cts.EncoderTest#testAMRWBEncoders;android.media.cts.AudioTrackTest#testWriteShortNegativeSize;android.media.cts.AudioTrackTest#testConstructorStreamType;android.media.cts.MediaPlayerTest#testCallback;android.media.cts.BassBoostTest#test2_0SetEnabledGetEnabled;android.media.cts.MediaPlayerFlakyNetworkTest#test_S2P00001;android.media.cts.EncodeVirtualDisplayTest#testEncodeVirtualDisplay;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromSurfaceToSurfaceQCIF;android.media.cts.DecoderTest#testCodecEarlyEOSVP9;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1350kbps_30fps_AAC_Stereo_192kbps_44110Hz;android.media.cts.DecoderTest#testCodecEarlyEOSVP8;android.media.cts.MediaPlayerFlakyNetworkTest#test_S5P00001;android.media.cts.MediaRandomTest#testRecorderRandomAction;android.media.cts.MediaDrmMockTest#testBadSession;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Stereo_128kbps_11025Hz;android.media.cts.CameraProfileTest#testGetWithId;android.media.cts.EnvReverbTest#test1_0Room;android.media.cts.StreamingMediaPlayerTest#testPlayMp3StreamNoLength;android.media.cts.SoundPoolAacTest#testMultiSound;android.media.cts.AudioTrackTest#testReloadStaticData;android.media.cts.MediaDrmMockTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testPlayAudio;android.media.cts.MediaDrmMockTest#testGetKeyRequestNoOptionalParameters;android.media.cts.MediaRecorderTest#testSetMaxDuration;android.media.cts.AudioPreProcessingTest#test2_2AecSetEnabledGetEnabled;android.media.cts.AsyncPlayerTest#testAsyncPlayer;android.media.cts.DecoderTest#testCodecBasicVP8;android.media.cts.DecoderTest#testCodecBasicVP9;android.media.cts.AudioTrackTest#testSetLoopPointsStream;android.media.cts.AudioTrackTest#testConstructorStereo8MusicStatic;android.media.cts.MediaCodecTest#testDequeueSurface;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToBuffer720p;android.media.cts.MediaRecorderTest#testRecorderTimelapsedVideo;android.media.cts.MediaCodecTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioTrackTest#testSetPlaybackHeadPositionStopped;android.media.cts.AudioTrackTest#testWriteByteSizeTooBig;android.media.cts.MediaMuxerTest#testAndroidTestCaseSetupProperly;android.media.cts.EnvReverbTest#test1_1Decay;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Stereo_128kbps_22050Hz;android.media.cts.DecoderTest#testDecodeWav;android.media.cts.DecoderTest#testCodecEarlyEOSH263;android.media.cts.SoundPoolOggTest#testSoundPoolOp;android.media.cts.DecoderTest#testCodecEarlyEOSH264;android.media.cts.MediaPlayerFlakyNetworkTest#test_S6P00002;android.media.cts.EnvReverbTest#test1_2Reverb;android.media.cts.AudioManagerTest#testSoundEffects;android.media.cts.ToneGeneratorTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaCodecTest#testReconfigureWithoutSurface;android.media.cts.RingtoneManagerTest#testConstructors;android.media.cts.MediaCodecListTest#testGetCapabilities;android.media.cts.MediaDrmMockTest#testIsMimeTypeSupported;android.media.cts.DecoderTest#testDecodeMonoMp3;android.media.cts.DecoderTest#testCodecResetsH263WithoutSurface;android.media.cts.MediaScannerNotificationTest#testMediaScannerNotification;android.media.cts.VisualizerTest#testAndroidTestCaseSetupProperly;android.media.cts.VirtualizerTest#test0_0ConstructorAndRelease;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Mono_24kbps_22050Hz;android.media.cts.AudioTrackTest#testWriteShort;android.media.cts.AudioRecordTest#testAndroidTestCaseSetupProperly;android.media.cts.ExtractDecodeEditEncodeMuxTest#testExtractDecodeEditEncodeMux720p;android.media.cts.EqualizerTest#test3_0ControlStatusListener;android.media.cts.MediaDrmMockTest#testRestoreKeys;android.media.cts.MediaMuxerTest#testVideoAudio;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Mono_24kbps_11025Hz;android.media.cts.AudioTrackTest#testConstructorStereo8MusicStream;android.media.cts.MediaPlayerTest#testSetNextMediaPlayerWithRelease;android.media.cts.VisualizerTest#test1_0CaptureRates;android.media.cts.CameraProfileTest#testAndroidTestCaseSetupProperly;android.media.cts.EncodeVirtualDisplayWithCompositionTest#testAndroidTestCaseSetupProperly;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToSurfaceQVGA;android.media.cts.VirtualizerTest#test1_1Properties;android.media.cts.AudioManagerTest#testRouting;android.media.cts.EqualizerTest#test3_1EnableStatusListener;android.media.cts.PresetReverbTest#test3_1EnableStatusListener;android.media.cts.EnvReverbTest#test0_0ConstructorAndRelease;android.media.cts.MediaPlayerTest#testChangeSubtitleTrack;android.media.cts.JetPlayerTest#testClone;android.media.cts.AudioEffectTest#test1_5AuxiliaryOnMediaPlayer;android.media.cts.MediaPlayerTest#testSetNextMediaPlayerWithReset;android.media.cts.AudioEffectTest#test2_0SetEnabledGetEnabled;android.media.cts.VisualizerTest#test1_1CaptureSize;android.media.cts.AudioTrackTest#testPlaybackHeadPositionAfterInit;android.media.cts.EqualizerTest#test1_3Properties;android.media.cts.AudioTrackTest#testWriteByte;android.media.cts.VirtualizerTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioTrackTest#testSetStereoVolumeMin;android.media.cts.MediaRecorderTest#testRecorderVideo;android.media.cts.ExtractDecodeEditEncodeMuxTest#testExtractDecodeEditEncodeMuxAudioVideo;android.media.cts.EqualizerTest#test2_0SetEnabledGetEnabled;android.media.cts.MediaPlayerTest#testSetNextMediaPlayer;android.media.cts.AudioTrackTest#testSetStereoVolumeMid;android.media.cts.VirtualizerTest#test1_0Strength;android.media.cts.EncodeDecodeTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioTrackTest#testAudioTrackProperties;android.media.cts.AudioTrackTest#testSetPlaybackHeadPositionPaused;android.media.cts.SoundPoolAacTest#testLoadMore;android.media.cts.ExtractDecodeEditEncodeMuxTest#testExtractDecodeEditEncodeMuxQCIF;android.media.cts.EncodeVirtualDisplayTest#testAndroidTestCaseSetupProperly;android.media.cts.RingtoneManagerTest#testSetType;android.media.cts.MediaDrmMockTest#testMultipleSessions;android.media.cts.MediaPlayerFlakyNetworkTest#test_S0P0;android.media.cts.SoundPoolOggTest#testLoad;android.media.cts.PresetReverbTest#test0_0ConstructorAndRelease;android.media.cts.RingtoneManagerTest#testAccessMethods;android.media.cts.EnvReverbTest#test1_4DiffusionAndDensity;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Stereo_24kbps_22050Hz;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Stereo_24kbps_22050Hz;android.media.cts.MediaDrmMockTest#testGetProvisionRequest;android.media.cts.CamcorderProfileTest#testGetWithId;android.media.cts.AudioEffectTest#test1_2ConstructorUnknownType;android.media.cts.SoundPoolOggTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioTrackTest#testWriteByte8bit;android.media.cts.PresetReverbTest#testAndroidTestCaseSetupProperly;android.media.cts.EncoderTest#testAACEncoders;android.media.cts.ExtractDecodeEditEncodeMuxTest#testExtractDecodeEditEncodeMuxAudio;android.media.cts.DecoderTest#testCodecBasicH263;android.media.cts.DecoderTest#testCodecBasicH264;android.media.cts.AudioTrackTest#testSetLoopPointsSuccess;android.media.cts.MediaDrmMockTest#testRemoveKeys;android.media.cts.FaceDetectorTest#testFindFaces;android.media.cts.MediaDrmMockTest#testGetKeyRequest;android.media.cts.MediaCodecListTest#testIsAVCBaselineProfileSupported;android.media.cts.AudioEffectTest#test3_4SetParameterIntArrayIntArray;android.media.cts.MediaCodecListTest#testIsH263BaselineProfileSupported;android.media.cts.EqualizerTest#test0_0ConstructorAndRelease;android.media.cts.EqualizerTest#test3_2ParameterChangedListener;android.media.cts.AudioTrackTest#testSetPlaybackRateZero;android.media.cts.MediaDrmMockTest#testGetSecureStops;android.media.cts.EnvReverbTest#test3_2ParameterChangedListener;android.media.cts.StreamingMediaPlayerTest#testHTTP_H263_AMR_Video2;android.media.cts.MediaDrmMockTest#testGetKeyRequestRelease;android.media.cts.StreamingMediaPlayerTest#testHTTP_H263_AMR_Video1;android.media.cts.EqualizerTest#testAndroidTestCaseSetupProperly;android.media.cts.ExtractDecodeEditEncodeMuxTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaDrmMockTest#testNullSession;android.media.cts.PresetReverbTest#test1_1Properties;android.media.cts.BassBoostTest#test3_1EnableStatusListener;android.media.cts.AudioTrack_ListenerTest#testAudioTrackCallbackWithHandler;android.media.cts.VirtualizerTest#test3_2ParameterChangedListener;android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1350kbps_30fps_AAC_Stereo_128kbps_44110Hz;android.media.cts.BassBoostTest#test1_0Strength;android.media.cts.AudioTrackTest#testPlaybackHeadPositionAfterFlushAndPlay;android.media.cts.PresetReverbTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioTrackTest#testWriteShortNegativeOffset;android.media.cts.DecoderTest#testCodecResetsMp3;android.media.cts.AudioTrackTest#testPlaybackHeadPositionAfterFlush;android.media.cts.MediaScannerTest#testCanonicalize;android.media.cts.MediaDrmMockTest#testMediaDrmConstructorFails;android.media.cts.PresetReverbTest#test2_0SetEnabledGetEnabled;android.media.cts.MediaDrmMockTest#testCryptoSession;android.media.cts.DecoderTest#testCodecResetsH263WithSurface;android.media.cts.AudioPreProcessingTest#test1_1NsCreateAndRelease;android.media.cts.DecodeEditEncodeTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioEffectTest#test3_6SetParameterIntArrayByteArray;android.media.cts.AudioTrackTest#testPlaybackHeadPositionAfterStop;android.media.cts.AsyncPlayerTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioPreProcessingTest#test3_2AgcSetEnabledGetEnabled;android.media.cts.MediaDrmMockTest#testGetKeyRequestOffline;android.media.cts.MediaDrmMockTest#testReleaseSecureStops;android.media.cts.MediaPlayerFlakyNetworkTest#test_S4P00001;android.media.cts.MediaDrmMockTest#testNullPropertyByteArray;android.media.cts.EqualizerTest#test1_2Presets;android.media.cts.EnvReverbTest#test1_5Properties;android.media.cts.CameraProfileTest#testGetImageEncodingQualityParameter;android.media.cts.VirtualizerTest#test3_0ControlStatusListener;android.media.cts.AudioTrackTest#testWriteByteNegativeOffset;android.media.cts.StreamingMediaPlayerTest#testPlayMp3StreamRedirect;android.media.cts.DecoderTest#testCodecEarlyEOSMpeg4;android.media.cts.EnvReverbTest#test3_0ControlStatusListener;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToSurfaceQCIF;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToSurface720p;android.media.cts.MediaDrmMockTest#testCryptoSessionEncrypt;android.media.cts.EqualizerTest#test1_0BandLevel;android.media.cts.EncodeVirtualDisplayWithCompositionTest#testMultipleVirtualDisplays;android.media.cts.AudioTrack_ListenerTest#testAudioTrackCallback;android.media.cts.DecoderTest#testCodecResetsVP9WithoutSurface;android.media.cts.DecodeEditEncodeTest#testVideoEdit720p;android.media.cts.AudioEffectTest#test1_0ConstructorFromType;android.media.cts.AudioTrackTest#testPlayStreamData;android.media.cts.MediaDrmMockTest#testCryptoSessionSign;android.media.cts.MediaDrmMockTest#testMediaDrmConstructor;android.media.cts.AudioTrackTest#testSetStereoVolumeMax;android.media.cts.MediaMuxerTest#testIllegalStateExceptions;android.media.cts.MediaCodecTest#testCreateInputSurfaceErrors;android.media.cts.AudioTrackTest#testConstructorMono16MusicStatic;android.media.cts.MediaDrmMockTest#testOpenCloseSession;android.media.cts.AudioManagerTest#testAndroidTestCaseSetupProperly;android.media.cts.DecoderTest#testEOSBehaviorMpeg4;android.media.cts.SoundPoolOggTest#testMultiSound;android.media.cts.AudioTrackTest#testConstructorMono8MusicStream;android.media.cts.MediaCodecListTest#testIsM4VSimpleProfileSupported;android.media.cts.VirtualizerTest#test1_2SetStrengthAfterRelease;android.media.cts.MediaDrmMockTest#testCryptoSessionVerify;android.media.cts.MediaMuxerTest#testVideoOnly;android.media.cts.AudioTrackTest#testWriteShortOffsetTooBig;android.media.cts.AudioManagerTest#testSetInvalidRingerMode;android.media.cts.MediaDrmMockTest#testIsMimeTypeNotSupported;android.media.cts.StreamingMediaPlayerTest#testPlayOggStreamNoLength;android.media.cts.MediaPlayerFlakyNetworkTest#test_S1P000005;android.media.cts.MediaRandomTest#testPlayerRandomAction;android.media.cts.EncoderTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testRecordedVideoPlayback0;android.media.cts.AudioRecordTest#testAudioRecordProperties;android.media.cts.AudioTrackTest#testWriteByteOffsetTooBig;android.media.cts.PresetReverbTest#test3_0ControlStatusListener;android.media.cts.DecodeEditEncodeTest#testVideoEditQVGA;android.media.cts.MediaDrmMockTest#testMissingPropertyByteArray;android.media.cts.MediaPlayerTest#testRecordAndPlay;android.media.cts.PresentationSyncTest#testThroughput;android.media.cts.MediaPlayerTest#testVideoSurfaceResetting;android.media.cts.AudioTrack_ListenerTest#testAndroidTestCaseSetupProperly;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToBufferQCIF;android.media.cts.MediaPlayerTest#testRecordedVideoPlayback180;android.media.cts.MediaRecorderTest#testRecorderAudio;android.media.cts.EqualizerTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioTrackTest#testPlaybackHeadPositionAfterPause;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Stereo_128kbps_11025Hz;android.media.cts.MediaRecorderTest#testSetMaxFileSize;android.media.cts.Vp8EncoderTest#testBasic;android.media.cts.AudioTrackTest#testPlaybackHeadPositionIncrease;android.media.cts.AudioTrackTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaDrmMockTest#testEventNoSessionNoData;android.media.cts.MediaDrmMockTest#testByteArrayProperties;android.media.cts.DecoderTest#testCodecResetsM4a;android.media.cts.RingtoneTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioPreProcessingTest#test3_1AgcCreateAndRelease;android.media.cts.AudioTrackTest#testSetPlaybackRateTwiceOutputSR;android.media.cts.PresetReverbTest#test1_0Presets;android.media.cts.StreamingMediaPlayerTest#testPlayOggStreamRedirect;android.media.cts.MediaCodecListTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioTrackTest#testSetLoopPointsStartAfterEnd;android.media.cts.MediaRecorderTest#testOnInfoListener;android.media.cts.VirtualizerTest#test3_1EnableStatusListener;android.media.cts.DecoderTest#testCodecResetsH264WithoutSurface;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Stereo_24kbps_11025Hz;android.media.cts.MediaPlayerTest#testRecordedVideoPlayback270;android.media.cts.BassBoostTest#test3_0ControlStatusListener;android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromSurfaceToSurface720p;android.media.cts.AudioTrackTest#testSetPlaybackRateUninit;android.media.cts.BassBoostTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioEffectTest#test0_0QueryEffects;android.media.cts.VisualizerTest#test2_0PollingCapture;android.media.cts.MediaDrmMockTest#testStringProperties;android.media.cts.BassBoostTest#test0_0ConstructorAndRelease;android.media.cts.MediaScannerNotificationTest#testAndroidTestCaseSetupProperly;android.media.cts.AudioTrackTest#testConstructorMono16MusicStream;android.media.cts.MediaRecorderTest#testRecordingAudioInRawFormats;android.media.cts.AudioEffectTest#test3_1SetParameterIntInt;android.media.cts.DecoderTest#testEOSBehaviorVP8;android.media.cts.StreamingMediaPlayerTest#testHTTP_H264Base_AAC_Video2;android.media.cts.AudioEffectTest#test1_4InsertOnMediaPlayer;android.media.cts.StreamingMediaPlayerTest#testHTTP_H264Base_AAC_Video1;android.media.cts.DecoderTest#testCodecResetsVP9WithSurface;android.media.cts.JetPlayerTest#testLoadJetFromPath;android.media.cts.DecoderTest#testEOSBehaviorVP9;android.media.cts.MediaDrmMockTest#testProvideKeyResponse;android.media.cts.DecoderTest#testDecodeM4a;android.media.cts.AudioTrackTest#testWriteByteNegativeSize;android.media.cts.AudioEffectTest#test4_0setEnabledLowerPriority;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_12fps_AAC_Mono_24kbps_22050Hz;android.media.cts.DecoderTest#testEOSBehaviorH264;android.media.cts.DecoderTest#testEOSBehaviorH263;android.media.cts.DecoderTest#testDecodeMonoOgg;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Stereo_24kbps_11025Hz;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Stereo_24kbps_22050Hz;android.media.cts.AudioTrackTest#testSetPlaybackHeadPositionTooFar;android.media.cts.AudioRecord_BufferSizeTest#testAndroidTestCaseSetupProperly;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_12fps_AAC_Mono_24kbps_11025Hz;android.media.cts.MediaCodecListTest#testComponentInstantiation;android.media.cts.BassBoostTest#test1_2SetStrengthAfterRelease;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Stereo_24kbps_11025Hz;android.media.cts.AudioTrackTest#testSetLoopPointsEndTooFar;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Mono_24kbps_11025Hz;android.media.cts.MediaScannerTest#testMediaScanner;android.media.cts.RingtoneTest#testRingtone;android.media.cts.AudioEffectTest#test5_0Command;android.media.cts.DecoderTest#testDecodeMp3Smpb;android.media.cts.AudioTrackTest#testWriteShort8bit;android.media.cts.AudioEffectTest#test3_3SetParameterIntByteArray;android.media.cts.AudioEffectTest#test4_3EnableStatusListener;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_300kbps_25fps_AAC_Mono_24kbps_22050Hz;android.media.cts.JetPlayerTest#testAndroidTestCaseSetupProperly;android.media.cts.Vp8EncoderTest#testSyncFrame;android.media.cts.VirtualizerTest#test2_0SetEnabledGetEnabled;android.media.cts.MediaPlayerSurfaceTest#testSetSurface;android.media.cts.SoundPoolAacTest#testLoad;android.media.cts.AudioEffectTest#test3_5SetParameterIntArrayShortArray;android.media.cts.MediaDrmMockTest#testBadCryptoSession;android.media.cts.AudioTrackTest#testConstructorStereo16MusicStatic;android.media.cts.AudioPreProcessingTest#test1_2NsSetEnabledGetEnabled;android.media.cts.AudioEffectTest#test2_1SetEnabledAfterRelease;android.media.cts.AudioManagerTest#testAccessRingMode;android.media.cts.SoundPoolAacTest#testSoundPoolOp;android.media.cts.AudioEffectTest#test4_4ParameterChangedListener;android.media.cts.DecoderTest#testCodecBasicMpeg4;android.media.cts.AudioTrackTest#testSetPlaybackHeadPositionPlaying;android.media.cts.AudioRecordTest#testAudioRecordOP;android.media.cts.MediaScannerTest#testWildcardPaths;android.media.cts.AudioEffectTest#test3_8GetParameterAfterRelease;android.media.cts.FaceDetector_FaceTest#testFaceProperties;android.media.cts.MediaPlayerTest#testLocalVideo_3gp_H263_176x144_56kbps_25fps_AAC_Stereo_128kbps_22050Hz;android.media.cts.MediaDrmMockTest#testCryptoSessionDecrypt" />
-  <Entry uri="android.mediastress" exclude="android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay00;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay10;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay11;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay07;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay08;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay10;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay05;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay11;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay06;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay03;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay04;android.mediastress.cts.MediaRecorderStressTest#testStressRecorder;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay01;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay02;android.mediastress.cts.H263QcifShortPlayerTest#testPlay07;android.mediastress.cts.MediaRecorderStressTest#testStressCamera;android.mediastress.cts.H263QcifShortPlayerTest#testPlay08;android.mediastress.cts.H263QcifShortPlayerTest#testPlay05;android.mediastress.cts.H263QcifShortPlayerTest#testPlay06;android.mediastress.cts.H263QcifShortPlayerTest#testPlay03;android.mediastress.cts.H263QcifShortPlayerTest#testPlay04;android.mediastress.cts.H263QcifShortPlayerTest#testPlay01;android.mediastress.cts.H263QcifShortPlayerTest#testPlay02;android.mediastress.cts.H264R720pAacLongPlayerTest#testPlay01;android.mediastress.cts.H264R720pAacLongPlayerTest#testPlay00;android.mediastress.cts.MediaRecorderStressTest#testStressCameraSwitchRecorder;android.mediastress.cts.H263QcifShortPlayerTest#testPlay09;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay06;android.mediastress.cts.NativeMediaTest#test1080pPlay;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay05;android.mediastress.cts.NativeMediaTest#testDefaultPlay;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay08;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay07;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay02;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay03;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay09;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay00;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay01;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay06;android.mediastress.cts.H263QcifShortPlayerTest#testPlay00;android.mediastress.cts.H264R1080pAacShortPlayerTest#testPlay00;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay07;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay04;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay00;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay05;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay02;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay01;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay08;android.mediastress.cts.H264R1080pAacShortPlayerTest#testPlay02;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay04;android.mediastress.cts.Vp8R480x360ShortPlayerTest#testPlay09;android.mediastress.cts.H264R1080pAacShortPlayerTest#testPlay01;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay03;android.mediastress.cts.H264R1080pAacRepeatedPlayerTest#testPlay00;android.mediastress.cts.H263QcifShortPlayerTest#testPlay13;android.mediastress.cts.H263QcifShortPlayerTest#testPlay12;android.mediastress.cts.H263QcifShortPlayerTest#testPlay15;android.mediastress.cts.H263QcifShortPlayerTest#testPlay14;android.mediastress.cts.H263QcifLongPlayerTest#testPlay00;android.mediastress.cts.H263QcifShortPlayerTest#testPlay17;android.mediastress.cts.H264R480pAacLongPlayerTest#testPlay00;android.mediastress.cts.H263QcifShortPlayerTest#testPlay16;android.mediastress.cts.H263QcifShortPlayerTest#testPlay19;android.mediastress.cts.H263QcifShortPlayerTest#testPlay18;android.mediastress.cts.H263QcifShortPlayerTest#testPlay10;android.mediastress.cts.H263QcifShortPlayerTest#testPlay11;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay11;android.mediastress.cts.H264R480x360AacShortPlayerTest#testPlay10;android.mediastress.cts.NativeMediaTest#test720pPlay;android.mediastress.cts.H264R1080pAacLongPlayerTest#testPlay00;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay12;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay01;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay00;android.mediastress.cts.H263QcifShortPlayerTest#testPlay23;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay11;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay10;android.mediastress.cts.H263QcifShortPlayerTest#testPlay21;android.mediastress.cts.H263QcifShortPlayerTest#testPlay22;android.mediastress.cts.H263QcifShortPlayerTest#testPlay20;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay02;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay03;android.mediastress.cts.MediaRecorderStressTest#testStressRecordVideoAndPlayback;android.mediastress.cts.H264R720pAacShortPlayerTest#testPlay09;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay04;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay05;android.mediastress.cts.Vp8R480x360LongPlayerTest#testPlay00;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay06;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay07;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay08;android.mediastress.cts.H264R480pAacShortPlayerTest#testPlay09" />
-  <Entry uri="android.net" exclude="android.net.wifi.cts.ScanResultTest#testScanResultProperties;android.net.wifi.cts.WifiManagerTest#testWifiManagerActions;android.net.cts.UriTest#testStringUri;android.net.cts.UrlQuerySanitizer_IllegalCharacterValueSanitizerTest#testAndroidTestCaseSetupProperly;android.net.rtp.cts.AudioGroupTest#testAdd;android.net.rtp.cts.AudioGroupTest#testAndroidTestCaseSetupProperly;android.net.rtp.cts.AudioGroupTest#testRemove;android.net.cts.LocalSocketTest#testAccessors;android.net.http.cts.SslErrorTest#testConstructorIgnoresInvalidValues;android.net.cts.UriTest#testCompareTo;android.net.http.cts.SslErrorTest#testAddErrorIgnoresInvalidValues;android.net.cts.VpnServiceTest#testProtect_DatagramSocket;android.net.wifi.cts.WifiConfigurationTest#testAndroidTestCaseSetupProperly;android.net.rtp.cts.AudioCodecTest#testGetCodecs;android.net.http.cts.ApacheHttpClientTest#testExecute_withWifi;android.net.cts.DnsTest#testAndroidTestCaseSetupProperly;android.net.cts.VpnServiceTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.SupplicantStateTest#testAndroidTestCaseSetupProperly;android.net.cts.NetworkInfo_StateTest#testValues;android.net.cts.UriTest#testAndroidTestCaseSetupProperly;android.net.cts.LocalSocketTest#testLocalConnections;android.net.wifi.cts.WifiManager_WifiLockTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.WifiManagerTest#testWifiManagerNetWork;android.net.cts.ConnectivityManagerTest#testGetAllNetworkInfo;android.net.rtp.cts.AudioGroupTest#testTraffic;android.net.cts.Uri_BuilderTest#testBuilderOperations;android.net.cts.UriTest#testBuildUpon;android.net.cts.TrafficStatsTest#testAndroidTestCaseSetupProperly;android.net.cts.ProxyTest#testConstructor;android.net.rtp.cts.AudioCodecTest#testGetCodec;android.net.cts.DhcpInfoTest#testConstructor;android.net.cts.LocalSocketAddress_NamespaceTest#testValues;android.net.cts.ConnectivityManagerTest#testRequestRouteToHost;android.net.cts.ConnectivityManagerTest#testSetNetworkPreference;android.net.http.cts.SslCertificateTest#testState;android.net.cts.NetworkInfo_DetailedStateTest#testAndroidTestCaseSetupProperly;android.net.rtp.cts.AudioCodecTest#testConstants;android.net.http.cts.SslCertificateTest#testSslCertificate;android.net.cts.ProxyTest#testAccessProperties;android.net.cts.CredentialsTest#testCredentials;android.net.rtp.cts.AudioStreamTest#testDoubleRelease;android.net.cts.TrafficStatsTest#testValidMobileStats;android.net.http.cts.SslErrorTest#testGetUrlWithDeprecatedConstructor;android.net.cts.VpnServiceTest#testProtect_int;android.net.cts.ConnectivityManagerTest#testGetNetworkInfo;android.net.cts.MailToTest#testAndroidTestCaseSetupProperly;android.net.cts.LocalSocketTest#testAndroidTestCaseSetupProperly;android.net.cts.LocalSocketAddress_NamespaceTest#testAndroidTestCaseSetupProperly;android.net.cts.NetworkInfo_DetailedStateTest#testValueOf;android.net.cts.DhcpInfoTest#testAndroidTestCaseSetupProperly;android.net.cts.UriTest#testPathOperations;android.net.rtp.cts.AudioStreamTest#testAndroidTestCaseSetupProperly;android.net.http.cts.SslCertificate_DNameTest#testDName;android.net.wifi.cts.WifiManagerTest#testSignal;android.net.cts.UrlQuerySanitizerTest#testUrlQuerySanitizer;android.net.wifi.cts.WifiManager_WifiLockTest#testWifiLock;android.net.rtp.cts.AudioStreamTest#testSetCodec;android.net.cts.MailToTest#testParseMailToURI;android.net.cts.UriTest#testParcelling;android.net.cts.UrlQuerySanitizerTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.WifiConfigurationTest#testWifiConfiguration;android.net.cts.NetworkInfoTest#testAccessNetworkInfoProperties;android.net.cts.ConnectivityManagerTest#testTest;android.net.http.cts.SslErrorTest#testGetPrimaryError;android.net.cts.NetworkInfo_StateTest#testValueOf;android.net.cts.UriTest#testFromFile;android.net.cts.VpnServiceTest#testTunDevice;android.net.rtp.cts.AudioStreamTest#testSetDtmfType;android.net.cts.SSLCertificateSocketFactoryTest#testAndroidTestCaseSetupProperly;android.net.http.cts.SslCertificateTest#testConstructor;android.net.http.cts.SslErrorTest#testAddError;android.net.cts.UriTest#testNormalizeScheme;android.net.wifi.cts.WifiInfoTest#testAndroidTestCaseSetupProperly;android.net.cts.ConnectivityManagerTest#testStartUsingNetworkFeature;android.net.cts.UriTest#testHierarchicalUris;android.net.cts.DhcpInfoTest#testToString;android.net.rtp.cts.AudioStreamTest#testV6Stream;android.net.cts.LocalSocketAddressTest#testAndroidTestCaseSetupProperly;android.net.cts.UrlQuerySanitizer_IllegalCharacterValueSanitizerTest#testSanitize;android.net.rtp.cts.AudioStreamTest#testV4Stream;android.net.wifi.cts.ConcurrencyTest#testConcurrency;android.net.cts.LocalSocketAddress_NamespaceTest#testValueOf;android.net.wifi.cts.WifiManagerTest#testWifiWatchdog;android.net.cts.UriTest#testEqualsAndHashCode;android.net.cts.VpnServiceTest#testPrepare;android.net.cts.UriTest#testOpaqueUri;android.net.cts.UriTest#testQueryParameters;android.net.cts.TrafficStatsTest#testThreadStatsTag;android.net.wifi.cts.SupplicantStateTest#testIsValidState;android.net.http.cts.SslErrorTest#testHasError;android.net.cts.SSLCertificateSocketFactoryTest#testAccessProperties;android.net.cts.VpnServiceTest#testEstablish;android.net.ipv6.cts.PingTest#testAndroidTestCaseSetupProperly;android.net.cts.NetworkInfoTest#testAndroidTestCaseSetupProperly;android.net.cts.ConnectivityManagerTest#testAndroidTestCaseSetupProperly;android.net.cts.UriTest#testEncodeAndDecode;android.net.rtp.cts.AudioGroupTest#testClear;android.net.cts.NetworkInfo_StateTest#testAndroidTestCaseSetupProperly;android.net.cts.UrlQuerySanitizer_ParameterValuePairTest#testAndroidTestCaseSetupProperly;android.net.cts.ProxyTest#testAndroidTestCaseSetupProperly;android.net.cts.LocalServerSocketTest#testLocalServerSocket;android.net.cts.CredentialsTest#testAndroidTestCaseSetupProperly;android.net.rtp.cts.AudioCodecTest#testAndroidTestCaseSetupProperly;android.net.cts.UrlQuerySanitizer_ParameterValuePairTest#testConstructor;android.net.cts.NetworkInfo_DetailedStateTest#testValues;android.net.http.cts.SslErrorTest#testGetPrimaryErrorWithEmptySet;android.net.rtp.cts.AudioGroupTest#testSetMode;android.net.wifi.cts.WifiInfoTest#testWifiInfoProperties;android.net.wifi.cts.ConcurrencyTest#testAndroidTestCaseSetupProperly;android.net.http.cts.ApacheHttpClientTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.WifiManagerTest#testWifiManagerProperties;android.net.rtp.cts.AudioGroupTest#testDoubleClear;android.net.wifi.cts.WifiManagerTest#testAndroidTestCaseSetupProperly;android.net.cts.ConnectivityManagerTest#testGetActiveNetworkInfo;android.net.cts.LocalSocketAddressTest#testNewLocalSocketAddressWithDefaultNamespace;android.net.http.cts.SslErrorTest#testGetUrl;android.net.ipv6.cts.PingTest#testLoopbackPing;android.net.cts.TrafficStatsTest#testValidTotalStats;android.net.wifi.cts.WifiEnterpriseConfigTest#testAddEapNetwork;android.net.cts.VpnServiceTest#testProtect_Socket;android.net.wifi.cts.WifiEnterpriseConfigTest#testAndroidTestCaseSetupProperly;android.net.cts.ConnectivityManagerTest#testIsNetworkTypeValid;android.net.cts.ConnectivityManagerTest#testIsNetworkSupported;android.net.cts.LocalServerSocketTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.WifiEnterpriseConfigTest#testSettersAndGetters;android.net.http.cts.ApacheHttpClientTest#testExecute_withMobile" />
-  <Entry uri="android.provider" exclude="android.provider.cts.ContactsContract_CommonDataKinds_EventTest#testGetTypeLabel;android.provider.cts.MediaStore_Audio_Genres_MembersTest#testStoreAudioGenresMembersInternal;android.provider.cts.ContactsContract_DataTest#testDataInsert_updatesContactLastUpdatedTimestamp;android.provider.cts.ContactsContract_CommonDataKinds_EmailTest#testGetTypeLabel;android.provider.cts.Settings_NameValueTableTest#testPutString;android.provider.cts.CalendarTest#testCalendarEntityQuery;android.provider.cts.ContactsContract_DataUsageTest#testSingleDataUsageFeedback_incrementsCorrectDataItems;android.provider.cts.BrowserTest#testSendString;android.provider.cts.MediaStore_Video_MediaTest#testStoreVideoMediaInternal;android.provider.cts.UserDictionary_WordsTest#testAddWord_deprecated;android.provider.cts.MediaStoreIntentsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_DeletedContacts#testQuerySinceTimestamp;android.provider.cts.BrowserTest#testRequestAllIcons;android.provider.cts.ContactsContract_CommonDataKinds_EmailTest#testAndroidTestCaseSetupProperly;android.provider.cts.CalendarTest#testReminders;android.provider.cts.MediaStore_Audio_ArtistsTest#testStoreAudioArtistsExternal;android.provider.cts.ContactsContractIntentsTest#testViewContactDir;android.provider.cts.CalendarTest#testBulkUpdate;android.provider.cts.ContactsContract_PhotoTest#testAddPhoto;android.provider.cts.Settings_NameValueTableTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAccountRemovalWithMergedContact_hasDeleteLogsForContacts;android.provider.cts.ContactsContract_PhotoTest#testAddEmptyPhoto;android.provider.cts.Settings_SecureTest#testGetPutFloat;android.provider.cts.MediaStore_Images_MediaTest#testGetContentUri;android.provider.cts.ContactsContract_DeletedContacts#testDelete_isUnsupported;android.provider.cts.CalendarTest#testCalendarCreationAndDeletion;android.provider.cts.BrowserTest#testBookmarksTable;android.provider.cts.Settings_SecureTest#testGetUriFor;android.provider.cts.ContactsContract_StatusUpdatesTest#testGetPresenceIconresourceId;android.provider.cts.MediaStore_Audio_Playlists_MembersTest#testStoreAudioPlaylistsMembersInternal;android.provider.cts.ContactsContract_CommonDataKinds_EventTest#testAndroidTestCaseSetupProperly;android.provider.cts.Contacts_PhonesTest#testGetDisplayLabel;android.provider.cts.ContactsContract_DeletedContacts#testInsert_isUnsupported;android.provider.cts.MediaStore_Audio_AlbumsTest#testStoreAudioAlbumsExternal;android.provider.cts.ContactsContract_DeletedContacts#testAndroidTestCaseSetupProperly;android.provider.cts.BrowserTest#testGetAllVisitedUrls;android.provider.cts.Contacts_ContactMethodsTest#testEncodeAndDecodeProtocol;android.provider.cts.ContactsContract_DeletedContacts#testQueryAll;android.provider.cts.MediaStore_Audio_MediaTest#testStoreAudioMediaInternal;android.provider.cts.ContactsContract_RawContactsTest#testRawContactPsuedoDelete_hasDeleteLogForContact;android.provider.cts.MediaStore_FilesTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Images_MediaTest#testStoreImagesMediaInternal;android.provider.cts.MediaStore_Audio_AlbumsTest#testAlbumArt;android.provider.cts.ContactsContract_ContactsTest#testLookupUri;android.provider.cts.MediaStoreIntentsTest#testPickVideoDir;android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithBitmap;android.provider.cts.MediaStoreIntentsTest#testViewAudioFile;android.provider.cts.MediaStore_Audio_Genres_MembersTest#testStoreAudioGenresMembersExternal;android.provider.cts.ContactsContract_CommonDataKinds_StructuredPostalTest#testAndroidTestCaseSetupProperly;android.provider.cts.CalendarTest#testInstanceSearch;android.provider.cts.VoicemailContractTest#testStatusTablePermissions;android.provider.cts.ContactsContract_CommonDataKinds_OrganizationTest#testAndroidTestCaseSetupProperly;android.provider.cts.SettingsTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Audio_PlaylistsTest#testStoreAudioPlaylistsInternal;android.provider.cts.ContactsContract_DumpFileProviderTest#testQuery_worksWithValidFileName;android.provider.cts.Settings_SecureTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Video_MediaTest#testAndroidTestCaseSetupProperly;android.provider.cts.BrowserTest#testAccessHistory;android.provider.cts.ContactsContract_DataTest#testContactablesFilterByPhonePrefix_returnsCorrectDataRows;android.provider.cts.MediaStore_Images_ThumbnailsTest#testStoreImagesMediaInternal;android.provider.cts.ContactsTest#testCallsTable;android.provider.cts.CalendarTest#testEventCreationAndDeletion;android.provider.cts.VoicemailContractTest#testVoicemailTablePermissions;android.provider.cts.CalendarTest#testEventsUid2445;android.provider.cts.MediaStore_VideoTest#testQuery;android.provider.cts.CalendarTest#testDefaultProjections;android.provider.cts.MediaStoreIntentsTest#testViewVideoDir;android.provider.cts.MediaStore_FilesTest#testGetContentUri;android.provider.cts.ContactsContract_ContactsTest#testInsert_isUnsupported;android.provider.cts.ContactsContract_CommonDataKinds_PhoneTest#testGetTypeLabel;android.provider.cts.VoicemailContractTest#testVoicemailsTable;android.provider.cts.ContactsContract_CommonDataKinds_RelationTest#testGetTypeLabel;android.provider.cts.Settings_SystemTest#testGetDefaultValues;android.provider.cts.ContactsContract_RawContactsTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStoreTest#testGetMediaScannerUri;android.provider.cts.ContactsContract_RawContactsTest#testRawContactDelete_removesRecord;android.provider.cts.Settings_SecureTest#testGetPutString;android.provider.cts.ContactsTest#testGroupMembershipTable;android.provider.cts.MediaStore_Audio_MediaTest#testGetContentUri;android.provider.cts.CalendarTest#testFullRecurrenceUpdate;android.provider.cts.MediaStore_FilesTest#testCaseSensitivity;android.provider.cts.MediaStore_Audio_AlbumsTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Audio_ArtistsTest#testStoreAudioArtistsInternal;android.provider.cts.ContactsContract_ContactsTest#testContactDelete_hasDeleteLog;android.provider.cts.ContactsContract_DataUsageTest#testMultiIdDataUsageFeedback_incrementsCorrectDataItems;android.provider.cts.CalendarTest#testSyncOnlyInsertEnforcement;android.provider.cts.VoicemailContractTest#testDataColumnUpdate_throwsIllegalArgumentException;android.provider.cts.CalendarTest#testColorWriteRequirements;android.provider.cts.CalendarTest#testWhenByDayQuery;android.provider.cts.ContactsContract_StreamItemsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_CommonDataKinds_ImTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_AudioTest#testKeyFor;android.provider.cts.ContactsContract_ContactsTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Images_ThumbnailsTest#testQueryInternalThumbnails;android.provider.cts.ContactsContract_DumpFileProviderTest#testOpenFileDescriptor_throwsErrorWithIllegalFileName;android.provider.cts.CalendarTest#testEventColors;android.provider.cts.SettingsTest#testBluetoothDevicesTable;android.provider.cts.ContactsContract_RawContactsTest#testRawContactUpdate_updatesContactUpdatedTimestamp;android.provider.cts.ContactsContract_CommonDataKinds_RelationTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStoreTest#testGetVersion;android.provider.cts.MediaStore_Audio_GenresTest#testGetContentUri;android.provider.cts.ContactsContract_DataTest#testDataDelete_updatesContactLastUpdatedTimestamp;android.provider.cts.ContactsContract_CommonDataKinds_SipAddressTest#testGetTypeLabel;android.provider.cts.BrowserTest#testSaveBookmark;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Video_MediaTest#testGetContentUri;android.provider.cts.CalendarTest#testExtendedProperties;android.provider.cts.Settings_SystemTest#testAndroidTestCaseSetupProperly;android.provider.cts.CalendarTest#testNonAdapterRecurrenceExceptions;android.provider.cts.CalendarTest#testOutOfOrderRecurrenceExceptions;android.provider.cts.CalendarTest#testConversionToRecurring;android.provider.cts.MediaStore_Audio_Playlists_MembersTest#testStoreAudioPlaylistsMembersExternal;android.provider.cts.CalendarTest#testMultiRuleRecurrence;android.provider.cts.MediaStoreIntentsTest#testPickAudioDir;android.provider.cts.MediaStore_Audio_GenresTest#testStoreAudioGenresExternal;android.provider.cts.MediaStoreIntentsTest#testViewVideoFile;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAccountRemoval_deletesContacts;android.provider.cts.Contacts_ContactMethodsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_GroupMembershipTest#testAddGroupMembershipWithGroupRowId;android.provider.cts.TelephonyProviderTest#testOpeningAnyFile;android.provider.cts.MediaStore_Audio_GenresTest#testGetContentUriForAudioId;android.provider.cts.ContactsContract_CommonDataKinds_PhoneTest#testAndroidTestCaseSetupProperly;android.provider.cts.Contacts_PeopleTest#testMarkAsContacted;android.provider.cts.MediaStore_FilesTest#testAccess;android.provider.cts.ContactsContract_CommonDataKinds_ImTest#testGetTypeLabel;android.provider.cts.SearchRecentSuggestionsTest#testSuggestionsTable;android.provider.cts.CalendarTest#testAttendees;android.provider.cts.SettingsTest#testAccessNonTable;android.provider.cts.MediaStoreIntentsTest#testPickImageDir;android.provider.cts.BrowserTest#testSearchesTable;android.provider.cts.Contacts_SettingsTest#testAccessSetting;android.provider.cts.ContactsContract_StreamItemPhotosTest#testContentPhotoUri;android.provider.cts.ContactsContract_DataTest#testGetLookupUriByDisplayName;android.provider.cts.ContactsContract_StatusUpdatesTest#testInsertStatus;android.provider.cts.MediaStore_Video_ThumbnailsTest#testGetContentUri;android.provider.cts.MediaStore_Audio_GenresTest#testStoreAudioGenresInternal;android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithImagePath;android.provider.cts.CalendarTest#testForwardRecurrenceExceptions;android.provider.cts.Settings_SecureTest#testUnknownSourcesOffByDefault;android.provider.cts.CalendarTest#testBadRequests;android.provider.cts.ContactsTest#testSettingsTable;android.provider.cts.VoicemailContractTest#testInsert_doesNotUpdateDataColumn;android.provider.cts.ContactsContract_RawContactsTest#testRawContactCreate_updatesContactUpdatedTimestamp;android.provider.cts.MediaStoreIntentsTest#testViewImageDir;android.provider.cts.ContactsContract_ContactsTest#testContactDelete_removesContactRecord;android.provider.cts.MediaStore_Images_ThumbnailsTest#testQueryExternalMiniThumbnails;android.provider.cts.ContactsContract_ContactsTest#testContactUpdate_updatesContactUpdatedTimestamp;android.provider.cts.Settings_SettingNotFoundExceptionTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_RawContactsTest#testGetLookupUriByDisplayName;android.provider.cts.BrowserTest#testAccessSearches;android.provider.cts.ContactsContract_CommonDataKinds_SipAddressTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_GroupMembershipTest#testAddGroupMembershipWithUnknownGroupSourceId;android.provider.cts.MediaStore_Audio_MediaTest#testStoreAudioMediaExternal;android.provider.cts.MediaStore_Audio_PlaylistsTest#testGetContentUri;android.provider.cts.ContactsTest#testGroupsTable;android.provider.cts.MediaStore_Audio_AlbumsTest#testGetContentUri;android.provider.cts.Settings_SystemTest#testGetUriFor;android.provider.cts.ContactsContract_StreamItemPhotosTest#testContentDirectoryUri;android.provider.cts.SearchRecentSuggestionsTest#testSearchRecentSuggestions;android.provider.cts.Contacts_ContactMethodsTest#testAddPostalLocation;android.provider.cts.MediaStore_Audio_Artists_AlbumsTest#testGetContentUri;android.provider.cts.SearchRecentSuggestionsTest#testConstructor;android.provider.cts.ContactsContract_ContactsTest#testMarkAsContacted;android.provider.cts.ContactsTest#testPeopleTable;android.provider.cts.CalendarTest#testCalendarColors;android.provider.cts.CalendarTest#testCalendarIsPrimary;android.provider.cts.ContactsContract_RawContactsTest#testRawContactDelete_hasDeleteLogForContact;android.provider.cts.Settings_SystemTest#testSystemSettings;android.provider.cts.CalendarTest#testRecurrence;android.provider.cts.ContactsContract_GroupMembershipTest#testAddGroupMembershipWithGroupSourceId;android.provider.cts.MediaStore_Audio_Genres_MembersTest#testGetContentUri;android.provider.cts.VoicemailContractTest#testStatusTable;android.provider.cts.ContactsContract_DataTest#testContactablesFilterByFirstName_returnsCorrectDataRows;android.provider.cts.Settings_NameValueTableTest#testGetUriFor;android.provider.cts.ContactsContract_DumpFileProviderTest#testQuery_throwsErrorWithIllegalFileName;android.provider.cts.ContactsTest#testContactMethodsTable;android.provider.cts.ContactsContractIntentsTest#testPickContactDir;android.provider.cts.MediaStore_Audio_AlbumsTest#testStoreAudioAlbumsInternal;android.provider.cts.Contacts_PeopleTest#testAddToGroup;android.provider.cts.ContactsContract_DataTest#testContactablesFilterByEmailPrefix_returnsCorrectDataRows;android.provider.cts.ContactsContract_StatusUpdatesTest#testGetPresencePrecedence;android.provider.cts.BrowserTest#testUpdateVisitedHistory;android.provider.cts.SettingsTest#testSecureTable;android.provider.cts.ContactsContract_StreamItemsTest#testContentUri;android.provider.cts.MediaStore_Audio_Artists_AlbumsTest#testStoreAudioArtistsAlbumsInternal;android.provider.cts.MediaStore_Video_ThumbnailsTest#testGetThumbnail;android.provider.cts.ContactsContractIntentsTest#testGetContentContactDir;android.provider.cts.SettingsTest#testSystemTable;android.provider.cts.CalendarTest#testEventUpdateAsApp;android.provider.cts.MediaStore_Images_MediaTest#testStoreImagesMediaExternal;android.provider.cts.CalendarTest#testEventsEntityQuery;android.provider.cts.ContactsContractIntentsTest#testAndroidTestCaseSetupProperly;android.provider.cts.CalendarTest#testSyncState;android.provider.cts.MediaStore_Video_ThumbnailsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_DataTest#testGetLookupUriBySourceId;android.provider.cts.UserDictionary_WordsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsTest#testExtensionsTable;android.provider.cts.ContactsContract_DataTest#testContactablesUri;android.provider.cts.ContactsContract_CommonDataKinds_ImTest#testGetProtocolLabel;android.provider.cts.Settings_SettingNotFoundExceptionTest#testConstructor;android.provider.cts.CalendarTest#testEventsIsOrganizer;android.provider.cts.ContactsContract_StreamItemsTest#testContentDirectoryUri;android.provider.cts.Contacts_PeopleTest#testAccessPhotoData;android.provider.cts.UserDictionary_WordsTest#testAddWord;android.provider.cts.CalendarTest#testSingleRecurrenceExceptions;android.provider.cts.BrowserTest#testGetAllBookmarks;android.provider.cts.ContactsContract_RawContactsTest#testRawContactDelete_setsDeleteFlag;android.provider.cts.MediaStoreIntentsTest#testViewImageFile;android.provider.cts.Settings_SecureTest#testGetPutLong;android.provider.cts.ContactsContract_DataTest#testContactablesFilterByLastName_returnsCorrectDataRows;android.provider.cts.SearchRecentSuggestionsTest#testAndroidTestCaseSetupProperly;android.provider.cts.Contacts_PhonesTest#testGetDisplayLabelCharSequenceArray;android.provider.cts.SettingsTest#testUserDictionarySettingsExists;android.provider.cts.Contacts_OrganizationsTest#testGetDisplayLabel;android.provider.cts.Settings_SecureTest#testGetDefaultValues;android.provider.cts.ContactsContract_ContactsTest#testContactDelete_marksRawContactsForDeletion;android.provider.cts.ContactsTest#testPhotosTable;android.provider.cts.ContactsContract_ContactsTest#testContentUri;android.provider.cts.MediaStore_Audio_Artists_AlbumsTest#testStoreAudioArtistsAlbumsExternal;android.provider.cts.Contacts_PhonesTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAccountRemovalWithMergedContact_doesNotDeleteContactAndTimestampUpdated;android.provider.cts.ContactsTest#testOrganizationsTable;android.provider.cts.MediaStore_Audio_Playlists_MembersTest#testGetContentUri;android.provider.cts.MediaStore_Audio_PlaylistsTest#testStoreAudioPlaylistsExternal;android.provider.cts.Contacts_OrganizationsTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsTest#testPhonesTable;android.provider.cts.Settings_SecureTest#testGetPutInt;android.provider.cts.ContactsContract_StatusUpdatesTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Audio_MediaTest#testGetContentUriForPath;android.provider.cts.CalendarTest#testCalendarUpdateAsApp;android.provider.cts.ContactsContract_DeletedContacts#testQueryByContactId;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAccountRemoval_hasDeleteLogsForContacts;android.provider.cts.ContactsContract_StreamItemPhotosTest#testAndroidTestCaseSetupProperly;android.provider.cts.MediaStore_Audio_ArtistsTest#testGetContentUri;android.provider.cts.ContactsContract_DumpFileProviderTest#testAndroidTestCaseSetupProperly;android.provider.cts.ContactsContract_DataTest#testDataUpdate_updatesContactLastUpdatedTimestamp;android.provider.cts.ContactsProvider2_AccountRemovalTest#testAccountRemovalWithMergedContact_deletesContacts;android.provider.cts.ContactsContract_RawContactsTest#testGetLookupUriBySourceId;android.provider.cts.MediaStore_Images_ThumbnailsTest#testGetContentUri;android.provider.cts.ContactsContract_DumpFileProviderTest#testOpenFileDescriptor_worksWithValidFileName;android.provider.cts.ContactsContract_CommonDataKinds_StructuredPostalTest#testGetTypeLabel;android.provider.cts.ContactsContract_DataUsageTest#testAndroidTestCaseSetupProperly;android.provider.cts.Contacts_ContactMethodsTest#test;android.provider.cts.MediaStore_Video_MediaTest#testStoreVideoMediaExternal;android.provider.cts.ContactsContract_CommonDataKinds_OrganizationTest#testGetTypeLabel;android.provider.cts.MediaStore_Images_ThumbnailsTest#testStoreImagesMediaExternal;android.provider.cts.ContactsContract_DataTest#testContactablesFilter_doesNotExist_returnsCorrectDataRows;android.provider.cts.ContactsContract_DeletedContacts#testQuery_returnsProperColumns" />
-  <Entry uri="android.security" exclude="android.security.cts.KeystoreExploitTest#testAndroidTestCaseSetupProperly;android.security.cts.CharDeviceTest#testExynosKernelMemoryRead;android.security.cts.VoldExploitTest#testAndroidTestCaseSetupProperly;android.security.cts.LoadEffectLibraryTest#testLoadLibrary;android.security.cts.BrowserTest#testAndroidTestCaseSetupProperly;android.security.cts.LinuxRngTest#testDevUrandomMajorMinor;android.security.cts.ServicePermissionsTest#testDumpProtected;android.security.cts.BannedFilesTest#testNoSetuidTcpdump;android.security.cts.SqliteJournalLeakTest#testShm;android.security.cts.LinuxRngTest#testDevRandomMajorMinor;android.security.cts.ClonedSecureRandomTest#testCheckForDuplicateOutput;android.security.cts.BrowserTest#testBrowserPrivateDataAccess;android.security.cts.BrowserTest#testTabExhaustion;android.security.cts.KeystoreExploitTest#testKeystoreCrash;android.security.cts.SqliteJournalLeakTest#testJournal;android.security.cts.BannedFilesTest#testNoCmdClient;android.security.cts.BannedFilesTest#testNoSetuidIp;android.security.cts.BannedFilesTest#testNoSyncAgent;android.security.cts.ListeningPortsTest#testNoListeningLoopbackTcp6Ports;android.security.cts.KernelSettingsTest#testKptrRestrict;android.security.cts.AslrTest#testVaRandomize;android.security.cts.KernelSettingsTest#testMmapMinAddr;android.security.cts.CertificateTest#testBlockCertificates;android.security.cts.BrowserTest#testTabReuse;android.security.cts.KernelSettingsTest#testSELinuxEnforcing;android.security.cts.ListeningPortsTest#testNoListeningLoopbackUdp6Ports;android.security.cts.NativeCodeTest#testPerfEvent;android.security.cts.KernelSettingsTest#testSetuidDumpable;android.security.cts.PackageSignatureTest#testAndroidTestCaseSetupProperly;android.security.cts.ServicePermissionsTest#testAndroidTestCaseSetupProperly;android.security.cts.CertificateTest#testCertificates;android.security.cts.KernelSettingsTest#testNoConfigGz;android.security.cts.KernelSettingsTest#testDmesgRestrict;android.security.cts.ListeningPortsTest#testAndroidTestCaseSetupProperly;android.security.cts.SqliteJournalLeakTest#testAndroidTestCaseSetupProperly;android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningTcp6Ports;android.security.cts.ListeningPortsTest#testNoListeningLoopbackTcpPorts;android.security.cts.ClonedSecureRandomTest#testAndroidTestCaseSetupProperly;android.security.cts.VoldExploitTest#testTryCommandInjection;android.security.cts.VoldExploitTest#testZergRushCrash;android.security.cts.AslrTest#testOneExecutableIsPie;android.security.cts.VoldExploitTest#testTryToCrashVold;android.security.cts.ListeningPortsTest#testNoListeningLoopbackUdpPorts;android.security.cts.CertificateTest#testAndroidTestCaseSetupProperly;android.security.cts.SqliteJournalLeakTest#testWal;android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningTcpPorts;android.security.cts.CharDeviceTest#testExynosRootingVuln" />
-  <Entry uri="android.webkit" exclude="android.webkit.cts.WebViewTest#testDocumentHasImages;android.webkit.cts.WebViewTest#testScrollBarOverlay;android.webkit.cts.WebViewTest#testGoBackAndForward;android.webkit.cts.WebViewTest#testGetContentHeight;android.webkit.cts.WebChromeClientTest#testOnJsConfirm;android.webkit.cts.WebChromeClientTest#testOnProgressChanged;android.webkit.cts.WebViewTest#testAddJavascriptInterfaceNullObject;android.webkit.cts.WebViewTest#testConstructor;android.webkit.cts.WebViewTest#testInvokeZoomPicker;android.webkit.cts.WebSettingsTest#testAccessMinimumLogicalFontSize;android.webkit.cts.WebViewStartupTest#testCookieManagerBlockingUiThread;android.webkit.cts.WebViewTest#testInternals;android.webkit.cts.WebViewClientTest#testShouldOverrideUrlLoading;android.webkit.cts.GeolocationTest#testSimpleGeolocationRequestAcceptOnce;android.webkit.cts.WebSettingsTest#testDatabaseDisabled;android.webkit.cts.WebView_WebViewTransportTest#testAccessWebView;android.webkit.cts.WebSettingsTest#testAccessJavaScriptCanOpenWindowsAutomatically;android.webkit.cts.WebSettingsTest#testAppCacheEnabled;android.webkit.cts.WebSettingsTest#testAccessUserAgentString;android.webkit.cts.WebViewTest#testClearHistory;android.webkit.cts.WebSettingsTest#testAccessSerifFontFamily;android.webkit.cts.WebSettingsTest#testAccessLayoutAlgorithm;android.webkit.cts.WebSettingsTest#testAccessFantasyFontFamily;android.webkit.cts.WebViewTest#testAddJavascriptInterface;android.webkit.cts.WebSettingsTest#testAccessCacheMode;android.webkit.cts.WebViewTest#testDebugDump;android.webkit.cts.WebViewTest#testSslErrorProceedResponseNotReusedForDifferentHost;android.webkit.cts.WebSettingsTest#testLocalImageLoads;android.webkit.cts.WebViewTest#testSslErrorProceedResponseReusedForSameHost;android.webkit.cts.HttpAuthHandlerTest#testUseHttpAuthUsernamePassword;android.webkit.cts.WebViewTest#testSetLayoutParams;android.webkit.cts.WebViewTest#testAppInjectedXRequestedWithHeaderIsNotOverwritten;android.webkit.cts.WebSettingsTest#testAccessUseDoubleTree;android.webkit.cts.WebViewTest#testOnReceivedSslErrorCancel;android.webkit.cts.URLUtilTest#testIsHttpUrl;android.webkit.cts.DateSorterTest#testConstants;android.webkit.cts.WebSettingsTest#testAccessFixedFontFamily;android.webkit.cts.WebSettingsTest#testSetRenderPriority;android.webkit.cts.WebViewTest#testRemoveJavascriptInterface;android.webkit.cts.WebViewTest#testAndroidAssetAnchor;android.webkit.cts.WebViewTest#testOnReceivedSslError;android.webkit.cts.CookieTest#testEmptyValue;android.webkit.cts.WebViewTest#testPauseResumeTimers;android.webkit.cts.URLUtilTest#testIsContentUrl;android.webkit.cts.WebChromeClientTest#testBlockWindowsAsync;android.webkit.cts.WebViewTest#testGetVisibleTitleHeight;android.webkit.cts.WebBackForwardListTest#testClone;android.webkit.cts.WebSettingsTest#testAccessDefaultTextEncodingName;android.webkit.cts.URLUtilTest#testGuessUrl;android.webkit.cts.MimeTypeMapTest#testAndroidTestCaseSetupProperly;android.webkit.cts.WebChromeClientTest#testOnReceivedIcon;android.webkit.cts.CookieTest#testAndroidTestCaseSetupProperly;android.webkit.cts.CookieManagerTest#testRemoveCookies;android.webkit.cts.WebSettingsTest#testAccessPluginsPath;android.webkit.cts.WebSettingsTest#testAccessAllowFileAccess;android.webkit.cts.WebSettingsTest#testAccessSupportMultipleWindows;android.webkit.cts.WebViewTest#testAppCanInjectHeadersViaImmutableMap;android.webkit.cts.WebViewTest#testSecureSiteSetsCertificate;android.webkit.cts.WebViewTest#testSetWebViewClient;android.webkit.cts.WebViewTest#testSetScrollBarStyle;android.webkit.cts.CookieTest#testDomain;android.webkit.cts.WebViewTest#testZoom;android.webkit.cts.URLUtilTest#testIsDataUrl;android.webkit.cts.CookieManagerTest#testAcceptCookie;android.webkit.cts.WebChromeClientTest#testOnReceivedTitle;android.webkit.cts.URLUtilTest#testIsFileUrl;android.webkit.cts.WebSettingsTest#testAccessJavaScriptEnabled;android.webkit.cts.URLUtilTest#testIsNetworkUrl;android.webkit.cts.WebViewTest#testFindAddress;android.webkit.cts.WebViewTest#testSetNetworkAvailable;android.webkit.cts.WebViewTest#testClearSslPreferences;android.webkit.cts.URLUtilTest#testIsHttpsUrl;android.webkit.cts.MimeTypeMapTest#testGetFileExtensionFromUrl;android.webkit.cts.WebViewTest#testGetOriginalUrl;android.webkit.cts.WebChromeClientTest#testBlockWindowsSync;android.webkit.cts.WebViewTest#testLoadData;android.webkit.cts.WebViewTest#testInsecureSiteClearsCertificate;android.webkit.cts.WebBackForwardListTest#testGetCurrentItem;android.webkit.cts.URLUtilTest#testStripAnchor;android.webkit.cts.URLUtilTest#testGuessFileName;android.webkit.cts.URLUtilTest#testAndroidTestCaseSetupProperly;android.webkit.cts.WebViewTest#testEvaluateJavascript;android.webkit.cts.DateSorterTest#testConstructor;android.webkit.cts.WebViewTest#testPageScroll;android.webkit.cts.WebSettingsTest#testIframesWhenAccessFromFileURLsEnabled;android.webkit.cts.WebViewTest#testFlingScroll;android.webkit.cts.WebSettingsTest#testXHRWhenAccessFromFileURLsEnabled;android.webkit.cts.WebChromeClientTest#testOnJsPrompt;android.webkit.cts.WebSettingsTest#testAccessSupportZoom;android.webkit.cts.WebSettingsTest#testLoadsImagesAutomatically;android.webkit.cts.URLUtilTest#testIsValidUrl;android.webkit.cts.WebViewTest#testRequestFocusNodeHref;android.webkit.cts.WebViewTest#testLoadDataWithBaseUrl;android.webkit.cts.WebChromeClientTest#testOnJsAlert;android.webkit.cts.WebSettingsTest#testAccessSansSerifFontFamily;android.webkit.cts.CookieManagerTest#testCookieManager;android.webkit.cts.WebViewTest#testSetMapTrackballToArrowKeys;android.webkit.cts.WebViewTest#testCreatingWebViewCreatesCookieSyncManager;android.webkit.cts.DateSorterTest#testGetIndex;android.webkit.cts.GeolocationTest#testGeolocationPermissions;android.webkit.cts.WebChromeClientTest#testOnJsBeforeUnload;android.webkit.cts.CookieManagerTest#testClone;android.webkit.cts.CookieManagerTest#testGetInstance;android.webkit.cts.WebViewTest#testGetZoomControls;android.webkit.cts.CookieTest#testSubDomain;android.webkit.cts.WebSettingsTest#testUserAgentString_default;android.webkit.cts.MimeTypeMapTest#testGetMimeTypeFromExtension;android.webkit.cts.WebSettingsTest#testBlockNetworkImage;android.webkit.cts.WebViewTest#testPlatformNotifications;android.webkit.cts.URLUtilTest#testIsAboutUrl;android.webkit.cts.WebViewTest#testSetPictureListener;android.webkit.cts.MimeTypeMapTest#testHasMimeType;android.webkit.cts.WebViewTest#testOnReceivedSslErrorProceed;android.webkit.cts.DateSorterTest#testGetLabel;android.webkit.cts.GeolocationTest#testSimpleGeolocationRequestAcceptAlways;android.webkit.cts.URLUtilTest#testDecode;android.webkit.cts.HttpAuthHandlerTest#testProceed;android.webkit.cts.WebSettingsTest#testSetNeedInitialFocus;android.webkit.cts.WebSettingsTest#testIframesWhenAccessFromFileURLsDisabled;android.webkit.cts.WebSettingsTest#testAccessCursiveFontFamily;android.webkit.cts.WebViewTest#testFindAll;android.webkit.cts.WebViewTest#testStopLoading;android.webkit.cts.DateSorterTest#testAndroidTestCaseSetupProperly;android.webkit.cts.WebSettingsTest#testAccessDefaultFixedFontSize;android.webkit.cts.CookieManagerTest#testb3167208;android.webkit.cts.WebSettingsTest#testAccessMinimumFontSize;android.webkit.cts.WebSettingsTest#testAccessUseWideViewPort;android.webkit.cts.WebSettingsTest#testAccessSaveFormData;android.webkit.cts.WebViewTest#testRequestChildRectangleOnScreen;android.webkit.cts.URLUtilTest#testIsJavaScriptUrl;android.webkit.cts.WebViewTest#testFindNext;android.webkit.cts.MimeTypeMapTest#testHasExtension;android.webkit.cts.WebViewTest#testSetDownloadListener;android.webkit.cts.WebSettingsTest#testXHRWhenAccessFromFileURLsDisabled;android.webkit.cts.WebViewTest#testDestroy;android.webkit.cts.MimeTypeMapTest#testGetSingleton;android.webkit.cts.WebViewTest#testAndroidAssetQueryParam;android.webkit.cts.WebViewTest#testAccessPluginList;android.webkit.cts.CookieTest#testPath;android.webkit.cts.WebViewTest#testAccessHttpAuthUsernamePassword;android.webkit.cts.WebViewTest#testUseRemovedJavascriptInterface;android.webkit.cts.WebSettingsTest#testAccessTextSize;android.webkit.cts.URLUtilTest#testIsAssetUrl;android.webkit.cts.CookieTest#testInvalidDomain;android.webkit.cts.CookieSyncManagerTest#testCookieSyncManager;android.webkit.cts.URLUtilTest#testComposeSearchUrl;android.webkit.cts.WebChromeClientTest#testWindows;android.webkit.cts.WebViewTest#testRequestImageRef;android.webkit.cts.WebSettingsTest#testAccessDefaultFontSize;android.webkit.cts.WebViewClientTest#testShouldOverrideKeyEvent;android.webkit.cts.WebHistoryItemTest#testWebHistoryItem;android.webkit.cts.WebSettingsTest#testAccessBuiltInZoomControls;android.webkit.cts.WebSettingsTest#testAppCacheDisabled;android.webkit.cts.WebViewTest#testSetWebChromeClient;android.webkit.cts.WebViewTest#testGetHitTestResult;android.webkit.cts.WebSettingsTest#testAccessStandardFontFamily;android.webkit.cts.GeolocationTest#testSimpleGeolocationRequestReject;android.webkit.cts.WebSettingsTest#testBlockNetworkLoads;android.webkit.cts.DateSorterTest#testGetBoundary;android.webkit.cts.WebViewTest#testCapturePicture;android.webkit.cts.WebSettingsTest#testAccessPluginsEnabled;android.webkit.cts.WebViewTest#testSaveAndRestoreState;android.webkit.cts.WebViewTest#testLoadUrl;android.webkit.cts.HttpAuthHandlerTest#testCancel;android.webkit.cts.URLUtilTest#testIsCookielessProxyUrl;android.webkit.cts.WebViewTest#testGetFavicon;android.webkit.cts.MimeTypeMapTest#testGetExtensionFromMimeType" />
-  <Entry uri="android.widget" exclude="android.widget.cts.ImageSwitcherTest#testSetImageDrawable;android.widget.cts.ExpandableListViewTest#testOnSaveInstanceState;android.widget.cts.RemoteViewsTest#testSetFloat;android.widget.cts.ToggleButtonTest#testConstructor;android.widget.cts.CursorTreeAdapterTest#testOnGroupCollapsed;android.widget.cts.ListViewTest#testDispatchDraw;android.widget.cts.HorizontalScrollViewTest#testRequestLayout;android.widget.cts.TextViewTest#testDrawableResolution;android.widget.cts.CursorTreeAdapterTest#testGetGroup;android.widget.cts.RemoteViewsTest#testSetBoolean;android.widget.cts.SimpleExpandableListAdapterTest#testGetChildrenCount;android.widget.cts.TimePickerTest#testSetEnabled;android.widget.cts.RemoteViewsTest#testSetChronometer;android.widget.cts.BaseExpandableListAdapterTest#testNotifyDataSetChanged;android.widget.cts.TextViewTest#testConstructor;android.widget.cts.FrameLayoutTest#testGenerateLayoutParams2;android.widget.cts.FrameLayoutTest#testGenerateLayoutParams1;android.widget.cts.DialerFilterTest#testClearText;android.widget.cts.ListViewTest#testFindViewWithTagTraversal;android.widget.cts.TextViewTest#testGetResolvedTextAlignmentWithInheritance;android.widget.cts.SimpleAdapterTest#testSetDropDownViewResource;android.widget.cts.GalleryTest#testShowContextMenu;android.widget.cts.ExpandableListViewTest#testSetChildIndicator;android.widget.cts.GalleryTest#testConstructor;android.widget.cts.CursorTreeAdapterTest#testGetGroupCount;android.widget.cts.TextViewTest#testDebug;android.widget.cts.ExpandableListViewTest#testSetIndicatorBounds;android.widget.cts.AutoCompleteTextViewTest#testOnKeyPreIme;android.widget.cts.TextViewTest#testOnTrackballEvent;android.widget.cts.ExpandableListViewTest#testAndroidTestCaseSetupProperly;android.widget.cts.PopupWindowTest#testAccessBackground;android.widget.cts.PopupWindowTest#testGetMaxAvailableHeight;android.widget.cts.TextViewTest#testGetTotalPaddingLeft;android.widget.cts.AutoCompleteTextViewTest#testAccessAdapter;android.widget.cts.AutoCompleteTextViewTest#testPerformCompletion;android.widget.cts.ZoomButtonTest#testDispatchUnhandledMove;android.widget.cts.AbsSpinnerTest#testOnMeasure;android.widget.cts.TextViewTest#testOnWindowFocusChanged;android.widget.cts.PopupWindowTest#testUpdateDimensionAndAlignAnchorViewWithOffsets;android.widget.cts.GridLayoutTest#testCheckLayoutParams;android.widget.cts.TabHostTest#testNewTabSpec;android.widget.cts.ViewAnimatorTest#testGetCurrentView;android.widget.cts.ListViewTest#testDispatchKeyEvent;android.widget.cts.TextViewTest#testSetMinEms;android.widget.cts.FrameLayoutTest#testGatherTransparentRegion;android.widget.cts.AbsListViewTest#testDraw;android.widget.cts.ZoomControlsTest#testHasFocus;android.widget.cts.RemoteViews_ActionExceptionTest#testConstructor;android.widget.cts.ViewFlipperTest#testActivityTestCaseSetUpProperly;android.widget.cts.RemoteViewsTest#testSetString;android.widget.cts.SimpleExpandableListAdapterTest#testConstructor;android.widget.cts.GalleryTest#testComputeHorizontalScrollExtent;android.widget.cts.DialerFilterTest#testGetFilterText;android.widget.cts.RadioGroupTest#testGenerateDefaultLayoutParams;android.widget.cts.DialerFilterTest#testSetFilterWatcher;android.widget.cts.CheckBoxTest#testConstructor;android.widget.cts.ProgressBarTest#testDrawableStateChanged;android.widget.cts.MultiAutoCompleteTextViewTest#testPerformFiltering;android.widget.cts.TextViewTest#testOnKeyMultiple;android.widget.cts.ProgressBarTest#testPostInvalidate;android.widget.cts.SlidingDrawerTest#testOpenAndClose;android.widget.cts.AutoCompleteTextViewTest#testConstructor;android.widget.cts.TextViewTest#testSetLineSpacing;android.widget.cts.ListViewTest#testFindViewTraversal;android.widget.cts.RadioGroupTest#testGetCheckedRadioButtonId;android.widget.cts.TabHostTest#testSetup2;android.widget.cts.TableLayout_LayoutParamsTest#testConstructor;android.widget.cts.HorizontalScrollViewTest#testRequestChildFocus;android.widget.cts.TabWidgetTest#testDispatchDraw;android.widget.cts.PopupWindowTest#testUpdate;android.widget.cts.BaseAdapterTest#testNotifyDataSetInvalidated;android.widget.cts.ProgressBarTest#testOnSaveAndRestoreInstanceState;android.widget.cts.TabHostTest#testSetup1;android.widget.cts.TextViewTest#testOnMeasure;android.widget.cts.CompoundButtonTest#testAccessInstanceState;android.widget.cts.TabWidgetTest#testOnFocusChange;android.widget.cts.DialerFilterTest#testOnFinishInflate;android.widget.cts.ImageViewTest#testSetSelected;android.widget.cts.TextViewTest#testDrawableResolution2;android.widget.cts.ExpandableListViewWithHeadersTest#testPreconditions;android.widget.cts.AbsListViewTest#testSetFilterText;android.widget.cts.ExpandableListViewTest#testGetAdapter;android.widget.cts.TextViewTest#testSingleLine;android.widget.cts.HorizontalScrollViewTest#testComputeScroll;android.widget.cts.CursorAdapterTest#testRunQueryOnBackgroundThread;android.widget.cts.ToastTest#testMakeText2;android.widget.cts.CursorAdapterTest#testGetView;android.widget.cts.ViewSwitcherTest#testSetFactory;android.widget.cts.ToastTest#testMakeText1;android.widget.cts.GridViewTest#testAccessStretchMode;android.widget.cts.AutoCompleteTextViewTest#testGetThreshold;android.widget.cts.RemoteViewsTest#testConstructor;android.widget.cts.AbsListViewTest#testCheckLayoutParams;android.widget.cts.ViewAnimatorTest#testSetAnimateFirstView;android.widget.cts.DigitalClockTest#testActivityTestCaseSetUpProperly;android.widget.cts.SlidingDrawerTest#testAnimateOpenAndClose;android.widget.cts.PopupWindowTest#testAccessFocusable;android.widget.cts.TimePickerTest#testSetOnTimeChangedListener;android.widget.cts.ScrollViewTest#testGetMaxScrollAmount;android.widget.cts.CursorAdapterTest#testOnContentChanged;android.widget.cts.TextViewTest#testGetTotalPaddingBottom;android.widget.cts.AnalogClockTest#testOnMeasure;android.widget.cts.RadioGroupTest#testCheck;android.widget.cts.CursorTreeAdapterTest#testNotifyDataSetChanged;android.widget.cts.TwoLineListItemTest#testActivityTestCaseSetUpProperly;android.widget.cts.AbsListViewTest#testGetContextMenuInfo;android.widget.cts.ViewAnimatorTest#testAccessOutAnimation;android.widget.cts.SlidingDrawerTest#testConstructor;android.widget.cts.TimePickerTest#testOnSaveInstanceStateAndOnRestoreInstanceState;android.widget.cts.AbsListViewTest#testAccessFastScrollEnabled;android.widget.cts.BaseAdapterTest#testGetItemViewType;android.widget.cts.AbsListViewTest#testSetOnScrollListener;android.widget.cts.ImageViewTest#testSetImageURI;android.widget.cts.RadioGroupTest#testOnFinishInflate;android.widget.cts.TableRowTest#testGenerateLayoutParams;android.widget.cts.DialerFilterTest#testGetLetters;android.widget.cts.HorizontalScrollViewTest#testComputeHorizontalScrollRange;android.widget.cts.TextViewTest#testSetPadding;android.widget.cts.VideoViewTest#testPlayVideo1;android.widget.cts.ArrayAdapterTest#testRemove;android.widget.cts.GridViewTest#testGetNumColumns;android.widget.cts.AbsSpinnerTest#testSetSelectionIntBoolean;android.widget.cts.LayoutDirectionTest#testDirectionForAllLayoutsWithCode;android.widget.cts.SimpleCursorAdapterTest#testAccessStringConversionColumn;android.widget.cts.ViewAnimatorTest#testGetBaseline;android.widget.cts.ChronometerTest#testConstructor;android.widget.cts.ResourceCursorTreeAdapterTest#testConstructor;android.widget.cts.AdapterViewTest#testGetPositionForView;android.widget.cts.GridViewTest#testSetVerticalSpacing;android.widget.cts.ButtonTest#testAndroidTestCaseSetupProperly;android.widget.cts.ToggleButtonTest#testToggleText;android.widget.cts.RatingBarTest#testSetMax;android.widget.cts.RemoteViewsTest#testSetViewVisibility;android.widget.cts.ScrollViewTest#testOnTouchEvent;android.widget.cts.BaseAdapterTest#testIsEnabled;android.widget.cts.ExpandableListViewTest#testSetOnChildClickListener;android.widget.cts.EditTextTest#testAndroidTestCaseSetupProperly;android.widget.cts.TextViewTest#testMarquee;android.widget.cts.ImageViewTest#testActivityTestCaseSetUpProperly;android.widget.cts.RadioGroupTest#testConstructors;android.widget.cts.DialerFilterTest#testAccessMode;android.widget.cts.DatePickerTest#testInit;android.widget.cts.TextViewTest#testGetTextColors;android.widget.cts.ProgressBarTest#testAccessProgress;android.widget.cts.TextViewTest#testGetPaint;android.widget.cts.SimpleExpandableListAdapterTest#testNewGroupView;android.widget.cts.AdapterView_AdapterContextMenuInfoTest#testConstructor;android.widget.cts.CompoundButtonTest#testConstructor;android.widget.cts.ImageViewTest#testSetImageLevel;android.widget.cts.SimpleCursorTreeAdapterTest#testBindGroupView;android.widget.cts.SimpleExpandableListAdapterTest#testGetGroup;android.widget.cts.TabWidgetTest#testFocusCurrentTab;android.widget.cts.RelativeLayoutTest#testOnLayout;android.widget.cts.ScrollViewTest#testComputeScroll;android.widget.cts.TextViewTest#testAccessHintTextColor;android.widget.cts.TableLayoutTest#testAccessShrinkAllColumns;android.widget.cts.RemoteViewsTest#testGetPackage;android.widget.cts.GridViewTest#testAttachLayoutAnimationParameters;android.widget.cts.LinearLayout_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.CompoundButtonTest#testAndroidTestCaseSetupProperly;android.widget.cts.ImageViewTest#testSetImageDrawable;android.widget.cts.AdapterViewTest#testAccessVisiblePosition;android.widget.cts.ListViewTest#testSaveAndRestoreInstanceState;android.widget.cts.CompoundButtonTest#testToggle;android.widget.cts.TextViewTest#testMoveCursorToVisibleOffset;android.widget.cts.AutoCompleteTextViewTest#testAccessDropDownWidth;android.widget.cts.RadioGroupTest#testGenerateLayoutParams;android.widget.cts.AdapterViewTest#testCanAnimate;android.widget.cts.ScrollViewTest#testOnLayout;android.widget.cts.AutoCompleteTextViewTest#testEnoughToFilter;android.widget.cts.CheckedTextViewTest#testOnCreateDrawableState;android.widget.cts.RelativeLayout_LayoutParamsTest#testDebug;android.widget.cts.ToastTest#testAccessDuration;android.widget.cts.ToggleButtonTest#testSetChecked;android.widget.cts.HeaderViewListAdapterTest#testGetFootersCount;android.widget.cts.GridLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.AbsListViewTest#testAccessSmoothScrollbarEnabled;android.widget.cts.SlidingDrawerTest#testSetOnDrawerOpenListener;android.widget.cts.HeaderViewListAdapterTest#testGetHeadersCount;android.widget.cts.RemoteViewsTest#testSetLong;android.widget.cts.SlidingDrawerTest#testSetOnDrawerCloseListener;android.widget.cts.TextViewTest#testGetResolvedTextDirectionLtrWithInheritance;android.widget.cts.ScrollViewTest#testFullScroll;android.widget.cts.RelativeLayout_LayoutParamsTest#testAccessRule1;android.widget.cts.BaseExpandableListAdapterTest#testAreAllItemsEnabled;android.widget.cts.RelativeLayout_LayoutParamsTest#testAccessRule2;android.widget.cts.RemoteViewsActivityTest#testDerivedClass;android.widget.cts.ToastTest#testShowFailure;android.widget.cts.SimpleAdapterTest#testSetViewImage;android.widget.cts.TextViewTest#testAccessPrivateImeOptions;android.widget.cts.AdapterView_AdapterContextMenuInfoTest#testAndroidTestCaseSetupProperly;android.widget.cts.TwoLineListItemTest#testOnFinishInflate;android.widget.cts.ExpandableListViewTest#testGetExpandableListPosition;android.widget.cts.AbsListViewTest#testAccessListPadding;android.widget.cts.ExpandableListViewTest#testExpandGroup;android.widget.cts.TextViewTest#testGetUrls;android.widget.cts.LinearLayoutTest#testAccessBaselineAlignedChildIndex;android.widget.cts.CheckBoxTest#testAndroidTestCaseSetupProperly;android.widget.cts.ZoomControlsTest#testSetOnZoomInClickListener;android.widget.cts.AbsSpinnerTest#testGetCount;android.widget.cts.SimpleExpandableListAdapterTest#testNewChildView;android.widget.cts.ViewSwitcherTest#testConstructor;android.widget.cts.AutoCompleteTextViewTest#testReplaceText;android.widget.cts.ScrollViewTest#testAccessFillViewport;android.widget.cts.ToastTest#testShow;android.widget.cts.TextViewTest#testDrawableStateChanged;android.widget.cts.TimePickerTest#testGetBaseline;android.widget.cts.TextViewTest#testOnTouchEvent;android.widget.cts.ListViewTest#testOnFocusChanged;android.widget.cts.ImageViewTest#testDrawableStateChanged;android.widget.cts.FrameLayoutTest#testOnLayout;android.widget.cts.ListViewTest#testAccessItemsCanFocus;android.widget.cts.AutoCompleteTextViewTest#testOnCommitCompletion;android.widget.cts.ScrollViewTest#testAccessSmoothScrollingEnabled;android.widget.cts.TextViewTest#testSelection;android.widget.cts.CheckedTextViewTest#testOnDraw;android.widget.cts.ViewAnimatorTest#testConstructor;android.widget.cts.RadioGroupTest#testInternalPassThroughHierarchyChangeListener;android.widget.cts.SimpleCursorAdapterTest#testSetViewImage;android.widget.cts.AdapterViewTest#testGetSelected;android.widget.cts.ExpandableListViewWithHeadersTest#testSelectedPosition;android.widget.cts.ProgressBarTest#testAccessIndeterminateDrawable;android.widget.cts.TableLayoutTest#testSetOnHierarchyChangeListener;android.widget.cts.ExpandableListViewTest#testSetOnItemClickListener;android.widget.cts.ProgressBarTest#testSetVisibility;android.widget.cts.AutoCompleteTextViewTest#testConvertSelectionToString;android.widget.cts.ImageViewTest#testSetImageResource;android.widget.cts.ScrollViewTest#testGetVerticalFadingEdgeStrengths;android.widget.cts.FilterTest#testFilter2;android.widget.cts.CursorTreeAdapterTest#testAndroidTestCaseSetupProperly;android.widget.cts.FilterTest#testFilter1;android.widget.cts.ZoomControlsTest#testSetIsZoomOutEnabled;android.widget.cts.ScrollViewTest#testMeasureChildWithMargins;android.widget.cts.CompoundButtonTest#testSetOnCheckedChangeListener;android.widget.cts.TextViewTest#testGetEditableText;android.widget.cts.HorizontalScrollViewTest#testOnRequestFocusInDescendants;android.widget.cts.AbsSpinnerTest#testAccessAdapter;android.widget.cts.ChronometerTest#testAccessOnChronometerTickListener;android.widget.cts.HeaderViewListAdapterTest#testConstructor;android.widget.cts.FrameLayoutTest#testSetForegroundGravity;android.widget.cts.AbsSpinnerTest#testGetSelectedView;android.widget.cts.TextViewTest#testSetGetTextAlignment;android.widget.cts.TextViewTest#testGetLayout;android.widget.cts.ImageViewTest#testConstructor;android.widget.cts.ImageViewTest#testInvalidateDrawable;android.widget.cts.PopupWindowTest#testShowAsDropDownWithOffsets;android.widget.cts.PopupWindowTest#testIsAboveAnchor;android.widget.cts.AutoCompleteTextViewTest#testPerformFiltering;android.widget.cts.ViewFlipperTest#testConstructor;android.widget.cts.DatePickerTest#testUpdateDate;android.widget.cts.MultiAutoCompleteTextViewTest#testMultiAutoCompleteTextView;android.widget.cts.MultiAutoCompleteTextView_CommaTokenizerTest#testConstructor;android.widget.cts.RemoteViewsTest#testSetOnClickPendingIntent;android.widget.cts.HorizontalScrollViewTest#testScrollTo;android.widget.cts.HorizontalScrollViewTest#testOnTouchEvent;android.widget.cts.ListViewTest#testOnMeasure;android.widget.cts.TextViewTest#testSetHighlightColor;android.widget.cts.BaseExpandableListAdapterTest#testNotifyDataSetInvalidated;android.widget.cts.ExpandableListViewWithHeadersTest#testConvertionBetweenFlatAndPacked;android.widget.cts.HeaderViewListAdapterTest#testRemoveFooter;android.widget.cts.ListViewTest#testTransientStateStableIds;android.widget.cts.ScrollViewTest#testSmoothScrollBy;android.widget.cts.ViewSwitcherTest#testAndroidTestCaseSetupProperly;android.widget.cts.TextViewTest#testAccessAutoLinkMask;android.widget.cts.ScrollerTest#testScrollModeWithDefaultDuration;android.widget.cts.GalleryTest#testComputeHorizontalScrollRange;android.widget.cts.CheckedTextViewTest#testSetPadding;android.widget.cts.CursorTreeAdapterTest#testGetGroupId;android.widget.cts.RemoteViewsTest#testApply;android.widget.cts.DialerFilterTest#testIsQwertyKeyboard;android.widget.cts.GalleryTest#testShowContextMenuForChild;android.widget.cts.ScrollViewTest#testPageScroll;android.widget.cts.SimpleCursorTreeAdapterTest#testSetViewImage;android.widget.cts.TableLayoutTest#testOnLayout;android.widget.cts.ArrayAdapterTest#testGetPosition;android.widget.cts.TabWidgetTest#testOnSizeChanged;android.widget.cts.SimpleCursorAdapterTest#testNewDropDownView;android.widget.cts.AutoCompleteTextViewTest#testAccessListSelection;android.widget.cts.TextViewTest#testSetText1;android.widget.cts.TextViewTest#testSetText2;android.widget.cts.RemoteViewsActivityTest#testWebView;android.widget.cts.TextViewTest#testSetText3;android.widget.cts.ToastTest#testAccessGravity;android.widget.cts.HorizontalScrollViewTest#testAddViewWithIndex;android.widget.cts.ResourceCursorTreeAdapterTest#testNewChildView;android.widget.cts.HeaderViewListAdapterTest#testAndroidTestCaseSetupProperly;android.widget.cts.ExpandableListViewTest#testGetPackedPositionForGroup;android.widget.cts.ZoomControlsTest#testShowAndHide;android.widget.cts.CompoundButtonTest#testAccessChecked;android.widget.cts.SimpleAdapterTest#testGetView;android.widget.cts.DialerFilterTest#testGetDigits;android.widget.cts.ArrayAdapterTest#testDataChangeEvent;android.widget.cts.ImageSwitcherTest#testAndroidTestCaseSetupProperly;android.widget.cts.SimpleExpandableListAdapterTest#testGetChildView;android.widget.cts.ZoomControlsTest#testConstructor;android.widget.cts.CompoundButtonTest#testVerifyDrawable;android.widget.cts.TextViewTest#testSetEms;android.widget.cts.AbsSpinnerTest#testGenerateDefaultLayoutParams;android.widget.cts.TextViewTest#testAccessError;android.widget.cts.ZoomButtonTest#testOnTouchEvent;android.widget.cts.TextViewTest#testSetMaxLinesException;android.widget.cts.CompoundButtonTest#testSetButtonDrawableById;android.widget.cts.FrameLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.HorizontalScrollViewTest#testComputeScrollDeltaToGetChildRectOnScreen;android.widget.cts.ExpandableListViewTest#testSetSelectedChild;android.widget.cts.MediaControllerTest#testShow;android.widget.cts.CursorAdapterTest#testGetDropDownView;android.widget.cts.ListViewTest#testNoSelectableItems;android.widget.cts.TextViewTest#testGetBaseLine;android.widget.cts.AbsSpinnerTest#testConstructor;android.widget.cts.ListViewTest#testAccessDividerHeight;android.widget.cts.TabWidgetTest#testChildDrawableStateChanged;android.widget.cts.AbsListViewTest#testAccessSelectedItem;android.widget.cts.ScrollerTest#testTimePassed;android.widget.cts.ArrayAdapterTest#testGetItem;android.widget.cts.ImageViewTest#testVerifyDrawable;android.widget.cts.ProgressBarTest#testConstructor;android.widget.cts.ProgressBarTest#testIncrementSecondaryProgressBy;android.widget.cts.CursorTreeAdapterTest#testSetChildrenCursor;android.widget.cts.FrameLayoutTest#testCheckLayoutParams;android.widget.cts.AbsoluteLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.ZoomButtonTest#testOnKeyUp;android.widget.cts.BaseExpandableListAdapterTest#testGetCombinedId;android.widget.cts.ListViewTest#testSetSelection;android.widget.cts.SimpleCursorAdapterTest#testNewView;android.widget.cts.AutoCompleteTextViewTest#testPopupWindow;android.widget.cts.TextView_SaveStateTest#testWriteToParcel;android.widget.cts.TabHost_TabSpecTest#testSetContent2;android.widget.cts.SeekBarTest#testConstructor;android.widget.cts.TabHost_TabSpecTest#testSetContent1;android.widget.cts.TextViewTest#testSetExtractedText;android.widget.cts.TabHost_TabSpecTest#testSetContent3;android.widget.cts.SimpleExpandableListAdapterTest#testGetGroupCount;android.widget.cts.TextViewTest#testComputeVerticalScrollRange;android.widget.cts.GridLayoutTest#testAlignment;android.widget.cts.ExpandableListViewTest#testGetPackedPositionForChild;android.widget.cts.FrameLayoutTest#testConstructor;android.widget.cts.CursorAdapterTest#testAndroidTestCaseSetupProperly;android.widget.cts.RelativeLayoutTest#testSetHorizontalGravity;android.widget.cts.GalleryTest#testDispatchKeyEvent;android.widget.cts.ToastTest#testSetText1;android.widget.cts.HorizontalScrollViewTest#testFullScroll;android.widget.cts.RemoteViewsTest#testSetCharSequence;android.widget.cts.ToastTest#testSetText2;android.widget.cts.HeaderViewListAdapterTest#testRemoveHeader;android.widget.cts.TextSwitcherTest#testSetCurrentText;android.widget.cts.TwoLineListItemTest#testConstructor;android.widget.cts.MediaControllerTest#testMediaController;android.widget.cts.ListViewTest#testConstructor;android.widget.cts.AbsListViewTest#testAccessSelector;android.widget.cts.BaseExpandableListAdapterTest#testDataSetObserver;android.widget.cts.BaseAdapterTest#testHasStableIds;android.widget.cts.TextViewTest#testAccessImeActionLabel;android.widget.cts.CompoundButtonTest#testSetButtonDrawableByDrawable;android.widget.cts.AbsListViewTest#testLayoutChildren;android.widget.cts.ImageViewTest#testClearColorFilter;android.widget.cts.TextViewTest#testGetResolvedTextDirectionRtl;android.widget.cts.CheckedTextViewTest#testChecked;android.widget.cts.MultiAutoCompleteTextViewTest#testReplaceText;android.widget.cts.DigitalClockTest#testOnDetachedFromWindow;android.widget.cts.CursorTreeAdapterTest#testGetChildView;android.widget.cts.FrameLayout_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.ImageViewTest#testSetMaxWidth;android.widget.cts.TabHostTest#testDispatchWindowFocusChanged;android.widget.cts.DigitalClockTest#testConstructor;android.widget.cts.DialerFilterTest#testOnKeyUpDown;android.widget.cts.TextViewTest#testSetHorizontallyScrolling;android.widget.cts.HeaderViewListAdapterTest#testGetViewTypeCount;android.widget.cts.AbsSeekBarTest#testAccessKeyProgressIncrement;android.widget.cts.AbsSeekBarTest#testSetThumb;android.widget.cts.ProgressBarTest#testOnDraw;android.widget.cts.TextViewTest#testSetText;android.widget.cts.PopupWindowTest#testAccessContentView;android.widget.cts.GridLayoutTest#testConstructor;android.widget.cts.PopupWindowTest#testAccessHeight;android.widget.cts.ToggleButtonTest#testAndroidTestCaseSetupProperly;android.widget.cts.ProgressBarTest#testVerifyDrawable;android.widget.cts.TableRowTest#testOnLayout;android.widget.cts.RadioGroupTest#testInternalCheckedStateTracker;android.widget.cts.HorizontalScrollViewTest#testOnSizeChanged;android.widget.cts.ResourceCursorAdapterTest#testNewView;android.widget.cts.MultiAutoCompleteTextView_CommaTokenizerTest#testFindTokenEnd;android.widget.cts.ZoomButtonTest#testOnLongClick;android.widget.cts.AnalogClockTest#testOnDetachedFromWindow;android.widget.cts.TextViewTest#testSetMaxLines;android.widget.cts.ExpandableListViewTest#testPerformItemClick;android.widget.cts.TextViewTest#testResetTextDirection;android.widget.cts.ScrollViewTest#testScrollTo;android.widget.cts.TableLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.ImageViewTest#testSetAdjustViewBounds;android.widget.cts.TableRowTest#testCheckLayoutParams;android.widget.cts.CheckedTextViewTest#testToggle;android.widget.cts.RemoteViewsTest#testSetProgressBar;android.widget.cts.VideoViewTest#testSetOnErrorListener;android.widget.cts.GalleryTest#testDispatchSetPressed;android.widget.cts.HorizontalScrollViewTest#testSmoothScrollTo;android.widget.cts.ZoomControlsTest#testSetZoomSpeed;android.widget.cts.ExpandableListViewTest#testSetAdapter;android.widget.cts.AutoCompleteTextViewTest#testOnFilterComplete;android.widget.cts.ImageViewTest#testGetDrawable;android.widget.cts.CursorTreeAdapterTest#testRunQueryOnBackgroundThread;android.widget.cts.SlidingDrawerTest#testGetHandle;android.widget.cts.BaseAdapterTest#testAndroidTestCaseSetupProperly;android.widget.cts.MediaControllerTest#testOnTrackballEvent;android.widget.cts.GalleryTest#testGenerateLayoutParams;android.widget.cts.PopupWindowTest#testConstructor;android.widget.cts.GalleryTest#testFoo;android.widget.cts.PopupWindowTest#testAccessAnimationStyle;android.widget.cts.ToggleButtonTest#testAccessTextOn;android.widget.cts.AbsoluteLayoutTest#testGenerateLayoutParams1;android.widget.cts.TextViewTest#testGetDefaultEditable;android.widget.cts.AbsoluteLayoutTest#testGenerateLayoutParams2;android.widget.cts.ArrayAdapterTest#testGetFilter;android.widget.cts.CheckedTextViewTest#testSetCheckMarkDrawableById;android.widget.cts.ScrollerTest#testAbortAnimation;android.widget.cts.LinearLayout_LayoutParamsTest#testConstructor;android.widget.cts.TextViewTest#testComputeVerticalScrollExtent;android.widget.cts.AbsSpinnerTest#testSetSelectionInt;android.widget.cts.TabHostTest#testGetTabContentView;android.widget.cts.TextViewTest#testGetDefaultMovementMethod;android.widget.cts.ScrollViewTest#testRequestChildRectangleOnScreen;android.widget.cts.TabHostTest#testGetCurrentView;android.widget.cts.TextViewTest#testAccessFilters;android.widget.cts.GalleryTest#testCheckLayoutParams;android.widget.cts.RadioGroup_LayoutParamsTest#testConstructor;android.widget.cts.BaseExpandableListAdapterTest#testOnGroupExpanded;android.widget.cts.MultiAutoCompleteTextView_CommaTokenizerTest#testTerminateToken;android.widget.cts.ScrollViewTest#testConstructor;android.widget.cts.ListViewTest#testLayoutChildren;android.widget.cts.RemoteViewsTest#testSetImageViewUri;android.widget.cts.ViewAnimatorTest#testAccessDisplayedChild;android.widget.cts.ExpandableListViewTest#testCollapseGroup;android.widget.cts.AnalogClockTest#testConstructor;android.widget.cts.CursorAdapterTest#testConvertToString;android.widget.cts.BaseAdapterTest#testIsEmpty;android.widget.cts.ResourceCursorTreeAdapterTest#testNewGroupView;android.widget.cts.ScrollViewTest#testFling;android.widget.cts.SlidingDrawerTest#testOnMeasure;android.widget.cts.TextViewTest#testSetMaxEms;android.widget.cts.LinearLayoutTest#testGenerateLayoutParams;android.widget.cts.PopupWindowTest#testAccessInputMethodMode;android.widget.cts.ListViewTest#testPerformItemClick;android.widget.cts.TextViewTest#testOnTextChanged;android.widget.cts.GridViewTest#testSetSelection;android.widget.cts.CursorAdapterTest#testHasStableIds;android.widget.cts.ProgressBarTest#testSetIndeterminate;android.widget.cts.TableRowTest#testGetVirtualChildCount;android.widget.cts.AutoCompleteTextViewTest#testOnTextChanged;android.widget.cts.TextViewTest#testSetLinesException;android.widget.cts.TextViewTest#testLength;android.widget.cts.RelativeLayoutTest#testSetGravity;android.widget.cts.RelativeLayoutTest#testConstructor;android.widget.cts.TextViewTest#testGetLineHeight;android.widget.cts.GalleryTest#testSetAnimationDuration;android.widget.cts.PopupWindowTest#testAccessTouchable;android.widget.cts.RelativeLayoutTest#testSetVerticalGravity;android.widget.cts.CursorTreeAdapterTest#testConstructor;android.widget.cts.AbsSpinnerTest#testRequestLayout;android.widget.cts.TextViewTest#testOnKeyShortcut;android.widget.cts.TableRowTest#testGetVirtualChildAt;android.widget.cts.SpinnerTest#testConstructor;android.widget.cts.SimpleAdapterTest#testGetDropDownView;android.widget.cts.ScrollViewTest#testAddViewWithLayoutParams;android.widget.cts.HeaderViewListAdapterTest#testGetItemViewType;android.widget.cts.RadioGroupTest#testSetOnCheckedChangeListener;android.widget.cts.ToggleButtonTest#testOnFinishInflate;android.widget.cts.DialerFilterTest#testAppend;android.widget.cts.HorizontalScrollViewTest#testRequestChildRectangleOnScreen;android.widget.cts.RadioButtonTest#testConstructor;android.widget.cts.PopupWindowTest#testDismiss;android.widget.cts.TableLayoutTest#testAddView2;android.widget.cts.TableLayoutTest#testAddView3;android.widget.cts.TabHostTest#testOnTouchModeChanged;android.widget.cts.TableLayoutTest#testAddView4;android.widget.cts.HeaderViewListAdapterTest#testGetWrappedAdapter;android.widget.cts.TableLayoutTest#testAddView1;android.widget.cts.ImageSwitcherTest#testSetImageResource;android.widget.cts.ToggleButtonTest#testDrawableStateChanged;android.widget.cts.EditTextTest#testSetSelectionIndex;android.widget.cts.EditTextTest#testExtendSelection;android.widget.cts.AbsSeekBarTest#testSetMax;android.widget.cts.CursorTreeAdapterTest#testChangeCursor;android.widget.cts.AdapterViewTest#testItemOrItemIdAtPosition;android.widget.cts.HorizontalScrollViewTest#testDispatchKeyEvent;android.widget.cts.TableRowTest#testGenerateDefaultLayoutParams;android.widget.cts.AbsListViewTest#testSetRecyclerListener;android.widget.cts.GalleryTest#testGetContextMenuInfo;android.widget.cts.AbsListViewTest#testAccessStackFromBottom;android.widget.cts.TextViewTest#testAccessText;android.widget.cts.SpinnerTest#testGetBaseline;android.widget.cts.ScrollViewTest#testRequestChildFocus;android.widget.cts.LinearLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.ButtonTest#testConstructor;android.widget.cts.ResourceCursorAdapterTest#testSetViewResource;android.widget.cts.ExpandableListViewBasicTest#testContextMenus;android.widget.cts.FrameLayoutTest#testVerifyDrawable;android.widget.cts.ExpandableListViewTest#testGetPackedPositionType;android.widget.cts.LinearLayoutTest#testLayoutHorizontal;android.widget.cts.ScrollViewTest#testComputeVerticalScrollRange;android.widget.cts.GridViewTest#testOnFocusChanged;android.widget.cts.ZoomControlsTest#testOnTouchEvent;android.widget.cts.GridViewTest#testActivityTestCaseSetUpProperly;android.widget.cts.ListViewTest#testAccessItemChecked;android.widget.cts.AbsoluteLayoutTest#testConstructor;android.widget.cts.TextViewTest#testComputeHorizontalScrollRange;android.widget.cts.HorizontalScrollViewTest#testAddViewWithLayoutParams;android.widget.cts.RemoteViewsTest#testGetLayoutId;android.widget.cts.CursorTreeAdapterTest#testNotifyDataSetChangedBoolean;android.widget.cts.TableRow_LayoutParamsTest#testSetBaseAttributes;android.widget.cts.HorizontalScrollViewTest#testMeasureChildWithMargins;android.widget.cts.TextViewTest#testSetIncludeFontPadding;android.widget.cts.HorizontalScrollViewTest#testAddView;android.widget.cts.TimePickerTest#testAccessCurrentMinute;android.widget.cts.TextViewTest#testGetExtendedPaddingBottom;android.widget.cts.BaseExpandableListAdapterTest#testIsEmpty;android.widget.cts.SimpleAdapterTest#testAccessViewBinder;android.widget.cts.SpinnerTest#testOnLayout;android.widget.cts.AutoCompleteTextViewTest#testAccessValidater;android.widget.cts.ScrollViewTest#testAddViewWithIndex;android.widget.cts.FrameLayoutTest#testDrawableStateChanged;android.widget.cts.PopupWindowTest#testSetTouchInterceptor;android.widget.cts.SimpleAdapterTest#testGetItem;android.widget.cts.ImageViewTest#testSetColorFilter1;android.widget.cts.ImageViewTest#testSetColorFilter2;android.widget.cts.SlidingDrawerTest#testDispatchDraw;android.widget.cts.TextViewTest#testSetOnEditorActionListener;android.widget.cts.DatePickerTest#testSetEnabled;android.widget.cts.RemoteViewsTest#testReapply;android.widget.cts.TextViewTest#testCompound;android.widget.cts.AdapterViewTest#testAccessEmptyView;android.widget.cts.Gallery_LayoutParamsTest#testConstructor;android.widget.cts.TextViewTest#testGetResolvedTextDirectionRtlWithInheritance;android.widget.cts.PopupWindowTest#testShowAtLocation;android.widget.cts.TextViewTest#testPerformLongClick;android.widget.cts.ExpandableListViewTest#testSetChildDivider;android.widget.cts.PopupWindowTest#testAccessClippingEnabled;android.widget.cts.RemoteViewsTest#testSetTextViewText;android.widget.cts.ScrollViewTest#testMeasureChild;android.widget.cts.TableLayoutTest#testAccessColumnShrinkable;android.widget.cts.TableRow_LayoutParamsTest#testConstructor;android.widget.cts.GalleryTest#testComputeHorizontalScrollOffset;android.widget.cts.ProgressBarTest#testOnMeasure;android.widget.cts.ProgressBarTest#testAccessProgressDrawable;android.widget.cts.SimpleAdapterTest#testGetFilter;android.widget.cts.RadioGroupTest#testSetOnHierarchyChangeListener;android.widget.cts.AbsListViewTest#testHandleDataChanged;android.widget.cts.AbsListViewTest#testShowContextMenuForChild;android.widget.cts.ExpandableListViewTest#testConstructor;android.widget.cts.HeaderViewListAdapterTest#testIsEmpty;android.widget.cts.AlphabetIndexerTest#testAlphabetIndexer;android.widget.cts.ChronometerTest#testAccessBase;android.widget.cts.TextViewTest#testAccessRawContentType;android.widget.cts.ScrollViewTest#testExecuteKeyEvent;android.widget.cts.SpinnerTest#testAccessPrompt;android.widget.cts.AnalogClockTest#testOnDraw;android.widget.cts.ChronometerTest#testStartAndStop;android.widget.cts.TabWidgetTest#testSetCurrentTab;android.widget.cts.CursorTreeAdapterTest#testGetFilter;android.widget.cts.ImageSwitcherTest#testSetImageURI;android.widget.cts.TabHostTest#testSetOnTabChangedListener;android.widget.cts.ScrollViewTest#testSmoothScrollTo;android.widget.cts.SimpleExpandableListAdapterTest#testGetGroupId;android.widget.cts.AbsListViewTest#testAccessCacheColorHint;android.widget.cts.TabHostTest#testSetCurrentTabByTag;android.widget.cts.HeaderViewListAdapterTest#testIsEnabled;android.widget.cts.ImageViewTest#testSetImageState;android.widget.cts.ExpandableListViewTest#testSetSelectedGroup;android.widget.cts.DialerFilterTest#testRemoveFilterWatcher;android.widget.cts.ToggleButtonTest#testAccessTextOff;android.widget.cts.TextViewTest#testSetSelectAllOnFocus;android.widget.cts.TextViewTest#testAccessKeyListener;android.widget.cts.ArrayAdapterTest#testInsert;android.widget.cts.MediaControllerTest#testSetPrevNextListeners;android.widget.cts.PopupWindowTest#testUpdatePositionAndDimension;android.widget.cts.TextViewTest#testOnDraw;android.widget.cts.TextViewTest#testSetFrame;android.widget.cts.ScrollerTest#testAccessFinalX;android.widget.cts.ScrollerTest#testAccessFinalY;android.widget.cts.AdapterViewTest#testOnLayout;android.widget.cts.ScrollViewTest#testOnRequestFocusInDescendants;android.widget.cts.TextViewTest#testCancelLongPress;android.widget.cts.GridViewTest#testAccessAdapter;android.widget.cts.ZoomButtonTest#testSetZoomSpeed;android.widget.cts.ExpandableListViewTest#testGetPackedPositionGroup;android.widget.cts.ExpandableListViewTest#testSetGroupIndicator;android.widget.cts.TextViewTest#testGetResolvedTextDirectionLtr;android.widget.cts.BaseAdapterTest#testGetDropDownView;android.widget.cts.ViewAnimatorTest#testShowPrevious;android.widget.cts.TextViewTest#testOnCreateContextMenu;android.widget.cts.TextViewTest#testAppend;android.widget.cts.DialerFilterTest#testOnFocusChanged;android.widget.cts.SlidingDrawerTest#testOnLayout;android.widget.cts.TextViewTest#testGetFocusedRect;android.widget.cts.TextSwitcherTest#testAddView;android.widget.cts.ExpandableListViewTest#testSetChildIndicatorBounds;android.widget.cts.RemoteViewsTest#testSetImageViewBitmap;android.widget.cts.CursorTreeAdapterTest#testHasStableIds;android.widget.cts.ToastTest#testConstructor;android.widget.cts.CursorTreeAdapterTest#testConvertToString;android.widget.cts.AbsListViewTest#testGetTopBottomFadingEdgeStrength;android.widget.cts.EditTextTest#testGetDefaultMovementMethod;android.widget.cts.AbsListViewTest#testAddTouchables;android.widget.cts.SeekBarTest#testSetOnSeekBarChangeListener;android.widget.cts.TextViewTest#testAccessLinkTextColor;android.widget.cts.TextViewTest#testAccessEllipsize;android.widget.cts.RatingBarTest#testAccessNumStars;android.widget.cts.ImageViewTest#testGetBaseline;android.widget.cts.AnalogClockTest#testOnAttachedToWindow;android.widget.cts.LayoutDirectionTest#testDirectionInheritanceForAllLayoutsWithCode;android.widget.cts.AutoCompleteTextViewTest#testAccessItemSelectedListener;android.widget.cts.TextSwitcherTest#testConstructor;android.widget.cts.TextViewTest#testGetResolvedTextAlignment;android.widget.cts.ExpandableListView_ExpandableListContextMenuInfoTest#testConstructor;android.widget.cts.HeaderViewListAdapterTest#testGetFilter;android.widget.cts.AbsSeekBarTest#testConstructor;android.widget.cts.ZoomControlsTest#testSetOnZoomOutClickListener;android.widget.cts.ArrayAdapterTest#testSort;android.widget.cts.HorizontalScrollViewTest#testFling;android.widget.cts.GridViewTest#testConstructor;android.widget.cts.RemoteViewsTest#testNotFeasibleSetters;android.widget.cts.RemoteViewsTest#testWriteToParcel;android.widget.cts.ScrollViewTest#testAddView;android.widget.cts.FilterTest#testConstructor;android.widget.cts.SimpleExpandableListAdapterTest#testGetChildId;android.widget.cts.AutoCompleteTextViewTest#testOnDetachedFromWindow;android.widget.cts.ScrollViewTest#testRequestLayout;android.widget.cts.ImageButtonTest#testConstructor;android.widget.cts.EditTextTest#testSelectAll;android.widget.cts.PopupWindowTest#testSetOnDismissListener;android.widget.cts.TimePickerTest#testAccessCurrentHour;android.widget.cts.ArrayAdapterTest#testCreateFromResource;android.widget.cts.TextViewTest#testSetShadowLayer;android.widget.cts.CompoundButtonTest#testOnCreateDrawableState;android.widget.cts.SimpleCursorAdapterTest#testChangeCursorAndColumns;android.widget.cts.ImageViewTest#testSetFrame;android.widget.cts.ArrayAdapterTest#testSetDropDownViewResouce;android.widget.cts.ResourceCursorAdapterTest#testNewDropDownView;android.widget.cts.ToastTest#testCancel;android.widget.cts.RatingBarTest#testAccessStepSize;android.widget.cts.CheckedTextViewTest#testSetCheckMarkDrawableByDrawable;android.widget.cts.TextViewTest#testInstanceState;android.widget.cts.AbsListViewTest#testGetFocusedRect;android.widget.cts.ViewAnimatorTest#testAddView;android.widget.cts.AdapterViewTest#testUnsupportedMethods;android.widget.cts.TextViewTest#testOnPrivateIMECommand;android.widget.cts.CursorAdapterTest#testAccessCursor;android.widget.cts.TextViewTest#testBringPointIntoView;android.widget.cts.SpinnerTest#testOnClick;android.widget.cts.TextViewTest#testSetEditableFactory;android.widget.cts.ViewSwitcherTest#testGetNextView;android.widget.cts.AbsSeekBarTest#testAccessThumbOffset;android.widget.cts.AbsoluteLayout_LayoutParamsTest#testDebug;android.widget.cts.DatePickerTest#testAccessDate;android.widget.cts.CursorAdapterTest#testConstructor;android.widget.cts.HorizontalScrollViewTest#testPageScroll;android.widget.cts.AutoCompleteTextViewTest#testPerformValidation;android.widget.cts.TextViewTest#testAccessLinksClickable;android.widget.cts.SlidingDrawerTest#testGetContent;android.widget.cts.ViewAnimatorTest#testShowNext;android.widget.cts.TextViewTest#testResetTextAlignment;android.widget.cts.ScrollerTest#testFlingMode;android.widget.cts.SlidingDrawerTest#testOnInterceptTouchEvent;android.widget.cts.DatePickerTest#testConstructor;android.widget.cts.TableLayoutTest#testAccessColumnCollapsed;android.widget.cts.AbsSeekBarTest#testVerifyDrawable;android.widget.cts.ScrollViewTest#testOnSizeChanged;android.widget.cts.TimePickerTest#testConstructors;android.widget.cts.TextViewTest#testAccessTransformationMethod;android.widget.cts.SimpleCursorTreeAdapterTest#testBindChildView;android.widget.cts.ScrollerTest#testExtendDuration;android.widget.cts.RatingBarTest#testAccessRating;android.widget.cts.RelativeLayoutTest#testCheckLayoutParams;android.widget.cts.GalleryTest#testGenerateDefaultLayoutParams;android.widget.cts.AbsoluteLayoutTest#testCheckLayoutParams;android.widget.cts.SlidingDrawerTest#testOnFinishInflate;android.widget.cts.EditTextTest#testSetSelectionStartstop;android.widget.cts.ToggleButtonTest#testSetBackgroundDrawable;android.widget.cts.HeaderViewListAdapterTest#testRegisterDataSetObserver;android.widget.cts.TextViewTest#testAccessFreezesText;android.widget.cts.ArrayAdapterTest#testAndroidTestCaseSetupProperly;android.widget.cts.ExpandableListViewTest#testGetSelectedPosition;android.widget.cts.TabHostTest#testGetCurrentTabTag;android.widget.cts.GridViewTest#testOnMeasure;android.widget.cts.HeaderViewListAdapterTest#testGetItemId;android.widget.cts.RadioButtonTest#testToggle;android.widget.cts.TextViewTest#testOnFocusChanged;android.widget.cts.AbsoluteLayout_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.ViewAnimatorTest#testAccessInAnimation;android.widget.cts.AdapterViewTest#testDispatchSaveInstanceState;android.widget.cts.HeaderViewListAdapterTest#testHasStableIds;android.widget.cts.RelativeLayoutTest#testOnMeasure;android.widget.cts.HorizontalScrollViewTest#testSmoothScrollBy;android.widget.cts.ListViewTest#testTransientStateUnstableIds;android.widget.cts.TableRowTest#testConstructor;android.widget.cts.TabHost_TabSpecTest#testSetIndicator2;android.widget.cts.ArrayAdapterTest#testAccessView;android.widget.cts.TabHost_TabSpecTest#testSetIndicator1;android.widget.cts.HorizontalScrollViewTest#testAccessSmoothScrollingEnabled;android.widget.cts.TextViewTest#testSetCursorVisible;android.widget.cts.FrameLayout_LayoutParamsTest#testConstructor;android.widget.cts.AutoCompleteTextViewTest#testOnAttachedToWindow;android.widget.cts.CursorAdapterTest#testInit;android.widget.cts.SimpleAdapterTest#testGetItemId;android.widget.cts.TableLayout_LayoutParamsTest#testSetBaseAttributes;android.widget.cts.ExpandableListViewBasicTest#testExpandedGroupMovement;android.widget.cts.TextViewTest#testAccessPaintFlags;android.widget.cts.CursorAdapterTest#testGetItemId;android.widget.cts.GalleryTest#testSetSpacing;android.widget.cts.TextViewTest#testSetLines;android.widget.cts.ScrollerTest#testConstructor;android.widget.cts.CompoundButtonTest#testOnDraw;android.widget.cts.ListViewTest#testGetMaxScrollAmount;android.widget.cts.TwoLineListItemTest#testGetTexts;android.widget.cts.AbsListViewTest#testBeforeAndAfterTextChanged;android.widget.cts.AdapterViewTest#testConstructor;android.widget.cts.SimpleAdapterTest#testSetViewText;android.widget.cts.ExpandableListViewTest#testGetSelectedId;android.widget.cts.TableLayoutTest#testOnMeasure;android.widget.cts.DialerFilterTest#testSetDigitsWatcher;android.widget.cts.AbsListViewTest#testPointToPosition;android.widget.cts.ExpandableListViewTest#testGetPackedPositionChild;android.widget.cts.ExpandableListViewBasicTest#testSelectedPosition;android.widget.cts.RemoteViewsTest#testSetBitmap;android.widget.cts.TextViewTest#testFoo;android.widget.cts.EditTextTest#testAccessText;android.widget.cts.AbsListViewTest#testComputeVerticalScrollValues;android.widget.cts.VideoViewTest#testConstructor;android.widget.cts.EditTextTest#testGetDefaultEditable;android.widget.cts.EditTextTest#testConstructor;android.widget.cts.ExpandableListViewWithHeadersTest#testExpandOnFirstGroup;android.widget.cts.RelativeLayout_LayoutParamsTest#testStartEnd;android.widget.cts.ScrollViewTest#testAddViewWithIndexAndLayoutParams;android.widget.cts.ViewFlipperTest#testSetFlipInterval;android.widget.cts.ZoomButtonTest#testConstructor;android.widget.cts.TableRowTest#testOnMeasure;android.widget.cts.TableLayoutTest#testAccessStretchAllColumns;android.widget.cts.GridViewTest#testSetHorizontalSpacing;android.widget.cts.ExpandableListViewWithHeadersTest#testContextMenus;android.widget.cts.ListViewTest#testRequestChildRectangleOnScreen;android.widget.cts.VideoViewTest#testSetMediaController;android.widget.cts.AdapterViewTest#testAccessOnItemClickAndLongClickListener;android.widget.cts.RemoteViewsTest#testSetImageViewResource;android.widget.cts.TextViewTest#testScroll;android.widget.cts.VideoViewTest#testResolveAdjustedSize;android.widget.cts.ScrollViewTest#testOnInterceptTouchEvent;android.widget.cts.ViewAnimatorTest#testRemoveViews;android.widget.cts.AlphabetIndexerTest#testAndroidTestCaseSetupProperly;android.widget.cts.ImageViewTest#testSetMaxHeight;android.widget.cts.ImageViewTest#testOnMeasure;android.widget.cts.RadioGroup_LayoutParamsTest#testSetBaseAttributes;android.widget.cts.AbsoluteLayoutTest#testOnMeasure;android.widget.cts.CompoundButtonTest#testPerformClick;android.widget.cts.ExpandableListViewTest#testAccessExpandableListAdapter;android.widget.cts.TextView_SaveStateTest#testToString;android.widget.cts.CursorTreeAdapterTest#testGetGroupView;android.widget.cts.TextViewTest#testPressKey;android.widget.cts.ProgressBarTest#testAccessMax;android.widget.cts.TextViewTest#testBeginEndBatchEdit;android.widget.cts.HeaderViewListAdapterTest#testGetItem;android.widget.cts.LinearLayoutTest#testActivityTestCaseSetUpProperly;android.widget.cts.TextViewTest#testSetGetTextDirection;android.widget.cts.HeaderViewListAdapterTest#testGetView;android.widget.cts.ScrollerTest#testScrollMode;android.widget.cts.ProgressBarTest#testAccessInterpolator;android.widget.cts.TextViewTest#testTextAttr;android.widget.cts.AbsListViewTest#testAccessScrollingCacheEnabled;android.widget.cts.MediaControllerTest#testSetEnabled;android.widget.cts.SimpleCursorAdapterTest#testConvertToString;android.widget.cts.ExpandableListViewTest#testDispatchDraw;android.widget.cts.DigitalClockTest#testOnAttachedToWindow;android.widget.cts.BaseAdapterTest#testGetViewTypeCount;android.widget.cts.CursorAdapterTest#testGetCount;android.widget.cts.ToastTest#testAccessView;android.widget.cts.FrameLayoutTest#testOnMeasure;android.widget.cts.HorizontalScrollViewTest#testGetMaxScrollAmount;android.widget.cts.AbsListViewTest#testSetScrollIndicators;android.widget.cts.TabHostTest#testOnAttachedToAndDetachedFromWindow;android.widget.cts.CursorAdapterTest#testGetFilter;android.widget.cts.CursorTreeAdapterTest#testGetChild;android.widget.cts.SlidingDrawerTest#testSetOnDrawerScrollListener;android.widget.cts.ProgressBarTest#testOnSizeChange;android.widget.cts.TextViewTest#testGetTotalPaddingRight;android.widget.cts.GridViewTest#testPressKey;android.widget.cts.CheckedTextViewTest#testDrawableStateChanged;android.widget.cts.ScrollerTest#testGetDuration;android.widget.cts.TableLayoutTest#testRequestLayout;android.widget.cts.ImageViewTest#testAccessImageMatrix;android.widget.cts.PopupWindowTest#testAccessWidth;android.widget.cts.BaseAdapterTest#testDataSetObserver;android.widget.cts.SpinnerTest#testPerformClick;android.widget.cts.MediaControllerTest#testConstructor;android.widget.cts.SimpleCursorTreeAdapterTest#testConstructor;android.widget.cts.TextViewTest#testGetTextColor;android.widget.cts.DialerFilterTest#testOnModechange;android.widget.cts.AdapterViewTest#testDispatchRestoreInstanceState;android.widget.cts.ImageViewTest#testOnCreateDrawableState;android.widget.cts.CursorTreeAdapterTest#testNotifyDataSetInvalidated;android.widget.cts.SimpleExpandableListAdapterTest#testGetGroupView;android.widget.cts.ListViewTest#testRequestLayout;android.widget.cts.Gallery_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.SimpleExpandableListAdapterTest#testGetChild;android.widget.cts.TableRowTest#testSetOnHierarchyChangeListener;android.widget.cts.TextViewTest#testGetExtendedPaddingTop;android.widget.cts.ResourceCursorAdapterTest#testSetDropDownViewResource;android.widget.cts.LinearLayoutTest#testAccessBaselineAligned;android.widget.cts.CursorTreeAdapterTest#testGetChildId;android.widget.cts.GridViewTest#testSetColumnWidth;android.widget.cts.AbsListViewTest#testAccessTranscriptMode;android.widget.cts.VideoViewTest#testGetBufferPercentage;android.widget.cts.LinearLayoutTest#testConstructor;android.widget.cts.TextViewTest#testAccessContentType;android.widget.cts.SimpleCursorAdapterTest#testBindView;android.widget.cts.SlidingDrawerTest#testOnTouchEvent;android.widget.cts.ListViewTest#testOnKeyUpDown;android.widget.cts.SimpleCursorAdapterTest#testAccessCursorToStringConverter;android.widget.cts.TabWidgetTest#testAddView;android.widget.cts.TextViewTest#testIsInputMethodTarget;android.widget.cts.AbsoluteLayout_LayoutParamsTest#testConstructor;android.widget.cts.RelativeLayoutTest#testGetBaseline;android.widget.cts.TextViewTest#testGetLineCount;android.widget.cts.GridLayoutTest#testActivityTestCaseSetUpProperly;android.widget.cts.ProgressBarTest#testInvalidateDrawable;android.widget.cts.AbsSpinnerTest#testOnSaveAndRestoreInstanceState;android.widget.cts.MultiAutoCompleteTextViewTest#testConstructor;android.widget.cts.ExpandableListViewTest#testGetFlatListPosition;android.widget.cts.ArrayAdapterTest#testAddAllParams;android.widget.cts.CursorTreeAdapterTest#testSetGroupCursor;android.widget.cts.TextViewTest#testDidTouchFocusSelect;android.widget.cts.SimpleCursorAdapterTest#testConstructor;android.widget.cts.TextViewTest#testAccessImeOptions;android.widget.cts.TabHostTest#testClearAllTabs;android.widget.cts.TextViewTest#testGetFadingEdgeStrength;android.widget.cts.TextViewTest#testSetMinLines;android.widget.cts.DialerFilterTest#testConstructor;android.widget.cts.AbsListViewTest#testConstructor;android.widget.cts.HorizontalScrollViewTest#testAddViewWithIndexAndLayoutParams;android.widget.cts.TextViewTest#testTextDirectionDefault;android.widget.cts.TextViewTest#testGetLineBounds;android.widget.cts.HorizontalScrollViewTest#testConstructor;android.widget.cts.AutoCompleteTextViewTest#testSetFrame;android.widget.cts.RelativeLayoutTest#testGenerateLayoutParams2;android.widget.cts.RelativeLayoutTest#testGenerateLayoutParams1;android.widget.cts.ArrayAdapterTest#testAdd;android.widget.cts.PopupWindowTest#testUpdateDimensionAndAlignAnchorView;android.widget.cts.ToastTest#testAccessMargin;android.widget.cts.RemoteViewsActivityTest#testGood;android.widget.cts.TextViewTest#testAccessTextSize;android.widget.cts.TableLayoutTest#testColumnStretchableEffect;android.widget.cts.CompoundButtonTest#testDrawableStateChanged;android.widget.cts.CursorAdapterTest#testAccessFilterQueryProvider;android.widget.cts.HorizontalScrollViewTest#testArrowScroll;android.widget.cts.ScrollViewTest#testOnMeasure;android.widget.cts.TextViewTest#testTextChangedListener;android.widget.cts.AutoCompleteTextViewTest#testSetCompletionHint;android.widget.cts.TextViewTest#testAccessTextColor;android.widget.cts.FrameLayoutTest#testAccessMeasureAllChildren;android.widget.cts.LinearLayoutTest#testAccessWeightSum;android.widget.cts.HorizontalScrollViewTest#testOnMeasure;android.widget.cts.ResourceCursorAdapterTest#testConstructor;android.widget.cts.FrameLayoutTest#testOnSizeChanged;android.widget.cts.LinearLayoutTest#testCheckLayoutParams;android.widget.cts.PopupWindowTest#testSetWindowLayoutMode;android.widget.cts.ExpandableListView_ExpandableListContextMenuInfoTest#testAndroidTestCaseSetupProperly;android.widget.cts.ListViewTest#testAccessHeaderView;android.widget.cts.RatingBarTest#testAccessOnRatingBarChangeListener;android.widget.cts.GridViewTest#testSetGravity;android.widget.cts.TextViewTest#testAccessHint;android.widget.cts.HorizontalScrollViewTest#testOnLayout;android.widget.cts.ListViewTest#testAccessAdapter;android.widget.cts.ArrayAdapterTest#testGetItemId;android.widget.cts.ImageButtonTest#testAndroidTestCaseSetupProperly;android.widget.cts.TextViewTest#testOnDetachedFromWindow;android.widget.cts.ProgressBarTest#testAccessSecondaryProgress;android.widget.cts.SimpleExpandableListAdapterTest#testIsChildSelectable;android.widget.cts.TextViewTest#testTextAlignmentDefault;android.widget.cts.TableLayoutTest#testCheckLayoutParams;android.widget.cts.AnalogClockTest#testOnSizeChanged;android.widget.cts.DialerFilterTest#testSetLettersWatcher;android.widget.cts.ViewAnimatorTest#testAccessDisplayedChildBoundary;android.widget.cts.TextViewTest#testSetSpannableFactory;android.widget.cts.ImageSwitcherTest#testConstructor;android.widget.cts.TextViewTest#testAccessMovementMethod;android.widget.cts.AbsSeekBarTest#testDrawableStateChanged;android.widget.cts.RadioGroupTest#testAddView;android.widget.cts.HorizontalScrollViewTest#testOnInterceptTouchEvent;android.widget.cts.TabHostTest#testConstructor;android.widget.cts.CursorTreeAdapterTest#testGetChildrenCount;android.widget.cts.SimpleCursorAdapterTest#testChangeCursor;android.widget.cts.HorizontalScrollViewTest#testAccessFillViewport;android.widget.cts.AbsSeekBarTest#testFoo;android.widget.cts.TableLayoutTest#testConstructor;android.widget.cts.GalleryTest#testSetUnselectedAlpha;android.widget.cts.AbsListViewTest#testInvalidateViews;android.widget.cts.HeaderViewListAdapterTest#testGetCount;android.widget.cts.RatingBarTest#testAccessIndicator;android.widget.cts.RelativeLayout_LayoutParamsTest#testConstructor;android.widget.cts.CursorAdapterTest#testNewDropDownView;android.widget.cts.ChronometerTest#testAccessFormat;android.widget.cts.ExpandableListViewBasicTest#testPreconditions;android.widget.cts.AbsListViewTest#testFoo;android.widget.cts.ListViewTest#testOnTouchEvent;android.widget.cts.TabHostTest#testAddTab;android.widget.cts.AdapterViewTest#testChangeFocusable;android.widget.cts.ListViewTest#testAccessDivider;android.widget.cts.ListViewTest#testAccessFooterView;android.widget.cts.SimpleCursorAdapterTest#testAccessViewBinder;android.widget.cts.ZoomButtonTest#testSetEnabled;android.widget.cts.CheckedTextViewTest#testConstructor;android.widget.cts.GridViewTest#testLayoutChildren;android.widget.cts.ImageViewTest#testSetAlpha;android.widget.cts.TextViewTest#testClearComposingText;android.widget.cts.ZoomControlsTest#testSetIsZoomInEnabled;android.widget.cts.TabWidgetTest#testConstructor;android.widget.cts.TableRowTest#testGenerateLayoutParams2;android.widget.cts.TextViewTest#testSetTextAppearance;android.widget.cts.FilterTest#testConvertResultToString;android.widget.cts.MultiAutoCompleteTextViewTest#testPerformValidation;android.widget.cts.TextViewTest#testHeightAndWidth;android.widget.cts.CursorTreeAdapterTest#testIsChildSelectable;android.widget.cts.ArrayAdapterTest#testAddAllCollection;android.widget.cts.AbsListView_LayoutParamsTest#testConstructors;android.widget.cts.ScrollViewTest#testDispatchKeyEvent;android.widget.cts.TabHostTest#testAccessCurrentTab;android.widget.cts.ViewSwitcherTest#testReset;android.widget.cts.TimePickerTest#testAccessIs24HourView;android.widget.cts.TextViewTest#testGetTotalPaddingTop;android.widget.cts.HorizontalScrollViewTest#testExecuteKeyEvent;android.widget.cts.AbsoluteLayoutTest#testOnLayout;android.widget.cts.ImageViewTest#testAccessScaleType;android.widget.cts.TabHostTest#testGetTabWidget;android.widget.cts.SlidingDrawerTest#testAnimateToggle;android.widget.cts.SlidingDrawerTest#testLockAndUnlock;android.widget.cts.GalleryTest#testSetGravity;android.widget.cts.ListViewTest#testOnFinishInflate;android.widget.cts.ScrollViewTest#testArrowScroll;android.widget.cts.ScrollViewTest#testComputeScrollDeltaToGetChildRectOnScreen;android.widget.cts.TabHostTest#testGetCurrentTabView;android.widget.cts.ExpandableListViewBasicTest#testExpandGroup;android.widget.cts.TextViewTest#testExtractText;android.widget.cts.RemoteViewsTest#testOnLoadClass;android.widget.cts.RadioGroupTest#testCheckLayoutParams;android.widget.cts.TextSwitcherTest#testSetText;android.widget.cts.AbsListViewTest#testGenerateLayoutParams;android.widget.cts.TabWidgetTest#testSetEnabled;android.widget.cts.AutoCompleteTextViewTest#testAccessItemClickListener;android.widget.cts.ChronometerTest#testFoo;android.widget.cts.ExpandableListViewBasicTest#testConvertionBetweenFlatAndPacked;android.widget.cts.DatePickerTest#testOnSaveInstanceState;android.widget.cts.DatePickerTest#testAndroidTestCaseSetupProperly;android.widget.cts.ImageButtonTest#testOnSetAlpha;android.widget.cts.AdapterViewTest#testAccessOnItemSelectedListener;android.widget.cts.BaseExpandableListAdapterTest#testOnGroupCollapsed;android.widget.cts.TableLayoutTest#testGenerateLayoutParams1;android.widget.cts.TableLayoutTest#testGenerateLayoutParams2;android.widget.cts.LinearLayoutTest#testLayoutVertical;android.widget.cts.CursorTreeAdapterTest#testAccessQueryProvider;android.widget.cts.TextViewTest#testSetTextKeepState1;android.widget.cts.ArrayAdapterTest#testConstructor;android.widget.cts.RemoteViewsTest#testDescribeContents;android.widget.cts.RelativeLayoutTest#testGenerateDefaultLayoutParams;android.widget.cts.SimpleExpandableListAdapterTest#testHasStableIds;android.widget.cts.TextViewTest#testOnPreDraw;android.widget.cts.ExpandableListViewBasicTest#testCollapseGroup;android.widget.cts.ExpandableListViewWithHeadersTest#testExpandOnFirstPosition;android.widget.cts.SimpleCursorAdapterTest#testSetViewText;android.widget.cts.RelativeLayoutTest#testSetIgnoreGravity;android.widget.cts.RadioGroup_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.BaseAdapterTest#testAreAllItemsEnabled;android.widget.cts.RemoteViewsTest#testSetInt;android.widget.cts.AutoCompleteTextViewTest#testAccessDropDownAnchor;android.widget.cts.ScrollerTest#testIsFinished;android.widget.cts.TextViewTest#testAccessGravity;android.widget.cts.TableLayoutTest#testAccessColumnStretchable;android.widget.cts.ExpandableListViewTest#testSetOnGroupClickListener;android.widget.cts.AlphabetIndexerTest#testCompare;android.widget.cts.AbsListView_LayoutParamsTest#testAndroidTestCaseSetupProperly;android.widget.cts.LayoutDirectionTest#testLayoutDirectionDefaults;android.widget.cts.HeaderViewListAdapterTest#testAreAllItemsEnabled;android.widget.cts.LinearLayout_LayoutParamsTest#testDebug;android.widget.cts.CursorTreeAdapterTest#testGetCursor;android.widget.cts.ImageViewTest#testOnDraw;android.widget.cts.GalleryTest#testGetChildDrawingOrder;android.widget.cts.TextViewTest#testAccessInputExtras;android.widget.cts.LinearLayoutTest#testGetBaseline;android.widget.cts.RatingBarTest#testConstructor;android.widget.cts.RemoteViewsTest#testSetUri;android.widget.cts.SpinnerTest#testsetPromptId;android.widget.cts.RemoteViewsTest#testSetTextColor;android.widget.cts.VideoViewTest#testGetDuration;android.widget.cts.AdapterViewTest#testGetCount;android.widget.cts.MultiAutoCompleteTextView_CommaTokenizerTest#testFindTokenStart;android.widget.cts.ImageViewTest#testSetImageBitmap;android.widget.cts.HeaderViewListAdapterTest#testUnregisterDataSetObserver;android.widget.cts.PopupWindowTest#testAccessOutsideTouchable;android.widget.cts.EditTextTest#testSetEllipsize;android.widget.cts.SimpleAdapterTest#testGetCount;android.widget.cts.SpinnerTest#testSetOnItemClickListener;android.widget.cts.SlidingDrawerTest#testToggle;android.widget.cts.AbsSpinnerTest#testPointToPosition;android.widget.cts.ViewFlipperTest#testViewFlipper;android.widget.cts.TabHostTest#testDispatchKeyEvent;android.widget.cts.ExpandableListViewTest#testIsGroupExpanded;android.widget.cts.LayoutDirectionTest#testDirectionFromXml;android.widget.cts.TextViewTest#testVerifyDrawable;android.widget.cts.ProgressBarTest#testIncrementProgressBy;android.widget.cts.PopupWindowTest#testShowAsDropDown;android.widget.cts.ListViewTest#testCanAnimate;android.widget.cts.HorizontalScrollViewTest#testMeasureChild;android.widget.cts.RadioGroupTest#testClearCheck;android.widget.cts.SimpleAdapterTest#testConstructor;android.widget.cts.HorizontalScrollViewTest#testGetHorizontalFadingEdgeStrengths;android.widget.cts.CursorAdapterTest#testGetItem" />
-</TestPlan>
diff --git a/tests/plans/CTS-stable.xml b/tests/plans/CTS-stable.xml
deleted file mode 100644
index b9e7321..0000000
--- a/tests/plans/CTS-stable.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<TestPlan version="1.0">
-  <Entry uri="android.aadb"/>
-  <Entry uri="android.acceleration"/>
-  <Entry uri="android.accessibility"/>
-  <Entry uri="android.accessibilityservice"/>
-  <Entry uri="android.accounts"/>
-  <Entry uri="android.admin"/>
-  <Entry uri="android.animation"/>
-  <Entry uri="android.app" exclude="android.app.cts.ActivityManagerTest#testIsRunningInTestHarness;android.app.cts.AlertDialogTest#testAlertDialogCancelable;android.app.cts.ExpandableListActivityTest#testCallback" />
-  <Entry uri="android.bionic"/>
-  <Entry uri="android.bluetooth"/>
-  <Entry uri="android.calendarcommon"/>
-  <Entry uri="android.content"/>
-  <Entry uri="android.core.tests.libcore.package.com"/>
-  <Entry uri="android.core.tests.libcore.package.conscrypt"/>
-  <Entry uri="android.core.tests.libcore.package.dalvik"/>
-  <Entry uri="android.core.tests.libcore.package.libcore"/>
-  <Entry uri="android.core.tests.libcore.package.org"/>
-  <Entry uri="android.core.tests.libcore.package.sun"/>
-  <Entry uri="android.core.tests.libcore.package.tests"/>
-  <Entry uri="android.core.vm-tests-tf"/>
-  <Entry uri="android.database"/>
-  <Entry uri="android.display"/>
-  <Entry uri="android.dpi"/>
-  <Entry uri="android.dpi2"/>
-  <Entry uri="android.dreams"/>
-  <Entry uri="android.drm"/>
-  <Entry uri="android.effect"/>
-  <Entry uri="android.example"/>
-  <Entry uri="android.gesture"/>
-  <Entry uri="android.graphics"/>
-  <Entry uri="android.graphics2"/>
-  <Entry uri="android.hardware" exclude="android.hardware.cts.SensorIntegrationTests#testAccelerometerDoesNotStopGyroscope;android.hardware.cts.SensorIntegrationTests#testsAccelerometerDoesnNotStopMagnetometer;android.hardware.cts.SensorIntegrationTests#testAndroidTestCaseSetupProperly;android.hardware.cts.SensorIntegrationTests#testBatchAndFlush;android.hardware.cts.SensorIntegrationTests#testGyroscopeDoesNotStopAccelerometer;android.hardware.cts.SensorIntegrationTests#testGyroscopeDoesNotStopMagnetometer;android.hardware.cts.SensorIntegrationTests#testMagnetometerDoesNotStopAccelerometer;android.hardware.cts.SensorIntegrationTests#testMagnetometerDoesNotStopGyroscope;android.hardware.cts.SensorMagneticFieldTest#testBatchingStoppingOtherClients;android.hardware.cts.SensorMagneticFieldTest#testBatchingStoppingOtherClientsBatching;android.hardware.cts.SensorMagneticFieldTest#testFrequencyAccuracy;android.hardware.cts.SensorMagneticFieldTest#testOneClientSeveralThreads;android.hardware.cts.SensorMagneticFieldTest#testOneClientSeveralThreadsBatching;android.hardware.cts.SensorMagneticFieldTest#testStandardDeviationWhileStatic;android.hardware.cts.SensorMagneticFieldTest#testStoppingOtherClients;android.hardware.cts.SensorMagneticFieldTest#testStoppingOtherClientsBatching;android.hardware.cts.SensorAccelerometerTest#testBatchingStoppingOtherClients;android.hardware.cts.SensorAccelerometerTest#testBatchingStoppingOtherClientsBatching;android.hardware.cts.SensorAccelerometerTest#testFrequencyAccuracy;android.hardware.cts.SensorAccelerometerTest#testOneClientSeveralThreads;android.hardware.cts.SensorAccelerometerTest#testOneClientSeveralThreadsBatching;android.hardware.cts.SensorGyroscopeTest#testBatchingStoppingOtherClients;android.hardware.cts.SensorGyroscopeTest#testBatchingStoppingOtherClientsBatching;android.hardware.cts.SensorGyroscopeTest#testFrequencyAccuracy;android.hardware.cts.SensorGyroscopeTest#testOneClientSeveralThreads;android.hardware.cts.SensorGyroscopeTest#testOneClientSeveralThreadsBatching;android.hardware.cts.SensorGyroscopeTest#testStandardDeviationWhilStatic;android.hardware.cts.SensorGyroscopeTest#testStoppingOtherClients;android.hardware.cts.SensorGyroscopeTest#testStoppingOtherClientsBatching;android.hardware.cts.SensorAccelerometerTest#testStandardDeviationWhileStatic;android.hardware.cts.SensorAccelerometerTest#testStoppingOtherClients;android.hardware.cts.SensorAccelerometerTest#testStoppingOtherClientsBatching;android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceRepeatingRequest;android.hardware.camera2.cts.ImageReaderTest#testImageReaderFromCameraJpeg;android.hardware.cts.CameraGLTest#testCameraToSurfaceTextureMetadata;android.hardware.cts.CameraTest#testImmediateZoom;android.hardware.cts.CameraTest#testPreviewCallback;android.hardware.cts.CameraTest#testSmoothZoom;android.hardware.cts.CameraTest#testVideoSnapshot;android.hardware.cts.CameraGLTest#testSetPreviewTextureBothCallbacks;android.hardware.cts.CameraGLTest#testSetPreviewTexturePreviewCallback" />
-  <Entry uri="android.holo"/>
-  <Entry uri="android.jni"/>
-  <Entry uri="android.keystore"/>
-  <Entry uri="android.location"/>
-  <Entry uri="android.media" exclude="android.media.cts.StreamingMediaPlayerTest#testHLS;android.media.cts.DecoderTest#testCodecResetsH264WithSurface" />
-  <Entry uri="android.mediastress" exclude="android.mediastress.cts.NativeMediaTest#test480pPlay" />
-  <Entry uri="android.nativemedia.sl"/>
-  <Entry uri="android.nativemedia.xa"/>
-  <Entry uri="android.nativeopengl"/>
-  <Entry uri="android.ndef"/>
-  <Entry uri="android.net" exclude="android.net.cts.ConnectivityManagerTest#testStartUsingNetworkFeature_enableHipri;android.net.wifi.cts.ScanResultTest#testScanResultTimeStamp;android.net.cts.DnsTest#testDnsWorks;android.net.cts.TrafficStatsTest#testTrafficStatsForLocalhost;android.net.wifi.cts.ScanResultTest#testAndroidTestCaseSetupProperly;android.net.wifi.cts.NsdManagerTest#testAndroidTestCaseSetupProperly;android.net.cts.SSLCertificateSocketFactoryTest#testCreateSocket;android.net.cts.SSLCertificateSocketFactoryTest#test_createSocket_bind;android.net.cts.SSLCertificateSocketFactoryTest#test_createSocket_simple;android.net.cts.SSLCertificateSocketFactoryTest#test_createSocket_wrapping" />
-  <Entry uri="android.opengl"/>
-  <Entry uri="android.openglperf"/>
-  <Entry uri="android.os"/>
-  <Entry uri="android.permission"/>
-  <Entry uri="android.permission2"/>
-  <Entry uri="android.preference"/>
-  <Entry uri="android.preference2"/>
-  <Entry uri="android.provider" exclude="android.provider.cts.CalendarTest#testRemindersAlarm" />
-  <Entry uri="android.renderscript"/>
-  <Entry uri="android.rscpp"/>
-  <Entry uri="android.rsg"/>
-  <Entry uri="android.sax"/>
-  <Entry uri="android.security" exclude="android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdp6Ports;android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdpPorts;android.security.cts.BannedFilesTest#testNoSu;android.security.cts.BannedFilesTest#testNoSuInPath;android.security.cts.PackageSignatureTest#testPackageSignatures" />
-  <Entry uri="android.speech"/>
-  <Entry uri="android.telephony"/>
-  <Entry uri="android.tests.appsecurity"/>
-  <Entry uri="android.tests.location"/>    
-  <Entry uri="android.tests.sigtest"/>
-  <Entry uri="android.text"/>
-  <Entry uri="android.textureview"/>
-  <Entry uri="android.theme"/>
-  <Entry uri="android.uiautomator"/>
-  <Entry uri="android.usb"/>
-  <Entry uri="android.util"/>
-  <Entry uri="android.view"/>
-  <Entry uri="android.webkit" exclude="android.webkit.cts.WebViewClientTest#testDoUpdateVisitedHistory;android.webkit.cts.WebViewClientTest#testLoadPage;android.webkit.cts.WebViewClientTest#testOnFormResubmission;android.webkit.cts.WebViewClientTest#testOnReceivedError;android.webkit.cts.WebViewClientTest#testOnReceivedHttpAuthRequest;android.webkit.cts.WebViewClientTest#testOnScaleChanged;android.webkit.cts.WebViewClientTest#testOnUnhandledKeyEvent;android.webkit.cts.WebViewTest#testSetInitialScale" />
-  <Entry uri="android.widget" exclude="android.widget.cts.GridViewTest#testSetNumColumns" />
-  <Entry uri="com.android.cts.bootup"/>
-  <Entry uri="com.android.cts.browserbench"/>
-  <Entry uri="com.android.cts.dram"/>
-  <Entry uri="com.android.cts.filesystemperf"/>
-  <Entry uri="com.android.cts.jank.opengl"/>
-  <Entry uri="com.android.cts.jank.ui"/>
-  <Entry uri="com.android.cts.opengl"/>
-  <Entry uri="com.android.cts.simplecpu"/>
-  <Entry uri="com.android.cts.ui"/>
-  <Entry uri="com.android.cts.uihost"/>
-  <Entry uri="com.android.cts.videoperf"/>
-  <Entry uri="zzz.android.monkey"/>
-</TestPlan>
diff --git a/tests/res/layout/framelayout_layout.xml b/tests/res/layout/framelayout_layout.xml
index 1048d1b..c6d1a83 100644
--- a/tests/res/layout/framelayout_layout.xml
+++ b/tests/res/layout/framelayout_layout.xml
@@ -23,8 +23,8 @@
                 android:orientation="vertical">
 
     <FrameLayout
-        android:layout_width="200dip"
-        android:layout_height="200dip"
+        android:layout_width="100dip"
+        android:layout_height="100dip"
         android:background="@drawable/yellow"
         android:id="@+id/framelayout">
     </FrameLayout>
@@ -37,7 +37,7 @@
 
         <TextView android:id="@+id/framelayout_textview"
             android:background="@drawable/blue"
-            android:layout_width="100dip"
+            android:layout_width="60dip"
             android:layout_height="30dip"
             android:text="@string/hello_world"/>
 
diff --git a/tests/res/layout/popupwindow.xml b/tests/res/layout/popupwindow.xml
index c9cefdf..e6b0aed 100644
--- a/tests/res/layout/popupwindow.xml
+++ b/tests/res/layout/popupwindow.xml
@@ -16,17 +16,17 @@
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:orientation="vertical">
 
     <TextView android:id="@+id/anchor_upper"
         android:layout_width="wrap_content"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:text="@string/text_view_hint"
         android:layout_weight="1"/>
 
     <LinearLayout android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:layout_weight="1">
 
         <TextView android:id="@+id/anchor_middle_left"
@@ -45,7 +45,7 @@
 
     <TextView android:id="@+id/anchor_lower"
         android:layout_width="wrap_content"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:text="@string/text_view_hint"
         android:layout_weight="1"/>
 
diff --git a/tests/res/raw/set_target_api_11.bc b/tests/res/raw/set_target_api_11.bc
index fa04be6..ae640a5 100644
--- a/tests/res/raw/set_target_api_11.bc
+++ b/tests/res/raw/set_target_api_11.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_12.bc b/tests/res/raw/set_target_api_12.bc
index abe314f..b4ad45e 100644
--- a/tests/res/raw/set_target_api_12.bc
+++ b/tests/res/raw/set_target_api_12.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_13.bc b/tests/res/raw/set_target_api_13.bc
index 4fa5b75..9e35efa 100644
--- a/tests/res/raw/set_target_api_13.bc
+++ b/tests/res/raw/set_target_api_13.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_14.bc b/tests/res/raw/set_target_api_14.bc
index 876b37c..a0fc7ff 100644
--- a/tests/res/raw/set_target_api_14.bc
+++ b/tests/res/raw/set_target_api_14.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_15.bc b/tests/res/raw/set_target_api_15.bc
index d2de6d9..791f604 100644
--- a/tests/res/raw/set_target_api_15.bc
+++ b/tests/res/raw/set_target_api_15.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_16.bc b/tests/res/raw/set_target_api_16.bc
index ca9aa65..db3f683 100644
--- a/tests/res/raw/set_target_api_16.bc
+++ b/tests/res/raw/set_target_api_16.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_17.bc b/tests/res/raw/set_target_api_17.bc
index b08b389..5784e3d 100644
--- a/tests/res/raw/set_target_api_17.bc
+++ b/tests/res/raw/set_target_api_17.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_18.bc b/tests/res/raw/set_target_api_18.bc
new file mode 100644
index 0000000..66ae059
--- /dev/null
+++ b/tests/res/raw/set_target_api_18.bc
Binary files differ
diff --git a/tests/res/raw/set_target_api_19.bc b/tests/res/raw/set_target_api_19.bc
new file mode 100644
index 0000000..bc926a6
--- /dev/null
+++ b/tests/res/raw/set_target_api_19.bc
Binary files differ
diff --git a/tests/res/values/styles.xml b/tests/res/values/styles.xml
index f8b56fd..e0110cc 100644
--- a/tests/res/values/styles.xml
+++ b/tests/res/values/styles.xml
@@ -138,4 +138,8 @@
         <item name="android:panelColorBackground">#ffffffff</item>
     </style>
 
+    <style name="Theme_NoSwipeDismiss">
+        <item name="android:windowSwipeToDismiss">false</item>
+    </style>
+
 </resources>
diff --git a/tests/src/android/opengl/cts/EglConfigStubActivity.java b/tests/src/android/opengl/cts/EglConfigStubActivity.java
index ab1a6d0..749679a 100644
--- a/tests/src/android/opengl/cts/EglConfigStubActivity.java
+++ b/tests/src/android/opengl/cts/EglConfigStubActivity.java
@@ -20,6 +20,7 @@
 import android.content.Intent;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
+import android.view.WindowManager;
 
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -44,6 +45,11 @@
         int contextClientVersion = getContextClientVersion();
         setTitle("EGL Config Id: " + configId + " Client Version: " + contextClientVersion);
 
+        // Dismiss keyguard and keep screen on while this test is on.
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
+                WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON |
+                WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
         mFinishedDrawing = new CountDownLatch(1);
         mView = new EglConfigGLSurfaceView(this, configId, contextClientVersion, new Runnable() {
             @Override
diff --git a/tests/src/android/os/cts/ReadElf.java b/tests/src/android/os/cts/ReadElf.java
index b0d5e74..89e9d48 100644
--- a/tests/src/android/os/cts/ReadElf.java
+++ b/tests/src/android/os/cts/ReadElf.java
@@ -38,6 +38,8 @@
     private static final int EM_386 = 3;
     private static final int EM_MIPS = 8;
     private static final int EM_ARM = 40;
+    // http://en.wikipedia.org/wiki/Qualcomm_Hexagon
+    private static final int EM_QDSP6 = 164;
 
     /** Size of the e_ident[] structure in the ELF header. */
     private static final int EI_NIDENT = 16;
@@ -278,7 +280,8 @@
     private void readHeader() throws IOException {
         mType = readHalf(getHeaderOffset(OFFSET_TYPE));
         int e_machine = readHalf(getHeaderOffset(OFFSET_MACHINE));
-        if (e_machine != EM_386 && e_machine != EM_MIPS && e_machine != EM_ARM) {
+        if (e_machine != EM_386 && e_machine != EM_MIPS && e_machine != EM_ARM &&
+                e_machine != EM_QDSP6) {
             throw new IOException("Invalid ELF e_machine: " + e_machine + ": " + mPath);
         }
 
@@ -406,7 +409,7 @@
         mFile.seek(offset);
         mFile.readFully(mBuffer, 0, 1);
 
-        return mBuffer[0];
+        return mBuffer[0] & 0xff;
     }
 
     private int readHalf(long offset) throws IOException {
@@ -415,9 +418,9 @@
 
         final int answer;
         if (mEndian == ELFDATA2LSB) {
-            answer = mBuffer[1] << 8 | mBuffer[0];
+            answer = mBuffer[1] << 8 | (mBuffer[0] & 0xff);
         } else {
-            answer = mBuffer[0] << 8 | mBuffer[1];
+            answer = mBuffer[0] << 8 | (mBuffer[1] & 0xff);
         }
 
         return answer;
@@ -430,12 +433,12 @@
         int answer = 0;
         if (mEndian == ELFDATA2LSB) {
             for (int i = mWordSize - 1; i >= 0; i--) {
-                answer = (answer << 8) | (mBuffer[i] & 0xFF);
+                answer = (answer << 8) | (mBuffer[i] & 0xff);
             }
         } else {
             final int N = mWordSize - 1;
             for (int i = 0; i <= N; i++) {
-                answer = (answer << 8) | mBuffer[i];
+                answer = (answer << 8) | (mBuffer[i] & 0xff);
             }
         }
 
diff --git a/tests/src/android/text/EmojiStubActivity.java b/tests/src/android/text/EmojiStubActivity.java
index 1587c94..8d09250 100644
--- a/tests/src/android/text/EmojiStubActivity.java
+++ b/tests/src/android/text/EmojiStubActivity.java
@@ -21,15 +21,20 @@
 import android.app.Activity;
 import android.os.Bundle;
 import android.webkit.WebView;
+import android.webkit.cts.NullWebViewUtils;
 
 public class EmojiStubActivity extends Activity {
     private WebView mWebView;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.webview_layout);
-        mWebView = (WebView) findViewById(R.id.web_page);
+        try {
+            super.onCreate(savedInstanceState);
+            setContentView(R.layout.webview_layout);
+            mWebView = (WebView) findViewById(R.id.web_page);
+        } catch (Exception e) {
+            NullWebViewUtils.determineIfWebViewAvailable(this, e);
+        }
     }
 
     public WebView getWebView() {
@@ -38,7 +43,9 @@
 
     @Override
     public void onDestroy() {
-        mWebView.destroy();
+        if (mWebView != null) {
+            mWebView.destroy();
+        }
         super.onDestroy();
     }
 }
diff --git a/tests/src/android/webkit/cts/CookieSyncManagerStubActivity.java b/tests/src/android/webkit/cts/CookieSyncManagerStubActivity.java
index 3421ac6..a5ac6ec 100644
--- a/tests/src/android/webkit/cts/CookieSyncManagerStubActivity.java
+++ b/tests/src/android/webkit/cts/CookieSyncManagerStubActivity.java
@@ -27,22 +27,35 @@
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        CookieSyncManager.createInstance(this);
 
-        mWebView = new WebView(this);
-        setContentView(mWebView);
+        try {
+            CookieSyncManager.createInstance(this);
+
+            mWebView = new WebView(this);
+            setContentView(mWebView);
+        } catch (Exception e) {
+            NullWebViewUtils.determineIfWebViewAvailable(this, e);
+        }
     }
 
     @Override
     protected void onResume() {
         super.onResume();
-        CookieSyncManager.getInstance().startSync();
+        try {
+            CookieSyncManager.getInstance().startSync();
+        } catch (Exception e) {
+            // May throw on a device with no webview, OK to ignore at this point.
+        }
     }
 
     @Override
     protected void onStop() {
         super.onStop();
-        CookieSyncManager.getInstance().stopSync();
+        try {
+            CookieSyncManager.getInstance().stopSync();
+        } catch (Exception e) {
+            // May throw on a device with no webview, OK to ignore at this point.
+        }
     }
 
     public WebView getWebView(){
diff --git a/tests/src/android/webkit/cts/NullWebViewUtils.java b/tests/src/android/webkit/cts/NullWebViewUtils.java
new file mode 100644
index 0000000..c52219f
--- /dev/null
+++ b/tests/src/android/webkit/cts/NullWebViewUtils.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2010 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.webkit.cts;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+
+/**
+ * Utilities to enable the android.webkit.* CTS tests (and others that rely on a functioning
+ * android.webkit.WebView implementation) to determine whether a functioning WebView is present
+ * on the device or not.
+ *
+ * Test cases that require android.webkit.* classes should wrap their first usage of WebView in a
+ * try catch block, and pass any exception that is thrown to
+ * NullWebViewUtils.determineIfWebViewAvailable. The return value of
+ * NullWebViewUtils.isWebViewAvailable will then determine if the test should expect to be able to
+ * use a WebView.
+ */
+public class NullWebViewUtils {
+
+    private static boolean sWebViewUnavailable;
+
+    /**
+     * @param context Current Activity context, used to query the PackageManager.
+     * @param t       An exception thrown by trying to invoke android.webkit.* APIs.
+     */
+    public static void determineIfWebViewAvailable(Context context, Throwable t) {
+        sWebViewUnavailable = !hasWebViewFeature(context) && checkCauseWasUnsupportedOperation(t);
+    }
+
+    /**
+     * After calling determineIfWebViewAvailable, this returns whether a WebView is available on the
+     * device and wheter the test can rely on it.
+     * @return True iff. PackageManager determined that there is no WebView on the device and the
+     *         exception thrown from android.webkit.* was UnsupportedOperationException.
+     */
+    public static boolean isWebViewAvailable() {
+        return !sWebViewUnavailable;
+    }
+
+    private static boolean hasWebViewFeature(Context context) {
+        // Query the system property that determins if there is a functional WebView on the device.
+        PackageManager pm = context.getPackageManager();
+        return pm.hasSystemFeature(PackageManager.FEATURE_WEBVIEW);
+    }
+
+    private static boolean checkCauseWasUnsupportedOperation(Throwable t) {
+        if (t == null) return false;
+        while (t.getCause() != null) {
+            t = t.getCause();
+        }
+        return t instanceof UnsupportedOperationException;
+    }
+
+    /**
+     * Some CTS tests (by design) first use android.webkit.* from a background thread. This helper
+     * allows the test to catch the UnsupportedOperationException from that background thread, and
+     * then query the result from the test main thread.
+     */
+    public static class NullWebViewFromThreadExceptionHandler
+            implements Thread.UncaughtExceptionHandler {
+        private Throwable mPendingException;
+
+        @Override
+        public void uncaughtException(Thread t, Throwable e) {
+            mPendingException = e;
+        }
+
+        public boolean isWebViewAvailable(Context context) {
+            return hasWebViewFeature(context) ||
+                    !checkCauseWasUnsupportedOperation(mPendingException);
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/src/android/webkit/cts/WebViewStubActivity.java b/tests/src/android/webkit/cts/WebViewStubActivity.java
index 6a51bbe..62adc39 100644
--- a/tests/src/android/webkit/cts/WebViewStubActivity.java
+++ b/tests/src/android/webkit/cts/WebViewStubActivity.java
@@ -29,9 +29,13 @@
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.webview_layout);
-        mWebView = (WebView) findViewById(R.id.web_page);
+        try {
+            super.onCreate(savedInstanceState);
+            setContentView(R.layout.webview_layout);
+            mWebView = (WebView) findViewById(R.id.web_page);
+        } catch (Exception e) {
+            NullWebViewUtils.determineIfWebViewAvailable(this, e);
+        }
     }
 
     public WebView getWebView() {
@@ -40,11 +44,13 @@
 
     @Override
     public void onDestroy() {
-        ViewParent parent =  mWebView.getParent();
-        if (parent instanceof ViewGroup) {
-            ((ViewGroup) parent).removeView(mWebView);
+        if (mWebView != null) {
+            ViewParent parent =  mWebView.getParent();
+            if (parent instanceof ViewGroup) {
+                ((ViewGroup) parent).removeView(mWebView);
+            }
+            mWebView.destroy();
         }
-        mWebView.destroy();
         super.onDestroy();
     }
 }
diff --git a/tests/src/android/widget/cts/RemoteViewsStubActivity.java b/tests/src/android/widget/cts/RemoteViewsStubActivity.java
index f1c0a72..f16ae13 100644
--- a/tests/src/android/widget/cts/RemoteViewsStubActivity.java
+++ b/tests/src/android/widget/cts/RemoteViewsStubActivity.java
@@ -20,6 +20,7 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.webkit.cts.NullWebViewUtils;
 import android.widget.RemoteViews;
 
 /**
@@ -28,7 +29,11 @@
 public class RemoteViewsStubActivity extends Activity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.remoteviews_host);
+        try {
+            super.onCreate(savedInstanceState);
+            setContentView(R.layout.remoteviews_host);
+        } catch (Exception e) {
+            NullWebViewUtils.determineIfWebViewAvailable(this, e);
+        }
     }
 }
diff --git a/tests/tests/accessibilityservice/AndroidManifest.xml b/tests/tests/accessibilityservice/AndroidManifest.xml
index c000460..13c44b5 100644
--- a/tests/tests/accessibilityservice/AndroidManifest.xml
+++ b/tests/tests/accessibilityservice/AndroidManifest.xml
@@ -38,7 +38,7 @@
               android:name="android.accessibilityservice.cts.AccessibilityFocusAndInputFocusSyncActivity"/>
 
       <activity android:label="@string/accessibility_text_traversal_test_activity"
-              android:name="android.accessibilityservice.cts.AccessibilityTextTraversalActivity"/> 
+              android:name="android.accessibilityservice.cts.AccessibilityTextTraversalActivity"/>
 
   </application>
 
diff --git a/tests/tests/accessibilityservice/res/layout/end_to_end_test.xml b/tests/tests/accessibilityservice/res/layout/end_to_end_test.xml
index 351ea24..79f87dc 100644
--- a/tests/tests/accessibilityservice/res/layout/end_to_end_test.xml
+++ b/tests/tests/accessibilityservice/res/layout/end_to_end_test.xml
@@ -18,7 +18,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
-              android:gravity="center" android:orientation="vertical">
+              android:gravity="center"
+              android:orientation="vertical">
 
     <ListView android:id="@+id/listview"
               android:layout_width="fill_parent"
diff --git a/tests/tests/accessibilityservice/res/layout/query_window_test.xml b/tests/tests/accessibilityservice/res/layout/query_window_test.xml
index 88d4cc9..001b024 100644
--- a/tests/tests/accessibilityservice/res/layout/query_window_test.xml
+++ b/tests/tests/accessibilityservice/res/layout/query_window_test.xml
@@ -17,6 +17,7 @@
 */
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/added_content"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
diff --git a/tests/tests/accessibilityservice/res/values/strings.xml b/tests/tests/accessibilityservice/res/values/strings.xml
index f60df17..0b97d3f 100644
--- a/tests/tests/accessibilityservice/res/values/strings.xml
+++ b/tests/tests/accessibilityservice/res/values/strings.xml
@@ -126,7 +126,7 @@
     <string name="accessibility_text_traversal_test_activity">Accessibility text traversal test</string>
 
     <string name="android_wiki_short">
-        Android is a Linux-based operating</string>
+        Android is a\nLinux-based\noperating</string>
 
     <string name="android_wiki">
         Android is a Linux-based operating system for mobile devices such as smartphones and tablet
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
index 53f68b5..c121071 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
@@ -22,12 +22,13 @@
 import android.test.ActivityInstrumentationTestCase2;
 import android.view.accessibility.AccessibilityEvent;
 
+import java.util.concurrent.TimeoutException;
+
 /**
  * Base text case for testing accessibility APIs by instrumenting an Activity.
  */
 public abstract class AccessibilityActivityTestCase<T extends Activity>
         extends ActivityInstrumentationTestCase2<T> {
-
     /**
      * Timeout required for pending Binder calls or event processing to
      * complete.
@@ -55,11 +56,20 @@
         info.flags &= ~AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
         getInstrumentation().getUiAutomation().setServiceInfo(info);
 
+        startActivityAndWaitForFirstEvent();
+
+        waitForIdle();
+    }
+
+    /**
+     * Waits for the UI do be idle.
+     *
+     * @throws TimeoutException if idle cannot be detected.
+     */
+    public void waitForIdle() throws TimeoutException {
         getInstrumentation().getUiAutomation().waitForIdle(
                 TIMEOUT_ACCESSIBILITY_STATE_IDLE,
                 TIMEOUT_ASYNC_PROCESSING);
-
-        startActivityAndWaitForFirstEvent();
     }
 
     /**
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndActivity.java
index 12bcd96..157a3dc 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndActivity.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndActivity.java
@@ -18,7 +18,6 @@
 
 import com.android.cts.accessibilityservice.R;
 
-import android.app.Activity;
 import android.os.Bundle;
 import android.view.View;
 import android.view.ViewGroup;
@@ -28,11 +27,11 @@
 import android.widget.TextView;
 
 /**
- * This class is an {@link Activity} used to perform end-to-end
+ * This class is an {@link android.app.Activity} used to perform end-to-end
  * testing of the accessibility feature by interaction with the
  * UI widgets.
  */
-public class AccessibilityEndToEndActivity extends Activity {
+public class AccessibilityEndToEndActivity extends AccessibilityTestActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
index 7e05e32..f0f0dd7 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
@@ -368,7 +368,6 @@
             && first.getCurrentItemIndex() == second.getCurrentItemIndex()
             && first.isEnabled() == second.isEnabled()
             && first.getFromIndex() == second.getFromIndex()
-            && first.isFullScreen() == second.isFullScreen()
             && first.getItemCount() == second.getItemCount()
             && first.isPassword() == second.isPassword()
             && first.getRemovedCount() == second.getRemovedCount()
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityFocusAndInputFocusSyncActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityFocusAndInputFocusSyncActivity.java
index cdd2e42..46f04aa 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityFocusAndInputFocusSyncActivity.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityFocusAndInputFocusSyncActivity.java
@@ -14,7 +14,6 @@
 
 package android.accessibilityservice.cts;
 
-import android.app.Activity;
 import android.os.Bundle;
 
 import com.android.cts.accessibilityservice.R;
@@ -26,7 +25,7 @@
  * this activity is for verifying the the sync between accessibility
  * and input focus.
  */
-public class AccessibilityFocusAndInputFocusSyncActivity extends Activity {
+public class AccessibilityFocusAndInputFocusSyncActivity extends AccessibilityTestActivity {
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTestActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTestActivity.java
new file mode 100644
index 0000000..4d9b97d
--- /dev/null
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTestActivity.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (C) 2014 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.accessibilityservice.cts;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.WindowManager;
+
+public abstract class AccessibilityTestActivity extends Activity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
+                | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
+    }
+}
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalActivity.java
index 7c9b45a..4a4a4ba 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalActivity.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalActivity.java
@@ -14,7 +14,6 @@
 
 package android.accessibilityservice.cts;
 
-import android.app.Activity;
 import android.os.Bundle;
 
 import com.android.cts.accessibilityservice.R;
@@ -23,7 +22,7 @@
  * Activity for testing the accessibility APIs for traversing the
  * text content of a View at several granularities.
  */
-public class AccessibilityTextTraversalActivity extends Activity {
+public class AccessibilityTextTraversalActivity extends AccessibilityTestActivity {
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
index a53fdea..bdc0cd5 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
@@ -15,6 +15,7 @@
 package android.accessibilityservice.cts;
 
 import android.app.UiAutomation;
+import android.content.pm.PackageManager;
 import android.os.Bundle;
 import android.test.suitebuilder.annotation.MediumTest;
 import android.text.Selection;
@@ -4486,6 +4487,11 @@
 
     @MediumTest
     public void testTextEditingActions() throws Exception {
+        if (!getActivity().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_INPUT_METHODS)) {
+            return;
+        }
+
         final EditText editText = (EditText) getActivity().findViewById(R.id.edit);
         final String textContent = getString(R.string.foo_bar_baz);
 
@@ -4513,7 +4519,7 @@
                 AccessibilityNodeInfo.ACTION_SET_SELECTION, arguments));
 
         // Copy the selected text.
-        text.performAction( AccessibilityNodeInfo.ACTION_COPY);
+        text.performAction(AccessibilityNodeInfo.ACTION_COPY);
 
         // Set selection at the end.
         final int textLength = editText.getText().length();
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityViewTreeReportingActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityViewTreeReportingActivity.java
index 5aaa067..6aa4f44 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityViewTreeReportingActivity.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityViewTreeReportingActivity.java
@@ -14,7 +14,6 @@
 
 package android.accessibilityservice.cts;
 
-import android.app.Activity;
 import android.os.Bundle;
 
 import com.android.cts.accessibilityservice.R;
@@ -26,7 +25,7 @@
  * this activity is for verifying the hierarchical movement of the
  * accessibility focus.
  */
-public class AccessibilityViewTreeReportingActivity extends Activity {
+public class AccessibilityViewTreeReportingActivity extends AccessibilityTestActivity {
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryActivity.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryActivity.java
index 6f72a75..b0cedf6 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryActivity.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryActivity.java
@@ -14,7 +14,6 @@
 
 package android.accessibilityservice.cts;
 
-import android.app.Activity;
 import android.os.Bundle;
 import android.view.View;
 
@@ -26,7 +25,7 @@
  * requesting an action to be performed on a given view from an
  * AccessiiblityService.
  */
-public class AccessibilityWindowQueryActivity extends Activity {
+public class AccessibilityWindowQueryActivity extends AccessibilityTestActivity {
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
index 1632489..492b99b 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
@@ -27,7 +27,6 @@
 import android.accessibilityservice.AccessibilityServiceInfo;
 import android.app.UiAutomation;
 import android.graphics.Rect;
-import android.os.SystemClock;
 import android.test.suitebuilder.annotation.MediumTest;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
@@ -77,9 +76,6 @@
 
             // make list of expected nodes
             List<String> classNameAndTextList = new ArrayList<String>();
-            classNameAndTextList.add("android.widget.FrameLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.FrameLayout");
             classNameAndTextList.add("android.widget.LinearLayout");
             classNameAndTextList.add("android.widget.LinearLayout");
             classNameAndTextList.add("android.widget.LinearLayout");
@@ -94,6 +90,9 @@
             classNameAndTextList.add("android.widget.ButtonB8");
             classNameAndTextList.add("android.widget.ButtonB9");
 
+            String contentViewIdResName = "com.android.cts.accessibilityservice:id/added_content";
+            boolean verifyContent = false;
+
             Queue<AccessibilityNodeInfo> fringe = new LinkedList<AccessibilityNodeInfo>();
             fringe.add(getInstrumentation().getUiAutomation().getRootInActiveWindow());
 
@@ -101,13 +100,20 @@
             while (!fringe.isEmpty()) {
                 AccessibilityNodeInfo current = fringe.poll();
 
-                CharSequence text = current.getText();
-                String receivedClassNameAndText = current.getClassName().toString()
-                    + ((text != null) ? text.toString() : "");
-                String expectedClassNameAndText = classNameAndTextList.remove(0);
+                if (!verifyContent
+                        && contentViewIdResName.equals(current.getViewIdResourceName())) {
+                    verifyContent = true;
+                }
 
-                assertEquals("Did not get the expected node info",
-                        expectedClassNameAndText, receivedClassNameAndText);
+                if (verifyContent) {
+                    CharSequence text = current.getText();
+                    String receivedClassNameAndText = current.getClassName().toString()
+                            + ((text != null) ? text.toString() : "");
+                    String expectedClassNameAndText = classNameAndTextList.remove(0);
+
+                    assertEquals("Did not get the expected node info",
+                            expectedClassNameAndText, receivedClassNameAndText);
+                }
 
                 final int childCount = current.getChildCount();
                 for (int i = 0; i < childCount; i++) {
@@ -327,7 +333,7 @@
                 AccessibilityService.GLOBAL_ACTION_BACK));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
     }
 
     @MediumTest
@@ -336,7 +342,7 @@
                 AccessibilityService.GLOBAL_ACTION_HOME));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
     }
 
     @MediumTest
@@ -346,14 +352,14 @@
                 AccessibilityService.GLOBAL_ACTION_RECENTS));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
 
         // Clean up.
         getInstrumentation().getUiAutomation().performGlobalAction(
                 AccessibilityService.GLOBAL_ACTION_BACK);
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
     }
 
     @MediumTest
@@ -363,14 +369,14 @@
                 AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
 
         // Clean up.
         assertTrue(getInstrumentation().getUiAutomation().performGlobalAction(
                 AccessibilityService.GLOBAL_ACTION_BACK));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
     }
 
     @MediumTest
@@ -380,14 +386,14 @@
                 AccessibilityService.GLOBAL_ACTION_QUICK_SETTINGS));
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
 
         // Clean up.
         getInstrumentation().getUiAutomation().performGlobalAction(
                 AccessibilityService.GLOBAL_ACTION_BACK);
 
         // Sleep a bit so the UI is settles.
-        SystemClock.sleep(3000);
+        waitForIdle();
     }
 
     @MediumTest
@@ -420,61 +426,6 @@
         }
     }
 
-    private void verifyNodesInAppWindow(AccessibilityNodeInfo root) throws Exception {
-        try {
-            AccessibilityServiceInfo info = getInstrumentation().getUiAutomation().getServiceInfo();
-            info.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
-            getInstrumentation().getUiAutomation().setServiceInfo(info);
-
-            root.refresh();
-
-            // make list of expected nodes
-            List<String> classNameAndTextList = new ArrayList<String>();
-            classNameAndTextList.add("android.widget.FrameLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.FrameLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.LinearLayout");
-            classNameAndTextList.add("android.widget.ButtonB1");
-            classNameAndTextList.add("android.widget.ButtonB2");
-            classNameAndTextList.add("android.widget.ButtonB3");
-            classNameAndTextList.add("android.widget.ButtonB4");
-            classNameAndTextList.add("android.widget.ButtonB5");
-            classNameAndTextList.add("android.widget.ButtonB6");
-            classNameAndTextList.add("android.widget.ButtonB7");
-            classNameAndTextList.add("android.widget.ButtonB8");
-            classNameAndTextList.add("android.widget.ButtonB9");
-
-            Queue<AccessibilityNodeInfo> fringe = new LinkedList<AccessibilityNodeInfo>();
-            fringe.add(root);
-
-            // do a BFS traversal and check nodes
-            while (!fringe.isEmpty()) {
-                AccessibilityNodeInfo current = fringe.poll();
-
-                CharSequence text = current.getText();
-                String receivedClassNameAndText = current.getClassName().toString()
-                    + ((text != null) ? text.toString() : "");
-                String expectedClassNameAndText = classNameAndTextList.remove(0);
-
-                assertEquals("Did not get the expected node info",
-                        expectedClassNameAndText, receivedClassNameAndText);
-
-                final int childCount = current.getChildCount();
-                for (int i = 0; i < childCount; i++) {
-                    AccessibilityNodeInfo child = current.getChild(i);
-                    fringe.add(child);
-                }
-            }
-        } finally {
-            AccessibilityServiceInfo info = getInstrumentation().getUiAutomation().getServiceInfo();
-            info.flags &= ~AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
-            getInstrumentation().getUiAutomation().setServiceInfo(info);
-        }
-    }
-
     @Override
     protected void scrubClass(Class<?> testCaseClass) {
         /* intentionally do not scrub */
diff --git a/tests/tests/app/src/android/app/cts/ActionBarActivity.java b/tests/tests/app/src/android/app/cts/ActionBarActivity.java
index 11cee03..dc65cb2 100644
--- a/tests/tests/app/src/android/app/cts/ActionBarActivity.java
+++ b/tests/tests/app/src/android/app/cts/ActionBarActivity.java
@@ -25,6 +25,8 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         ActionBar bar = getActionBar();
-        bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+        if (bar != null) {
+            bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+        }
     }
 }
diff --git a/tests/tests/app/src/android/app/cts/ActionBarTest.java b/tests/tests/app/src/android/app/cts/ActionBarTest.java
index 796cd74..75e7807 100644
--- a/tests/tests/app/src/android/app/cts/ActionBarTest.java
+++ b/tests/tests/app/src/android/app/cts/ActionBarTest.java
@@ -40,6 +40,9 @@
 
     @UiThreadTest
     public void testAddTab() {
+        if (mBar == null) {
+            return;
+        }
         assertEquals(0, mBar.getTabCount());
 
         Tab t1 = createTab("Tab 1");
diff --git a/tests/tests/app/src/android/app/cts/DialogTest.java b/tests/tests/app/src/android/app/cts/DialogTest.java
index fa90494..4f2e197 100644
--- a/tests/tests/app/src/android/app/cts/DialogTest.java
+++ b/tests/tests/app/src/android/app/cts/DialogTest.java
@@ -812,6 +812,7 @@
         assertTrue(d.isShowing());
         assertFalse(mCalledCallback);
         dialogDismiss(d);
+        Thread.sleep(SLEEP_TIME);
         assertTrue(mCalledCallback);
         assertFalse(d.isShowing());
 
diff --git a/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java b/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
index 5c80fd1..c4318d8 100644
--- a/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
+++ b/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
@@ -114,6 +114,9 @@
             assertNotAvailable(PackageManager.FEATURE_CAMERA_FLASH);
             assertNotAvailable(PackageManager.FEATURE_CAMERA_FRONT);
             assertNotAvailable(PackageManager.FEATURE_CAMERA_ANY);
+            assertFalse("Devices supporting external cameras must have a representative camera " +
+                    "connected for testing",
+                    mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL));
         } else {
             assertAvailable(PackageManager.FEATURE_CAMERA_ANY);
             checkFrontCamera();
@@ -234,6 +237,8 @@
                 Sensor.TYPE_STEP_COUNTER);
         assertFeatureForSensor(featuresLeft, PackageManager.FEATURE_SENSOR_STEP_DETECTOR,
                 Sensor.TYPE_STEP_DETECTOR);
+        assertFeatureForSensor(featuresLeft, PackageManager.FEATURE_SENSOR_HEART_RATE,
+                Sensor.TYPE_HEART_RATE);
 
         assertTrue("Assertions need to be added to this test for " + featuresLeft,
                 featuresLeft.isEmpty());
diff --git a/tests/tests/app/src/android/app/cts/WallpaperManagerTest.java b/tests/tests/app/src/android/app/cts/WallpaperManagerTest.java
index fdf3cac..65f89f3 100644
--- a/tests/tests/app/src/android/app/cts/WallpaperManagerTest.java
+++ b/tests/tests/app/src/android/app/cts/WallpaperManagerTest.java
@@ -33,26 +33,37 @@
         mWallpaperManager = WallpaperManager.getInstance(mContext);
     }
 
+    /**
+     * Suggesting desired dimensions is only a hint to the system that can be ignored.
+     *
+     * Test if the desired minimum width or height the WallpaperManager returns
+     * is greater than 0. If so, then we check whether that the size is at least the
+     * as big as the screen.
+     */
     public void testSuggestDesiredDimensions() {
-        Point min = getScreenSize();
-        int w = min.x * 3;
-        int h = min.y * 2;
+        final Point min = getScreenSize();
+        final int w = min.x * 3;
+        final int h = min.y * 2;
 
-        mWallpaperManager.suggestDesiredDimensions(min.x / 2, min.y / 2);
-        assertEquals(min.x, mWallpaperManager.getDesiredMinimumWidth());
-        assertEquals(min.y, mWallpaperManager.getDesiredMinimumHeight());
+        assertDesiredMinimum(new Point(min.x / 2, min.y / 2), min);
 
-        mWallpaperManager.suggestDesiredDimensions(w, h);
-        assertEquals(w, mWallpaperManager.getDesiredMinimumWidth());
-        assertEquals(h, mWallpaperManager.getDesiredMinimumHeight());
+        assertDesiredMinimum(new Point(w, h),
+                             new Point(w, h));
 
-        mWallpaperManager.suggestDesiredDimensions(min.x / 2, h);
-        assertEquals(min.x, mWallpaperManager.getDesiredMinimumWidth());
-        assertEquals(h, mWallpaperManager.getDesiredMinimumHeight());
+        assertDesiredMinimum(new Point(min.x / 2, h),
+                             new Point(min.x, h));
 
-        mWallpaperManager.suggestDesiredDimensions(w, min.y / 2);
-        assertEquals(w, mWallpaperManager.getDesiredMinimumWidth());
-        assertEquals(min.y, mWallpaperManager.getDesiredMinimumHeight());
+        assertDesiredMinimum(new Point(w, min.y / 2),
+                             new Point(w, min.y));
+    }
+
+    private void assertDesiredMinimum(Point suggestedSize, Point expectedSize) {
+        mWallpaperManager.suggestDesiredDimensions(suggestedSize.x, suggestedSize.y);
+        Point actualSize = new Point(mWallpaperManager.getDesiredMinimumWidth(),
+                mWallpaperManager.getDesiredMinimumHeight());
+        if (actualSize.x > 0 || actualSize.y > 0) {
+            assertEquals(expectedSize, actualSize);
+        }
     }
 
     private Point getScreenSize() {
diff --git a/tests/tests/bionic/bionic-unit-tests-cts_list.txt b/tests/tests/bionic/bionic-unit-tests-cts_list.txt
index 55daff5..370bb9e 100644
--- a/tests/tests/bionic/bionic-unit-tests-cts_list.txt
+++ b/tests/tests/bionic/bionic-unit-tests-cts_list.txt
@@ -448,7 +448,7 @@
   pthread_no_op_detach_after_join
   pthread_join_self
   pthread_sigmask
-  __pthread_clone
+  __bionic_clone
   pthread_setname_np__too_long
   pthread_setname_np__self
   pthread_setname_np__other
diff --git a/tests/tests/content/src/android/content/cts/IntentTest.java b/tests/tests/content/src/android/content/cts/IntentTest.java
index 562c915..d7bf6f4 100644
--- a/tests/tests/content/src/android/content/cts/IntentTest.java
+++ b/tests/tests/content/src/android/content/cts/IntentTest.java
@@ -17,10 +17,8 @@
 package android.content.cts;
 
 import com.android.internal.app.ResolverActivity;
-import com.android.internal.util.Objects;
 import com.android.internal.util.XmlUtils;
 
-
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
diff --git a/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java b/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
index 35584bb..2354926 100644
--- a/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
+++ b/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
@@ -16,10 +16,6 @@
 
 package android.content.cts;
 
-import com.android.cts.stub.R;
-
-import dalvik.annotation.BrokenTest;
-
 import android.app.QueuedWork;
 import android.content.Context;
 import android.content.ContextWrapper;
@@ -28,7 +24,6 @@
 import android.preference.PreferenceManager;
 import android.test.AndroidTestCase;
 import android.util.Log;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -93,6 +88,19 @@
         assertEquals("default", prefs.getString(key, "default"));
     }
 
+    public void testPutNullRemovesKey() {
+        SharedPreferences prefs = getPrefs();
+        prefs.edit().putString("test-key", "test-value").commit();
+        assertEquals("test-value", prefs.getString("test-key", null));
+
+        SharedPreferences.Editor editor = prefs.edit().putString("test-key", null);
+        assertEquals("test-value", prefs.getString("test-key", null));
+        editor.commit();
+
+        assertNull(prefs.getString("test-key", null));
+        assertFalse(prefs.contains("test-key"));
+    }
+
     private abstract class RedundantWriteTest {
         // Do some initial operation on editor.  No commit needed.
         public abstract void setUp(SharedPreferences.Editor editor);
diff --git a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
index 11bc15c..f2f859a 100644
--- a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
+++ b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
@@ -124,6 +124,7 @@
         Display display = virtualDisplay.getDisplay();
         try {
             assertDisplayRegistered(display, Display.FLAG_PRIVATE);
+            assertEquals(mSurface, virtualDisplay.getSurface());
 
             // Show a private presentation on the display.
             assertDisplayCanShowPresentation("private presentation window",
@@ -148,6 +149,7 @@
         Display display = virtualDisplay.getDisplay();
         try {
             assertDisplayRegistered(display, Display.FLAG_PRIVATE | Display.FLAG_PRESENTATION);
+            assertEquals(mSurface, virtualDisplay.getSurface());
 
             // Show a private presentation on the display.
             assertDisplayCanShowPresentation("private presentation window",
@@ -159,6 +161,38 @@
         assertDisplayUnregistered(display);
     }
 
+    /**
+     * Ensures that an application can create a private virtual display and show
+     * its own windows on it where the surface is attached or detached dynamically.
+     */
+    public void testPrivateVirtualDisplayWithDynamicSurface() throws Exception {
+        VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
+                WIDTH, HEIGHT, DENSITY, null, 0);
+        assertNotNull("virtual display must not be null", virtualDisplay);
+
+        Display display = virtualDisplay.getDisplay();
+        try {
+            assertDisplayRegistered(display, Display.FLAG_PRIVATE);
+            assertNull(virtualDisplay.getSurface());
+
+            // Attach the surface.
+            virtualDisplay.setSurface(mSurface);
+            assertEquals(mSurface, virtualDisplay.getSurface());
+
+            // Show a private presentation on the display.
+            assertDisplayCanShowPresentation("private presentation window",
+                    display, BLUEISH,
+                    WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION, 0);
+
+            // Detach the surface.
+            virtualDisplay.setSurface(null);
+            assertNull(virtualDisplay.getSurface());
+        } finally {
+            virtualDisplay.release();
+        }
+        assertDisplayUnregistered(display);
+    }
+
     private void assertDisplayRegistered(Display display, int flags) {
         assertNotNull("display object must not be null", display);
         assertTrue("display must be valid", display.isValid());
diff --git a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
index 572c3f4..fafce61 100644
--- a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
 import android.test.ActivityInstrumentationTestCase2;
 import android.util.DisplayMetrics;
 import android.view.Display;
@@ -49,6 +50,12 @@
         if (aspectRatio >= 1.333 && aspectRatio <= 1.86) {
             return;
         }
+        if (getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+            // Watch allows for a different set of aspect ratios.
+            if (aspectRatio >= 1.0 && aspectRatio <= 1.86) {
+                return;
+            }
+        }
         fail("Aspect ratio was not between 1.333 and 1.86: " + aspectRatio);
     }
 
diff --git a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
index 4ecabc5..e2f75c6 100644
--- a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
@@ -17,6 +17,7 @@
 package android.dpi.cts;
 
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.test.AndroidTestCase;
 import android.util.DisplayMetrics;
 import android.view.Display;
@@ -40,8 +41,13 @@
         double xInches = (double) metrics.widthPixels / metrics.xdpi;
         double yInches = (double) metrics.heightPixels / metrics.ydpi;
         double diagonalInches = Math.sqrt(Math.pow(xInches, 2) + Math.pow(yInches, 2));
-        assertTrue("Screen diagonal must be at least 2.5 inches: " + diagonalInches,
-                diagonalInches >= 2.5d);
+        double minSize = 2.5d;
+        if (getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+            // Watches have a different minimum diagonal.
+            minSize = 1.0d;
+        }
+        assertTrue("Screen diagonal must be at least " + minSize + " inches: " + diagonalInches,
+                diagonalInches >= minSize);
 
         double density = 160.0d * metrics.density;
         assertTrue("Screen density must be at least 100 dpi: " + density, density >= 100.0d);
diff --git a/tests/tests/graphics/src/android/graphics/cts/BitmapFactoryTest.java b/tests/tests/graphics/src/android/graphics/cts/BitmapFactoryTest.java
index 6c63783..a80d2e2 100644
--- a/tests/tests/graphics/src/android/graphics/cts/BitmapFactoryTest.java
+++ b/tests/tests/graphics/src/android/graphics/cts/BitmapFactoryTest.java
@@ -39,6 +39,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.io.RandomAccessFile;
 
 public class BitmapFactoryTest extends InstrumentationTestCase {
@@ -236,50 +237,6 @@
         assertEquals(START_WIDTH, b.getWidth());
     }
 
-    public void testDecodeFileDescriptor3() throws IOException {
-        // Arbitrary offsets to use. If the offset of the FD matches the offset of the image,
-        // decoding should succeed, but if they do not match, decoding should fail.
-        long ACTUAL_OFFSETS[] = new long[] { 0, 17 };
-        for (int RES_ID : RES_IDS) {
-            for (int j = 0; j < ACTUAL_OFFSETS.length; ++j) {
-                // FIXME: The purgeable test should attempt to purge the memory
-                // to force a re-decode.
-                for (boolean TEST_PURGEABLE : new boolean[] { false, true }) {
-                    BitmapFactory.Options opts = new BitmapFactory.Options();
-                    opts.inPurgeable = TEST_PURGEABLE;
-                    opts.inInputShareable = TEST_PURGEABLE;
-
-                    long actualOffset = ACTUAL_OFFSETS[j];
-                    String path = obtainPath(RES_ID, actualOffset);
-                    RandomAccessFile file = new RandomAccessFile(path, "r");
-                    FileDescriptor fd = file.getFD();
-                    assertTrue(fd.valid());
-
-                    // Set the offset to ACTUAL_OFFSET
-                    file.seek(actualOffset);
-                    assertEquals(file.getFilePointer(), actualOffset);
-
-                    // Now decode. This should be successful and leave the offset
-                    // unchanged.
-                    Bitmap b = BitmapFactory.decodeFileDescriptor(fd, null, opts);
-                    assertNotNull(b);
-                    assertEquals(file.getFilePointer(), actualOffset);
-
-                    // Now use the other offset. It should fail to decode, and
-                    // the offset should remain unchanged.
-                    long otherOffset = ACTUAL_OFFSETS[(j + 1) % ACTUAL_OFFSETS.length];
-                    assertFalse(otherOffset == actualOffset);
-                    file.seek(otherOffset);
-                    assertEquals(file.getFilePointer(), otherOffset);
-
-                    b = BitmapFactory.decodeFileDescriptor(fd, null, opts);
-                    assertNull(b);
-                    assertEquals(file.getFilePointer(), otherOffset);
-                }
-            }
-        }
-    }
-
     public void testDecodeFile1() throws IOException {
         Bitmap b = BitmapFactory.decodeFile(obtainPath(), mOpt1);
         assertNotNull(b);
@@ -507,32 +464,17 @@
     }
 
     private String obtainPath() throws IOException {
-        return obtainPath(R.drawable.start, 0);
-    }
-
-    /*
-     * Create a new file and return a path to it.
-     * @param resId Original file. It will be copied into the new file.
-     * @param offset Number of zeroes to write to the new file before the
-     *               copied file. This allows testing decodeFileDescriptor
-     *               with an offset. Must be less than or equal to 1024
-     */
-    private String obtainPath(int resId, long offset) throws IOException {
         File dir = getInstrumentation().getTargetContext().getFilesDir();
         dir.mkdirs();
-        // The suffix does not necessarily represent theactual file type.
         File file = new File(dir, "test.jpg");
         if (!file.createNewFile()) {
             if (!file.exists()) {
                 fail("Failed to create new File!");
             }
         }
-        InputStream is = obtainInputStream(resId);
+        InputStream is = obtainInputStream();
         FileOutputStream fOutput = new FileOutputStream(file);
         byte[] dataBuffer = new byte[1024];
-        // Write a bunch of zeroes before the image.
-        assertTrue(offset <= 1024);
-        fOutput.write(dataBuffer, 0, (int) offset);
         int readLength = 0;
         while ((readLength = is.read(dataBuffer)) != -1) {
             fOutput.write(dataBuffer, 0, readLength);
diff --git a/tests/tests/hardware/src/android/hardware/cts/CameraTest.java b/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
index f877d8b..c6e28f7 100644
--- a/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
@@ -16,6 +16,7 @@
 
 package android.hardware.cts;
 
+import android.content.pm.PackageManager;
 import android.graphics.BitmapFactory;
 import android.graphics.ImageFormat;
 import android.graphics.Rect;
@@ -1571,20 +1572,9 @@
         PreviewCbForPreviewPictureSizesCombination callback =
             new PreviewCbForPreviewPictureSizesCombination();
 
-        // Test combination of preview sizes and picture sizes. Pick four of each to test.
-        // Do not test all combinations because it will timeout. Four is just a small number
-        // and the test will not timeout.
-        List<Size> previewSizes = parameters.getSupportedPreviewSizes();
-        List<Size> pictureSizes = parameters.getSupportedPictureSizes();
-        int previewSizeTestCount = Math.min(previewSizes.size(), 4);
-        int pictureSizeTestCount = Math.min(pictureSizes.size(), 4);
-        // Calculate the step so that the first one and the last one are always tested.
-        float previewSizeIndexStep = (float) (previewSizes.size() - 1) / (previewSizeTestCount - 1);
-        float pictureSizeIndexStep = (float) (pictureSizes.size() - 1) / (pictureSizeTestCount - 1);
-        for (int i = 0; i < previewSizeTestCount; i++) {
-            for (int j = 0; j < pictureSizeTestCount; j++) {
-                Size previewSize = previewSizes.get(Math.round(previewSizeIndexStep * i));
-                Size pictureSize = pictureSizes.get(Math.round(pictureSizeIndexStep * j));
+        // Test all combination of preview sizes and picture sizes.
+        for (Size previewSize: parameters.getSupportedPreviewSizes()) {
+            for (Size pictureSize: parameters.getSupportedPictureSizes()) {
                 Log.v(TAG, "Test previewSize=(" + previewSize.width + "," +
                         previewSize.height + ") pictureSize=(" +
                         pictureSize.width + "," + pictureSize.height + ")");
@@ -2949,4 +2939,23 @@
         terminateMessageLooper();
     }
 
+    public void testCameraExternalConnected() {
+        if (getActivity().getPackageManager().
+                hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL) ) {
+            int nCameras = Camera.getNumberOfCameras();
+            assertTrue("Devices with external camera support must have a camera connected for " +
+                    "testing",
+                    nCameras > 0);
+            for (int id = 0; id < nCameras; id++) {
+                try {
+                    Camera c = Camera.open(id);
+                    c.release();
+                } catch (Throwable e) {
+                    throw new AssertionError("Devices with external camera support must " +
+                            "have all listed cameras be connected and openable for testing", e);
+                }
+            }
+        }
+    }
+
 }
diff --git a/tests/tests/hardware/src/android/hardware/cts/SensorTest.java b/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
index 24dd368..b1691c3 100644
--- a/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
@@ -33,13 +34,21 @@
 import android.hardware.TriggerEventListener;
 import android.os.Handler;
 import android.os.HandlerThread;
+import android.os.PowerManager;
 import android.test.AndroidTestCase;
+import android.util.Log;
 
 public class SensorTest extends AndroidTestCase {
     private SensorManager mSensorManager;
     private TriggerListener mTriggerListener;
     private SensorListener mSensorListener;
-    private ArrayList<Sensor> mContinuousSensorList;
+    private List<Sensor> mSensorList;
+    private static final String TAG = "SensorTest";
+    // Test only SDK defined sensors. Any sensors with type > 100 are ignored.
+    private static final int MAX_SENSOR_TYPE = 100;
+    private static final int TIMEOUT_S = 40;
+
+    private PowerManager.WakeLock mWakeLock;
 
     @Override
     protected void setUp() throws Exception {
@@ -47,18 +56,9 @@
         mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);
         mTriggerListener = new TriggerListener();
         mSensorListener = new SensorListener();
-        mContinuousSensorList = new ArrayList<Sensor>();
-        for (int i = Sensor.TYPE_ACCELEROMETER; i <= Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR; ++i) {
-            Sensor sensor = mSensorManager.getDefaultSensor(i);
-            // Skip all non-continuous mode sensors.
-            if (sensor == null || Sensor.TYPE_SIGNIFICANT_MOTION == i ||
-                Sensor.TYPE_STEP_COUNTER == i || Sensor.TYPE_STEP_DETECTOR == i ||
-                Sensor.TYPE_LIGHT == i || Sensor.TYPE_PROXIMITY == i ||
-                Sensor.TYPE_AMBIENT_TEMPERATURE == i) {
-                continue;
-            }
-            mContinuousSensorList.add(sensor);
-        }
+        mSensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL);
+        PowerManager pm = (PowerManager) getContext().getSystemService(Context.POWER_SERVICE);
+        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
     }
 
     public void testSensorOperations() {
@@ -79,7 +79,7 @@
 
         sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);
         boolean hasStepCounter = getContext().getPackageManager().hasSystemFeature(
-                                        PackageManager.FEATURE_SENSOR_STEP_COUNTER);
+                PackageManager.FEATURE_SENSOR_STEP_COUNTER);
         // stepcounter sensor is optional
         if (hasStepCounter) {
             assertEquals(Sensor.TYPE_STEP_COUNTER, sensor.getType());
@@ -90,7 +90,7 @@
 
         sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR);
         boolean hasStepDetector = getContext().getPackageManager().hasSystemFeature(
-                                        PackageManager.FEATURE_SENSOR_STEP_DETECTOR);
+                PackageManager.FEATURE_SENSOR_STEP_DETECTOR);
         // stepdetector sensor is optional
         if (hasStepDetector) {
             assertEquals(Sensor.TYPE_STEP_DETECTOR, sensor.getType());
@@ -99,6 +99,17 @@
             assertNull(sensor);
         }
 
+        sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE);
+        boolean hasHeartRate = getContext().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_SENSOR_HEART_RATE);
+        // heartrate sensor is optional
+        if (hasHeartRate) {
+            assertEquals(Sensor.TYPE_HEART_RATE, sensor.getType());
+            assertSensorValues(sensor);
+        } else {
+            assertNull(sensor);
+        }
+
         sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
         boolean hasCompass = getContext().getPackageManager().hasSystemFeature(
                 PackageManager.FEATURE_SENSOR_COMPASS);
@@ -178,76 +189,91 @@
     // Register for updates from each continuous mode sensor, wait for 25 events, call flush and
     // wait for flushCompleteEvent before unregistering for the sensor.
     public void testBatchAndFlush() throws Exception {
-        for (Sensor sensor : mContinuousSensorList) {
-            final CountDownLatch eventReceived = new CountDownLatch(25);
-            final CountDownLatch flushReceived = new CountDownLatch(1);
-            SensorEventListener2 listener = new SensorEventListener2() {
-                @Override
-                public void onSensorChanged(SensorEvent event) {
-                    eventReceived.countDown();
+        try {
+            mWakeLock.acquire();
+            for (Sensor sensor : mSensorList) {
+                // Skip OEM defined sensors and trigger sensors.
+                if (sensor.getType() > MAX_SENSOR_TYPE || sensor.getMinDelay() < 0) {
+                    continue;
                 }
-
-                @Override
-                public void onAccuracyChanged(Sensor sensor, int accuracy) {
-                }
-
-                @Override
-                public void onFlushCompleted(Sensor sensor) {
-                    flushReceived.countDown();
-                }
-            };
-            boolean result = mSensorManager.registerListener(listener, sensor,
-                                            SensorManager.SENSOR_DELAY_NORMAL, 10000000);
-            assertTrue(result);
-            // Wait for 25 events and call flush.
-            eventReceived.await();
-            result = mSensorManager.flush(listener);
-            assertTrue(result);
-            flushReceived.await();
-            mSensorManager.unregisterListener(listener);
+                registerListenerCallFlush(sensor, null);
+            }
+        } finally {
+            mWakeLock.release();
         }
     }
 
     // Same as testBatchAndFlush but using Handler version of the API to register for sensors.
     // onSensorChanged is now called on a background thread.
     public void testBatchAndFlushWithHandler() throws Exception {
-        for (Sensor sensor : mContinuousSensorList) {
-            final CountDownLatch eventReceived = new CountDownLatch(25);
-            final CountDownLatch flushReceived = new CountDownLatch(1);
-            SensorEventListener2 listener = new SensorEventListener2() {
-                @Override
-                public void onSensorChanged(SensorEvent event) {
-                    eventReceived.countDown();
-                }
-
-                @Override
-                public void onAccuracyChanged(Sensor sensor, int accuracy) {
-                }
-
-                @Override
-                public void onFlushCompleted(Sensor sensor) {
-                    flushReceived.countDown();
-                }
-            };
+        try {
+            mWakeLock.acquire();
             HandlerThread handlerThread = new HandlerThread("sensorThread");
             handlerThread.start();
             Handler handler = new Handler(handlerThread.getLooper());
-            boolean result = mSensorManager.registerListener(listener, sensor,
-                                            SensorManager.SENSOR_DELAY_NORMAL, 15000000,
-                                            handler);
-            assertTrue(result);
-            // Wait for 25 events and call flush.
-            eventReceived.await();
-            result = mSensorManager.flush(listener);
-            assertTrue(result);
-            flushReceived.await();
-            mSensorManager.unregisterListener(listener);
+            for (Sensor sensor : mSensorList) {
+                // Skip OEM defined sensors and trigger sensors.
+                if (sensor.getType() > MAX_SENSOR_TYPE || sensor.getMinDelay() < 0) {
+                    continue;
+                }
+                registerListenerCallFlush(sensor, handler);
+            }
+        }  finally {
+            mWakeLock.release();
         }
     }
 
+    private void registerListenerCallFlush(Sensor sensor, Handler handler)
+            throws InterruptedException {
+        final CountDownLatch eventReceived = new CountDownLatch(25);
+        final CountDownLatch flushReceived = new CountDownLatch(1);
+        SensorEventListener2 listener = new SensorEventListener2() {
+            @Override
+            public void onSensorChanged(SensorEvent event) {
+                eventReceived.countDown();
+            }
+
+            @Override
+            public void onAccuracyChanged(Sensor sensor, int accuracy) {
+            }
+
+            @Override
+            public void onFlushCompleted(Sensor sensor) {
+                flushReceived.countDown();
+            }
+        };
+        // Consider only continuous mode sensors for testing registerListener.
+        // For on-change sensors, call registerListener() so that the listener is associated
+        // with the sensor and flush(listener) can be called on it.
+        if (sensor.getMinDelay() >= 0) {
+            Log.i(TAG, "testBatch " + sensor.getName());
+            boolean result = mSensorManager.registerListener(listener, sensor,
+                    SensorManager.SENSOR_DELAY_NORMAL, 10000000, handler);
+            assertTrue("registerListener failed " + sensor.getName(), result);
+            // Wait for 25 events or 40 seconds only for continuous mode sensors.
+            if (sensor.getMinDelay() > 0) {
+                boolean countZero = eventReceived.await(TIMEOUT_S, TimeUnit.SECONDS);
+                if (!countZero) {
+                    fail("Timed out waiting for events from " + sensor.getName());
+                }
+            }
+        }
+
+        Log.i(TAG, "testFlush " + sensor.getName());
+        boolean result = mSensorManager.flush(listener);
+        assertTrue("flush failed " + sensor.getName(), result);
+        boolean countZero = flushReceived.await(TIMEOUT_S, TimeUnit.SECONDS);
+        if (!countZero) {
+            fail("Timed out waiting for flushCompleteEvent from " + sensor.getName());
+        }
+        mSensorManager.unregisterListener(listener);
+        Log.i(TAG, "testBatchAndFlush pass " + sensor.getName());
+    }
+
     // Call registerListener for multiple sensors at a time and call flush.
     public void testBatchAndFlushWithMutipleSensors() throws Exception {
-        int numSensors = mContinuousSensorList.size() < 3 ? mContinuousSensorList.size() : 3;
+        final int MAX_SENSORS = 3;
+        int numSensors = mSensorList.size() < MAX_SENSORS ? mSensorList.size() : MAX_SENSORS;
         if (numSensors == 0) {
             return;
         }
@@ -268,18 +294,46 @@
                 flushReceived.countDown();
             }
         };
-        for (int i = 0; i < numSensors; ++i) {
-            Sensor sensor = mContinuousSensorList.get(i);
-            boolean result = mSensorManager.registerListener(listener, sensor,
-                                            SensorManager.SENSOR_DELAY_FASTEST);
-            assertTrue(result);
+
+        try {
+            mWakeLock.acquire();
+            StringBuilder registeredSensors = new StringBuilder(30);
+            for (Sensor sensor : mSensorList) {
+                // Skip all non-continuous sensors.
+                if (sensor.getMinDelay() <= 0 || sensor.getType() > MAX_SENSOR_TYPE) {
+                    continue;
+                }
+                boolean result = mSensorManager.registerListener(listener, sensor,
+                        SensorManager.SENSOR_DELAY_GAME, 10000000);
+                assertTrue("registerListener failed for " + sensor.getName(), result);
+                registeredSensors.append(sensor.getName());
+                registeredSensors.append(" ");
+                if (--numSensors == 0) {
+                    break;
+                }
+            }
+            if (registeredSensors.toString().isEmpty()) {
+                return;
+            }
+
+            Log.i(TAG, "testBatchAndFlushWithMutipleSensors " + registeredSensors);
+            // Wait for numSensors * 50 events or 40 seconds.
+            boolean countZero = eventReceived.await(TIMEOUT_S, TimeUnit.SECONDS);
+            if (!countZero) {
+                fail("Timed out waiting for events from " + registeredSensors.toString());
+            }
+            boolean result = mSensorManager.flush(listener);
+            assertTrue("flush failed " + registeredSensors.toString(), result);
+            countZero = flushReceived.await(TIMEOUT_S, TimeUnit.SECONDS);
+            if (!countZero) {
+                fail("Timed out waiting for flushCompleteEvent from " +
+                      registeredSensors.toString());
+            }
+            mSensorManager.unregisterListener(listener);
+            Log.i(TAG, "testBatchAndFlushWithMutipleSensors passed");
+        } finally {
+            mWakeLock.release();
         }
-        // Wait for N events and call flush.
-        eventReceived.await();
-        boolean result = mSensorManager.flush(listener);
-        assertTrue(result);
-        flushReceived.await();
-        mSensorManager.unregisterListener(listener);
     }
 
     private void assertSensorValues(Sensor sensor) {
diff --git a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyPairGeneratorTest.java b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyPairGeneratorTest.java
index 9127984..284ac83 100644
--- a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyPairGeneratorTest.java
+++ b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyPairGeneratorTest.java
@@ -484,16 +484,15 @@
             final X509Certificate x509userCert) throws Exception {
         // TODO this should probably be in something like:
         // TestKeyStore.createForClientSelfSigned(...)
-        String provider = SSLContext.getDefault().getProvider().getName();
         TrustManager[] clientTrustManagers = TestKeyStore.createTrustManagers(
                 TestKeyStore.getIntermediateCa().keyStore);
-        SSLContext clientContext = TestSSLContext.createSSLContext("TLS", provider,
+        SSLContext clientContext = TestSSLContext.createSSLContext("TLS",
                 new KeyManager[] {
                     TestKeyManager.wrap(new MyKeyManager(privKey, x509userCert))
                 }, clientTrustManagers);
         TestKeyStore serverKeyStore = TestKeyStore.getServer();
         serverKeyStore.keyStore.setCertificateEntry("client-selfSigned", x509userCert);
-        SSLContext serverContext = TestSSLContext.createSSLContext("TLS", provider,
+        SSLContext serverContext = TestSSLContext.createSSLContext("TLS",
                 serverKeyStore.keyManagers,
                 TestKeyStore.createTrustManagers(serverKeyStore.keyStore));
         SSLServerSocket serverSocket = (SSLServerSocket) serverContext.getServerSocketFactory()
diff --git a/tests/tests/location/src/android/location/cts/LocationManagerTest.java b/tests/tests/location/src/android/location/cts/LocationManagerTest.java
index 8028422..64b15dc 100644
--- a/tests/tests/location/src/android/location/cts/LocationManagerTest.java
+++ b/tests/tests/location/src/android/location/cts/LocationManagerTest.java
@@ -267,40 +267,66 @@
      */
     public void testModeAndProviderApisConsistent() {
         ContentResolver cr = mContext.getContentResolver();
+
+        // Find out what the settings say about which providers are enabled
         int mode = Settings.Secure.getInt(
                 cr, Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
         boolean gps = Settings.Secure.isLocationProviderEnabled(cr, LocationManager.GPS_PROVIDER);
         boolean nlp = Settings.Secure.isLocationProviderEnabled(
                 cr, LocationManager.NETWORK_PROVIDER);
 
-        // Assert that if there are no test providers enabled, LocationManager just returns the
-        // values from Settings.Secure.
+        // Find out location manager's opinion on the matter, making sure we dont' get spurious
+        // results from test versions of the two providers.
         forceClearTestProvider(LocationManager.GPS_PROVIDER);
         forceClearTestProvider(LocationManager.NETWORK_PROVIDER);
         boolean lmGps = mManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
         boolean lmNlp = mManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
-        assertEquals("Inconsistent GPS values", gps, lmGps);
-        assertEquals("Inconsistent NLP values", nlp, lmNlp);
 
-        // Assert that isLocationProviderEnabled() values are consistent with the location mode
+        // Location Manager will report provider as off if it doesn't know about it
+        boolean expectedGps = gps && deviceHasProvider(LocationManager.GPS_PROVIDER);
+        boolean expectedNlp = nlp && deviceHasProvider(LocationManager.NETWORK_PROVIDER);
+
+        // Assert LocationManager returned the values from Settings.Secure (assuming the device has
+        // the appropriate hardware).
+        assertEquals("Inconsistent GPS values", expectedGps, lmGps);
+        assertEquals("Inconsistent NLP values", expectedNlp, lmNlp);
+
         switch (mode) {
             case Settings.Secure.LOCATION_MODE_OFF:
-                assertFalse("Bad GPS for mode " + mode, gps);
-                assertFalse("Bad NLP for mode " + mode, nlp);
+                expectedGps = false;
+                expectedNlp = false;
                 break;
             case Settings.Secure.LOCATION_MODE_SENSORS_ONLY:
-                assertEquals("Bad GPS for mode " + mode, hasGpsFeature(), gps);
-                assertFalse("Bad NLP for mode " + mode, nlp);
+                expectedGps = true;
+                expectedNlp = false;
                 break;
             case Settings.Secure.LOCATION_MODE_BATTERY_SAVING:
-                assertFalse("Bad GPS for mode " + mode, gps);
-                assertTrue("Bad NLP for mode " + mode, nlp);
+                expectedGps = false;
+                expectedNlp = true;
                 break;
             case Settings.Secure.LOCATION_MODE_HIGH_ACCURACY:
-                assertEquals("Bad GPS for mode " + mode, hasGpsFeature(), gps);
-                assertTrue("Bad NLP for mode " + mode, nlp);
+                expectedGps = true;
+                expectedNlp = true;
                 break;
         }
+
+        // Assert that isLocationProviderEnabled() values are consistent with the location mode
+        assertEquals("Bad GPS for mode " + mode, expectedGps, gps);
+        assertEquals("Bad NLP for mode " + mode, expectedNlp, nlp);
+    }
+
+    /**
+     * Returns true if the {@link LocationManager} reports that the device includes this flavor
+     * of location provider.
+     */
+    private boolean deviceHasProvider(String provider) {
+        List<String> providers = mManager.getAllProviders();
+        for (String aProvider : providers) {
+            if (aProvider.equals(provider)) {
+                return true;
+            }
+        }
+        return false;
     }
 
     /**
@@ -413,7 +439,7 @@
                     // run the update location test logic to ensure location updates can be injected
                     doLocationUpdatesWithLocationListener(providerName);
                 } finally {
-                    removeTestProvider(providerName);
+                    mManager.removeTestProvider(providerName);
                 }
             }
         }
@@ -825,7 +851,7 @@
     }
 
     private void unmockFusedLocation() {
-        removeTestProvider(FUSED_PROVIDER_NAME);
+        mManager.removeTestProvider(FUSED_PROVIDER_NAME);
     }
 
     /**
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/res/raw/video_480x360_mp4_h264_500kbps_25fps_aac_stereo_128kbps_44100hz_id3v2.mp4 b/tests/tests/media/res/raw/video_480x360_mp4_h264_500kbps_25fps_aac_stereo_128kbps_44100hz_id3v2.mp4
new file mode 100644
index 0000000..0902533
--- /dev/null
+++ b/tests/tests/media/res/raw/video_480x360_mp4_h264_500kbps_25fps_aac_stereo_128kbps_44100hz_id3v2.mp4
Binary files differ
diff --git a/tests/tests/media/src/android/media/cts/AdaptivePlaybackTest.java b/tests/tests/media/src/android/media/cts/AdaptivePlaybackTest.java
index 1747afa..13852ae 100644
--- a/tests/tests/media/src/android/media/cts/AdaptivePlaybackTest.java
+++ b/tests/tests/media/src/android/media/cts/AdaptivePlaybackTest.java
@@ -1275,11 +1275,13 @@
 
             /* test if the explicitly named codec is present on the system */
             if (explicitCodecName != null) {
-                MediaCodec codec = MediaCodec.createByCodecName(explicitCodecName);
-                if (codec != null) {
-                    codec.release();
-                    add(new Codec(explicitCodecName, null, mediaList));
-                }
+                try {
+                    MediaCodec codec = MediaCodec.createByCodecName(explicitCodecName);
+                    if (codec != null) {
+                        codec.release();
+                        add(new Codec(explicitCodecName, null, mediaList));
+                    }
+                } catch (Exception e) {}
             }
         } catch (Throwable t) {
             Log.wtf("Constructor failed", t);
diff --git a/tests/tests/media/src/android/media/cts/DecoderTest.java b/tests/tests/media/src/android/media/cts/DecoderTest.java
index 65f16b1..f250c3d 100644
--- a/tests/tests/media/src/android/media/cts/DecoderTest.java
+++ b/tests/tests/media/src/android/media/cts/DecoderTest.java
@@ -981,7 +981,7 @@
         CRC32 crc = new CRC32();
         int pos = buf.position();
         buf.rewind();
-        for (int i = 0; i < buf.capacity(); i++) {
+        for (int i = 0; i < size; i++) {
             crc.update(buf.get());
         }
         buf.position(pos);
diff --git a/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java b/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java
index 445814e..6f1faf6 100644
--- a/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java
@@ -261,6 +261,7 @@
             // Create a MediaCodec for the decoder, just based on the MIME type.  The various
             // format details will be passed through the csd-0 meta-data later on.
             decoder = MediaCodec.createDecoderByType(MIME_TYPE);
+            if (VERBOSE) Log.d(TAG, "got decoder: " + decoder.getName());
 
             doEncodeDecodeVideoFromBuffer(encoder, colorFormat, decoder, toSurface);
         } finally {
@@ -321,7 +322,7 @@
             // Create a MediaCodec for the decoder, just based on the MIME type.  The various
             // format details will be passed through the csd-0 meta-data later on.
             decoder = MediaCodec.createDecoderByType(MIME_TYPE);
-            MediaFormat decoderFormat = MediaFormat.createVideoFormat(MIME_TYPE, mWidth, mHeight);
+            if (VERBOSE) Log.d(TAG, "got decoder: " + decoder.getName());
             decoder.configure(format, outputSurface.getSurface(), null, 0);
             decoder.start();
 
@@ -910,7 +911,7 @@
         // Set to zero.  In YUV this is a dull green.
         Arrays.fill(frameData, (byte) 0);
 
-        int startX, startY, countX, countY;
+        int startX, startY;
 
         frameIndex %= 8;
         //frameIndex = (frameIndex / 8) % 8;    // use this instead for debug -- easier to see
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayTest.java
index fce343e..39c7b77 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayTest.java
@@ -19,6 +19,7 @@
 import android.app.Presentation;
 import android.media.MediaCodec;
 import android.media.MediaCodecInfo;
+import android.media.MediaCodecList;
 import android.media.MediaFormat;
 import android.content.Context;
 import android.graphics.drawable.ColorDrawable;
@@ -150,6 +151,25 @@
         }
     }
 
+    private static boolean hasCodec(String mimeType) {
+        int numCodecs = MediaCodecList.getCodecCount();
+        for (int i = 0; i < numCodecs; i++) {
+            MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
+
+            if (!codecInfo.isEncoder()) {
+                continue;
+            }
+
+            String[] types = codecInfo.getSupportedTypes();
+            for (int j = 0; j < types.length; j++) {
+                if (types[j].equalsIgnoreCase(mimeType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
     /**
      * Prepares the encoder, decoder, and virtual display.
      */
@@ -159,6 +179,11 @@
         OutputSurface outputSurface = null;
         VirtualDisplay virtualDisplay = null;
 
+        // Don't run the test of the codec isn't present.
+        if (!hasCodec(MIME_TYPE)) {
+            return;
+        }
+
         try {
             // Encoded video resolution matches virtual display.
             MediaFormat encoderFormat = MediaFormat.createVideoFormat(MIME_TYPE, WIDTH, HEIGHT);
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
index 8985ddb..369ae6e 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
@@ -138,6 +138,10 @@
     public void testRendering800x480Locally() throws Throwable {
         Log.i(TAG, "testRendering800x480Locally");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         if (maxRes.first >= 800 && maxRes.second >= 480) {
             runTestRenderingInSeparateThread(800, 480, false, false);
         } else {
@@ -148,6 +152,10 @@
     public void testRenderingMaxResolutionLocally() throws Throwable {
         Log.i(TAG, "testRenderingMaxResolutionLocally");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         Log.w(TAG, "Trying resolution w:" + maxRes.first + " h:" + maxRes.second);
         runTestRenderingInSeparateThread(maxRes.first, maxRes.second, false, false);
     }
@@ -155,6 +163,10 @@
     public void testRendering800x480Remotely() throws Throwable {
         Log.i(TAG, "testRendering800x480Remotely");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         if (maxRes.first >= 800 && maxRes.second >= 480) {
             runTestRenderingInSeparateThread(800, 480, true, false);
         } else {
@@ -165,6 +177,10 @@
     public void testRenderingMaxResolutionRemotely() throws Throwable {
         Log.i(TAG, "testRenderingMaxResolutionRemotely");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         Log.w(TAG, "Trying resolution w:" + maxRes.first + " h:" + maxRes.second);
         runTestRenderingInSeparateThread(maxRes.first, maxRes.second, true, false);
     }
@@ -172,6 +188,10 @@
     public void testRendering800x480RemotelyWith3Windows() throws Throwable {
         Log.i(TAG, "testRendering800x480RemotelyWith3Windows");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         if (maxRes.first >= 800 && maxRes.second >= 480) {
             runTestRenderingInSeparateThread(800, 480, true, true);
         } else {
@@ -182,6 +202,10 @@
     public void testRendering800x480LocallyWith3Windows() throws Throwable {
         Log.i(TAG, "testRendering800x480LocallyWith3Windows");
         Pair<Integer, Integer> maxRes = checkMaxConcurrentEncodingDecodingResolution();
+        if (maxRes == null) {
+            Log.i(TAG, "codec not supported, skipping the test");
+            return;
+        }
         if (maxRes.first >= 800 && maxRes.second >= 480) {
             runTestRenderingInSeparateThread(800, 480, false, true);
         } else {
@@ -400,6 +424,10 @@
     private static final int NUM_RENDERING = 10;
     private void doTestVirtualDisplayRecycles(int numDisplays) throws Exception {
         CodecInfo codecInfo = getAvcSupportedFormatInfo();
+        if (codecInfo == null) {
+            Log.i(TAG, "no codec found, skipping");
+            return;
+        }
         VirtualDisplayPresentation[] virtualDisplays = new VirtualDisplayPresentation[numDisplays];
         for (int i = 0; i < NUM_CODEC_CREATION; i++) {
             mCodecConfigReceived = false;
@@ -1326,6 +1354,9 @@
 
     private static CodecInfo getAvcSupportedFormatInfo() {
         MediaCodecInfo mediaCodecInfo = selectCodec(MIME_TYPE);
+        if (mediaCodecInfo == null) {
+            return null;
+        }
         CodecCapabilities cap = mediaCodecInfo.getCapabilitiesForType(MIME_TYPE);
         if (cap == null) { // not supported
             return null;
@@ -1408,6 +1439,9 @@
      */
     private Pair<Integer, Integer> checkMaxConcurrentEncodingDecodingResolution() {
         CodecInfo codecInfo = getAvcSupportedFormatInfo();
+        if (codecInfo == null) {
+            return null;
+        }
         int maxW = codecInfo.mMaxW;
         int maxH = codecInfo.mMaxH;
         if (maxW >= 1920 && maxH >= 1080) {
diff --git a/tests/tests/media/src/android/media/cts/InputSurface.java b/tests/tests/media/src/android/media/cts/InputSurface.java
index 5d72979..157ed88 100644
--- a/tests/tests/media/src/android/media/cts/InputSurface.java
+++ b/tests/tests/media/src/android/media/cts/InputSurface.java
@@ -35,7 +35,6 @@
  */
 class InputSurface {
     private static final String TAG = "InputSurface";
-    private static final boolean VERBOSE = false;
 
     private static final int EGL_RECORDABLE_ANDROID = 0x3142;
 
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java b/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
index 471363f..baf4a2d 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
@@ -35,7 +35,10 @@
     private static final int PLAY_TIME_MS = 30000;
 
     public void testAvcBaseline1() throws Exception {
-        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline,
+        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline)) {
+          return;
+        }
+        if (supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline,
                 CodecProfileLevel.AVCLevel1)) {
             throw new RuntimeException("AVCLevel1 support is required by CDD");
         }
@@ -44,6 +47,9 @@
     }
 
     public void testAvcBaseline12() throws Exception {
+        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline)) {
+            return;
+        }
         if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline,
                 CodecProfileLevel.AVCLevel12)) {
             Log.i(TAG, "AvcBaseline12 not supported");
@@ -60,6 +66,9 @@
     }
 
     public void testAvcBaseline30() throws Exception {
+        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline)) {
+            return;
+        }
         if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileBaseline,
                 CodecProfileLevel.AVCLevel3)) {
             Log.i(TAG, "AvcBaseline30 not supported");
@@ -75,6 +84,9 @@
     }
 
     public void testAvcHigh31() throws Exception {
+        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileHigh)) {
+            return;
+        }
         if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileHigh,
                 CodecProfileLevel.AVCLevel31)) {
             Log.i(TAG, "AvcHigh31 not supported");
@@ -90,6 +102,9 @@
     }
 
     public void testAvcHigh40() throws Exception {
+        if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileHigh)) {
+            return;
+        }
         if (!supports(AVC_MIME, CodecProfileLevel.AVCProfileHigh,
                 CodecProfileLevel.AVCLevel4)) {
             Log.i(TAG, "AvcHigh40 not supported");
@@ -108,7 +123,15 @@
                 + "&key=ik0", 1920, 1080, PLAY_TIME_MS);
     }
 
+    private boolean supports(String mimeType, int profile) {
+        return supports(mimeType, profile, 0, false);
+    }
+
     private boolean supports(String mimeType, int profile, int level) {
+        return supports(mimeType, profile, level, true);
+    }
+
+    private boolean supports(String mimeType, int profile, int level, boolean testLevel) {
         int numCodecs = MediaCodecList.getCodecCount();
         for (int i = 0; i < numCodecs; i++) {
             MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
@@ -116,10 +139,14 @@
                 continue;
             }
 
+            if (!supportsMimeType(codecInfo, mimeType)) {
+                continue;
+            }
+
             CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(mimeType);
             for (CodecProfileLevel profileLevel : capabilities.profileLevels) {
                 if (profileLevel.profile == profile
-                        && profileLevel.level >= level) {
+                        && (!testLevel || profileLevel.level >= level)) {
                     return true;
                 }
             }
@@ -128,4 +155,14 @@
         return false;
     }
 
+    private static boolean supportsMimeType(MediaCodecInfo codecInfo, String mimeType) {
+        String[] supportedMimeTypes = codecInfo.getSupportedTypes();
+        for (String supportedMimeType : supportedMimeTypes) {
+            if (mimeType.equalsIgnoreCase(supportedMimeType)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
 }
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecListTest.java b/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
index 3428e86..2ed9002 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
@@ -241,6 +241,7 @@
         list.add(new CodecType("video/3gpp", true));            // h263 encoder
         list.add(new CodecType("video/mp4v-es", false));        // m4v decoder
         list.add(new CodecType("video/x-vnd.on2.vp8", false));  // vp8 decoder
+        list.add(new CodecType("video/x-vnd.on2.vp8", true));   // vp8 encoder
         list.add(new CodecType("video/x-vnd.on2.vp9", false));  // vp9 decoder
 
         return list;
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecTest.java b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
index 4b8abcd..ce85b78 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.concurrent.atomic.AtomicBoolean;
-
+import java.util.Locale;
 
 /**
  * General MediaCodec tests.
@@ -83,6 +83,10 @@
 
         // Replace color format with something that isn't COLOR_FormatSurface.
         MediaCodecInfo codecInfo = selectCodec(MIME_TYPE);
+        if (codecInfo == null) {
+            // Pass if no codec was available.
+            return;
+        }
         int colorFormat = findNonSurfaceColorFormat(codecInfo, MIME_TYPE);
         format.setInteger(MediaFormat.KEY_COLOR_FORMAT, colorFormat);
 
@@ -133,7 +137,11 @@
         InputSurface inputSurface = null;
 
         try {
-            encoder = MediaCodec.createEncoderByType(MIME_TYPE);
+            encoder = createEncoderForMimeType(MIME_TYPE);
+            if (encoder == null) {
+                // Pass if no codec was available.
+                return;
+            }
             encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             inputSurface = new InputSurface(encoder.createInputSurface());
             inputSurface.makeCurrent();
@@ -181,7 +189,11 @@
         Surface surface = null;
 
         try {
-            encoder = MediaCodec.createEncoderByType(MIME_TYPE);
+            encoder = createEncoderForMimeType(MIME_TYPE);
+            if (encoder == null) {
+                // Pass if no codec was available.
+                return;
+            }
             encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             surface = encoder.createInputSurface();
             encoder.start();
@@ -215,7 +227,11 @@
         Surface surface = null;
 
         try {
-            encoder = MediaCodec.createEncoderByType(MIME_TYPE);
+            encoder = createEncoderForMimeType(MIME_TYPE);
+            if (encoder == null) {
+                // Pass if no codec was available.
+                return;
+            }
             encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             surface = encoder.createInputSurface();
             encoder.start();
@@ -289,8 +305,11 @@
             mediaExtractor = getMediaExtractorForMimeType(inputResourceId, "video/");
             MediaFormat mediaFormat =
                     mediaExtractor.getTrackFormat(mediaExtractor.getSampleTrackIndex());
-            mediaCodec =
-                    MediaCodec.createDecoderByType(mediaFormat.getString(MediaFormat.KEY_MIME));
+            mediaCodec = createDecoderForMimeType(mediaFormat.getString(MediaFormat.KEY_MIME));
+            if (mediaCodec == null) {
+              // Pass if no decoder was available.
+              return true;
+            }
             mediaCodec.configure(mediaFormat, outputSurface.getSurface(), null, 0);
             mediaCodec.start();
             boolean eos = false;
@@ -365,11 +384,15 @@
         MediaCodec audioDecoderA = null;
         MediaCodec audioDecoderB = null;
         try {
-            audioDecoderA = MediaCodec.createDecoderByType(MIME_TYPE_AUDIO);
+            audioDecoderA = createDecoderForMimeType(MIME_TYPE_AUDIO);
+            if (audioDecoderA == null) {
+              // Pass if no decoder was available.
+              return;
+            }
             audioDecoderA.configure(format, null, null, 0);
             audioDecoderA.start();
 
-            audioDecoderB = MediaCodec.createDecoderByType(MIME_TYPE_AUDIO);
+            audioDecoderB = createDecoderForMimeType(MIME_TYPE_AUDIO);
             audioDecoderB.configure(format, null, null, 0);
             audioDecoderB.start();
         } finally {
@@ -407,11 +430,19 @@
         MediaCodec audioEncoder = null;
         MediaCodec audioDecoder = null;
         try {
-            audioEncoder = MediaCodec.createEncoderByType(MIME_TYPE_AUDIO);
+            audioEncoder = createEncoderForMimeType(MIME_TYPE_AUDIO);
+            if (audioEncoder == null) {
+              // Pass if no encoder was available.
+              return;
+            }
             audioEncoder.configure(encoderFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             audioEncoder.start();
 
-            audioDecoder = MediaCodec.createDecoderByType(MIME_TYPE_AUDIO);
+            audioDecoder = createDecoderForMimeType(MIME_TYPE_AUDIO);
+            if (audioDecoder == null) {
+              // Pass if no decoder was available.
+              return;
+            }
             audioDecoder.configure(decoderFormat, null, null, 0);
             audioDecoder.start();
         } finally {
@@ -440,6 +471,10 @@
         // audio only checks this and stop
         mVideoEncodingOngoing = true;
         final CodecInfo info = getAvcSupportedFormatInfo();
+        if (info == null) {
+            // Pass if no codec was available.
+            return;
+        }
         long start = System.currentTimeMillis();
         Thread videoEncodingThread = new Thread(new Runnable() {
             @Override
@@ -474,6 +509,9 @@
 
     private static CodecInfo getAvcSupportedFormatInfo() {
         MediaCodecInfo mediaCodecInfo = selectCodec(MIME_TYPE);
+        if (mediaCodecInfo == null) { // not supported
+            return null;
+        }
         CodecCapabilities cap = mediaCodecInfo.getCapabilitiesForType(MIME_TYPE);
         if (cap == null) { // not supported
             return null;
@@ -557,7 +595,11 @@
         InputSurface inputSurface = null;
         mVideoEncoderHadError = false;
         try {
-            encoder = MediaCodec.createEncoderByType(MIME_TYPE);
+            encoder = createEncoderForMimeType(MIME_TYPE);
+            if (encoder == null) {
+              // Pass if no encoder was available.
+              return;
+            }
             encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             inputSurface = new InputSurface(encoder.createInputSurface());
             inputSurface.makeCurrent();
@@ -599,7 +641,11 @@
         MediaCodec encoder = null;
         mAudioEncoderHadError = false;
         try {
-            encoder = MediaCodec.createEncoderByType(MIME_TYPE_AUDIO);
+            encoder = createEncoderForMimeType(MIME_TYPE_AUDIO);
+            if (encoder == null) {
+              // Pass if no codec was available.
+              return;
+            }
             encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
             MediaCodec.BufferInfo info = new MediaCodec.BufferInfo();
             encoder.start();
@@ -702,6 +748,39 @@
         return 0;   // not reached
     }
 
+    /** Returns a decoder for {@code mimeType}, or {@code null} if none is available. */
+    private static MediaCodec createDecoderForMimeType(String mimeType) {
+        return createCodecForMimeType(mimeType, false);
+    }
+
+    /** Returns a encoder for {@code mimeType}, or {@code null} if none is available. */
+    private static MediaCodec createEncoderForMimeType(String mimeType) {
+        return createCodecForMimeType(mimeType, true);
+    }
+
+    /**
+     * Returns a codec for {@code mimeType}, or {@code null} if there is no suitable codec on this
+     * device. The codec is an encoder if {@code encoder} is {@code true}, and a decoder otherwise.
+     */
+    private static MediaCodec createCodecForMimeType(String mimeType, boolean encoder) {
+        mimeType = mimeType.toLowerCase(Locale.US);
+        for (int index = 0; index < MediaCodecList.getCodecCount(); index++) {
+            MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(index);
+            if (encoder != codecInfo.isEncoder()) {
+                continue;
+            }
+
+            for (String codecType : codecInfo.getSupportedTypes()) {
+                if (codecType.equals(mimeType)) {
+                    return encoder
+                            ? MediaCodec.createEncoderByType(codecType.toLowerCase(Locale.US))
+                            : MediaCodec.createDecoderByType(codecType.toLowerCase(Locale.US));
+                }
+            }
+        }
+        return null;
+    }
+
     private MediaExtractor getMediaExtractorForMimeType(int resourceId, String mimeTypePrefix)
             throws IOException {
         MediaExtractor mediaExtractor = new MediaExtractor();
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..30c8370
--- /dev/null
+++ b/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
@@ -0,0 +1,121 @@
+/*
+ * 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));
+    }
+
+    public void testSetDataSourceNull() {
+        MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+
+        try {
+            retriever.setDataSource((String)null);
+            fail("Expected IllegalArgumentException.");
+        } catch (IllegalArgumentException ex) {
+            // Expected, test passed.
+        }
+    }
+
+    public void testID3v2Metadata() {
+        MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+
+        try {
+            Resources resources = getContext().getResources();
+            AssetFileDescriptor afd = resources.openRawResourceFd(
+                    R.raw.video_480x360_mp4_h264_500kbps_25fps_aac_stereo_128kbps_44100hz_id3v2);
+
+            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 unexpectedly present",
+                retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_WRITER));
+    }
+}
diff --git a/tests/tests/media/src/android/media/cts/Vp8EncoderTest.java b/tests/tests/media/src/android/media/cts/Vp8EncoderTest.java
index 14e4055..2be0fc4 100644
--- a/tests/tests/media/src/android/media/cts/Vp8EncoderTest.java
+++ b/tests/tests/media/src/android/media/cts/Vp8EncoderTest.java
@@ -19,7 +19,9 @@
 import android.content.Context;
 import android.content.res.Resources;
 import android.media.MediaCodec;
+import android.media.MediaCodecInfo;
 import android.media.MediaCodecInfo.CodecCapabilities;
+import android.media.MediaCodecList;
 import android.media.MediaFormat;
 import android.os.Bundle;
 import android.test.AndroidTestCase;
@@ -57,6 +59,28 @@
         mResources = mContext.getResources();
     }
 
+     // TODO: Make a public method selectCodec() in common libraries (e.g. cts/libs/), to avoid
+     // redundant function definitions in this and other media related test files.
+     private static boolean hasCodec(String mimeType) {
+         int numCodecs = MediaCodecList.getCodecCount();
+
+         for (int i = 0; i < numCodecs; i++) {
+             MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
+
+             if (!codecInfo.isEncoder()) {
+                 continue;
+             }
+
+             String[] types = codecInfo.getSupportedTypes();
+             for (int j = 0; j < types.length; j++) {
+                 if (types[j].equalsIgnoreCase(mimeType)) {
+                     return true;
+                 }
+             }
+         }
+         return false;
+     }
+
     /**
      * A basic test for VP8 encoder.
      *
@@ -64,6 +88,11 @@
      * and then decodes it to verify the bitstream.
      */
     public void testBasic() throws Exception {
+        if (!hasCodec(VP8_MIME)) {
+            Log.w(TAG, "Codec " + VP8_MIME + " not supported. Return from testBasic.");
+            return;
+        }
+
         encode(BASIC_IVF,
                R.raw.video_176x144_yv12,
                176,  // width
@@ -79,6 +108,11 @@
      * encoder fails. The test does not verify the output stream.
      */
     public void testSyncFrame() throws Exception {
+        if (!hasCodec(VP8_MIME)) {
+            Log.w(TAG, "Codec " + VP8_MIME + " not supported. Return from testSyncFrame.");
+            return;
+        }
+
         encodeSyncFrame(R.raw.video_176x144_yv12,
                         176, // width
                         144, // height
@@ -92,6 +126,11 @@
      * bitrate and ensure the encoder responds.
      */
     public void testVariableBitrate() throws Exception {
+        if (!hasCodec(VP8_MIME)) {
+            Log.w(TAG, "Codec " + VP8_MIME + " not supported. Return from testVariableBitrate.");
+            return;
+        }
+
         encodeVariableBitrate(R.raw.video_176x144_yv12,
                               176, // width
                               144, // height
diff --git a/tests/tests/mediastress/src/android/mediastress/cts/NativeMediaTest.java b/tests/tests/mediastress/src/android/mediastress/cts/NativeMediaTest.java
index f3bbc40..2119d75 100644
--- a/tests/tests/mediastress/src/android/mediastress/cts/NativeMediaTest.java
+++ b/tests/tests/mediastress/src/android/mediastress/cts/NativeMediaTest.java
@@ -20,15 +20,41 @@
 import android.media.CamcorderProfile;
 import android.media.MediaRecorder.AudioEncoder;
 import android.media.MediaRecorder.VideoEncoder;
+import android.media.MediaCodecInfo;
+import android.media.MediaCodecList;
 import android.os.Environment;
 import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
 
 import junit.framework.Assert;
 
 public class NativeMediaTest extends ActivityInstrumentationTestCase2<NativeMediaActivity> {
+    private static final String TAG = "NativeMediaTest";
+    private static final String MIME_TYPE = "video/h264";
+    private static final int VIDEO_CODEC = VideoEncoder.H264;
     private static final int NUMBER_PLAY_PAUSE_REPEATITIONS = 10;
     private static final long PLAY_WAIT_TIME_MS = 4000;
 
+    private static boolean hasCodec(String mimeType) {
+        int numCodecs = MediaCodecList.getCodecCount();
+
+        for (int i = 0; i < numCodecs; i++) {
+            MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
+
+            if (!codecInfo.isEncoder()) {
+                continue;
+            }
+
+            String[] types = codecInfo.getSupportedTypes();
+            for (int j = 0; j < types.length; j++) {
+                if (types[j].equalsIgnoreCase(mimeType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
     public NativeMediaTest() {
         super(NativeMediaActivity.class);
     }
@@ -50,11 +76,19 @@
     }
 
     private void runPlayTest(int quality) throws InterruptedException {
+        // Don't run the test if the codec isn't supported.
+        if (!hasCodec(MIME_TYPE)) {
+            Log.w(TAG, "Codec " + MIME_TYPE + " not supported.");
+            return;
+        }
+        // Don't run the test if the quality level isn't supported.
         if (quality != 0) {
             if (!isResolutionSupported(quality)) {
+                Log.w(TAG, "Quality level " + quality + " not supported.");
                 return;
             }
         }
+
         Intent intent = new Intent();
         intent.putExtra(NativeMediaActivity.EXTRA_VIDEO_QUALITY,
                 quality);
@@ -92,7 +126,7 @@
             return false;
         }
         CamcorderProfile profile = CamcorderProfile.get(quality);
-        if ((profile != null) && (profile.videoCodec == VideoEncoder.H264) &&
+        if ((profile != null) && (profile.videoCodec == VIDEO_CODEC) &&
                 (profile.audioCodec == AudioEncoder.AAC)) {
             return true;
         }
diff --git a/tests/tests/net/Android.mk b/tests/tests/net/Android.mk
index 7219fc4..82abd62 100644
--- a/tests/tests/net/Android.mk
+++ b/tests/tests/net/Android.mk
@@ -30,7 +30,8 @@
 
 LOCAL_PACKAGE_NAME := CtsNetTestCases
 
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestserver ctsdeviceutil ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestserver ctsdeviceutil ctstestrunner \
+                               core-tests-support
 
 # uncomment when dalvik.annotation.Test* are removed or part of SDK
 #LOCAL_SDK_VERSION := current
diff --git a/tests/tests/net/src/android/net/cts/ConnectivityManagerTest.java b/tests/tests/net/src/android/net/cts/ConnectivityManagerTest.java
index e769be1..5656119 100644
--- a/tests/tests/net/src/android/net/cts/ConnectivityManagerTest.java
+++ b/tests/tests/net/src/android/net/cts/ConnectivityManagerTest.java
@@ -66,8 +66,10 @@
         mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
         mPackageManager = getContext().getPackageManager();
 
-        String[] naStrings = getContext().getResources().getStringArray(
-                com.android.internal.R.array.networkAttributes);
+        // Get com.android.internal.R.array.networkAttributes
+        int resId = getContext().getResources().getIdentifier("networkAttributes", "array", "android");
+        String[] naStrings = getContext().getResources().getStringArray(resId);
+
         for (String naString : naStrings) {
             try {
                 NetworkConfig n = new NetworkConfig(naString);
@@ -75,8 +77,9 @@
             } catch (Exception e) {}
         }
 
-        int[] protectedNetworks = getContext().getResources().getIntArray(
-                com.android.internal.R.array.config_protectedNetworks);
+        // Get com.android.internal.R.array.config_protectedNetworks
+        resId = getContext().getResources().getIdentifier("config_protectedNetworks", "array", "android");
+        int[] protectedNetworks = getContext().getResources().getIntArray(resId);
         for (int p : protectedNetworks) {
             mProtectedNetworks.add(p);
         }
diff --git a/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java b/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
index ceb74d1..cb8aeaf 100644
--- a/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
+++ b/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
@@ -28,6 +28,8 @@
 
 import dalvik.annotation.BrokenTest;
 
+import libcore.javax.net.ssl.SSLDefaultConfigurationAsserts;
+
 public class SSLCertificateSocketFactoryTest extends AndroidTestCase {
     private SSLCertificateSocketFactory mFactory;
     private int mTimeout;
@@ -39,6 +41,10 @@
         mFactory = (SSLCertificateSocketFactory) SSLCertificateSocketFactory.getDefault(mTimeout);
     }
 
+    public void testDefaultConfiguration() throws Exception {
+        SSLDefaultConfigurationAsserts.assertSSLSocketFactory(mFactory);
+    }
+
     public void testAccessProperties() throws Exception {
         mFactory.getSupportedCipherSuites();
         mFactory.getDefaultCipherSuites();
diff --git a/tests/tests/net/src/android/net/cts/VpnServiceTest.java b/tests/tests/net/src/android/net/cts/VpnServiceTest.java
index 9e35375..8bdd7b0 100644
--- a/tests/tests/net/src/android/net/cts/VpnServiceTest.java
+++ b/tests/tests/net/src/android/net/cts/VpnServiceTest.java
@@ -42,7 +42,7 @@
 
         // Should be always resolved by only one activity.
         int count = mContext.getPackageManager().queryIntentActivities(intent, 0).size();
-        assertEquals(count, 1);
+        assertEquals(1, count);
     }
 
     public void testEstablish() throws Exception {
diff --git a/tests/tests/net/src/android/net/wifi/cts/WifiEnterpriseConfigTest.java b/tests/tests/net/src/android/net/wifi/cts/WifiEnterpriseConfigTest.java
index 58298d5..6e395aa 100644
--- a/tests/tests/net/src/android/net/wifi/cts/WifiEnterpriseConfigTest.java
+++ b/tests/tests/net/src/android/net/wifi/cts/WifiEnterpriseConfigTest.java
@@ -17,6 +17,7 @@
 package android.net.wifi.cts;
 
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiEnterpriseConfig.Eap;
@@ -34,6 +35,11 @@
     private static final String ANON_IDENTITY = "anonidentity";
     private static final int ENABLE_DELAY = 10000;
 
+    private boolean hasWifi() {
+        return getContext().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_WIFI);
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -42,10 +48,16 @@
         assertNotNull(mWifiManager);
         mWifiManager.setWifiEnabled(true);
         Thread.sleep(ENABLE_DELAY);
-        assertTrue(mWifiManager.isWifiEnabled());
+        if (hasWifi()) {
+            assertTrue(mWifiManager.isWifiEnabled());
+        }
     }
 
     public void testSettersAndGetters() {
+        if (!hasWifi()) {
+            return;
+        }
+
         WifiEnterpriseConfig config = new WifiEnterpriseConfig();
         assertTrue(config.getEapMethod() == Eap.NONE);
         config.setEapMethod(Eap.PEAP);
@@ -78,6 +90,10 @@
     }
 
     public void testAddEapNetwork() {
+        if (!hasWifi()) {
+            return;
+        }
+
         WifiConfiguration config = new WifiConfiguration();
         WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
         enterpriseConfig.setEapMethod(Eap.PWD);
diff --git a/tests/tests/os/src/android/os/cts/BuildVersionTest.java b/tests/tests/os/src/android/os/cts/BuildVersionTest.java
index 1b078ac..f3cbc88 100644
--- a/tests/tests/os/src/android/os/cts/BuildVersionTest.java
+++ b/tests/tests/os/src/android/os/cts/BuildVersionTest.java
@@ -29,8 +29,8 @@
 
     private static final String LOG_TAG = "BuildVersionTest";
     private static final Set<String> EXPECTED_RELEASES =
-        new HashSet<String>(Arrays.asList("4.4", "4.4.1", "4.4.2", "4.4.3", "4.4.4"));
-    private static final int EXPECTED_SDK = 19;
+        new HashSet<String>(Arrays.asList("4.4W.2", "4.4W.1", "4.4W"));
+    private static final int EXPECTED_SDK = 20;
 
     @SuppressWarnings("deprecation")
     public void testReleaseVersion() {
diff --git a/tests/tests/permission/src/android/permission/cts/AppWidgetManagerPermissionTest.java b/tests/tests/permission/src/android/permission/cts/AppWidgetManagerPermissionTest.java
index a290f6a..4223f08 100644
--- a/tests/tests/permission/src/android/permission/cts/AppWidgetManagerPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/AppWidgetManagerPermissionTest.java
@@ -18,6 +18,7 @@
 
 import android.appwidget.AppWidgetManager;
 import android.content.ComponentName;
+import android.content.pm.PackageManager;
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
 
@@ -44,6 +45,11 @@
      */
     @SmallTest
     public void testBindAppWidget() {
+        if (!getContext().getPackageManager()
+                .hasSystemFeature(PackageManager.FEATURE_APP_WIDGETS)) {
+            return;
+        }
+
         try {
             mAppWidgetManager.bindAppWidgetId(1, new ComponentName(mContext, "foo"));
             fail("Was able to call bindAppWidgetId");
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 3a5849f..d455727 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -743,7 +743,6 @@
                 new File("/dev/felica_uicc"), // b/11142586
                 new File("/dev/full"),
                 new File("/dev/genlock"),    // b/9035217
-                new File("/dev/hw_random"),  // b/9191279
                 new File("/dev/ion"),
                 new File("/dev/kgsl-2d0"),   // b/11271533
                 new File("/dev/kgsl-2d1"),   // b/11271533
@@ -756,19 +755,27 @@
                 new File("/dev/mali"),        // b/11142586
                 new File("/dev/msm_rotator"), // b/9035217
                 new File("/dev/null"),
+                new File("/dev/nvhost-as-gpu"),
                 new File("/dev/nvhost-ctrl"), // b/9088251
+                new File("/dev/nvhost-ctrl-gpu"),
+                new File("/dev/nvhost-dbg-gpu"),
+                new File("/dev/nvhost-gpu"),
                 new File("/dev/nvhost-gr2d"), // b/9088251
                 new File("/dev/nvhost-gr3d"), // b/9088251
                 new File("/dev/nvhost-tsec"),
+                new File("/dev/nvhost-prof-gpu"),
+                new File("/dev/nvhost-vic"),
                 new File("/dev/nvmap"),       // b/9088251
                 new File("/dev/ptmx"),        // b/9088251
                 new File("/dev/pvrsrvkm"),    // b/9108170
+                new File("/dev/pvr_sync"),
                 new File("/dev/quadd"),
                 new File("/dev/random"),
                 new File("/dev/snfc_cen"),    // b/11142586
                 new File("/dev/snfc_hsel"),   // b/11142586
                 new File("/dev/snfc_intu_poll"), // b/11142586
                 new File("/dev/snfc_rfs"),    // b/11142586
+                new File("/dev/tegra-throughput"),
                 new File("/dev/tiler"),       // b/9108170
                 new File("/dev/tty"),
                 new File("/dev/urandom"),
@@ -806,6 +813,24 @@
                 (status.mode & 0666) == 0666);
     }
 
+    public void testDevHwRandomLockedDown() throws Exception {
+        File f = new File("/dev/hw_random");
+        if (!f.exists()) {
+            // HW RNG is not required to be exposed on all devices.
+            return;
+        }
+
+        FileUtils.FileStatus status = new FileUtils.FileStatus();
+        assertTrue(FileUtils.getFileStatus(f.getCanonicalPath(), status, false));
+        assertTrue(
+                f + " has wrong file mode: 0"
+                        + Integer.toOctalString(status.mode),
+                (status.mode & 0777) == 0440);
+
+        assertFileOwnedBy(f, "root");
+        assertFileOwnedByGroup(f, "system");
+    }
+
     /**
      * Test that the /system/bin/run-as command has setuid and setgid
      * attributes set on the file.  If these calls fail, debugger
diff --git a/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
index da9057e..b5a4f24 100644
--- a/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
@@ -19,6 +19,7 @@
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.location.Location;
 import android.location.LocationListener;
 import android.location.LocationManager;
@@ -39,6 +40,7 @@
 
     private LocationManager mLocationManager;
     private List<String> mAllProviders;
+    private boolean mHasTelephony;
 
     @Override
     protected void setUp() throws Exception {
@@ -46,6 +48,8 @@
         mLocationManager = (LocationManager) getContext().getSystemService(
                 Context.LOCATION_SERVICE);
         mAllProviders = mLocationManager.getAllProviders();
+        mHasTelephony = getContext().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_TELEPHONY);
 
         assertNotNull(mLocationManager);
         assertNotNull(mAllProviders);
@@ -63,6 +67,10 @@
      */
     @SmallTest
     public void testListenCellLocation() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         TelephonyManager telephonyManager = (TelephonyManager) getContext().getSystemService(
                 Context.TELEPHONY_SERVICE);
         PhoneStateListener phoneStateListener = new PhoneStateListener();
@@ -90,6 +98,10 @@
      */
     @SmallTest
     public void testListenCellLocation2() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         TelephonyManager telephonyManager = (TelephonyManager) getContext().getSystemService(
                 Context.TELEPHONY_SERVICE);
         PhoneStateListener phoneStateListener = new PhoneStateListener();
diff --git a/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
index 2e09a49..9441319 100644
--- a/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
@@ -52,14 +52,14 @@
             int lineCt = 0;
             String line;
             while ((line = reader.readLine()) != null) {
-                if (!line.startsWith("--------- beginning of /dev/log")) {
+                if (!line.startsWith("--------- beginning of ")) {
                     lineCt++;
                 }
             }
 
             // no permission get an empty log buffer.
             // Logcat returns only one line:
-            // "--------- beginning of /dev/log/main"
+            // "--------- beginning of <log device>"
 
             assertEquals("Unexpected logcat entries. Are you running the "
                        + "the latest logger.c from the Android kernel?",
diff --git a/tests/tests/permission/src/android/permission/cts/NoSystemFunctionPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoSystemFunctionPermissionTest.java
index 17f916a..9eec0ac 100644
--- a/tests/tests/permission/src/android/permission/cts/NoSystemFunctionPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoSystemFunctionPermissionTest.java
@@ -20,6 +20,7 @@
 import android.app.ActivityManager;
 import android.app.AlarmManager;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.graphics.Bitmap;
 import android.os.Vibrator;
 import android.telephony.gsm.SmsManager;
@@ -146,6 +147,10 @@
      */
     @SmallTest
     public void testSendSms() {
+        if (!getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+            return;
+        }
+
         SmsManager smsManager = SmsManager.getDefault();
         byte[] testData = new byte[10];
         try {
diff --git a/tests/tests/permission/src/android/permission/cts/TelephonyManagerPermissionTest.java b/tests/tests/permission/src/android/permission/cts/TelephonyManagerPermissionTest.java
index 4c116dd..2681c0f 100644
--- a/tests/tests/permission/src/android/permission/cts/TelephonyManagerPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/TelephonyManagerPermissionTest.java
@@ -17,6 +17,7 @@
 package android.permission.cts;
 
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.telephony.TelephonyManager;
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
@@ -26,11 +27,14 @@
  */
 public class TelephonyManagerPermissionTest extends AndroidTestCase {
 
+    private boolean mHasTelephony;
     TelephonyManager mTelephonyManager = null;
 
     @Override
     protected void setUp() throws Exception {
         super.setUp();
+        mHasTelephony = getContext().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_TELEPHONY);
         mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
         assertNotNull(mTelephonyManager);
     }
@@ -43,6 +47,10 @@
      */
     @SmallTest
     public void testGetDeviceId() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         try {
             String id = mTelephonyManager.getDeviceId();
             fail("Got device ID: " + id);
@@ -59,6 +67,10 @@
      */
     @SmallTest
     public void testGetLine1Number() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         try {
             String nmbr = mTelephonyManager.getLine1Number();
             fail("Got line 1 number: " + nmbr);
@@ -75,6 +87,10 @@
      */
     @SmallTest
     public void testGetSimSerialNumber() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         try {
             String nmbr = mTelephonyManager.getSimSerialNumber();
             fail("Got SIM serial number: " + nmbr);
@@ -91,6 +107,10 @@
      */
     @SmallTest
     public void testGetSubscriberId() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         try {
             String sid = mTelephonyManager.getSubscriberId();
             fail("Got subscriber id: " + sid);
@@ -107,6 +127,10 @@
      */
     @SmallTest
     public void testVoiceMailNumber() {
+        if (!mHasTelephony) {
+            return;
+        }
+
         try {
             String vmnum = mTelephonyManager.getVoiceMailNumber();
             fail("Got voicemail number: " + vmnum);
diff --git a/tests/tests/permission2/src/android/permission2/cts/NoProcessOutgoingCallPermissionTest.java b/tests/tests/permission2/src/android/permission2/cts/NoProcessOutgoingCallPermissionTest.java
index 4a124e7..956f1a6 100644
--- a/tests/tests/permission2/src/android/permission2/cts/NoProcessOutgoingCallPermissionTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/NoProcessOutgoingCallPermissionTest.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.PackageManager;
 import android.net.Uri;
 import android.os.Bundle;
 import android.test.AndroidTestCase;
@@ -51,6 +52,12 @@
      */
     // TODO: add back to LargeTest when test can cancel initiated call
     public void testProcessOutgoingCall() {
+        final PackageManager pm = getContext().getPackageManager();
+        if (!pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) ||
+                !pm.hasSystemFeature(PackageManager.FEATURE_SIP_VOIP)) {
+            return;
+        }
+
         Log.i(LOG_TAG, "Beginning testProcessOutgoingCall");
         OutgoingCallBroadcastReceiver rcvr = new OutgoingCallBroadcastReceiver();
         Intent ntnt = mContext.registerReceiver(rcvr,
diff --git a/tests/tests/provider/src/android/provider/cts/Contacts_PeopleTest.java b/tests/tests/provider/src/android/provider/cts/Contacts_PeopleTest.java
index d634d30..e5085b8 100644
--- a/tests/tests/provider/src/android/provider/cts/Contacts_PeopleTest.java
+++ b/tests/tests/provider/src/android/provider/cts/Contacts_PeopleTest.java
@@ -28,10 +28,12 @@
 import android.net.Uri;
 import android.os.RemoteException;
 import android.provider.Contacts;
+import android.provider.Contacts.GroupMembership;
 import android.provider.Contacts.Groups;
 import android.provider.Contacts.GroupsColumns;
 import android.provider.Contacts.People;
 import android.test.InstrumentationTestCase;
+import android.util.Log;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -53,9 +55,6 @@
     private static final int PEOPLE_ID_INDEX = 0;
     private static final int PEOPLE_LAST_CONTACTED_INDEX = 1;
 
-    private static final int MEMBERSHIP_PERSON_ID_INDEX = 1;
-    private static final int MEMBERSHIP_GROUP_ID_INDEX = 5;
-
     private static final String[] GROUPS_PROJECTION = new String[] {
         Groups._ID,
         Groups.NAME
@@ -127,13 +126,19 @@
             mRowsAdded.add(People.addToMyContactsGroup(mContentResolver, personId));
             cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
                     Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null, null);
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             int groupId = cursor.getInt(GROUPS_ID_INDEX);
             cursor.close();
             cursor = People.queryGroups(mContentResolver, personId);
-            cursor.moveToFirst();
-            assertEquals(personId, cursor.getInt(MEMBERSHIP_PERSON_ID_INDEX));
-            assertEquals(groupId, cursor.getInt(MEMBERSHIP_GROUP_ID_INDEX));
+
+            int membershipGroupIdIndex =
+                    cursor.getColumnIndex(android.provider.Contacts.GroupMembership.GROUP_ID);
+            int membershipPersonIdIndex =
+                    cursor.getColumnIndex(android.provider.Contacts.GroupMembership.PERSON_ID);
+
+            assertTrue(cursor.moveToFirst());
+            assertEquals(personId, cursor.getInt(membershipPersonIdIndex));
+            assertEquals(groupId, cursor.getInt(membershipGroupIdIndex));
             cursor.close();
 
             // People: test_people_create, Group: Groups.GROUP_MY_CONTACTS
@@ -145,38 +150,38 @@
             cursor = mProvider.query(People.CONTENT_URI, PEOPLE_PROJECTION,
                     People.NAME + " = 'test_people_create'", null, null, null);
 
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             personId = cursor.getInt(PEOPLE_ID_INDEX);
             mRowsAdded.add(ContentUris.withAppendedId(People.CONTENT_URI, personId));
             cursor.close();
             cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
                     Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null, null);
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             groupId = cursor.getInt(GROUPS_ID_INDEX);
             cursor.close();
             cursor = People.queryGroups(mContentResolver, personId);
-            cursor.moveToFirst();
-            assertEquals(personId, cursor.getInt(MEMBERSHIP_PERSON_ID_INDEX));
-            assertEquals(groupId, cursor.getInt(MEMBERSHIP_GROUP_ID_INDEX));
+            assertTrue(cursor.moveToFirst());
+            assertEquals(personId, cursor.getInt(membershipPersonIdIndex));
+            assertEquals(groupId, cursor.getInt(membershipGroupIdIndex));
             cursor.close();
 
             // People: test_people_1, Group: test_group_0
             cursor = mProvider.query(mPeopleRowsAdded.get(1), PEOPLE_PROJECTION,
                     null, null, null, null);
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             personId = cursor.getInt(PEOPLE_ID_INDEX);
             cursor.close();
             cursor = mProvider.query(mGroupRowsAdded.get(0), GROUPS_PROJECTION,
                     null, null, null, null);
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             groupId = cursor.getInt(GROUPS_ID_INDEX);
             cursor.close();
             mRowsAdded.add(People.addToGroup(mContentResolver, personId, groupId));
             cursor = People.queryGroups(mContentResolver, personId);
             boolean found = false;
             while (cursor.moveToNext()) {
-                assertEquals(personId, cursor.getInt(MEMBERSHIP_PERSON_ID_INDEX));
-                if (cursor.getInt(MEMBERSHIP_GROUP_ID_INDEX) == groupId) {
+                assertEquals(personId, cursor.getInt(membershipPersonIdIndex));
+                if (cursor.getInt(membershipGroupIdIndex) == groupId) {
                     found = true;
                     break;
                 }
@@ -188,7 +193,7 @@
             // People: test_people_2, Group: test_group_1
             cursor = mProvider.query(mPeopleRowsAdded.get(2), PEOPLE_PROJECTION,
                     null, null, null, null);
-            cursor.moveToFirst();
+            assertTrue(cursor.moveToFirst());
             personId = cursor.getInt(PEOPLE_ID_INDEX);
             cursor.close();
             String groupName = "test_group_1";
@@ -196,8 +201,8 @@
             cursor = People.queryGroups(mContentResolver, personId);
             List<Integer> groupIds = new ArrayList<Integer>();
             while (cursor.moveToNext()) {
-                assertEquals(personId, cursor.getInt(MEMBERSHIP_PERSON_ID_INDEX));
-                groupIds.add(cursor.getInt(MEMBERSHIP_GROUP_ID_INDEX));
+                assertEquals(personId, cursor.getInt(membershipPersonIdIndex));
+                groupIds.add(cursor.getInt(membershipGroupIdIndex));
             }
             cursor.close();
 
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Images_MediaTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Images_MediaTest.java
index e68286f..3f28a34 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStore_Images_MediaTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Images_MediaTest.java
@@ -78,6 +78,13 @@
 
         mHelper = new FileCopyHelper(mContext);
         mRowsAdded = new ArrayList<Uri>();
+
+        String campath = Environment.getExternalStorageDirectory() + File.separator +
+                Environment.DIRECTORY_DCIM + File.separator + "Camera";
+        File camfile = new File(campath);
+        if (!camfile.exists()) {
+            assertTrue("failed to create " + campath, camfile.mkdir());
+        }
     }
 
     public void testInsertImageWithImagePath() throws Exception {
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Images_ThumbnailsTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Images_ThumbnailsTest.java
index b76108b..322f5d5 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStore_Images_ThumbnailsTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Images_ThumbnailsTest.java
@@ -69,6 +69,13 @@
 
         mHelper = new FileCopyHelper(mContext);
         mRowsAdded = new ArrayList<Uri>();
+
+        String campath = Environment.getExternalStorageDirectory() + File.separator +
+                Environment.DIRECTORY_DCIM + File.separator + "Camera";
+        File camfile = new File(campath);
+        if (!camfile.exists()) {
+            assertTrue("failed to create " + campath, camfile.mkdir());
+        }
     }
 
     public void testQueryInternalThumbnails() throws Exception {
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java
index 287551c..ac0bc03 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java
@@ -22,22 +22,49 @@
 import android.content.ContentUris;
 import android.content.ContentValues;
 import android.database.Cursor;
+import android.media.MediaCodecInfo;
+import android.media.MediaCodecList;
 import android.net.Uri;
 import android.os.Environment;
 import android.provider.MediaStore.Video.Media;
 import android.provider.MediaStore.Video.Thumbnails;
 import android.provider.MediaStore.Video.VideoColumns;
 import android.test.AndroidTestCase;
+import android.util.Log;
 
 import java.io.File;
 import java.io.IOException;
 
 public class MediaStore_Video_ThumbnailsTest extends AndroidTestCase {
+    private static final String TAG = "MediaStore_Video_ThumbnailsTest";
+    private static final String MIME_TYPE = "video/3gpp";
 
     private ContentResolver mResolver;
 
     private FileCopyHelper mFileHelper;
 
+    // TODO: Make a public method selectCodec() in common libraries (e.g. cts/libs/), to avoid
+    // redundant function definitions in this and other media related test files.
+    private static boolean hasCodec(String mimeType) {
+        int numCodecs = MediaCodecList.getCodecCount();
+
+        for (int i = 0; i < numCodecs; i++) {
+            MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
+
+            if (!codecInfo.isEncoder()) {
+                continue;
+            }
+
+            String[] types = codecInfo.getSupportedTypes();
+            for (int j = 0; j < types.length; j++) {
+                if (types[j].equalsIgnoreCase(mimeType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -69,6 +96,14 @@
         // Get the current thumbnail count for future comparison.
         int count = getThumbnailCount(Thumbnails.EXTERNAL_CONTENT_URI);
 
+        // Don't run the test if the codec isn't supported.
+        if (!hasCodec(MIME_TYPE)) {
+            // Calling getThumbnail should not generate a new thumbnail.
+            assertNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null));
+            Log.w(TAG, "Codec " + MIME_TYPE + " not supported. Return from testGetThumbnail.");
+            return;
+        }
+
         // Calling getThumbnail should generate a new thumbnail.
         assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null));
         assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MICRO_KIND, null));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/AllocationResize.java b/tests/tests/renderscript/src/android/renderscript/cts/AllocationResize.java
index b6d9a1a..68d7274 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/AllocationResize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/AllocationResize.java
@@ -49,7 +49,7 @@
         mIn.copy1DRangeFrom(0, INPUTSIZE, inArray);
 
         try {
-            RSUtils.forEach(this, 0, mIn, mOut);
+            forEach(0, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
 
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ClearObjectTest.java b/tests/tests/renderscript/src/android/renderscript/cts/ClearObjectTest.java
index 64deb33..e8a330a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ClearObjectTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ClearObjectTest.java
@@ -66,7 +66,7 @@
         Allocation mOut = Allocation.createSized(mRS, Element.I32(mRS), ObjectNum);
         ms_clear.set_element(element);
         try {
-            RSUtils.forEach(this, TEST_ID_ELEMENT, mIn, mOut);
+            forEach(TEST_ID_ELEMENT, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         int[] tmpArray = new int[ObjectNum];
@@ -83,7 +83,7 @@
         ms_clear.set_type(type);
 
         try {
-            RSUtils.forEach(this, TEST_ID_TYPE, mIn, mOut);
+            forEach(TEST_ID_TYPE, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         int[] tmpArray = new int[ObjectNum];
@@ -99,7 +99,7 @@
         Allocation allocation = Allocation.createTyped(mRS, mIn.getType());
         ms_clear.set_allocation(allocation);
         try {
-            RSUtils.forEach(this, TEST_ID_ALLOCATION, mIn, mOut);
+            forEach(TEST_ID_ALLOCATION, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         int[] tmpArray = new int[ObjectNum];
@@ -115,7 +115,7 @@
         Allocation mIn = Allocation.createSized(mRS, Element.I32(mRS), ObjectNum);
         ms_clear.set_sampler(sampler);
         try {
-            RSUtils.forEach(this, TEST_ID_SAMPLER, mIn, mOut);
+            forEach(TEST_ID_SAMPLER, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         int[] tmpArray = new int[ObjectNum];
@@ -131,7 +131,7 @@
         Allocation mOut = Allocation.createSized(mRS, Element.I32(mRS), ObjectNum);
         ms_clear.set_script(script);
         try {
-            RSUtils.forEach(this, TEST_ID_SCRIPT, mIn, mOut);
+            forEach(TEST_ID_SCRIPT, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         int[] tmpArray = new int[ObjectNum];
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/GetElementAt.java b/tests/tests/renderscript/src/android/renderscript/cts/GetElementAt.java
index a9be1bc..babc1ef 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/GetElementAt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/GetElementAt.java
@@ -62,7 +62,7 @@
         mOut = Allocation.createTyped(mRS, gIn.getType());
         script_x.set_gIn(gIn);
         try {
-            RSUtils.forEach(this, TEST_ID_X, mOut);
+            forEach(TEST_ID_X, mOut);
         } catch (RSRuntimeException e) {
         }
         mOut.copyTo(out);
@@ -83,7 +83,7 @@
         mOut = Allocation.createTyped(mRS, gIn.getType());
         script_xy.set_gIn(gIn);
         try {
-            RSUtils.forEach(this, TEST_ID_XY, mOut);
+            forEach(TEST_ID_XY, mOut);
         } catch (RSRuntimeException e) {
         }
         mOut.copyTo(out);
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/InitTest.java b/tests/tests/renderscript/src/android/renderscript/cts/InitTest.java
index ef36927..848c192 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/InitTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/InitTest.java
@@ -46,7 +46,7 @@
         mIn.copy1DRangeFrom(0, INPUTSIZE, in);
 
         try {
-            RSUtils.forEach(this, 0, mIn, mOut);
+            forEach(0, mIn, mOut);
         } catch (RSRuntimeException e) {
         }
         mOut.copyTo(out);
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/PowTest.java b/tests/tests/renderscript/src/android/renderscript/cts/PowTest.java
index 09a2e94..ad3d078 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/PowTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/PowTest.java
@@ -88,8 +88,8 @@
     }
 
     @Override
-    protected void fillRandom(long seed, int fact, int offset, float[] inArray, int rStride, int rSkip) {
-        RSUtils.genRandom(seed, 32, -16, inArray, rStride, rSkip);
+    protected void fillRandomFloats(long seed, int fact, int offset, float[] inArray) {
+        RSUtils.genRandomFloats(seed, 32, -16, inArray);
     }
 
     public void testPowF32() {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/PownTest.java b/tests/tests/renderscript/src/android/renderscript/cts/PownTest.java
index c95a294..32308ce 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/PownTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/PownTest.java
@@ -82,7 +82,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE];
-        RSUtils.genRandom(0x12345678, 32, 1, -16, n);
+        RSUtils.genRandomInts(0x12345678, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32.set_n1(nAlloc);
 
@@ -93,7 +93,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE];
-        RSUtils.genRandom(0x12345678, 32, 1, -16, n);
+        RSUtils.genRandomInts(0x12345678, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n1(nAlloc);
 
@@ -104,7 +104,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_2(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*2];
-        RSUtils.genRandom(0xacdef1, 32, 1, -16, n);
+        RSUtils.genRandomInts(0xacdef1, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32.set_n2(nAlloc);
 
@@ -115,7 +115,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_2(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*2];
-        RSUtils.genRandom(0xacdef1, 32, 1, -16, n);
+        RSUtils.genRandomInts(0xacdef1, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n2(nAlloc);
 
@@ -126,7 +126,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_3(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0xa123f1, 32, 1, -16, n, 4, 1);
+        RSUtils.genRandomInts(0xa123f1, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32.set_n3(nAlloc);
 
@@ -137,7 +137,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_3(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0xa123f1, 32, 1, -16, n, 4, 1);
+        RSUtils.genRandomInts(0xa123f1, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n3(nAlloc);
 
@@ -148,7 +148,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_4(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0x4323ca, 32, 1, -16, n);
+        RSUtils.genRandomInts(0x4323ca, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32.set_n4(nAlloc);
 
@@ -159,7 +159,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_4(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0x4323ca, 32, 1, -16, n);
+        RSUtils.genRandomInts(0x4323ca, 32, -16, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n4(nAlloc);
 
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/PowrTest.java b/tests/tests/renderscript/src/android/renderscript/cts/PowrTest.java
index f10995b..cebbe24 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/PowrTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/PowrTest.java
@@ -88,8 +88,8 @@
     }
 
     @Override
-    protected void fillRandom(long seed, int fact, int offset, float[] inArray, int rStride, int rSkip) {
-        RSUtils.genRandom(seed, 64, 0, inArray, rStride, rSkip);
+    protected void fillRandomFloats(long seed, int fact, int offset, float[] inArray) {
+        RSUtils.genRandomFloats(seed, 64, 0, inArray);
     }
 
     public void testPowrF32() {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RSBaseCompute.java b/tests/tests/renderscript/src/android/renderscript/cts/RSBaseCompute.java
index d68e628..d7759f1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RSBaseCompute.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RSBaseCompute.java
@@ -89,7 +89,7 @@
                                 int offset, int rStride, int rSkip, int refStride, int outStride,
                                 int inStride, int skip, int ulp) {
         float[] inArray = makeInArray(INPUTSIZE * inStride);
-        fillRandom(seed, fact, offset, inArray, rStride, rSkip);
+        fillRandomFloats(seed, fact, offset, inArray);
         float[] refArray = getRefArray(inArray, INPUTSIZE, inStride, skip);
 
         Allocation mAllocationIn = setInAlloc(inElement);
@@ -97,7 +97,7 @@
 
         Allocation mAllocationOut = setOutAlloc(outElement);
         try {
-            RSUtils.forEach(this, testid, mAllocationIn, mAllocationOut);
+            forEach(testid, mAllocationIn, mAllocationOut);
         } catch (RSRuntimeException e) {
             Log.e("RenderscriptCTS", "Caught RSRuntimeException: " +
                   e.getMessage());
@@ -173,8 +173,8 @@
         return new float[size];
     }
 
-    protected void fillRandom(long seed, int fact, int offset, float[] inArray, int rStride, int rSkip) {
-        RSUtils.genRandom(seed, fact, offset, inArray, rStride, rSkip);
+    protected void fillRandomFloats(long seed, int fact, int offset, float[] inArray) {
+        RSUtils.genRandomFloats(seed, fact, offset, inArray);
     }
 
     protected void fillInAlloc(Allocation mIn, float[] inArray) {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java b/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
index 8c81e3d..d3fb5d0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
@@ -27,65 +27,23 @@
  */
 public class RSUtils {
 
-    public static void genRandom(long seed, int factor, int offset, float array[]) {
+    /**
+     * Fills the array with random floats.  Values will be: offset + number between 0 and max.
+     */
+    public static void genRandomFloats(long seed, int max, int offset, float array[]) {
         Random r = new Random(seed);
         for (int i = 0; i < array.length; i++) {
-            array[i] = r.nextFloat() * factor + offset;
+            array[i] = r.nextFloat() * max + offset;
         }
     }
 
-    public static void genRandom(long seed, int factor, int offset, float array[],
-            int stride, int skip) {
-        Random r = new Random(seed);
-        for (int i = 0; i < array.length / stride; i++) {
-            for (int j = 0; j < stride; j++) {
-                if (j >= stride - skip)
-                    array[i * stride + j] = 0;
-                else
-                    array[i * stride + j] = r.nextFloat() * factor + offset;
-            }
-        }
-    }
-
-    public static void genRandom(long seed, int max, int factor, int offset, int array[]) {
+    /**
+     * Fills the array with random ints.  Values will be: offset + number between 0 and max (exclusive).
+     */
+    public static void genRandomInts(long seed, int max, int offset, int array[]) {
         Random r = new Random(seed);
         for (int i = 0; i < array.length; i++) {
-            array[i] = (r.nextInt(max) * factor + offset);
+            array[i] = (r.nextInt(max) + offset);
         }
     }
-
-    public static void genRandom(long seed, int factor, int offset, int array[],
-            int stride, int skip) {
-        Random r = new Random(seed);
-        for (int i = 0; i < array.length / stride; i++) {
-            for (int j = 0; j < stride; j++) {
-                if (j >= stride - skip)
-                    array[i * stride + j] = 0;
-                else
-                    array[i * stride + j] = r.nextInt() * factor + offset;
-            }
-        }
-    }
-
-    public static void genRandom(long seed, int max, int factor, int offset, int array[],
-            int stride, int skip) {
-        Random r = new Random(seed);
-        for (int i = 0; i < array.length / stride; i++) {
-            for (int j = 0; j < stride; j++) {
-                if (j >= stride - skip)
-                    array[i * stride + j] = 0;
-                else
-                    array[i * stride + j] = r.nextInt(max) * factor + offset;
-            }
-        }
-    }
-
-    public static void forEach(RSBaseCompute base, int testId, Allocation in) throws RSRuntimeException {
-        base.forEach(testId, in);
-    }
-
-    public static void forEach(RSBaseCompute base, int testId, Allocation in, Allocation out)
-            throws RSRuntimeException {
-        base.forEach(testId, in,out);
-    }
 }
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RootnTest.java b/tests/tests/renderscript/src/android/renderscript/cts/RootnTest.java
index 8301ad5..2c447bb 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RootnTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RootnTest.java
@@ -80,7 +80,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE];
-        RSUtils.genRandom(0x12345678, 32, 1, 1, n);
+        RSUtils.genRandomInts(0x12345678, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32.set_n1(nAlloc);
 
@@ -91,7 +91,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE];
-        RSUtils.genRandom(0x12345678, 32, 1, 1, n);
+        RSUtils.genRandomInts(0x12345678, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n1(nAlloc);
 
@@ -103,7 +103,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_2(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*2];
-        RSUtils.genRandom(0xacdef1, 32, 1, 1, n);
+        RSUtils.genRandomInts(0xacdef1, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32.set_n2(nAlloc);
 
@@ -114,7 +114,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_2(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*2];
-        RSUtils.genRandom(0xacdef1, 32, 1, 1, n);
+        RSUtils.genRandomInts(0xacdef1, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n2(nAlloc);
 
@@ -126,7 +126,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_3(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0xa123f1, 32, 1, 1, n, 4, 1);
+        RSUtils.genRandomInts(0xa123f1, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32.set_n3(nAlloc);
 
@@ -137,7 +137,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_3(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0xa123f1, 32, 1, 1, n, 4, 1);
+        RSUtils.genRandomInts(0xa123f1, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n3(nAlloc);
 
@@ -148,7 +148,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_4(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0x4323ca, 32, 1, 1, n);
+        RSUtils.genRandomInts(0x4323ca, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32.set_n4(nAlloc);
 
@@ -159,7 +159,7 @@
         Allocation nAlloc = Allocation.createSized(mRS, Element.I32_4(mRS), INPUTSIZE);
 
         n = new int[INPUTSIZE*4];
-        RSUtils.genRandom(0x4323ca, 32, 1, 1, n);
+        RSUtils.genRandomInts(0x4323ca, 32, 1, n);
         nAlloc.copyFrom(n);
         script_f32_relaxed.set_n4(nAlloc);
 
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RsPackColorTo8888Test.java b/tests/tests/renderscript/src/android/renderscript/cts/RsPackColorTo8888Test.java
index 0b008a7..edff5b9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RsPackColorTo8888Test.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RsPackColorTo8888Test.java
@@ -72,10 +72,10 @@
         float[] inArray = new float[INPUTSIZE * 4];
         byte[] outArray = new byte[INPUTSIZE * 4];
         byte[] refArray = new byte[INPUTSIZE * 4];
-        RSUtils.genRandom(seed, 1, 0, inArray, 4, 1);
+        RSUtils.genRandomFloats(seed, 1, 0, inArray);
         mAllocationIn.copy1DRangeFrom(0, INPUTSIZE, inArray);
         try {
-            RSUtils.forEach(this, testId, mAllocationIn, mAllocationOut);
+            forEach(testId, mAllocationIn, mAllocationOut);
         } catch (RSRuntimeException e) {
         }
         mAllocationOut.copyTo(outArray);
@@ -99,10 +99,10 @@
         float[] inArray = new float[INPUTSIZE * 4];
         byte[] outArray = new byte[INPUTSIZE * 4];
         byte[] refArray = new byte[INPUTSIZE * 4];
-        RSUtils.genRandom(seed, 1, 0, inArray);
+        RSUtils.genRandomFloats(seed, 1, 0, inArray);
         mAllocationIn.copy1DRangeFrom(0, INPUTSIZE, inArray);
         try {
-            RSUtils.forEach(this, testId, mAllocationIn, mAllocationOut);
+            forEach(testId, mAllocationIn, mAllocationOut);
         } catch (RSRuntimeException e) {
         }
         mAllocationOut.copyTo(outArray);
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RsUnpackColor8888Test.java b/tests/tests/renderscript/src/android/renderscript/cts/RsUnpackColor8888Test.java
index 4df1169..3ebbee1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RsUnpackColor8888Test.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RsUnpackColor8888Test.java
@@ -44,7 +44,7 @@
 
         mAllocationIn.copy1DRangeFrom(0, INPUTSIZE, inArray);
         try {
-            RSUtils.forEach(this, 0, mAllocationIn, mAllocationOut);
+            forEach(0, mAllocationIn, mAllocationOut);
         } catch (RSRuntimeException e) {
         }
         mAllocationOut.copyTo(outArray);
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_11.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_11.java
index a16059a..e4ba592 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_11.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_11.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_12.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_12.java
index 5c31f94..c0e6c71 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_12.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_12.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_13.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_13.java
index e12bf00..0c0eacc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_13.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_13.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_14.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_14.java
index 97879a5..d618472 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_14.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_14.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_15.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_15.java
index 636a128..a031b1c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_15.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_15.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_16.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_16.java
index 435316f..bc48c48 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_16.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_16.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_17.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_17.java
index c706ca6..176c8e3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_17.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_17.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 The Android Open Source Project
+ * Copyright (C) 2011-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.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_18.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_18.java
new file mode 100644
index 0000000..a0ab5ad
--- /dev/null
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_18.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011-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.
+ */
+
+/*
+ * This file is auto-generated. DO NOT MODIFY!
+ * The source Renderscript file: set_target_api_18.rs
+ */
+package android.renderscript.cts;
+
+import android.renderscript.*;
+import android.content.res.Resources;
+
+/**
+ * @hide
+ */
+public class ScriptC_set_target_api_18 extends ScriptC {
+    private static final String __rs_resource_name = "set_target_api_18";
+    // Constructor
+    public  ScriptC_set_target_api_18(RenderScript rs) {
+        this(rs,
+             rs.getApplicationContext().getResources(),
+             rs.getApplicationContext().getResources().getIdentifier(
+                 __rs_resource_name, "raw",
+                 rs.getApplicationContext().getPackageName()));
+    }
+
+    public  ScriptC_set_target_api_18(RenderScript rs, Resources resources, int id) {
+        super(rs, resources, id);
+    }
+
+    private final static int mExportFuncIdx_check = 0;
+    public void invoke_check(int version) {
+        FieldPacker check_fp = new FieldPacker(4);
+        check_fp.addI32(version);
+        invoke(mExportFuncIdx_check, check_fp);
+    }
+
+}
+
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_19.java b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_19.java
new file mode 100644
index 0000000..c5017a2
--- /dev/null
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ScriptC_set_target_api_19.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011-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.
+ */
+
+/*
+ * This file is auto-generated. DO NOT MODIFY!
+ * The source Renderscript file: set_target_api_19.rs
+ */
+package android.renderscript.cts;
+
+import android.renderscript.*;
+import android.content.res.Resources;
+
+/**
+ * @hide
+ */
+public class ScriptC_set_target_api_19 extends ScriptC {
+    private static final String __rs_resource_name = "set_target_api_19";
+    // Constructor
+    public  ScriptC_set_target_api_19(RenderScript rs) {
+        this(rs,
+             rs.getApplicationContext().getResources(),
+             rs.getApplicationContext().getResources().getIdentifier(
+                 __rs_resource_name, "raw",
+                 rs.getApplicationContext().getPackageName()));
+    }
+
+    public  ScriptC_set_target_api_19(RenderScript rs, Resources resources, int id) {
+        super(rs, resources, id);
+    }
+
+    private final static int mExportFuncIdx_check = 0;
+    public void invoke_check(int version) {
+        FieldPacker check_fp = new FieldPacker(4);
+        check_fp.addI32(version);
+        invoke(mExportFuncIdx_check, check_fp);
+    }
+
+}
+
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/VersionTest.java b/tests/tests/renderscript/src/android/renderscript/cts/VersionTest.java
index c3966a9..c3dbea9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/VersionTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/VersionTest.java
@@ -25,75 +25,68 @@
  */
 public class VersionTest extends RSBaseCompute {
     public void testVersion11() {
-        ScriptC_set_target_api_11 test11 =
-                new ScriptC_set_target_api_11(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_11);
+        ScriptC_set_target_api_11 test11 = new ScriptC_set_target_api_11(mRS);
         test11.invoke_check(11);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion12() {
-        ScriptC_set_target_api_12 test12 =
-                new ScriptC_set_target_api_12(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_12);
+        ScriptC_set_target_api_12 test12 = new ScriptC_set_target_api_12(mRS);
         test12.invoke_check(12);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion13() {
-        ScriptC_set_target_api_13 test13 =
-                new ScriptC_set_target_api_13(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_13);
+        ScriptC_set_target_api_13 test13 = new ScriptC_set_target_api_13(mRS);
         test13.invoke_check(13);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion14() {
-        ScriptC_set_target_api_14 test14 =
-                new ScriptC_set_target_api_14(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_14);
+        ScriptC_set_target_api_14 test14 = new ScriptC_set_target_api_14(mRS);
         test14.invoke_check(14);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion15() {
-        ScriptC_set_target_api_15 test15 =
-                new ScriptC_set_target_api_15(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_15);
+        ScriptC_set_target_api_15 test15 = new ScriptC_set_target_api_15(mRS);
         test15.invoke_check(15);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion16() {
-        ScriptC_set_target_api_16 test16 =
-                new ScriptC_set_target_api_16(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_16);
+        ScriptC_set_target_api_16 test16 = new ScriptC_set_target_api_16(mRS);
         test16.invoke_check(16);
         waitForMessage();
         checkForErrors();
     }
 
     public void testVersion17() {
-        ScriptC_set_target_api_17 test17 =
-                new ScriptC_set_target_api_17(mRS,
-                                              mRes,
-                                              R.raw.set_target_api_17);
+        ScriptC_set_target_api_17 test17 = new ScriptC_set_target_api_17(mRS);
         test17.invoke_check(17);
         waitForMessage();
         checkForErrors();
     }
 
+    public void testVersion18() {
+        ScriptC_set_target_api_18 test18 = new ScriptC_set_target_api_18(mRS);
+        test18.invoke_check(18);
+        waitForMessage();
+        checkForErrors();
+    }
+
+    public void testVersion19() {
+        ScriptC_set_target_api_19 test19 = new ScriptC_set_target_api_19(mRS);
+        test19.invoke_check(19);
+        waitForMessage();
+        checkForErrors();
+    }
+
     public void testVersion_too_high() {
         try {
             ScriptC_set_target_api_too_high test_too_high =
diff --git a/tests/tests/rscpp/librscpptest/Android.mk b/tests/tests/rscpp/librscpptest/Android.mk
index 329ce1e..9813ba6 100644
--- a/tests/tests/rscpp/librscpptest/Android.mk
+++ b/tests/tests/rscpp/librscpptest/Android.mk
@@ -19,7 +19,8 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE := librscpptest_jni
 LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := rs_jni.cpp
+LOCAL_SRC_FILES := rs_jni.cpp rs_jni_allocation.cpp
+LOCAL_SRC_FILES += setelementat.rs
 
 LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
 LOCAL_C_INCLUDES += frameworks/rs/cpp
diff --git a/tests/tests/rscpp/librscpptest/rs_jni.cpp b/tests/tests/rscpp/librscpptest/rs_jni.cpp
index 16c4176..92ebd56 100644
--- a/tests/tests/rscpp/librscpptest/rs_jni.cpp
+++ b/tests/tests/rscpp/librscpptest/rs_jni.cpp
@@ -30,30 +30,35 @@
 using namespace android::RSC;
 
 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSInitTest_initTest(JNIEnv * env,
-                                                                               jclass obj)
+                                                                                 jclass obj,
+                                                                                 jstring pathObj)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     bool r = true;
     for (int i = 0; i < 1000; i++) {
         sp<RS> rs = new RS();
-        r &= rs->init();
+        r &= rs->init(path);
         LOGE("Native iteration %i, returned %i", i, (int)r);
     }
+    env->ReleaseStringUTFChars(pathObj, path);
     return r;
 }
 
 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSBlurTest_blurTest(JNIEnv * env,
                                                                                  jclass obj,
+                                                                                 jstring pathObj,
                                                                                  jint X,
                                                                                  jint Y,
                                                                                  jbyteArray inputByteArray,
                                                                                  jbyteArray outputByteArray,
                                                                                  jboolean singleChannel)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e;
     if (singleChannel) {
@@ -75,24 +80,26 @@
 
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
 
 extern "C" JNIEXPORT jboolean JNICALL
-Java_android_cts_rscpp_RSConvolveTest_convolveTest(JNIEnv * env, jclass obj, jint X,
-                                                   jint Y, jbyteArray inputByteArray,
+Java_android_cts_rscpp_RSConvolveTest_convolveTest(JNIEnv * env, jclass obj, jstring pathObj,
+                                                   jint X, jint Y, jbyteArray inputByteArray,
                                                    jbyteArray outputByteArray,
                                                    jfloatArray coeffArray,
                                                    jboolean is3x3)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jfloat * coeffs = env->GetFloatArrayElements(coeffArray, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e = Element::A_8(rs);
 
@@ -119,22 +126,25 @@
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
     env->ReleaseFloatArrayElements(coeffArray, coeffs, JNI_ABORT);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
 
 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSLUTTest_lutTest(JNIEnv * env,
                                                                                jclass obj,
+                                                                               jstring pathObj,
                                                                                jint X,
                                                                                jint Y,
                                                                                jbyteArray inputByteArray,
                                                                                jbyteArray outputByteArray)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e = Element::RGBA_8888(rs);
 
@@ -156,12 +166,14 @@
 
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
 
 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RS3DLUTTest_lutTest(JNIEnv * env,
                                                                                  jclass obj,
+                                                                                 jstring pathObj,
                                                                                  jint X,
                                                                                  jint Y,
                                                                                  jint lutSize,
@@ -169,12 +181,13 @@
                                                                                  jbyteArray inputByteArray2,
                                                                                  jbyteArray outputByteArray)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * input2 = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray2, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e = Element::RGBA_8888(rs);
 
@@ -200,23 +213,25 @@
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(inputByteArray2, input2, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
 
 extern "C" JNIEXPORT jboolean JNICALL
-Java_android_cts_rscpp_RSColorMatrixTest_colorMatrixTest(JNIEnv * env, jclass obj, jint X,
-                                                         jint Y, jbyteArray inputByteArray,
+Java_android_cts_rscpp_RSColorMatrixTest_colorMatrixTest(JNIEnv * env, jclass obj, jstring pathObj,
+                                                         jint X, jint Y, jbyteArray inputByteArray,
                                                          jbyteArray outputByteArray,
                                                          jfloatArray coeffArray,
                                                          jint optionFlag)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jfloat * coeffs = env->GetFloatArrayElements(coeffArray, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e = Element::RGBA_8888(rs);
 
@@ -248,21 +263,23 @@
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
     env->ReleaseFloatArrayElements(coeffArray, coeffs, JNI_ABORT);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
 
 extern "C" JNIEXPORT jboolean JNICALL
-Java_android_cts_rscpp_RSBlendTest_blendTest(JNIEnv * env, jclass obj, jint X,
-                                             jint Y, jbyteArray inputByteArray,
+Java_android_cts_rscpp_RSBlendTest_blendTest(JNIEnv * env, jclass obj, jstring pathObj,
+                                             jint X, jint Y, jbyteArray inputByteArray,
                                              jbyteArray outputByteArray,
                                              jint optionFlag)
 {
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
     jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0);
     jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0);
 
     sp<RS> rs = new RS();
-    rs->init();
+    rs->init(path);
 
     sp<const Element> e = Element::RGBA_8888(rs);
 
@@ -327,6 +344,7 @@
 
     env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0);
     env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0);
+    env->ReleaseStringUTFChars(pathObj, path);
     return (rs->getError() == RS_SUCCESS);
 
 }
diff --git a/tests/tests/rscpp/librscpptest/rs_jni_allocation.cpp b/tests/tests/rscpp/librscpptest/rs_jni_allocation.cpp
new file mode 100644
index 0000000..4157026
--- /dev/null
+++ b/tests/tests/rscpp/librscpptest/rs_jni_allocation.cpp
@@ -0,0 +1,394 @@
+/*
+ * 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.
+ */
+
+#include <jni.h>
+#include <android/log.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include <RenderScript.h>
+
+#define  LOG_TAG    "rscpptest"
+#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
+#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
+
+#include "ScriptC_setelementat.h"
+
+using namespace android::RSC;
+
+static void createTypedHelper (sp<RS> mRS, sp<const Element> e) {
+    Type::Builder typeBuilder(mRS, e);
+    for (int mips = 0; mips <= 1; mips ++) {
+        bool useMips = (mips == 1);
+
+        for (int faces = 0; faces <= 1; faces++) {
+            bool useFaces = (faces == 1);
+
+            for (uint32_t x = 1; x < 8; x ++) {
+                for (uint32_t y = 1; y < 8; y ++) {
+                    typeBuilder.setMipmaps(useMips);
+                    typeBuilder.setFaces(useFaces);
+                    typeBuilder.setX(x);
+                    typeBuilder.setY(y);
+                    Allocation::createTyped(mRS, typeBuilder.create());
+                }
+            }
+        }
+    }
+
+}
+
+extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSAllocationTest_typedTest(JNIEnv * env,
+                                                                                        jclass obj,
+                                                                                        jstring pathObj)
+{
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
+    sp<RS> mRS = new RS();
+    mRS->init(path);
+    env->ReleaseStringUTFChars(pathObj, path);
+
+    createTypedHelper(mRS, Element::A_8(mRS));
+    createTypedHelper(mRS, Element::RGBA_4444(mRS));
+    createTypedHelper(mRS, Element::RGBA_5551(mRS));
+    createTypedHelper(mRS, Element::RGB_565(mRS));
+    createTypedHelper(mRS, Element::RGB_888(mRS));
+    createTypedHelper(mRS, Element::RGBA_8888(mRS));
+    createTypedHelper(mRS, Element::F32(mRS));
+    createTypedHelper(mRS, Element::F32_2(mRS));
+    createTypedHelper(mRS, Element::F32_3(mRS));
+    createTypedHelper(mRS, Element::F32_4(mRS));
+    createTypedHelper(mRS, Element::F64(mRS));
+    createTypedHelper(mRS, Element::F64_2(mRS));
+    createTypedHelper(mRS, Element::F64_3(mRS));
+    createTypedHelper(mRS, Element::F64_4(mRS));
+    createTypedHelper(mRS, Element::I8(mRS));
+    createTypedHelper(mRS, Element::I8_2(mRS));
+    createTypedHelper(mRS, Element::I8_3(mRS));
+    createTypedHelper(mRS, Element::I8_4(mRS));
+    createTypedHelper(mRS, Element::I16(mRS));
+    createTypedHelper(mRS, Element::I16_2(mRS));
+    createTypedHelper(mRS, Element::I16_3(mRS));
+    createTypedHelper(mRS, Element::I16_4(mRS));
+    createTypedHelper(mRS, Element::I32(mRS));
+    createTypedHelper(mRS, Element::I32_2(mRS));
+    createTypedHelper(mRS, Element::I32_3(mRS));
+    createTypedHelper(mRS, Element::I32_4(mRS));
+    createTypedHelper(mRS, Element::I64(mRS));
+    createTypedHelper(mRS, Element::I64_2(mRS));
+    createTypedHelper(mRS, Element::I64_3(mRS));
+    createTypedHelper(mRS, Element::I64_4(mRS));
+    createTypedHelper(mRS, Element::U8(mRS));
+    createTypedHelper(mRS, Element::U8_2(mRS));
+    createTypedHelper(mRS, Element::U8_3(mRS));
+    createTypedHelper(mRS, Element::U8_4(mRS));
+    createTypedHelper(mRS, Element::U16(mRS));
+    createTypedHelper(mRS, Element::U16_2(mRS));
+    createTypedHelper(mRS, Element::U16_3(mRS));
+    createTypedHelper(mRS, Element::U16_4(mRS));
+    createTypedHelper(mRS, Element::U32(mRS));
+    createTypedHelper(mRS, Element::U32_2(mRS));
+    createTypedHelper(mRS, Element::U32_3(mRS));
+    createTypedHelper(mRS, Element::U32_4(mRS));
+    createTypedHelper(mRS, Element::U64(mRS));
+    createTypedHelper(mRS, Element::U64_2(mRS));
+    createTypedHelper(mRS, Element::U64_3(mRS));
+    createTypedHelper(mRS, Element::U64_4(mRS));
+    createTypedHelper(mRS, Element::MATRIX_2X2(mRS));
+    createTypedHelper(mRS, Element::MATRIX_3X3(mRS));
+    createTypedHelper(mRS, Element::MATRIX_4X4(mRS));
+    createTypedHelper(mRS, Element::SAMPLER(mRS));
+    createTypedHelper(mRS, Element::SCRIPT(mRS));
+    createTypedHelper(mRS, Element::TYPE(mRS));
+    createTypedHelper(mRS, Element::BOOLEAN(mRS));
+    createTypedHelper(mRS, Element::ELEMENT(mRS));
+    createTypedHelper(mRS, Element::ALLOCATION(mRS));
+
+    mRS->finish();
+    return true;
+}
+
+static bool helperFloatCopy(sp<RS> mRS, int nElems, int offset, int count, int copyMode) {
+    bool passed = true;
+    sp<Allocation> A = Allocation::createSized(mRS, Element::F32(mRS), nElems);
+
+    float *src, *dst;
+    src = new float[nElems];
+    dst = new float[nElems];
+
+    for (int i = 0; i < count; i++) {
+        src[i] = (float)i;
+        dst[offset + i] = -1.0f;
+    }
+
+    switch (copyMode) {
+    case 0: A->copy1DFrom(src); break;
+    case 1: A->copy1DRangeFrom(offset, count, src); break;
+    }
+    A->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static bool helperCharCopy(sp<RS> mRS, int nElems, int offset, int count, int copyMode) {
+    bool passed = true;
+    sp<Allocation> A = Allocation::createSized(mRS, Element::I8(mRS), nElems);
+
+    char *src, *dst;
+    src = new char[nElems];
+    dst = new char[nElems];
+
+    for (int i = 0; i < count; i++) {
+        src[i] = (char)i;
+        dst[offset + i] = -1;
+    }
+
+    switch (copyMode) {
+    case 0: A->copy1DFrom(src); break;
+    case 1: A->copy1DRangeFrom(offset, count, src); break;
+    }
+    A->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static bool helperShortCopy(sp<RS> mRS, int nElems, int offset, int count, int copyMode) {
+    bool passed = true;
+    sp<Allocation> A = Allocation::createSized(mRS, Element::I16(mRS), nElems);
+
+    short *src, *dst;
+    src = new short[nElems];
+    dst = new short[nElems];
+
+    for (int i = 0; i < count; i++) {
+        src[i] = (short)i;
+        dst[offset + i] = -1;
+    }
+
+    switch (copyMode) {
+    case 0: A->copy1DFrom(src); break;
+    case 1: A->copy1DRangeFrom(offset, count, src); break;
+    }
+    A->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static bool helperIntCopy(sp<RS> mRS, int nElems, int offset, int count, int copyMode) {
+    bool passed = true;
+    sp<Allocation> A = Allocation::createSized(mRS, Element::I32(mRS), nElems);
+
+    int *src, *dst;
+    src = new int[nElems];
+    dst = new int[nElems];
+
+    for (int i = 0; i < count; i++) {
+        src[i] = (int)i;
+        dst[offset + i] = -1;
+    }
+
+    switch (copyMode) {
+    case 0: A->copy1DFrom(src); break;
+    case 1: A->copy1DRangeFrom(offset, count, src); break;
+    }
+    A->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static bool helperDoubleCopy(sp<RS> mRS, int nElems, int offset, int count, int copyMode) {
+    bool passed = true;
+    sp<Allocation> A = Allocation::createSized(mRS, Element::F64(mRS), nElems);
+
+    double *src, *dst;
+    src = new double[nElems];
+    dst = new double[nElems];
+
+    for (int i = 0; i < count; i++) {
+        src[i] = (double)i;
+        dst[offset + i] = -1;
+    }
+
+    switch (copyMode) {
+    case 0: A->copy1DFrom(src); break;
+    case 1: A->copy1DRangeFrom(offset, count, src); break;
+    }
+    A->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static bool helperFloatAllocationCopy(sp<RS> mRS, int nElems, int offset, int count) {
+
+    bool passed = true;
+    sp<Allocation> srcA = Allocation::createSized(mRS, Element::F32(mRS), nElems);
+    sp<Allocation> dstA = Allocation::createSized(mRS, Element::F32(mRS), nElems);
+
+    float *src, *dst;
+    src = new float[nElems];
+    dst = new float[nElems];
+    for (int i = 0; i < nElems; i++) {
+        src[i] = (float)i;
+        dst[i] = -1.0f;
+    }
+
+    // First populate the source allocation
+    srcA->copy1DFrom(src);
+    // Now test allocation to allocation copy
+    dstA->copy1DRangeFrom(offset, count, srcA, offset);
+    dstA->copy1DTo(dst);
+
+    for (int i = 0; i < count; i++) {
+        if (dst[offset + i] != src[offset + i]) {
+            passed = false;
+            break;
+        }
+    }
+
+    delete[] src;
+    delete[] dst;
+    return passed;
+}
+
+static int elemsToTest = 20;
+
+extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSAllocationTest_test1DCopy(JNIEnv * env,
+                                                                                         jclass obj,
+                                                                                         jstring pathObj)
+{
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
+    sp<RS> mRS = new RS();
+    mRS->init(path);
+    env->ReleaseStringUTFChars(pathObj, path);
+    bool passed = true;
+
+    for (int s = 8; s <= elemsToTest; s += 2) {
+        for (int mode = 0; mode < 1; mode ++) {
+            passed &= helperFloatCopy(mRS, s, 0, s, mode);
+            passed &= helperCharCopy(mRS, s, 0, s, mode);
+            passed &= helperShortCopy(mRS, s, 0, s, mode);
+            passed &= helperIntCopy(mRS, s, 0, s, mode);
+            //helperBaseObjCopy(mRS, s, 0, s, mode);
+        }
+
+        // now test copy range
+        for (int mode = 1; mode < 2; mode ++) {
+            for (int off = 0; off < s; off ++) {
+                for (int count = 1; count <= s - off; count ++) {
+                    passed &= helperFloatCopy(mRS, s, off, count, mode);
+                    passed &= helperCharCopy(mRS, s, off, count, mode);
+                    passed &= helperShortCopy(mRS, s, off, count, mode);
+                    passed &= helperIntCopy(mRS, s, off, count, mode);
+                    //helperBaseObjCopy(mRS, s, off, count, mode);
+                }
+            }
+        }
+
+        for (int off = 0; off < s; off ++) {
+            for (int count = 1; count <= s - off; count ++) {
+                passed &= helperFloatAllocationCopy(mRS, s, off, count);
+                //helperByteAllocationCopy(mRS, s, off, count);
+            }
+        }
+    }
+    return passed;
+}
+
+extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSAllocationTest_testSetElementAt(JNIEnv * env,
+                                                                                               jclass obj,
+                                                                                               jstring pathObj)
+{
+    const char * path = env->GetStringUTFChars(pathObj, NULL);
+    sp<RS> mRS = new RS();
+    mRS->init(path);
+    env->ReleaseStringUTFChars(pathObj, path);
+
+    bool passed = true;
+
+    Type::Builder b(mRS, Element::I32(mRS));
+    b.setX(48);
+    sp<Allocation> largeArray = Allocation::createTyped(mRS, b.create());
+    b.setX(1);
+    sp<Allocation> singleElement = Allocation::createTyped(mRS, b.create());
+
+    sp<ScriptC_setelementat> script = new ScriptC_setelementat(mRS);
+
+    script->set_memset_toValue(1);
+    script->forEach_memset(singleElement);
+
+    script->set_dimX(48);
+    script->set_array(largeArray);
+
+    script->forEach_setLargeArray(singleElement);
+
+    int result = 0;
+
+    script->set_compare_value(10);
+    script->forEach_compare(largeArray);
+    script->forEach_getCompareResult(singleElement);
+    singleElement->copy1DTo(&result);
+    if (result != 2) {
+        passed = false;
+    }
+
+    return passed;
+}
diff --git a/tests/tests/rscpp/librscpptest/setelementat.rs b/tests/tests/rscpp/librscpptest/setelementat.rs
new file mode 100644
index 0000000..1251ec1
--- /dev/null
+++ b/tests/tests/rscpp/librscpptest/setelementat.rs
@@ -0,0 +1,50 @@
+#pragma version(1)
+#pragma rs java_package_name(com.android.cts.stub)
+#pragma rs_fp_relaxed
+
+int memset_toValue = 0;
+
+int compare_value = 0;
+int compare_failure = 2;
+int failure_value = 0;
+
+uint32_t dimX = 0;
+uint32_t dimY = 0;
+rs_allocation array;
+
+void memset(int *aout) {
+    *aout = memset_toValue;
+    return;
+}
+
+void compare(const int *ain) {
+    if (*ain != compare_value) {
+        rsAtomicCas(&compare_failure, 2, -1);
+        failure_value = *ain;
+    }
+    return;
+}
+
+void getCompareResult(int* aout) {
+    *aout = compare_failure;
+}
+
+void setLargeArray(const int *ain, uint32_t x) {
+    int source = 10;
+    if (x == 0) {
+        for (uint32_t i = 0; i < dimX; i++) {
+            rsSetElementAt(array, &source, i);
+        }
+    }
+}
+
+void setLargeArray2D(const int *ain, uint32_t x) {
+    int source = 10;
+    if (x == 0) {
+        for (uint32_t y = 0; y < dimY; y++) {
+            for (uint32_t xtemp = 0; xtemp < dimX; xtemp++) {
+                rsSetElementAt(array, &source, xtemp, y);
+            }
+        }
+    }
+}
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RS3DLUTTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RS3DLUTTest.java
index 197a4cd..7a85f57 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RS3DLUTTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RS3DLUTTest.java
@@ -35,7 +35,7 @@
 
     private final int lutSize = 64;
 
-    native boolean lutTest(int X, int Y, int lutSize, byte[] input, byte[] input2, byte[] output);
+    native boolean lutTest(String path, int X, int Y, int lutSize, byte[] input, byte[] input2, byte[] output);
     public void testRSLUT() {
         int[] baseAlloc = new int[X * Y * 4];
         RSUtils.genRandom(0x419144, 255, 1, -128, baseAlloc);
@@ -71,7 +71,7 @@
         lut.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        lutTest(X, Y, lutSize, byteAlloc, byteColorCube, nativeByteAlloc);
+        lutTest(this.getContext().getCacheDir().toString(), X, Y, lutSize, byteAlloc, byteColorCube, nativeByteAlloc);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSAllocationTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSAllocationTest.java
new file mode 100644
index 0000000..86662bf
--- /dev/null
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSAllocationTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.cts.rscpp;
+
+import com.android.cts.stub.R;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.test.AndroidTestCase;
+import android.renderscript.*;
+import android.util.Log;
+
+public class RSAllocationTest extends RSCppTest {
+    static {
+        System.loadLibrary("rscpptest_jni");
+    }
+
+    native boolean typedTest(String path);
+    public void testRSAllocationTypes() {
+        assertTrue(typedTest(this.getContext().getCacheDir().toString()));
+    }
+
+    native boolean test1DCopy(String path);
+    public void testRSAllocationCopy() {
+        assertTrue(test1DCopy(this.getContext().getCacheDir().toString()));
+    }
+
+    native boolean testSetElementAt(String path);
+    public void testRSAllocationSetElementAt() {
+        assertTrue(testSetElementAt(this.getContext().getCacheDir().toString()));
+    }
+
+
+}
\ No newline at end of file
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSBlendTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSBlendTest.java
index b378807..0830f78 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSBlendTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSBlendTest.java
@@ -33,7 +33,7 @@
     private static final int X = 256;
     private static final int Y = 256;
 
-    native boolean blendTest(int X, int Y, byte[] input, byte[] output, int optionFlag);
+    native boolean blendTest(String path, int X, int Y, byte[] input, byte[] output, int optionFlag);
     public void testRSBlend() {
         for (int iter = 0; iter < 15; iter++) {
             int[] baseAlloc = new int[X * Y * 4];
@@ -111,7 +111,7 @@
                 break;
             }
 
-            blendTest(X, Y, byteAlloc, byteAlloc2, iter);
+            blendTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, byteAlloc2, iter);
             rsOutput.copyTo(byteAlloc);
             for (int i = 0; i < X * Y * 4; i++) {
                 assertTrue(byteAlloc[i] == byteAlloc2[i]);
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSBlurTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSBlurTest.java
index 4d4530c..e546516 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSBlurTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSBlurTest.java
@@ -33,7 +33,7 @@
     private final int X = 1024;
     private final int Y = 1024;
 
-    native boolean blurTest(int X, int Y, byte[] input, byte[] output, boolean singleChannel);
+    native boolean blurTest(String path, int X, int Y, byte[] input, byte[] output, boolean singleChannel);
     public void testRSBlurOneChannel() {
         int[] baseAlloc = new int[X * Y];
         RSUtils.genRandom(0x1DEFF, 255, 1, -128, baseAlloc);
@@ -55,7 +55,7 @@
         blur.forEach(rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y];
-        blurTest(X, Y, byteAlloc, nativeByteAlloc, true);
+        blurTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, true);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y; i++) {
@@ -86,7 +86,7 @@
         blur.forEach(rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        blurTest(X, Y, byteAlloc, nativeByteAlloc, false);
+        blurTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, false);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSColorMatrixTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSColorMatrixTest.java
index e4c0085..d634c1f 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSColorMatrixTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSColorMatrixTest.java
@@ -33,7 +33,7 @@
     private final int X = 1024;
     private final int Y = 1024;
 
-    native boolean colorMatrixTest(int X, int Y, byte[] input, byte[] output, float[] coeffs, int optionFlag);
+    native boolean colorMatrixTest(String path, int X, int Y, byte[] input, byte[] output, float[] coeffs, int optionFlag);
     public void testRSColorMatrix0() {
         int[] baseAlloc = new int[X * Y * 4];
         RSUtils.genRandom(0x251107, 255, 1, -128, baseAlloc);
@@ -67,7 +67,7 @@
         cm.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        colorMatrixTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, 0);
+        colorMatrixTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, 0);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
@@ -99,7 +99,7 @@
         cm.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        colorMatrixTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, 1);
+        colorMatrixTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, 1);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
@@ -135,7 +135,7 @@
         cm.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        colorMatrixTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, 2);
+        colorMatrixTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, 2);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
@@ -167,7 +167,7 @@
         cm.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        colorMatrixTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, 3);
+        colorMatrixTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, 3);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
@@ -199,7 +199,7 @@
         cm.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        colorMatrixTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, 4);
+        colorMatrixTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, 4);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSConvolveTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSConvolveTest.java
index d669d3b..ded67cc 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSConvolveTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSConvolveTest.java
@@ -33,7 +33,7 @@
     private final int X = 1024;
     private final int Y = 1024;
 
-    native boolean convolveTest(int X, int Y, byte[] input, byte[] output, float[] coeffs, boolean is3x3);
+    native boolean convolveTest(String path, int X, int Y, byte[] input, byte[] output, float[] coeffs, boolean is3x3);
     public void testConvolve3x3() {
         int[] baseAlloc = new int[X * Y];
         float[] coeffs = new float[9];
@@ -66,7 +66,7 @@
         convolve.forEach(rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y];
-        convolveTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, true);
+        convolveTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, true);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y; i++) {
@@ -124,7 +124,7 @@
         convolve.forEach(rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y];
-        convolveTest(X, Y, byteAlloc, nativeByteAlloc, coeffs, false);
+        convolveTest(this.getContext().getCacheDir().toString(), X, Y, byteAlloc, nativeByteAlloc, coeffs, false);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y; i++) {
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSInitTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSInitTest.java
index 22804d3..7fd5ffa 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSInitTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSInitTest.java
@@ -29,13 +29,13 @@
         System.loadLibrary("rscpptest_jni");
     }
 
-    native boolean initTest();
+    native boolean initTest(String path);
     public void testRSInit() {
         for (int i = 0; i < 1000; i++) {
             RenderScript mRS = RenderScript.create(getContext());
             mRS.destroy();
             Log.d("rscpptest", "Java iteration " + i);
         }
-        assertTrue(initTest());
+        assertTrue(initTest(this.getContext().getCacheDir().toString()));
     }
 }
\ No newline at end of file
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSLUTTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSLUTTest.java
index 7890d57..2579666 100644
--- a/tests/tests/rscpp/src/android/cts/rscpp/RSLUTTest.java
+++ b/tests/tests/rscpp/src/android/cts/rscpp/RSLUTTest.java
@@ -33,7 +33,7 @@
     private final int X = 1024;
     private final int Y = 1024;
 
-    native boolean lutTest(int X, int Y, byte[] input, byte[] output);
+    native boolean lutTest(String path, int X, int Y, byte[] input, byte[] output);
     public void testRSLUT() {
         int[] baseAlloc = new int[X * Y * 4];
         RSUtils.genRandom(0x72727272, 255, 1, -128, baseAlloc);
@@ -59,7 +59,7 @@
         lut.forEach(rsInput, rsOutput);
 
         byte[] nativeByteAlloc = new byte[X * Y * 4];
-        lutTest(X, Y, byteAlloc, nativeByteAlloc);
+        lutTest(this.getContext().getCacheDir().toString().toString(), X, Y, byteAlloc, nativeByteAlloc);
         rsOutput.copyTo(byteAlloc);
 
         for (int i = 0; i < X * Y * 4; i++) {
diff --git a/tests/tests/security/jni/Android.mk b/tests/tests/security/jni/Android.mk
index 2553d32..5be602f 100644
--- a/tests/tests/security/jni/Android.mk
+++ b/tests/tests/security/jni/Android.mk
@@ -28,11 +28,13 @@
 		android_security_cts_LinuxRngTest.cpp \
 		android_security_cts_NativeCodeTest.cpp \
 		android_security_cts_LoadEffectLibraryTest.cpp \
+		android_security_cts_NativeCodeTest.cpp \
+		android_security_cts_SELinuxTest.cpp \
 		android_security_cts_AudioPolicyBinderTest.cpp \
 		android_security_cts_AudioflingerBinderTest.cpp
 
 LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
 
-LOCAL_SHARED_LIBRARIES := libnativehelper liblog libbinder libutils libmedia
+LOCAL_SHARED_LIBRARIES := libnativehelper liblog libbinder libutils libmedia libselinux
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
index b027315..1d43f15 100644
--- a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
+++ b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
@@ -22,6 +22,7 @@
 extern int register_android_security_cts_LinuxRngTest(JNIEnv*);
 extern int register_android_security_cts_NativeCodeTest(JNIEnv*);
 extern int register_android_security_cts_LoadEffectLibraryTest(JNIEnv*);
+extern int register_android_security_cts_SELinuxTest(JNIEnv*);
 extern int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env);
 extern int register_android_security_cts_AudioFlingerBinderTest(JNIEnv* env);
 
@@ -48,6 +49,10 @@
         return JNI_ERR;
     }
 
+    if (register_android_security_cts_SELinuxTest(env)) {
+        return JNI_ERR;
+    }
+
     if (register_android_security_cts_KernelSettingsTest(env)) {
         return JNI_ERR;
     }
diff --git a/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
new file mode 100644
index 0000000..3bee3a5
--- /dev/null
+++ b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+#include <jni.h>
+#include <selinux/selinux.h>
+#include <JNIHelp.h>
+#include <ScopedUtfChars.h>
+
+/*
+ * Function: checkSELinuxAccess
+ * Purpose: Check permissions between two security contexts.
+ * Parameters: subjectContextStr: subject security context as a string
+ *             objectContextStr: object security context as a string
+ *             objectClassStr: object's security class name as a string
+ *             permissionStr: permission name as a string
+ * Returns: boolean: (true) if permission was granted, (false) otherwise
+ * Exceptions: NullPointerException if any argument is NULL
+ */
+static jboolean android_security_cts_SELinuxTest_checkSELinuxAccess(JNIEnv *env, jobject, jstring subjectContextStr,
+        jstring objectContextStr, jstring objectClassStr, jstring permissionStr, jstring auxStr) {
+    if (subjectContextStr == NULL || objectContextStr == NULL || objectClassStr == NULL
+            || permissionStr == NULL || auxStr == NULL) {
+        jniThrowNullPointerException(env, NULL);
+        return false;
+    }
+
+    ScopedUtfChars subjectContext(env, subjectContextStr);
+    ScopedUtfChars objectContext(env, objectContextStr);
+    ScopedUtfChars objectClass(env, objectClassStr);
+    ScopedUtfChars permission(env, permissionStr);
+    ScopedUtfChars aux(env, auxStr);
+
+    char *tmp1 = const_cast<char *>(subjectContext.c_str());
+    char *tmp2 = const_cast<char *>(objectContext.c_str());
+    char *tmp3 = const_cast<char *>(aux.c_str());
+    int accessGranted = selinux_check_access(tmp1, tmp2, objectClass.c_str(), permission.c_str(), tmp3);
+    return (accessGranted == 0) ? true : false;
+}
+
+
+static JNINativeMethod gMethods[] = {
+    {  "checkSELinuxAccess", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z",
+            (void *) android_security_cts_SELinuxTest_checkSELinuxAccess },
+};
+
+int register_android_security_cts_SELinuxTest(JNIEnv* env)
+{
+    jclass clazz = env->FindClass("android/security/cts/SELinuxTest");
+    return env->RegisterNatives(clazz, gMethods,
+            sizeof(gMethods) / sizeof(JNINativeMethod));
+}
diff --git a/tests/tests/security/src/android/security/cts/BannedFilesTest.java b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
index 70f845e..ce0b48c 100644
--- a/tests/tests/security/src/android/security/cts/BannedFilesTest.java
+++ b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
@@ -131,6 +131,14 @@
         assertNotSetugid("/vendor/bin/tcpdump-arm");
     }
 
+    /**
+     * Test if /dev/diag exists.
+     */
+    public void testNoDevDiag(){
+        File file = new File("/dev/diag");
+        assertFalse("File \"" + file.getAbsolutePath() + "\" exists", file.exists());
+    }
+
     private static void assertNotSetugid(String file) {
         FileUtils.FileStatus fs = new FileUtils.FileStatus();
         if (!FileUtils.getFileStatus(file, fs, false)) {
diff --git a/tests/tests/security/src/android/security/cts/HwRngTest.java b/tests/tests/security/src/android/security/cts/HwRngTest.java
new file mode 100644
index 0000000..3dc11af
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/HwRngTest.java
@@ -0,0 +1,159 @@
+/*
+ * 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.security.cts;
+
+import junit.framework.TestCase;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Tests for hardware random number generator device {@code /dev/hw_random}.
+ */
+public class HwRngTest extends TestCase {
+
+    // The block of constants below is from hw_random framework documentation and source code:
+    // see https://www.kernel.org/doc/Documentation/hw_random.txt.
+    private static final File DEV_HW_RANDOM = new File("/dev/hw_random");
+    private static final File SYSFS_HW_RANDOM = new File("/sys/class/misc/hw_random");
+    private static final String HWRNG_DRIVER_NAME = "hwrng";
+    private static final int HWRNG_DRIVER_MAJOR = 10;
+    private static final int HWRNG_DRIVER_MINOR = 183;
+
+    /**
+     * Asserts that the {@code /dev/hw_random} device is configured in an acceptable way or is not
+     * present at all.
+     */
+    public void testConfigurationIfFilePresent() throws Exception {
+        if (!DEV_HW_RANDOM.exists()) {
+            // The device is not present
+            return;
+        }
+
+        // Sanity check based on https://www.kernel.org/doc/Documentation/hw_random.txt.
+
+        // In short, assert that:
+        // 1. hwrng kernel driver is using MAJOR 10 and MINOR 183,
+        // 2. a driver is selected in the hrwng framework, and
+        // 3. /dev/hw_random references a character device with the above MAJOR and MINOR.
+
+        // 1. Assert that the hwrng driver is using MAJOR 10 and MINOR 183.
+        //    We achieve this by inspecting /sys/class/misc/hw_random/dev and uevent.
+        assertTrue(SYSFS_HW_RANDOM + " not found", SYSFS_HW_RANDOM.isDirectory());
+        assertEquals(
+                "Driver major:minor",
+                HWRNG_DRIVER_MAJOR + ":" + HWRNG_DRIVER_MINOR,
+                readyFullyAsciiFile(new File(SYSFS_HW_RANDOM, "dev")).trim());
+
+        Map<String, String> ueventVars = parseUeventFile(new File(SYSFS_HW_RANDOM, "uevent"));
+        assertEquals("uevent MAJOR", String.valueOf(HWRNG_DRIVER_MAJOR), ueventVars.get("MAJOR"));
+        assertEquals("uevent MINOR", String.valueOf(HWRNG_DRIVER_MINOR), ueventVars.get("MINOR"));
+        assertEquals("uevent DEVNAME", HWRNG_DRIVER_NAME, ueventVars.get("DEVNAME"));
+
+        // 2. Assert that a driver is selected in the hrwng framework.
+        //    We achieve this by inspecting /sys/class/misc/hw_random/rng_current.
+        File rngCurrentFile = new File(SYSFS_HW_RANDOM, "rng_current");
+        String rngCurrent = readyFullyAsciiFile(rngCurrentFile);
+        assertFalse(
+                "No driver selected according to " + rngCurrentFile,
+                rngCurrent.trim().isEmpty());
+
+        // 3. Assert that /dev/hw_random references a character device with the above MAJOR+MINOR.
+        assertEquals(
+                DEV_HW_RANDOM + " major",
+                HWRNG_DRIVER_MAJOR,
+                LinuxRngTest.getCharDeviceMajor(DEV_HW_RANDOM.getCanonicalPath()));
+        assertEquals(
+                DEV_HW_RANDOM + " minor",
+                HWRNG_DRIVER_MINOR,
+                LinuxRngTest.getCharDeviceMinor(DEV_HW_RANDOM.getCanonicalPath()));
+    }
+
+    private static String readyFullyAsciiFile(File file) throws IOException {
+        InputStream in = null;
+        try {
+            in = new FileInputStream(file);
+            return new String(readyFully(in), "US-ASCII");
+        } finally {
+            closeSilently(in);
+        }
+    }
+
+    private static byte[] readyFully(InputStream in) throws IOException {
+        ByteArrayOutputStream result = new ByteArrayOutputStream();
+        byte[] buffer = new byte[16 * 1024];
+        int chunkSize;
+        while ((chunkSize = in.read(buffer)) != -1) {
+            result.write(buffer, 0, chunkSize);
+        }
+        return result.toByteArray();
+    }
+
+    private static Map<String, String> parseUeventFile(File file) throws IOException {
+        // The format of the file is line-oriented.
+        // Each variable takes up one line.
+        // The typical format of a variable is KEY=VALUE
+
+        Map<String, String> result = new HashMap<String, String>();
+        BufferedReader in = null;
+        try {
+            in = new BufferedReader(new InputStreamReader(new FileInputStream(file), "US-ASCII"));
+            String line;
+            while ((line = in.readLine()) != null) {
+                if (line.trim().length() == 0) {
+                    // Ignore empty lines
+                    continue;
+                }
+
+                String key;
+                String value;
+                int delimiterIndex = line.indexOf('=');
+                if (delimiterIndex != -1) {
+                    key = line.substring(0, delimiterIndex);
+                    value = line.substring(delimiterIndex + 1);
+                } else {
+                    key = line;
+                    value = "";
+                }
+
+                if (result.containsKey(key)) {
+                    throw new IllegalArgumentException("Multiple values for key: " + key);
+                }
+                result.put(key, value);
+            }
+            return result;
+        } finally {
+            closeSilently(in);
+        }
+    }
+
+    private static void closeSilently(Closeable in) {
+        if (in != null) {
+            try {
+                in.close();
+            } catch (IOException ignored) {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/tests/security/src/android/security/cts/SELinuxTest.java b/tests/tests/security/src/android/security/cts/SELinuxTest.java
new file mode 100644
index 0000000..838eb8a
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/SELinuxTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.security.cts;
+
+import junit.framework.TestCase;
+
+/**
+ * Verify that the SELinux configuration is sane.
+ */
+public class SELinuxTest extends TestCase {
+
+    static {
+        System.loadLibrary("ctssecurity_jni");
+    }
+
+    public void testMyJni() {
+        try {
+            checkSELinuxAccess(null, null, null, null, null);
+            fail("should have thrown");
+        } catch (NullPointerException e) {
+            // expected
+        }
+    }
+
+
+    public void testCheckAccessSane() {
+        assertFalse(checkSELinuxAccess("a", "b", "c", "d", "e"));
+    }
+
+    public void testRild() {
+        assertTrue(checkSELinuxAccess("u:r:rild:s0", "u:object_r:rild_prop:s0", "property_service", "set", "ril.ecclist"));
+    }
+
+    public void testZygote() {
+        assertFalse(checkSELinuxAccess("u:r:zygote:s0", "u:object_r:runas_exec:s0", "file", "getattr", "/system/bin/run-as"));
+        // Also check init, just as a sanity check (init is unconfined, so it should pass)
+        assertTrue(checkSELinuxAccess("u:r:init:s0", "u:object_r:runas_exec:s0", "file", "getattr", "/system/bin/run-as"));
+    }
+
+    private static native boolean checkSELinuxAccess(String scon, String tcon, String tclass, String perm, String extra);
+}
diff --git a/tests/tests/security/src/android/security/cts/ServicePermissionsTest.java b/tests/tests/security/src/android/security/cts/ServicePermissionsTest.java
index 7de3baa..00cbfd8 100644
--- a/tests/tests/security/src/android/security/cts/ServicePermissionsTest.java
+++ b/tests/tests/security/src/android/security/cts/ServicePermissionsTest.java
@@ -17,6 +17,7 @@
 package android.security.cts;
 
 import android.os.IBinder;
+import android.os.TransactionTooLargeException;
 import android.test.AndroidTestCase;
 import android.util.Log;
 
@@ -107,6 +108,9 @@
                     // probably not checking for DUMP.
                     throw e;
                 }
+            } catch (TransactionTooLargeException e) {
+                // SELinux likely prevented the dump - assume safe
+                continue;
             } finally {
                 out.close();
             }
diff --git a/tests/tests/security/testeffect/Android.mk b/tests/tests/security/testeffect/Android.mk
index 49441c7..a7e3cac 100644
--- a/tests/tests/security/testeffect/Android.mk
+++ b/tests/tests/security/testeffect/Android.mk
@@ -22,7 +22,7 @@
 
 LOCAL_CFLAGS+= -O2 -fvisibility=hidden
 
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx
+LOCAL_MODULE_RELATIVE_PATH := soundfx
 LOCAL_MODULE:= libctstesteffect
 
 LOCAL_C_INCLUDES := \
diff --git a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
index 09c7cc7..9986e67 100644
--- a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
@@ -16,6 +16,7 @@
 
 package android.telephony.cts;
 
+import android.bluetooth.BluetoothAdapter;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.net.ConnectivityManager;
@@ -184,13 +185,14 @@
                 break;
 
             case TelephonyManager.PHONE_TYPE_NONE:
-                boolean nwSupported = mCm.isNetworkSupported(mCm.TYPE_WIFI);
-                if (nwSupported) {
+                if (mCm.isNetworkSupported(ConnectivityManager.TYPE_WIFI)) {
                     assertSerialNumber();
-                    assertMacAddressReported();
+                    assertMacAddress(getWifiMacAddress());
+                } else if (mCm.isNetworkSupported(ConnectivityManager.TYPE_BLUETOOTH)) {
+                    assertSerialNumber();
+                    assertMacAddress(getBluetoothMacAddress());
                 } else {
-                    nwSupported = mCm.isNetworkSupported(mCm.TYPE_ETHERNET);
-                    assertTrue(nwSupported);
+                    assertTrue(mCm.isNetworkSupported(ConnectivityManager.TYPE_ETHERNET));
                 }
                 break;
 
@@ -284,15 +286,14 @@
                 Pattern.matches("[0-9A-Za-z]+", Build.SERIAL));
     }
 
-    private void assertMacAddressReported() {
-        String macAddress = getMacAddress();
+    private void assertMacAddress(String macAddress) {
         String macPattern = "([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}";
         assertTrue("MAC Address " + macAddress + " does not match pattern " + macPattern,
                 Pattern.matches(macPattern, macAddress));
     }
 
     /** @return mac address which requires the WiFi system to be enabled */
-    private String getMacAddress() {
+    private String getWifiMacAddress() {
         WifiManager wifiManager = (WifiManager) getContext()
                 .getSystemService(Context.WIFI_SERVICE);
 
@@ -313,6 +314,15 @@
         }
     }
 
+    private String getBluetoothMacAddress() {
+        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+        if (adapter == null) {
+            return "";
+        }
+
+        return adapter.getAddress();
+    }
+
     private static final String ISO_COUNTRY_CODE_PATTERN = "[a-z]{2}";
 
     public void testGetNetworkCountryIso() {
diff --git a/tests/tests/text/src/android/text/cts/EmojiTest.java b/tests/tests/text/src/android/text/cts/EmojiTest.java
index f5f191f..4bcc0e1 100644
--- a/tests/tests/text/src/android/text/cts/EmojiTest.java
+++ b/tests/tests/text/src/android/text/cts/EmojiTest.java
@@ -25,6 +25,7 @@
 import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.View;
+import android.webkit.cts.NullWebViewUtils;
 import android.webkit.cts.WebViewOnUiThread;
 import android.widget.TextView;
 import android.widget.EditText;
@@ -58,7 +59,6 @@
      */
     public void testEmojiGlyph() {
         CaptureCanvas ccanvas = new CaptureCanvas(getInstrumentation().getContext());
-        CaptureWebView cwebview = new CaptureWebView(getInstrumentation().getContext());
 
         Bitmap mBitmapA, mBitmapB;  // Emoji displayed Bitmaps to compare
 
@@ -92,11 +92,15 @@
 
             assertFalse(mBitmapA.sameAs(mBitmapB));
 
-            mBitmapA = cwebview.capture(Character.toChars(comparedCodePoints[i][0]));
-            mBitmapB = cwebview.capture(Character.toChars(comparedCodePoints[i][1]));
-
-            assertFalse(mBitmapA.sameAs(mBitmapB));
-
+            // Trigger activity bringup so we can determine if a WebView is available on this
+            // device.
+            EmojiStubActivity activity = getActivity();
+            if (NullWebViewUtils.isWebViewAvailable()) {
+                CaptureWebView cwebview = new CaptureWebView(getInstrumentation().getContext());
+                mBitmapA = cwebview.capture(Character.toChars(comparedCodePoints[i][0]));
+                mBitmapB = cwebview.capture(Character.toChars(comparedCodePoints[i][1]));
+                assertFalse(mBitmapA.sameAs(mBitmapB));
+            }
         }
     }
 
diff --git a/tests/tests/text/src/android/text/cts/StaticLayoutLineBreakingTest.java b/tests/tests/text/src/android/text/cts/StaticLayoutLineBreakingTest.java
index b249b9e..2add424 100644
--- a/tests/tests/text/src/android/text/cts/StaticLayoutLineBreakingTest.java
+++ b/tests/tests/text/src/android/text/cts/StaticLayoutLineBreakingTest.java
@@ -396,80 +396,6 @@
         return string.replaceAll(String.valueOf(c), String.valueOf(r));
     }
 
-    public void testClassIS() {
-        char[] classISCharacters = new char[] {'.', ',', ':', ';'};
-        char[] digitCharacters = new char[] {'0', '\u0660', '\u06F0', '\u0966', '\uFF10'};
-
-        for (char c : classISCharacters) {
-            // .,:; are class IS breakpoints... (but still shouldn't break alphabetic chars)
-            //              01234567
-            layout(replace("L XXX#X", '#', c), new int[] {2});
-            layout(replace("L XXXX#X", '#', c), new int[] {2});
-
-            // ...except when adjacent to digits
-            for (char d : digitCharacters) {
-                //                      01234567
-                layout(replace(replace("L XX0#X", '#', c), '0', d), new int[] {2});
-                layout(replace(replace("L XXX#0", '#', c), '0', d), new int[] {2});
-                layout(replace(replace("L XXX0#X", '#', c), '0', d), new int[] {2});
-                layout(replace(replace("L XXXX#0", '#', c), '0', d), new int[] {2});
-            }
-        }
-    }
-
-    public void testClassSYandHY() {
-        char[] classSYorHYCharacters = new char[] {'/', '-'};
-        char[] digitCharacters = new char[] {'0', '\u0660', '\u06F0', '\u0966', '\uFF10'};
-
-        for (char c : classSYorHYCharacters) {
-            // / is a class SY breakpoint, - a class HY...
-            //              01234567
-            layout(replace("L XXX#X", '#', c), new int[] {6});
-            layout(replace("L XXXX#X", '#', c), new int[] {2});
-
-            // ...except when followed by a digits
-            for (char d : digitCharacters) {
-                //                      01234567
-                layout(replace(replace("L XX0#X", '#', c), '0', d), new int[] {6});
-                layout(replace(replace("L XXX#0", '#', c), '0', d), new int[] {2});
-                layout(replace(replace("L XXX0#X", '#', c), '0', d), new int[] {2});
-                layout(replace(replace("L XXXX#0", '#', c), '0', d), new int[] {2});
-            }
-        }
-    }
-
-    public void testClassID() {
-        char ideographic = '\u8a9e'; // regular ideographic character
-        char hyphen = '\u30A0'; // KATAKANA-HIRAGANA DOUBLE HYPHEN, ideographic but non starter
-
-        // Single ideographs are normal characters
-        layout("L XXX" + ideographic, NO_BREAK);
-        layout("L XXX" + ideographic + "X", new int[] {2});
-        layout("L XXXX" + ideographic, new int[] {2});
-        layout("L XXXX" + ideographic + "X", new int[] {2});
-
-        // Two adjacent ideographs create a possible breakpoint
-        layout("L X" + ideographic + ideographic + "X", NO_BREAK);
-        layout("L X" + ideographic + ideographic + "XX", new int[] {4});
-        layout("L XX" + ideographic + ideographic + "XX", new int[] {5});
-        layout("L XXX" + ideographic + ideographic + "X", new int[] {6});
-        layout("L XXXX" + ideographic + ideographic + "X", new int[] {2});
-
-        // Except when the second one is a non starter
-        layout("L X" + ideographic + hyphen + "X", NO_BREAK);
-        layout("L X" + ideographic + hyphen + "XX", new int[] {2});
-        layout("L XX" + ideographic + hyphen + "XX", new int[] {2});
-        layout("L XXX" + ideographic + hyphen + "X", new int[] {2});
-        layout("L XXXX" + ideographic + hyphen + "X", new int[] {2});
-
-        // When the non-starter is first, a pair of ideographic characters is a line break
-        layout("L X" + hyphen + ideographic + "X", NO_BREAK);
-        layout("L X" + hyphen + ideographic + "XX", new int[] {4});
-        layout("L XX" + hyphen + ideographic + "XX", new int[] {5});
-        layout("L XXX" + hyphen + ideographic + "X", new int[] {6});
-        layout("L XXXX" + hyphen + ideographic + "X", new int[] {2});
-    }
-
     public void testReplacementSpan() {
         // Add ReplacementSpan to the string
     }
@@ -511,37 +437,19 @@
         }
     }
 
-    public void testNarrowWidthWithSpace() {
-        int[] widths = new int[] { 0, 4 };
-        for (int width: widths) {
-            layout("X ", new int[] {1}, width);
-            layout("X  ", new int[] {1}, width);
-            layout("XX ", new int[] {1, 2}, width);
-            layout("XX  ", new int[] {1, 2}, width);
-            layout("X  X", new int[] {1, 3}, width);
-            layout("X X", new int[] {1, 2}, width);
-
-            layout(" ", NO_BREAK, width);
-            layout(" X", new int[] {1}, width);
-            layout("  ", NO_BREAK, width);
-            layout(" X X", new int[] {1, 2, 3}, width);
-            layout("  X", new int[] {2}, width);
-        }
-    }
-
     public void testNarrowWidthZeroWidth() {
-        int[] widths = new int[] { 0, 4 };
+        int[] widths = new int[] { 1, 4 };
         for (int width: widths) {
             layout("X.", new int[] {1}, width);
-            layout("X__", new int[] {1}, width);
-            layout("X__X", new int[] {1, 3}, width); // Could be {1}
-            layout("X__X_", new int[] {1, 3, 4}, width); // Could be {1, 4}
+            layout("X__", NO_BREAK, width);
+            layout("X__X", new int[] {3}, width);
+            layout("X__X_", new int[] {3}, width);
 
             layout("_", NO_BREAK, width);
             layout("__", NO_BREAK, width);
-            layout("_X", new int[] {1}, width); // Could be NO_BREAK
-            layout("_X_", new int[] {1, 2}, width); // Could be {2}
-            layout("_X__", new int[] {1, 2}, width); // Could be {2}
+            layout("_X", new int[] {1}, width);
+            layout("_X_", new int[] {1}, width);
+            layout("__X__", new int[] {2}, width);
         }
     }
 
diff --git a/tests/tests/text/src/android/text/method/cts/ArrowKeyMovementMethodTest.java b/tests/tests/text/src/android/text/method/cts/ArrowKeyMovementMethodTest.java
index 1d8a032..9b1acf7 100644
--- a/tests/tests/text/src/android/text/method/cts/ArrowKeyMovementMethodTest.java
+++ b/tests/tests/text/src/android/text/method/cts/ArrowKeyMovementMethodTest.java
@@ -30,6 +30,7 @@
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.WindowManager;
 import android.widget.TextView;
 import android.widget.TextView.BufferType;
 
@@ -68,6 +69,9 @@
 
         getInstrumentation().runOnMainSync(new Runnable() {
             public void run() {
+                getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON |
+                        WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
+                
                 getActivity().setContentView(mTextView);
                 mTextView.setFocusable(true);
                 mTextView.requestFocus();
@@ -180,7 +184,7 @@
         // last line
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressBothShiftAlt();
-        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_UP, event));
@@ -191,7 +195,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressShift();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_UP, event));
@@ -214,7 +218,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressAlt();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_UP, event));
@@ -249,9 +253,10 @@
         // last line
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressBothShiftAlt();
+        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
+                KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second |line
         // last line|
@@ -259,9 +264,10 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressShift();
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
+                KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second |line
         // last lin|e
@@ -271,9 +277,10 @@
         assertTrue(correspondingIn3rdLine <= END_OF_ALL_TEXT);
 
         pressShift();
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
+                KeyEvent.KEYCODE_DPAD_DOWN, 0, 0);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second |line
         // last line|
@@ -281,27 +288,29 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressAlt();
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
+                KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second line
         // last line|
         assertSelection(END_OF_ALL_TEXT);
 
+        pressAlt();
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         MetaKeyKeyListener.resetMetaState(mEditable);
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
+                KeyEvent.KEYCODE_DPAD_DOWN, 0, 0);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second line
         // last lin|e
         assertSelection(correspondingIn3rdLine);
 
         assertFalse(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
-                KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN,
-                        KeyEvent.KEYCODE_DPAD_DOWN)));
+                KeyEvent.KEYCODE_DPAD_DOWN, event));
         // first line
         // second line
         // last lin|e
@@ -315,7 +324,7 @@
         // last line
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressBothShiftAlt();
-        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_LEFT, 0, KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_LEFT, event));
@@ -334,7 +343,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressShift();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_LEFT, 0, KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_LEFT, event));
@@ -354,7 +363,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressAlt();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_LEFT, 0, KeyEvent.META_ALT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_LEFT, event));
@@ -401,7 +410,7 @@
         // last line
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressBothShiftAlt();
-        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        KeyEvent event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_RIGHT, 0, KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_RIGHT, event));
@@ -420,7 +429,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressShift();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_RIGHT, 0, KeyEvent.META_SHIFT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_RIGHT, event));
@@ -439,7 +448,7 @@
 
         Selection.setSelection(mEditable, SPACE_IN_2ND_LINE);
         pressAlt();
-        event = new KeyEvent(0, 0, KeyEvent.ACTION_UP,
+        event = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
             KeyEvent.KEYCODE_DPAD_RIGHT, 0, KeyEvent.META_ALT_ON);
         assertTrue(mArrowKeyMovementMethod.onKeyDown(mTextView, mEditable,
                 KeyEvent.KEYCODE_DPAD_RIGHT, event));
diff --git a/tests/tests/text/src/android/text/method/cts/KeyListenerTestCase.java b/tests/tests/text/src/android/text/method/cts/KeyListenerTestCase.java
index 4007f33..375ea54 100644
--- a/tests/tests/text/src/android/text/method/cts/KeyListenerTestCase.java
+++ b/tests/tests/text/src/android/text/method/cts/KeyListenerTestCase.java
@@ -23,6 +23,7 @@
 import android.text.format.DateUtils;
 import android.text.method.cts.KeyListenerStubActivity;
 import android.text.method.KeyListener;
+import android.view.WindowManager;
 import android.widget.TextView;
 
 /**
@@ -63,6 +64,13 @@
         mInstrumentation = getInstrumentation();
         mTextView = (TextView) mActivity.findViewById(R.id.keylistener_textview);
 
+        mActivity.runOnUiThread(new Runnable() {
+            public void run() {
+                // Ensure that the screen is on for this test.
+                mTextView.setKeepScreenOn(true);
+            }
+        });
+
         assertTrue(mActivity.waitForWindowFocus(5 * DateUtils.SECOND_IN_MILLIS));
     }
 
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;
diff --git a/tests/tests/theme/src/android/theme/cts/DeviceDefaultTest.java b/tests/tests/theme/src/android/theme/cts/DeviceDefaultTest.java
index 086dce1..77de0b4 100644
--- a/tests/tests/theme/src/android/theme/cts/DeviceDefaultTest.java
+++ b/tests/tests/theme/src/android/theme/cts/DeviceDefaultTest.java
@@ -19,6 +19,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.test.ActivityInstrumentationTestCase2;
 
@@ -85,7 +86,7 @@
     }
 
     public void testGetActionBar_DeviceDefault_Light_DialogWhenLarge() {
-        assertActionBarWhenLarge(android.R.style.Theme_Holo_Light_DialogWhenLarge);
+        assertActionBarWhenLarge(android.R.style.Theme_DeviceDefault_Light_DialogWhenLarge);
     }
 
     public void testGetActionBar_DeviceDefault_Light_DialogWhenLarge_NoActionBar() {
@@ -122,6 +123,10 @@
 
     private void assertGetActionBar(int themeId, boolean actionBar) {
         Activity activity = startActivity(themeId);
+        if (activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+            assertNull(activity.getActionBar());
+            return;
+        }
         if (actionBar) {
             assertNotNull(activity.getActionBar());
         } else {
diff --git a/tests/tests/util/src/android/util/cts/TypedValueTest.java b/tests/tests/util/src/android/util/cts/TypedValueTest.java
index 5cd7463..2ab91d9 100644
--- a/tests/tests/util/src/android/util/cts/TypedValueTest.java
+++ b/tests/tests/util/src/android/util/cts/TypedValueTest.java
@@ -205,16 +205,4 @@
 
         assertEquals(TypedValue.complexToDimension(10, dm), tv.getDimension(dm));
     }
-
-    public void testComplexToDimensionNoisy() {
-        DisplayMetrics dm = new DisplayMetrics();
-        dm.density = 1.1f;
-        dm.heightPixels = 100;
-        dm.scaledDensity = 2.1f;
-        dm.xdpi = 200f;
-        dm.ydpi = 300f;
-
-        assertEquals(TypedValue.complexToDimension(1, dm),
-                                 TypedValue.complexToDimensionNoisy(1, dm));
-    }
 }
diff --git a/tests/tests/view/src/android/view/cts/WindowTest.java b/tests/tests/view/src/android/view/cts/WindowTest.java
index 7e147ab..fb670a9 100644
--- a/tests/tests/view/src/android/view/cts/WindowTest.java
+++ b/tests/tests/view/src/android/view/cts/WindowTest.java
@@ -286,8 +286,8 @@
         mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm);
         int screenWidth = dm.widthPixels;
         int screenHeight = dm.heightPixels;
-        assertEquals(screenWidth, decor.getWidth());
-        assertEquals(screenHeight, decor.getHeight());
+        assertTrue(decor.getWidth() >= screenWidth);
+        assertTrue(decor.getHeight() >= screenHeight);
         assertSame(mWindow.getContext(), decor.getContext());
     }
 
@@ -1088,5 +1088,8 @@
 
         public void onActionModeFinished(ActionMode mode) {
         }
+
+        public void onWindowDismissed() {
+        }
     }
 }
diff --git a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
index 9f92d23..12ce833 100644
--- a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
+++ b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
@@ -195,6 +195,11 @@
     }
 
     public void testInputMethodSubtypesOfSystemImes() {
+        if (!getContext().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_INPUT_METHODS)) {
+            return;
+        }
+
         final InputMethodManager imm = (InputMethodManager) mContext
                 .getSystemService(Context.INPUT_METHOD_SERVICE);
         final List<InputMethodInfo> imis = imm.getInputMethodList();
diff --git a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodManagerTest.java b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodManagerTest.java
index 46f58e6..033deb2 100644
--- a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodManagerTest.java
+++ b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodManagerTest.java
@@ -19,6 +19,7 @@
 
 import android.app.Instrumentation;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.cts.util.PollingCheck;
 import android.os.Handler;
 import android.os.IBinder;
@@ -58,6 +59,11 @@
     }
 
     public void testInputMethodManager() throws Throwable {
+        if (!getActivity().getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_INPUT_METHODS)) {
+            return;
+        }
+
         Window window = mActivity.getWindow();
         final EditText view = (EditText) window.findViewById(R.id.entry);
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java b/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
index a0b4fa6..ead235e 100644
--- a/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
@@ -42,13 +42,19 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
 
-        mCookieManager = CookieManager.getInstance();
-        assertNotNull(mCookieManager);
+            mCookieManager = CookieManager.getInstance();
+            assertNotNull(mCookieManager);
+        }
     }
 
     public void testGetInstance() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mOnUiThread.cleanUp();
         CookieManager c1 = CookieManager.getInstance();
         CookieManager c2 = CookieManager.getInstance();
@@ -57,9 +63,15 @@
     }
 
     public void testClone() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
     }
 
     public void testAcceptCookie() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mCookieManager.removeAllCookie();
         mCookieManager.setAcceptCookie(false);
         assertFalse(mCookieManager.acceptCookie());
@@ -113,6 +125,9 @@
     }
 
     public void testCookieManager() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // enable cookie
         mCookieManager.setAcceptCookie(true);
         assertTrue(mCookieManager.acceptCookie());
@@ -146,6 +161,9 @@
 
     @SuppressWarnings("deprecation")
     public void testRemoveCookies() throws InterruptedException {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // enable cookie
         mCookieManager.setAcceptCookie(true);
         assertTrue(mCookieManager.acceptCookie());
@@ -212,6 +230,9 @@
     }
 
     public void testb3167208() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String uri = "http://host.android.com/path/";
         // note the space after the domain=
         String problemCookie = "foo=bar; domain= .android.com; path=/";
diff --git a/tests/tests/webkit/src/android/webkit/cts/CookieSyncManagerTest.java b/tests/tests/webkit/src/android/webkit/cts/CookieSyncManagerTest.java
index 67a77e7..95e3add 100644
--- a/tests/tests/webkit/src/android/webkit/cts/CookieSyncManagerTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/CookieSyncManagerTest.java
@@ -33,6 +33,9 @@
     }
 
     public void testCookieSyncManager() throws Exception {
+        if (getActivity().getWebView() == null) {
+            return;
+        }
         CookieSyncManager csm1 = CookieSyncManager.createInstance(getActivity());
         assertNotNull(csm1);
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/CookieTest.java b/tests/tests/webkit/src/android/webkit/cts/CookieTest.java
index 0c0396a..7f3b183 100644
--- a/tests/tests/webkit/src/android/webkit/cts/CookieTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/CookieTest.java
@@ -16,22 +16,30 @@
 
 package android.webkit.cts;
 
-import android.test.AndroidTestCase;
+import android.test.ActivityInstrumentationTestCase2;
 import android.webkit.CookieManager;
 import android.webkit.CookieSyncManager;
 
 /**
  * Original framework tests for CookieManager
  */
-public class CookieTest extends AndroidTestCase {
+public class CookieTest extends ActivityInstrumentationTestCase2<CookieSyncManagerStubActivity> {
 
     private CookieManager mCookieManager;
     private static final long WAIT_TIME = 50;
 
+    public CookieTest() {
+        super("com.android.cts.stub", CookieSyncManagerStubActivity.class);
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        CookieSyncManager.createInstance(getContext());
+
+        if (getActivity().getWebView() == null) {
+            return;
+        }
+
         mCookieManager = CookieManager.getInstance();
         mCookieManager.removeAllCookie();
         // cookies are removed asynchronously, wait a bit for cookies to be removed
@@ -48,6 +56,9 @@
     }
 
     public void testDomain() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String url = "http://www.foo.com";
 
         // basic
@@ -86,6 +97,9 @@
     }
 
     public void testSubDomain() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String url_abcd = "http://a.b.c.d.com";
         String url_bcd = "http://b.c.d.com";
         String url_cd = "http://c.d.com";
@@ -127,6 +141,9 @@
     }
 
     public void testInvalidDomain() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String url = "http://foo.bar.com";
 
         mCookieManager.setCookie(url, "a=1; domain=.yo.foo.bar.com");
@@ -163,6 +180,9 @@
     }
 
     public void testPath() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String url = "http://www.foo.com";
 
         mCookieManager.setCookie(url, "a=b; path=/wee");
@@ -192,6 +212,9 @@
     }
 
     public void testEmptyValue() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         String url = "http://www.foobar.com";
 
         mCookieManager.setCookie(url, "bar=");
diff --git a/tests/tests/webkit/src/android/webkit/cts/GeolocationTest.java b/tests/tests/webkit/src/android/webkit/cts/GeolocationTest.java
index 016d7c2..8ab9eb6 100644
--- a/tests/tests/webkit/src/android/webkit/cts/GeolocationTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/GeolocationTest.java
@@ -135,49 +135,58 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        // Set up a WebView with JavaScript and Geolocation enabled
-        final String GEO_DIR = "geo_test";
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
-        mOnUiThread.getSettings().setJavaScriptEnabled(true);
-        mOnUiThread.getSettings().setGeolocationEnabled(true);
-        mOnUiThread.getSettings().setGeolocationDatabasePath(
-                getActivity().getApplicationContext().getDir(GEO_DIR, 0).getPath());
+        WebView webview = getActivity().getWebView();
 
-        // Add a JsInterface to report back to the test when a location is received
-        mJavascriptStatusReceiver = new JavascriptStatusReceiver();
-        mOnUiThread.addJavascriptInterface(mJavascriptStatusReceiver, JS_INTERFACE_NAME);
+        if (webview != null) {
+            // Set up a WebView with JavaScript and Geolocation enabled
+            final String GEO_DIR = "geo_test";
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+            mOnUiThread.getSettings().setJavaScriptEnabled(true);
+            mOnUiThread.getSettings().setGeolocationEnabled(true);
+            mOnUiThread.getSettings().setGeolocationDatabasePath(
+                    getActivity().getApplicationContext().getDir(GEO_DIR, 0).getPath());
 
-        // Always intercept all loads with the same geolocation test page
-        mOnUiThread.setWebViewClient(new InterceptClient(mOnUiThread));
-        // Clear all permissions before each test
-        GeolocationPermissions.getInstance().clearAll();
-        // Cache this mostly because the lookup is two lines of code
-        mLocationManager = (LocationManager)getActivity().getApplicationContext()
-                .getSystemService(Context.LOCATION_SERVICE);
-        // Add a test provider before each test to inject a location
-        mProviders = mLocationManager.getAllProviders();
-        for (String provider : mProviders) {
-            // Can't mock passive provider.
-            if (provider.equals(LocationManager.PASSIVE_PROVIDER)) {
-                mProviders.remove(provider);
-                break;
+            // Add a JsInterface to report back to the test when a location is received
+            mJavascriptStatusReceiver = new JavascriptStatusReceiver();
+            mOnUiThread.addJavascriptInterface(mJavascriptStatusReceiver, JS_INTERFACE_NAME);
+
+            // Always intercept all loads with the same geolocation test page
+            mOnUiThread.setWebViewClient(new InterceptClient(mOnUiThread));
+            // Clear all permissions before each test
+            GeolocationPermissions.getInstance().clearAll();
+            // Cache this mostly because the lookup is two lines of code
+            mLocationManager = (LocationManager)getActivity().getApplicationContext()
+                    .getSystemService(Context.LOCATION_SERVICE);
+            // Add a test provider before each test to inject a location
+            mProviders = mLocationManager.getAllProviders();
+            for (String provider : mProviders) {
+                // Can't mock passive provider.
+                if (provider.equals(LocationManager.PASSIVE_PROVIDER)) {
+                    mProviders.remove(provider);
+                    break;
+                }
             }
+            addTestProviders();
         }
-        addTestProviders();
     }
 
     @Override
     protected void tearDown() throws Exception {
         stopUpdateLocationThread();
-        // Remove the test provider after each test
-        for (String provider : mProviders) {
-            try {
-                // Work around b/11446702 by clearing the test provider before removing it
-                mLocationManager.clearTestProviderEnabled(provider);
-                mLocationManager.removeTestProvider(provider);
-            } catch (IllegalArgumentException e) {} // Not much to do about this
+        if (mProviders != null) {
+            // Remove the test provider after each test
+            for (String provider : mProviders) {
+                try {
+                    // Work around b/11446702 by clearing the test provider before removing it
+                    mLocationManager.clearTestProviderEnabled(provider);
+                    mLocationManager.removeTestProvider(provider);
+                } catch (IllegalArgumentException e) {} // Not much to do about this
+            }
         }
-        mOnUiThread.cleanUp();
+
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         // This will null all member and static variables
         super.tearDown();
     }
@@ -278,6 +287,9 @@
 
     // Test loading a page and accepting the domain for one load
     public void testSimpleGeolocationRequestAcceptOnce() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final TestSimpleGeolocationRequestWebChromeClient chromeClientAcceptOnce =
                 new TestSimpleGeolocationRequestWebChromeClient(mOnUiThread, true, false);
         mOnUiThread.setWebChromeClient(chromeClientAcceptOnce);
@@ -368,6 +380,9 @@
 
     // Test loading a page and retaining the domain forever
     public void testSimpleGeolocationRequestAcceptAlways() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final TestSimpleGeolocationRequestWebChromeClient chromeClientAcceptAlways =
                 new TestSimpleGeolocationRequestWebChromeClient(mOnUiThread, true, true);
         mOnUiThread.setWebChromeClient(chromeClientAcceptAlways);
@@ -424,6 +439,9 @@
 
     // Test the GeolocationPermissions API
     public void testGeolocationPermissions() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         Set<String> acceptedOrigins = new TreeSet<String>();
         BooleanCheck falseCheck = new BooleanCheck(false);
         GeolocationPermissions.getInstance().getAllowed(URL_2, falseCheck);
@@ -483,6 +501,9 @@
 
     // Test loading pages and checks rejecting once and recjecting the domain forever
     public void testSimpleGeolocationRequestReject() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final TestSimpleGeolocationRequestWebChromeClient chromeClientRejectOnce =
                 new TestSimpleGeolocationRequestWebChromeClient(mOnUiThread, false, false);
         mOnUiThread.setWebChromeClient(chromeClientRejectOnce);
diff --git a/tests/tests/webkit/src/android/webkit/cts/HttpAuthHandlerTest.java b/tests/tests/webkit/src/android/webkit/cts/HttpAuthHandlerTest.java
index 52e9278..b078c7a 100644
--- a/tests/tests/webkit/src/android/webkit/cts/HttpAuthHandlerTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/HttpAuthHandlerTest.java
@@ -43,12 +43,18 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+        }
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
+
         if (mWebServer != null) {
             mWebServer.shutdown();
         }
@@ -138,6 +144,9 @@
     }
 
     public void testProceed() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebServer = new CtsTestServer(getActivity());
         String url = mWebServer.getAuthAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
 
@@ -147,6 +156,9 @@
     }
 
     public void testCancel() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebServer = new CtsTestServer(getActivity());
         String url = mWebServer.getAuthAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
 
@@ -159,6 +171,9 @@
     }
 
     public void testUseHttpAuthUsernamePassword() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebServer = new CtsTestServer(getActivity());
         String url = mWebServer.getAuthAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebBackForwardListTest.java b/tests/tests/webkit/src/android/webkit/cts/WebBackForwardListTest.java
index 34dc697..71893f4 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebBackForwardListTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebBackForwardListTest.java
@@ -20,6 +20,7 @@
 import android.test.ActivityInstrumentationTestCase2;
 import android.webkit.WebBackForwardList;
 import android.webkit.WebHistoryItem;
+import android.webkit.WebView;
 
 
 public class WebBackForwardListTest extends ActivityInstrumentationTestCase2<WebViewStubActivity> {
@@ -35,16 +36,24 @@
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+        }
     }
 
     @Override
     public void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         super.tearDown();
     }
 
     public void testGetCurrentItem() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         WebBackForwardList list = mOnUiThread.copyBackForwardList();
 
         assertNull(list.getCurrentItem());
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebChromeClientTest.java b/tests/tests/webkit/src/android/webkit/cts/WebChromeClientTest.java
index 5c9c958..3142298 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebChromeClientTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebChromeClientTest.java
@@ -44,13 +44,18 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+        }
         mWebServer = new CtsTestServer(getActivity());
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         if (mWebServer != null) {
             mWebServer.shutdown();
         }
@@ -62,6 +67,9 @@
     }
 
     public void testOnProgressChanged() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -78,6 +86,9 @@
     }
 
     public void testOnReceivedTitle() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -96,6 +107,9 @@
     }
 
     public void testOnReceivedIcon() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -159,20 +173,32 @@
         }
     }
     public void testWindows() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         runWindowTest(true);
     }
 
     public void testBlockWindowsSync() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mBlockWindowCreationSync = true;
         runWindowTest(false);
     }
 
     public void testBlockWindowsAsync() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mBlockWindowCreationAsync = true;
         runWindowTest(false);
     }
 
     public void testOnJsBeforeUnload() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -196,6 +222,9 @@
     }
 
     public void testOnJsAlert() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -218,6 +247,9 @@
     }
 
     public void testOnJsConfirm() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
@@ -240,6 +272,9 @@
     }
 
     public void testOnJsPrompt() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebChromeClient webChromeClient = new MockWebChromeClient();
         mOnUiThread.setWebChromeClient(webChromeClient);
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebHistoryItemTest.java b/tests/tests/webkit/src/android/webkit/cts/WebHistoryItemTest.java
index 468430f..7d276e9 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebHistoryItemTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebHistoryItemTest.java
@@ -54,12 +54,17 @@
     protected void setUp() throws Exception {
         super.setUp();
         mWebServer = new CtsTestServer(getActivity());
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+        }
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         mWebServer.shutdown();
         super.tearDown();
         if (mIconDb != null) {
@@ -69,6 +74,9 @@
     }
 
     public void testWebHistoryItem() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final WaitForIconClient waitForIconClient = new WaitForIconClient(mOnUiThread);
         mOnUiThread.setWebChromeClient(waitForIconClient);
         runTestOnUiThread(new Runnable() {
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
index 6186a02..b25a0cf 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
@@ -65,8 +65,11 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        mOnUiThread = new WebViewOnUiThread(this, getActivity().getWebView());
-        mSettings = mOnUiThread.getSettings();
+        WebView webview = getActivity().getWebView();
+        if (webview != null) {
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+            mSettings = mOnUiThread.getSettings();
+        }
         mContext = getInstrumentation().getTargetContext();
     }
 
@@ -75,7 +78,9 @@
         if (mWebServer != null) {
             mWebServer.shutdown();
         }
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         super.tearDown();
     }
 
@@ -90,6 +95,9 @@
      * Safari/<major>.<minor>
      */
     public void testUserAgentString_default() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final String actualUserAgentString = mSettings.getUserAgentString();
         Log.i(LOG_TAG, String.format("Checking user agent string %s", actualUserAgentString));
         final String patternString =
@@ -131,6 +139,9 @@
     }
 
     public void testAccessUserAgentString() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         startWebServer();
         String url = mWebServer.getUserAgentUrl();
 
@@ -159,6 +170,9 @@
     }
 
     public void testAccessAllowFileAccess() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // This test is not compatible with 4.0.3
         if ("4.0.3".equals(Build.VERSION.RELEASE)) {
             return;
@@ -184,6 +198,9 @@
     }
 
     public void testAccessCacheMode() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         runTestOnUiThread(new Runnable() {
             @Override
             public void run() {
@@ -249,6 +266,9 @@
     }
 
     public void testAccessCursiveFontFamily() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getCursiveFontFamily());
 
         String newCusiveFamily = "Apple Chancery";
@@ -257,6 +277,9 @@
     }
 
     public void testAccessFantasyFontFamily() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getFantasyFontFamily());
 
         String newFantasyFamily = "Papyrus";
@@ -265,6 +288,9 @@
     }
 
     public void testAccessFixedFontFamily() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getFixedFontFamily());
 
         String newFixedFamily = "Courier";
@@ -273,6 +299,9 @@
     }
 
     public void testAccessSansSerifFontFamily() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getSansSerifFontFamily());
 
         String newFixedFamily = "Verdana";
@@ -281,6 +310,9 @@
     }
 
     public void testAccessSerifFontFamily() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getSerifFontFamily());
 
         String newSerifFamily = "Times";
@@ -289,6 +321,9 @@
     }
 
     public void testAccessStandardFontFamily() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getStandardFontFamily());
 
         String newStandardFamily = "Times";
@@ -297,6 +332,9 @@
     }
 
     public void testAccessDefaultFontSize() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         int defaultSize = mSettings.getDefaultFontSize();
         assertTrue(defaultSize > 0);
 
@@ -315,6 +353,9 @@
     }
 
     public void testAccessDefaultFixedFontSize() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         int defaultSize = mSettings.getDefaultFixedFontSize();
         assertTrue(defaultSize > 0);
 
@@ -333,6 +374,9 @@
     }
 
     public void testAccessDefaultTextEncodingName() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getDefaultTextEncodingName());
 
         String newEncodingName = "iso-8859-1";
@@ -341,6 +385,9 @@
     }
 
     public void testAccessJavaScriptCanOpenWindowsAutomatically() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mSettings.setJavaScriptEnabled(true);
 
         mSettings.setJavaScriptCanOpenWindowsAutomatically(false);
@@ -365,6 +412,9 @@
     }
 
     public void testAccessJavaScriptEnabled() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mSettings.setJavaScriptEnabled(true);
         assertTrue(mSettings.getJavaScriptEnabled());
         loadAssetUrl(TestHtmlConstants.JAVASCRIPT_URL);
@@ -388,6 +438,9 @@
     }
 
     public void testAccessLayoutAlgorithm() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertEquals(WebSettings.LayoutAlgorithm.NARROW_COLUMNS, mSettings.getLayoutAlgorithm());
 
         mSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
@@ -398,6 +451,9 @@
     }
 
     public void testAccessMinimumFontSize() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertEquals(8, mSettings.getMinimumFontSize());
 
         mSettings.setMinimumFontSize(100);
@@ -411,6 +467,9 @@
     }
 
     public void testAccessMinimumLogicalFontSize() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertEquals(8, mSettings.getMinimumLogicalFontSize());
 
         mSettings.setMinimumLogicalFontSize(100);
@@ -424,6 +483,9 @@
     }
 
     public void testAccessPluginsEnabled() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getPluginsEnabled());
 
         mSettings.setPluginsEnabled(true);
@@ -431,6 +493,9 @@
     }
 
     public void testAccessPluginsPath() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(mSettings.getPluginsPath());
 
         String pluginPath = "pluginPath";
@@ -440,6 +505,9 @@
     }
 
     public void testAccessSaveFormData() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertTrue(mSettings.getSaveFormData());
 
         mSettings.setSaveFormData(false);
@@ -447,6 +515,9 @@
     }
 
     public void testAccessTextSize() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertEquals(TextSize.NORMAL, mSettings.getTextSize());
 
         mSettings.setTextSize(TextSize.LARGER);
@@ -463,6 +534,9 @@
     }
 
     public void testAccessUseDoubleTree() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getUseDoubleTree());
 
         mSettings.setUseDoubleTree(true);
@@ -471,6 +545,9 @@
     }
 
     public void testAccessUseWideViewPort() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getUseWideViewPort());
 
         mSettings.setUseWideViewPort(true);
@@ -478,12 +555,18 @@
     }
 
     public void testSetNeedInitialFocus() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mSettings.setNeedInitialFocus(false);
 
         mSettings.setNeedInitialFocus(true);
     }
 
     public void testSetRenderPriority() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mSettings.setRenderPriority(WebSettings.RenderPriority.HIGH);
 
         mSettings.setRenderPriority(WebSettings.RenderPriority.LOW);
@@ -492,6 +575,9 @@
     }
 
     public void testAccessSupportMultipleWindows() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.supportMultipleWindows());
 
         mSettings.setSupportMultipleWindows(true);
@@ -499,6 +585,9 @@
     }
 
     public void testAccessSupportZoom() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertTrue(mSettings.supportZoom());
 
         runTestOnUiThread(new Runnable() {
@@ -511,6 +600,9 @@
     }
 
     public void testAccessBuiltInZoomControls() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getBuiltInZoomControls());
 
         runTestOnUiThread(new Runnable() {
@@ -523,6 +615,9 @@
     }
 
     public void testAppCacheDisabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Test that when AppCache is disabled, we don't get any AppCache
         // callbacks.
         startWebServer();
@@ -542,6 +637,9 @@
     }
 
     public void testAppCacheEnabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Note that the AppCache path can only be set once. This limits the
         // amount of testing we can do, and means that we must test all aspects
         // of setting the AppCache path in a single test to guarantee ordering.
@@ -587,6 +685,9 @@
     // using a URL. Finally, it looks like enabling database requires creating a
     // webChromeClient and listening to Quota callbacks, which is not documented.
     public void testDatabaseDisabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Verify that websql database does not work when disabled.
         startWebServer();
 
@@ -605,6 +706,9 @@
     }
 
     public void testLoadsImagesAutomatically() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertTrue(mSettings.getLoadsImagesAutomatically());
 
         startWebServer();
@@ -637,6 +741,9 @@
     }
 
     public void testBlockNetworkImage() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getBlockNetworkImage());
 
         startWebServer();
@@ -666,6 +773,9 @@
     }
 
     public void testBlockNetworkLoads() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertFalse(mSettings.getBlockNetworkLoads());
 
         startWebServer();
@@ -702,6 +812,9 @@
 
     // Verify that an image in local file system can be loaded by an asset
     public void testLocalImageLoads() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         mSettings.setJavaScriptEnabled(true);
         // Check that local images are loaded without issues regardless of domain checkings
@@ -716,6 +829,9 @@
     // Verify that javascript cross-domain request permissions matches file domain settings
     // for iframes
     public void testIframesWhenAccessFromFileURLsEnabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         mSettings.setJavaScriptEnabled(true);
         // disable universal access from files
@@ -732,6 +848,9 @@
     // Verify that javascript cross-domain request permissions matches file domain settings
     // for iframes
     public void testIframesWhenAccessFromFileURLsDisabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         mSettings.setJavaScriptEnabled(true);
         // disable universal access from files
@@ -750,11 +869,17 @@
 
     // Verify that enabling file access from file URLs enable XmlHttpRequest (XHR) across files
     public void testXHRWhenAccessFromFileURLsEnabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         verifyFileXHR(true);
     }
 
     // Verify that disabling file access from file URLs disable XmlHttpRequest (XHR) accross files
     public void testXHRWhenAccessFromFileURLsDisabled() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         final ChromeClient webChromeClient = new ChromeClient(mOnUiThread);
         mOnUiThread.setWebChromeClient(webChromeClient);
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
index f4df82a..7872dbe 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
@@ -47,18 +47,24 @@
     protected void setUp() throws Exception {
         super.setUp();
         final WebViewStubActivity activity = getActivity();
-        new PollingCheck(TEST_TIMEOUT) {
-            @Override
-                protected boolean check() {
-                return activity.hasWindowFocus();
-            }
-        }.run();
-        mOnUiThread = new WebViewOnUiThread(this, activity.getWebView());
+        WebView webview = activity.getWebView();
+        if (webview != null) {
+            new PollingCheck(TEST_TIMEOUT) {
+                @Override
+                    protected boolean check() {
+                    return activity.hasWindowFocus();
+                }
+            }.run();
+
+            mOnUiThread = new WebViewOnUiThread(this, webview);
+        }
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         if (mWebServer != null) {
             mWebServer.shutdown();
         }
@@ -67,12 +73,18 @@
 
     // Verify that the shouldoverrideurlloading is false by default
     public void testShouldOverrideUrlLoadingDefault() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final WebViewClient webViewClient = new WebViewClient();
         assertFalse(webViewClient.shouldOverrideUrlLoading(mOnUiThread.getWebView(), null));
     }
 
     // Verify shouldoverrideurlloading called on top level navigation
     public void testShouldOverrideUrlLoading() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         mOnUiThread.getSettings().setJavaScriptEnabled(true);
@@ -86,6 +98,9 @@
 
     // Verify shouldoverrideurlloading called on webview called via onCreateWindow
     public void testShouldOverrideUrlLoadingOnCreateWindow() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebServer = new CtsTestServer(getActivity());
         // WebViewClient for main window
         final MockWebViewClient mainWebViewClient = new MockWebViewClient();
@@ -132,6 +147,9 @@
     }
 
     public void testLoadPage() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         mWebServer = new CtsTestServer(getActivity());
@@ -165,6 +183,9 @@
     }
 
     public void testOnReceivedError() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
 
@@ -176,6 +197,9 @@
     }
 
     public void testOnFormResubmission() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         final WebSettings settings = mOnUiThread.getSettings();
@@ -201,6 +225,9 @@
     }
 
     public void testDoUpdateVisitedHistory() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         mWebServer = new CtsTestServer(getActivity());
@@ -219,6 +246,9 @@
     }
 
     public void testOnReceivedHttpAuthRequest() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         mWebServer = new CtsTestServer(getActivity());
@@ -230,6 +260,9 @@
     }
 
     public void testShouldOverrideKeyEvent() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
 
@@ -237,6 +270,9 @@
     }
 
     public void testOnUnhandledKeyEvent() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         requireLoadedPage();
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
@@ -256,6 +292,9 @@
     }
 
     public void testOnScaleChanged() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final MockWebViewClient webViewClient = new MockWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         mWebServer = new CtsTestServer(getActivity());
@@ -281,6 +320,9 @@
     }
 
     private void requireLoadedPage() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mOnUiThread.loadUrlAndWaitForCompletion("about:blank");
     }
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewStartupTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewStartupTest.java
index a7ee974..56f8f61 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewStartupTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewStartupTest.java
@@ -63,9 +63,17 @@
                 Log.i(TAG, "done setting cookie before creating webview");
             }
         });
+        NullWebViewUtils.NullWebViewFromThreadExceptionHandler h =
+                new NullWebViewUtils.NullWebViewFromThreadExceptionHandler();
+
+        background.setUncaughtExceptionHandler(h);
         background.start();
         background.join();
 
+        if (!h.isWebViewAvailable(mActivity)) {
+            return;
+        }
+
         // Now create WebView and test that setting the cookie beforehand really worked.
         mActivity.createAndAttachWebView();
         WebViewOnUiThread onUiThread = new WebViewOnUiThread(this, mActivity.getWebView());
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
index 75eb752..d339a62 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
@@ -124,23 +124,28 @@
     protected void setUp() throws Exception {
         super.setUp();
         final WebViewStubActivity activity = getActivity();
-        new PollingCheck() {
-            @Override
-                protected boolean check() {
-                return activity.hasWindowFocus();
-            }
-        }.run();
         mWebView = activity.getWebView();
-        File f = activity.getFileStreamPath("snapshot");
-        if (f.exists()) {
-            f.delete();
+        if (mWebView != null) {
+            new PollingCheck() {
+                @Override
+                    protected boolean check() {
+                        return activity.hasWindowFocus();
+                }
+            }.run();
+            File f = activity.getFileStreamPath("snapshot");
+            if (f.exists()) {
+                f.delete();
+            }
+
+            mOnUiThread = new WebViewOnUiThread(this, mWebView);
         }
-        mOnUiThread = new WebViewOnUiThread(this, mWebView);
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mOnUiThread.cleanUp();
+        if (mOnUiThread != null) {
+            mOnUiThread.cleanUp();
+        }
         if (mWebServer != null) {
             mWebServer.shutdown();
         }
@@ -171,6 +176,10 @@
 
     @UiThreadTest
     public void testConstructor() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         new WebView(getActivity());
         new WebView(getActivity(), null);
         new WebView(getActivity(), null, 0);
@@ -178,12 +187,19 @@
 
     @UiThreadTest
     public void testCreatingWebViewCreatesCookieSyncManager() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         new WebView(getActivity());
         assertNotNull(CookieSyncManager.getInstance());
     }
 
     @UiThreadTest
     public void testFindAddress() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         /*
          * Info about USPS
          * http://en.wikipedia.org/wiki/Postal_address#United_States
@@ -199,19 +215,25 @@
     @SuppressWarnings("deprecation")
     @UiThreadTest
     public void testGetZoomControls() {
-         WebSettings settings = mWebView.getSettings();
-         assertTrue(settings.supportZoom());
-         View zoomControls = mWebView.getZoomControls();
-         assertNotNull(zoomControls);
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+        WebSettings settings = mWebView.getSettings();
+        assertTrue(settings.supportZoom());
+        View zoomControls = mWebView.getZoomControls();
+        assertNotNull(zoomControls);
 
-         // disable zoom support
-         settings.setSupportZoom(false);
-         assertFalse(settings.supportZoom());
-         assertNull(mWebView.getZoomControls());
+        // disable zoom support
+        settings.setSupportZoom(false);
+        assertFalse(settings.supportZoom());
+        assertNull(mWebView.getZoomControls());
     }
 
     @UiThreadTest
     public void testInvokeZoomPicker() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         WebSettings settings = mWebView.getSettings();
         assertTrue(settings.supportZoom());
         startWebServer(false);
@@ -221,6 +243,10 @@
     }
 
     public void testZoom() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         // Pinch zoom is not supported in wrap_content layouts.
         mOnUiThread.setLayoutHeightToMatchParent();
 
@@ -307,6 +333,10 @@
 
     @UiThreadTest
     public void testSetScrollBarStyle() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
         assertFalse(mWebView.overlayHorizontalScrollbar());
         assertFalse(mWebView.overlayVerticalScrollbar());
@@ -326,6 +356,10 @@
 
     @UiThreadTest
     public void testScrollBarOverlay() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         mWebView.setHorizontalScrollbarOverlay(true);
         mWebView.setVerticalScrollbarOverlay(false);
         assertTrue(mWebView.overlayHorizontalScrollbar());
@@ -339,6 +373,10 @@
 
     @UiThreadTest
     public void testLoadUrl() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         assertNull(mWebView.getUrl());
         assertNull(mWebView.getOriginalUrl());
         assertEquals(INITIAL_PROGRESS, mWebView.getProgress());
@@ -362,6 +400,10 @@
 
     @UiThreadTest
     public void testLoadUrlDoesNotStripParamsWhenLoadingContentUrls() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         Uri.Builder uriBuilder = new Uri.Builder().scheme(
                 ContentResolver.SCHEME_CONTENT).authority(MockContentProvider.AUTHORITY);
         uriBuilder.appendPath("foo.html").appendQueryParameter("param","bar");
@@ -374,6 +416,10 @@
 
     @UiThreadTest
     public void testAppInjectedXRequestedWithHeaderIsNotOverwritten() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         startWebServer(false);
         String url = mWebServer.getAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
         HashMap<String, String> map = new HashMap<String, String>();
@@ -393,6 +439,10 @@
 
     @UiThreadTest
     public void testAppCanInjectHeadersViaImmutableMap() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         startWebServer(false);
         String url = mWebServer.getAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
         HashMap<String, String> map = new HashMap<String, String>();
@@ -413,6 +463,10 @@
     @SuppressWarnings("deprecation")
     @UiThreadTest
     public void testGetVisibleTitleHeight() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         startWebServer(false);
         String url = mWebServer.getAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
         mOnUiThread.loadUrlAndWaitForCompletion(url);
@@ -421,6 +475,10 @@
 
     @UiThreadTest
     public void testGetOriginalUrl() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         startWebServer(false);
         final String finalUrl = mWebServer.getAssetUrl(TestHtmlConstants.HELLO_WORLD_URL);
         final String redirectUrl =
@@ -441,6 +499,10 @@
     }
 
     public void testStopLoading() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         assertEquals(INITIAL_PROGRESS, mOnUiThread.getProgress());
 
         startWebServer(false);
@@ -476,6 +538,10 @@
 
     @UiThreadTest
     public void testGoBackAndForward() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         assertGoBackOrForwardBySteps(false, -1);
         assertGoBackOrForwardBySteps(false, 1);
 
@@ -522,6 +588,10 @@
 
     @UiThreadTest
     public void testAddJavascriptInterface() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         WebSettings settings = mWebView.getSettings();
         settings.setJavaScriptEnabled(true);
         settings.setJavaScriptCanOpenWindowsAutomatically(true);
@@ -568,6 +638,10 @@
 
     @UiThreadTest
     public void testAddJavascriptInterfaceNullObject() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         WebSettings settings = mWebView.getSettings();
         settings.setJavaScriptEnabled(true);
         String setTitleToPropertyTypeHtml = "<html><head></head>" +
@@ -600,6 +674,10 @@
 
     @UiThreadTest
     public void testRemoveJavascriptInterface() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         WebSettings settings = mWebView.getSettings();
         settings.setJavaScriptEnabled(true);
         String setTitleToPropertyTypeHtml = "<html><head></head>" +
@@ -619,6 +697,10 @@
     }
 
     public void testUseRemovedJavascriptInterface() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         class RemovedObject {
             @Override
             @JavascriptInterface
@@ -667,6 +749,10 @@
     }
 
     public void testJavascriptInterfaceCustomPropertiesClearedOnReload() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
+
         mOnUiThread.getSettings().setJavaScriptEnabled(true);
 
         class DummyJavaScriptInterface {
@@ -727,6 +813,9 @@
     }
 
     public void testCapturePicture() throws Exception, Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final TestPictureListener listener = new TestPictureListener();
 
         startWebServer(false);
@@ -751,6 +840,9 @@
     }
 
     public void testSetPictureListener() throws Exception, Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MyPictureListener implements PictureListener {
             public int callCount;
             public WebView webView;
@@ -794,6 +886,9 @@
 
     @UiThreadTest
     public void testAccessHttpAuthUsernamePassword() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         try {
             WebViewDatabase.getInstance(getActivity()).clearHttpAuthUsernamePassword();
 
@@ -855,6 +950,9 @@
     }
 
     public void testLoadData() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final String HTML_CONTENT =
                 "<html><head><title>Hello,World!</title></head><body></body>" +
                 "</html>";
@@ -883,6 +981,9 @@
 
     @UiThreadTest
     public void testLoadDataWithBaseUrl() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNull(mWebView.getUrl());
         String imgUrl = TestHtmlConstants.SMALL_IMG_URL; // relative
         // Snippet of HTML that will prevent favicon requests to the test server.
@@ -971,6 +1072,9 @@
     }
 
     public void testFindAll()  throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Make the page scrollable, so we can detect the scrolling to make sure the
         // content fully loaded.
         mOnUiThread.setInitialScale(100);
@@ -995,6 +1099,9 @@
     }
 
     public void testFindNext() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Reset the scaling so that finding the next "all" text will require scrolling.
         mOnUiThread.setInitialScale(100);
 
@@ -1051,6 +1158,9 @@
     }
 
     public void testDocumentHasImages() throws Exception, Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class DocumentHasImageCheckHandler extends Handler {
             private boolean mReceived;
             private int mMsgArg1;
@@ -1100,6 +1210,9 @@
     }
 
     public void testPageScroll() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         DisplayMetrics metrics = mOnUiThread.getDisplayMetrics();
         int dimension = 2 * Math.max(metrics.widthPixels, metrics.heightPixels);
         String p = "<p style=\"height:" + dimension + "px;\">" +
@@ -1144,6 +1257,9 @@
     }
 
     public void testGetContentHeight() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mOnUiThread.loadDataAndWaitForCompletion(
                 "<html><body></body></html>", "text/html", null);
         new PollingCheck() {
@@ -1182,12 +1298,18 @@
 
     @UiThreadTest
     public void testPlatformNotifications() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         WebView.enablePlatformNotifications();
         WebView.disablePlatformNotifications();
     }
 
     @UiThreadTest
     public void testAccessPluginList() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         assertNotNull(WebView.getPluginList());
 
         // can not find a way to install plugins
@@ -1196,12 +1318,18 @@
 
     @UiThreadTest
     public void testDestroy() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Create a new WebView, since we cannot call destroy() on a view in the hierarchy
         WebView localWebView = new WebView(getActivity());
         localWebView.destroy();
     }
 
     public void testFlingScroll() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         DisplayMetrics metrics = mOnUiThread.getDisplayMetrics();
         final int dimension = 10 * Math.max(metrics.widthPixels, metrics.heightPixels);
         String p = "<p style=\"height:" + dimension + "px;" +
@@ -1231,6 +1359,9 @@
     }
 
     public void testRequestFocusNodeHref() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         startWebServer(false);
         String url1 = mWebServer.getAssetUrl(TestHtmlConstants.HTML_URL1);
         String url2 = mWebServer.getAssetUrl(TestHtmlConstants.HTML_URL2);
@@ -1298,6 +1429,9 @@
     }
 
     public void testRequestImageRef() throws Exception, Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class ImageLoaded {
             public boolean mImageLoaded;
 
@@ -1378,10 +1512,16 @@
 
     @UiThreadTest
     public void testDebugDump() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebView.debugDump();
     }
 
     public void testGetHitTestResult() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final String anchor = "<p><a href=\"" + TestHtmlConstants.EXT_WEB_URL1
                 + "\">normal anchor</a></p>";
         final String blankAnchor = "<p><a href=\"\">blank anchor</a></p>";
@@ -1443,6 +1583,9 @@
     }
 
     public void testSetInitialScale() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final String p = "<p style=\"height:1000px;width:1000px\">Test setInitialScale.</p>";
         final float defaultScale =
             getInstrumentation().getTargetContext().getResources().getDisplayMetrics().density;
@@ -1494,6 +1637,9 @@
 
     @UiThreadTest
     public void testGetFavicon() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         startWebServer(false);
         String url = mWebServer.getAssetUrl(TestHtmlConstants.TEST_FAVICON_URL);
         mOnUiThread.loadUrlAndWaitForCompletion(url);
@@ -1504,6 +1650,9 @@
 
     @UiThreadTest
     public void testClearHistory() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         startWebServer(false);
         String url1 = mWebServer.getAssetUrl(TestHtmlConstants.HTML_URL1);
         String url2 = mWebServer.getAssetUrl(TestHtmlConstants.HTML_URL2);
@@ -1526,6 +1675,9 @@
 
     @UiThreadTest
     public void testSaveAndRestoreState() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // nothing to save
         assertNull(mWebView.saveState(new Bundle()));
 
@@ -1589,6 +1741,9 @@
     }
 
     public void testSetWebViewClient() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final ScaleChangedWebViewClient webViewClient = new ScaleChangedWebViewClient();
         mOnUiThread.setWebViewClient(webViewClient);
         startWebServer(false);
@@ -1604,6 +1759,9 @@
 
     @UiThreadTest
     public void testInsecureSiteClearsCertificate() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebViewClient extends WaitForLoadedClient {
             public MockWebViewClient() {
                 super(mOnUiThread);
@@ -1632,6 +1790,9 @@
 
     @UiThreadTest
     public void testSecureSiteSetsCertificate() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebViewClient extends WaitForLoadedClient {
             public MockWebViewClient() {
                 super(mOnUiThread);
@@ -1660,6 +1821,9 @@
 
     @UiThreadTest
     public void testClearSslPreferences() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Load the first page. We expect a call to
         // WebViewClient.onReceivedSslError().
         final SslErrorWebViewClient webViewClient = new SslErrorWebViewClient();
@@ -1687,6 +1851,9 @@
     }
 
     public void testOnReceivedSslError() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebViewClient extends WaitForLoadedClient {
             private String mErrorUrl;
             private WebView mWebView;
@@ -1720,6 +1887,9 @@
     }
 
     public void testOnReceivedSslErrorProceed() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebViewClient extends WaitForLoadedClient {
             public MockWebViewClient() {
                 super(mOnUiThread);
@@ -1738,6 +1908,9 @@
     }
 
     public void testOnReceivedSslErrorCancel() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebViewClient extends WaitForLoadedClient {
             public MockWebViewClient() {
                 super(mOnUiThread);
@@ -1757,6 +1930,9 @@
     }
 
     public void testSslErrorProceedResponseReusedForSameHost() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Load the first page. We expect a call to
         // WebViewClient.onReceivedSslError().
         final SslErrorWebViewClient webViewClient = new SslErrorWebViewClient();
@@ -1777,6 +1953,9 @@
     }
 
     public void testSslErrorProceedResponseNotReusedForDifferentHost() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         // Load the first page. We expect a call to
         // WebViewClient.onReceivedSslError().
         final SslErrorWebViewClient webViewClient = new SslErrorWebViewClient();
@@ -1800,6 +1979,9 @@
     }
 
     public void testRequestChildRectangleOnScreen() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         DisplayMetrics metrics = mOnUiThread.getDisplayMetrics();
         final int dimension = 2 * Math.max(metrics.widthPixels, metrics.heightPixels);
         String p = "<p style=\"height:" + dimension + "px;width:" + dimension + "px\">&nbsp;</p>";
@@ -1823,6 +2005,9 @@
     }
 
     public void testSetDownloadListener() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MyDownloadListener implements DownloadListener {
             public String url;
             public String mimeType;
@@ -1879,6 +2064,9 @@
 
     @UiThreadTest
     public void testSetLayoutParams() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(600, 800);
         mWebView.setLayoutParams(params);
         assertSame(params, mWebView.getLayoutParams());
@@ -1886,10 +2074,16 @@
 
     @UiThreadTest
     public void testSetMapTrackballToArrowKeys() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mWebView.setMapTrackballToArrowKeys(true);
     }
 
     public void testSetNetworkAvailable() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         WebSettings settings = mOnUiThread.getSettings();
         settings.setJavaScriptEnabled(true);
         startWebServer(false);
@@ -1920,6 +2114,9 @@
     }
 
     public void testSetWebChromeClient() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         final class MockWebChromeClient extends WaitForProgressClient {
             private boolean mOnProgressChanged = false;
 
@@ -1957,6 +2154,9 @@
     }
 
     public void testPauseResumeTimers() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         class Monitor {
             private boolean mIsUpdated;
 
@@ -2012,6 +2212,9 @@
 
     // verify query parameters can be passed correctly to android asset files
     public void testAndroidAssetQueryParam() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         WebSettings settings = mOnUiThread.getSettings();
         settings.setJavaScriptEnabled(true);
@@ -2023,6 +2226,9 @@
 
     // verify anchors work correctly for android asset files
     public void testAndroidAssetAnchor() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
 
         WebSettings settings = mOnUiThread.getSettings();
         settings.setJavaScriptEnabled(true);
@@ -2033,6 +2239,9 @@
     }
 
     public void testEvaluateJavascript() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mOnUiThread.getSettings().setJavaScriptEnabled(true);
         mOnUiThread.loadUrlAndWaitForCompletion("about:blank");
 
@@ -2056,6 +2265,9 @@
 
     // Verify Print feature can create a PDF file with a correct preamble.
     public void testPrinting() throws Throwable {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         mOnUiThread.loadDataAndWaitForCompletion("<html><head></head>" +
                 "<body>foo</body></html>",
                 "text/html", null);
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebView_WebViewTransportTest.java b/tests/tests/webkit/src/android/webkit/cts/WebView_WebViewTransportTest.java
index dd784be..cb72ef0 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebView_WebViewTransportTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebView_WebViewTransportTest.java
@@ -31,6 +31,9 @@
 
     @UiThreadTest
     public void testAccessWebView() {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         WebView webView = getActivity().getWebView();
         WebViewTransport transport = webView.new WebViewTransport();
 
diff --git a/tests/tests/widget/src/android/widget/cts/CompoundButtonTest.java b/tests/tests/widget/src/android/widget/cts/CompoundButtonTest.java
index 731d1ce..252e237 100644
--- a/tests/tests/widget/src/android/widget/cts/CompoundButtonTest.java
+++ b/tests/tests/widget/src/android/widget/cts/CompoundButtonTest.java
@@ -300,7 +300,7 @@
 
         state = compoundButton.onSaveInstanceState();
         assertNotNull(state);
-        assertTrue(compoundButton.getFreezesText());
+        assertFalse(compoundButton.getFreezesText());
 
         compoundButton.setChecked(true);
 
diff --git a/tests/tests/widget/src/android/widget/cts/FrameLayoutTest.java b/tests/tests/widget/src/android/widget/cts/FrameLayoutTest.java
index 5b225e8..6564ce0 100644
--- a/tests/tests/widget/src/android/widget/cts/FrameLayoutTest.java
+++ b/tests/tests/widget/src/android/widget/cts/FrameLayoutTest.java
@@ -156,7 +156,7 @@
         // text view and button are VISIBLE, they should be measured
         final TextView textView = (TextView) frameLayout.findViewById(R.id.framelayout_textview);
         compareScaledPixels(30, textView.getMeasuredHeight());
-        compareScaledPixels(100, textView.getMeasuredWidth());
+        compareScaledPixels(60, textView.getMeasuredWidth());
         assertEquals(textView.getMeasuredHeight(), frameLayout.getMeasuredHeight());
         assertEquals(textView.getMeasuredWidth(), frameLayout.getMeasuredWidth());
 
diff --git a/tests/tests/widget/src/android/widget/cts/RemoteViewsActivityTest.java b/tests/tests/widget/src/android/widget/cts/RemoteViewsActivityTest.java
index 758afd7..b3c0915 100644
--- a/tests/tests/widget/src/android/widget/cts/RemoteViewsActivityTest.java
+++ b/tests/tests/widget/src/android/widget/cts/RemoteViewsActivityTest.java
@@ -23,6 +23,7 @@
 import android.view.InflateException;
 import android.view.View;
 import android.view.ViewGroup;
+import android.webkit.cts.NullWebViewUtils;
 import android.widget.RemoteViews;
 
 import com.android.cts.stub.R;
@@ -96,6 +97,9 @@
 
     @MediumTest
     public void testWebView() throws Exception {
+        if (!NullWebViewUtils.isWebViewAvailable()) {
+            return;
+        }
         RemoteViews orig = new RemoteViews(PACKAGE_NAME, R.layout.remote_view_test_bad_2);
         Parcel p = Parcel.obtain();
         orig.writeToParcel(p, 0);
diff --git a/tests/tests/widget/src/android/widget/cts/VideoViewTest.java b/tests/tests/widget/src/android/widget/cts/VideoViewTest.java
index 679a298..c8d9fc7 100644
--- a/tests/tests/widget/src/android/widget/cts/VideoViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/VideoViewTest.java
@@ -18,16 +18,18 @@
 
 import com.android.cts.stub.R;
 
-
 import android.app.Activity;
 import android.app.Instrumentation;
 import android.content.Context;
 import android.cts.util.PollingCheck;
+import android.media.MediaCodecInfo;
+import android.media.MediaCodecList;
 import android.media.MediaPlayer;
 import android.media.MediaPlayer.OnCompletionListener;
 import android.media.MediaPlayer.OnErrorListener;
 import android.media.MediaPlayer.OnPreparedListener;
 import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
 import android.view.View.MeasureSpec;
 import android.widget.MediaController;
 import android.widget.VideoView;
@@ -40,6 +42,8 @@
  * Test {@link VideoView}.
  */
 public class VideoViewTest extends ActivityInstrumentationTestCase2<VideoViewStubActivity> {
+    /** Debug TAG. **/
+    private static final String TAG = "VideoViewTest";
     /** The maximum time to wait for an operation. */
     private static final long   TIME_OUT = 15000L;
     /** The interval time to wait for completing an operation. */
@@ -48,6 +52,8 @@
     private static final int    TEST_VIDEO_DURATION = 11047;
     /** The full name of R.raw.testvideo. */
     private static final String VIDEO_NAME   = "testvideo.3gp";
+    /** The MIME type. */
+    private static final String MIME_TYPE = "video/3gpp";
     /** delta for duration in case user uses different decoders on different
         hardware that report a duration that's different by a few milliseconds */
     private static final int DURATION_DELTA = 100;
@@ -95,6 +101,28 @@
         }
     }
 
+    // TODO: Make a public method selectCodec() in common libraries (e.g. cts/libs/), to avoid
+    // redundant function definitions in this and other media related test files.
+    private static boolean hasCodec(String mimeType) {
+        int numCodecs = MediaCodecList.getCodecCount();
+
+        for (int i = 0; i < numCodecs; i++) {
+            MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
+
+            if (!codecInfo.isEncoder()) {
+                continue;
+            }
+
+            String[] types = codecInfo.getSupportedTypes();
+            for (int j = 0; j < types.length; j++) {
+                if (types[j].equalsIgnoreCase(mimeType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
     /**
      * Instantiates a new video view test.
      */
@@ -165,6 +193,12 @@
     }
 
     public void testPlayVideo1() throws Throwable {
+        // Don't run the test if the codec isn't supported.
+        if (!hasCodec(MIME_TYPE)) {
+            Log.w(TAG, "Codec " + MIME_TYPE + " not supported. Return from testPlayVideo1.");
+            return;
+        }
+
         final MockOnPreparedListener preparedListener = new MockOnPreparedListener();
         mVideoView.setOnPreparedListener(preparedListener);
         final MockOnCompletionListener completionListener = new MockOnCompletionListener();
@@ -219,6 +253,12 @@
     }
 
     public void testGetBufferPercentage() throws Throwable {
+        // Don't run the test if the codec isn't supported.
+        if (!hasCodec(MIME_TYPE)) {
+            Log.w(TAG, MIME_TYPE + " not supported. Return from testGetBufferPercentage.");
+            return;
+        }
+
         final MockOnPreparedListener prepareListener = new MockOnPreparedListener();
         mVideoView.setOnPreparedListener(prepareListener);
 
@@ -255,6 +295,12 @@
     }
 
     public void testGetDuration() throws Throwable {
+        // Don't run the test if the codec isn't supported.
+        if (!hasCodec(MIME_TYPE)) {
+            Log.w(TAG, "Codec " + MIME_TYPE + " not supported. Return from testGetDuration.");
+            return;
+        }
+
         runTestOnUiThread(new Runnable() {
             public void run() {
                 mVideoView.setVideoPath(mVideoPath);
diff --git a/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/values-watch/styles.xml b/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/values-watch/styles.xml
new file mode 100644
index 0000000..1d904c2
--- /dev/null
+++ b/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/values-watch/styles.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ * Copyright (C) 2011 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.
+ -->
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar" />
+
+</resources>
\ No newline at end of file
diff --git a/tools/cts-java-scanner/src/com/android/cts/javascanner/DocletRunner.java b/tools/cts-java-scanner/src/com/android/cts/javascanner/DocletRunner.java
index 8c8dd4f..e56a7cf 100644
--- a/tools/cts-java-scanner/src/com/android/cts/javascanner/DocletRunner.java
+++ b/tools/cts-java-scanner/src/com/android/cts/javascanner/DocletRunner.java
@@ -15,12 +15,13 @@
  */
 package com.android.cts.javascanner;
 
+import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Scanner;
 
 class DocletRunner {
 
@@ -45,16 +46,21 @@
         args.add(getClassPath());
         args.addAll(getSourceFiles(mSourceDir));
 
-        Process process = new ProcessBuilder(args).start();
-        Scanner scanner = null;
+
+        // NOTE: We redirect the error stream to make sure the child process
+        // isn't blocked due to a full pipe. (The javadoc tool writes source errors
+        // to stderr.)
+        Process process = new ProcessBuilder(args).redirectErrorStream(true).start();
+        BufferedReader reader = new BufferedReader(
+                new InputStreamReader(process.getInputStream()));
         try {
-            scanner = new Scanner(process.getInputStream());
-            while (scanner.hasNextLine()) {
-                System.out.println(scanner.nextLine());
+            String line = null;
+            while ((line = reader.readLine()) != null) {
+                System.out.println(line);
             }
         } finally {
-            if (scanner != null) {
-                scanner.close();
+            if (reader != null) {
+                reader.close();
             }
         }
 
diff --git a/tools/dasm/src/dasm/DAsm.java b/tools/dasm/src/dasm/DAsm.java
index d298689..72436ac 100644
--- a/tools/dasm/src/dasm/DAsm.java
+++ b/tools/dasm/src/dasm/DAsm.java
@@ -403,8 +403,11 @@
         regs_count = 1;
 
         method_nat = new CstNat(new CstString(name), new CstString(descriptor));
-        if (method_nat.isClassInit()) access |= AccessFlags.ACC_STATIC;
-        if (method_nat.isInstanceInit()) access |= AccessFlags.ACC_CONSTRUCTOR;
+        if (method_nat.isClassInit()) {
+            access |= (AccessFlags.ACC_CONSTRUCTOR | AccessFlags.ACC_STATIC);
+        } else if (method_nat.isInstanceInit()) {
+            access |= AccessFlags.ACC_CONSTRUCTOR;
+        }
 
         method_acc = access;
     }
diff --git a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoActivity.java b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoActivity.java
index 4df8e62..ed82b08 100644
--- a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoActivity.java
+++ b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoActivity.java
@@ -106,6 +106,11 @@
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        // Dismiss keyguard and keep screen on while this test is on.
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
+                WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON |
+                WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
         super.onCreate(savedInstanceState);
         Window w = getWindow();
         w.setFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED,
diff --git a/tools/tradefed-host/etc/cts-tradefed b/tools/tradefed-host/etc/cts-tradefed
index 11f97e6..bc5c07a 100755
--- a/tools/tradefed-host/etc/cts-tradefed
+++ b/tools/tradefed-host/etc/cts-tradefed
@@ -35,9 +35,9 @@
 checkPath java
 
 # check java version
-JAVA_VERSION=$(java -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
+JAVA_VERSION=$(java -version 2>&1 | head -n 1 | grep '[ "]1\.[67][\. "$$]')
 if [ "${JAVA_VERSION}" == "" ]; then
-    echo "Wrong java version. 1.6 is required."
+    echo "Wrong java version. 1.6 or 1.7 is required."
     exit
 fi
 
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
index ccdb0eb..d62531c 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
@@ -31,7 +31,7 @@
     @Option(name="cts-install-path", description="the path to the cts installation to use")
     private String mCtsRootDirPath = System.getProperty("CTS_ROOT");
 
-    public static final String CTS_BUILD_VERSION = "4.4_r3";
+    public static final String CTS_BUILD_VERSION = "4.4W_r4";
 
     /**
      * {@inheritDoc}
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 809696a..77189cd 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
@@ -19,6 +19,7 @@
 import com.android.ddmlib.Log;
 import com.android.tradefed.build.IBuildInfo;
 import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.ITestDevice;
 import com.android.tradefed.result.ITestInvocationListener;
 import com.android.tradefed.testtype.IBuildReceiver;
 import com.android.tradefed.testtype.InstrumentationTest;
@@ -30,8 +31,8 @@
 import junit.framework.Assert;
 
 /**
- * A {@link InstrumentationTest] that will install CTS apks before test execution,
- * and uninstall on execution completion.
+ * A {@link InstrumentationTest} that will install CTS apks 
+ * before test execution, and uninstall on execution completion.
  */
 public class InstrumentationApkTest extends InstrumentationTest implements IBuildReceiver {
 
@@ -68,20 +69,29 @@
     @Override
     public void run(final ITestInvocationListener listener)
             throws DeviceNotAvailableException {
-        Assert.assertNotNull("missing device", getDevice());
-        Assert.assertNotNull("missing build", mCtsBuild);
+        ITestDevice mTestDevice = getDevice();
+
+        if (mTestDevice == null) {
+            Log.e(LOG_TAG, String.format("Missing device."));
+            return;
+        }
+        if (mCtsBuild == null) {
+            Log.e(LOG_TAG, String.format("Missing build %s", mCtsBuild));
+            return;
+        }
 
         for (String apkFileName : mInstallFileNames) {
             Log.d(LOG_TAG, String.format("Installing %s on %s", apkFileName,
-                    getDevice().getSerialNumber()));
+                    mTestDevice.getSerialNumber()));
             try {
-                String installCode = getDevice().installPackage(mCtsBuild.getTestApp(apkFileName),
+                String installCode = mTestDevice.installPackage(mCtsBuild.getTestApp(apkFileName),
                         true);
-                Assert.assertNull(String.format("Failed to install %s on %s. Reason: %s",
-                        apkFileName, getDevice().getSerialNumber(), installCode), installCode);
-
+                if (installCode != null) {
+                    Log.e(LOG_TAG, String.format("Failed to install %s on %s. Reason: %s",
+                          apkFileName, mTestDevice.getSerialNumber(), installCode));
+                }
             } catch (FileNotFoundException e) {
-                Assert.fail(String.format("Could not find file %s", apkFileName));
+                Log.e(LOG_TAG, String.format("Could not find file %s", apkFileName));
             }
         }
         super.run(listener);
diff --git a/tools/utils/buildCts.py b/tools/utils/buildCts.py
index b269be8..fd91c40 100755
--- a/tools/utils/buildCts.py
+++ b/tools/utils/buildCts.py
@@ -72,8 +72,6 @@
 
     self.test_repository = os.path.join(self.out_dir, 'repository/testcases')
     self.plan_repository = os.path.join(self.out_dir, 'repository/plans')
-    
-    #dirty hack to copy over prepopulated CTS test plans, stable vs flaky, for autoCTS
     self.definedplans_repository = os.path.join(self.android_root, 'cts/tests/plans')
 
   def GenerateTestDescriptions(self):
@@ -154,14 +152,111 @@
     plan.Include('android\.telephony')
     plan.Include('android\.nativemedia.*')
     plan.Include('com\.android\.cts\..*')#TODO(stuartscott): Should PDK have all these?
-    #TODO(stuartscott): Maybe move away from com.android.* to android.* - less typing
     self.__WritePlan(plan, 'PDK')
 
-    #dirty hack to copy over pre-populated CTS plans - flaky vs stable - to streamline autoCTS
-    shutil.copyfile(os.path.join(self.definedplans_repository, 'CTS-flaky.xml'),
-        os.path.join(self.plan_repository, 'CTS-flaky.xml'))
-    shutil.copyfile(os.path.join(self.definedplans_repository, 'CTS-stable.xml'),
-        os.path.join(self.plan_repository, 'CTS-stable.xml'))
+    flaky_tests = BuildCtsFlakyTestList()
+
+    # CTS Stable plan
+    plan = tools.TestPlan(packages)
+    plan.Exclude(r'android\.display')
+    for package, test_list in flaky_tests.iteritems():
+      plan.ExcludeTests(package, test_list)
+    self.__WritePlan(plan, 'CTS-stable')
+
+    # CTS Flaky plan - inversion of CTS Stable
+    plan = tools.TestPlan(packages)
+    plan.Exclude('.*')
+    plan.Include(r'android\.display')
+    for package, test_list in flaky_tests.iteritems():
+      plan.Include(package)
+      plan.IncludeTests(package, test_list)
+    self.__WritePlan(plan, 'CTS-flaky')
+
+
+def BuildCtsFlakyTestList():
+  """ Construct a defaultdict that maps package name to a list of tests
+      that are known to be flaky. """
+  return {
+      'android.app' : [
+          'cts.ActivityManagerTest#testIsRunningInTestHarness',
+          'cts.AlertDialogTest#testAlertDialogCancelable',
+          'cts.ExpandableListActivityTest#testCallback',],
+      'android.hardware' : [
+          'cts.SensorIntegrationTests#testAccelerometerDoesNotStopGyroscope',
+          'cts.SensorIntegrationTests#testsAccelerometerDoesnNotStopMagnetometer',
+          'cts.SensorIntegrationTests#testAndroidTestCaseSetupProperly',
+          'cts.SensorIntegrationTests#testBatchAndFlush',
+          'cts.SensorIntegrationTests#testGyroscopeDoesNotStopAccelerometer',
+          'cts.SensorIntegrationTests#testGyroscopeDoesNotStopMagnetometer',
+          'cts.SensorIntegrationTests#testMagnetometerDoesNotStopAccelerometer',
+          'cts.SensorIntegrationTests#testMagnetometerDoesNotStopGyroscope',
+          'cts.SensorMagneticFieldTest#testBatchingStoppingOtherClients',
+          'cts.SensorMagneticFieldTest#testBatchingStoppingOtherClientsBatching',
+          'cts.SensorMagneticFieldTest#testFrequencyAccuracy',
+          'cts.SensorMagneticFieldTest#testOneClientSeveralThreads',
+          'cts.SensorMagneticFieldTest#testOneClientSeveralThreadsBatching',
+          'cts.SensorMagneticFieldTest#testStandardDeviationWhileStatic',
+          'cts.SensorMagneticFieldTest#testStoppingOtherClients',
+          'cts.SensorMagneticFieldTest#testStoppingOtherClientsBatching',
+          'cts.SensorAccelerometerTest#testBatchingStoppingOtherClients',
+          'cts.SensorAccelerometerTest#testBatchingStoppingOtherClientsBatching',
+          'cts.SensorAccelerometerTest#testFrequencyAccuracy',
+          'cts.SensorAccelerometerTest#testOneClientSeveralThreads',
+          'cts.SensorAccelerometerTest#testOneClientSeveralThreadsBatching',
+          'cts.SensorGyroscopeTest#testBatchingStoppingOtherClients',
+          'cts.SensorGyroscopeTest#testBatchingStoppingOtherClientsBatching',
+          'cts.SensorGyroscopeTest#testFrequencyAccuracy',
+          'cts.SensorGyroscopeTest#testOneClientSeveralThreads',
+          'cts.SensorGyroscopeTest#testOneClientSeveralThreadsBatching',
+          'cts.SensorGyroscopeTest#testStandardDeviationWhilStatic',
+          'cts.SensorGyroscopeTest#testStoppingOtherClients',
+          'cts.SensorGyroscopeTest#testStoppingOtherClientsBatching',
+          'cts.SensorAccelerometerTest#testStandardDeviationWhileStatic',
+          'cts.SensorAccelerometerTest#testStoppingOtherClients',
+          'cts.SensorAccelerometerTest#testStoppingOtherClientsBatching',
+          'camera2.cts.CameraDeviceTest#testCameraDeviceRepeatingRequest',
+          'camera2.cts.ImageReaderTest#testImageReaderFromCameraJpeg',
+          'cts.CameraGLTest#testCameraToSurfaceTextureMetadata',
+          'cts.CameraTest#testImmediateZoom',
+          'cts.CameraTest#testPreviewCallback',
+          'cts.CameraTest#testSmoothZoom',
+          'cts.CameraTest#testVideoSnapshot',
+          'cts.CameraGLTest#testSetPreviewTextureBothCallbacks',
+          'cts.CameraGLTest#testSetPreviewTexturePreviewCallback',
+          'cts.CameraGLTest#testSetPreviewTexturePreviewCallback',],
+      'android.media' : [
+          'cts.DecoderTest#testCodecResetsH264WithSurface',
+          'cts.StreamingMediaPlayerTest#testHLS',],
+      'android.mediastress' : [
+          'cts.NativeMediaTest#test480pPlay',],
+      'android.net' : [
+          'cts.ConnectivityManagerTest#testStartUsingNetworkFeature_enableHipri',
+          'wifi.cts.ScanResultTest#testScanResultTimeStamp',
+          'cts.DnsTest#testDnsWorks',
+          'cts.TrafficStatsTest#testTrafficStatsForLocalhost',
+          'wifi.cts.ScanResultTest#testAndroidTestCaseSetupProperly',
+          'wifi.cts.NsdManagerTest#testAndroidTestCaseSetupProperly',
+          'cts.SSLCertificateSocketFactoryTest#testCreateSocket',
+          'cts.SSLCertificateSocketFactoryTest#test_createSocket_bind',
+          'cts.SSLCertificateSocketFactoryTest#test_createSocket_simple',
+          'cts.SSLCertificateSocketFactoryTest#test_createSocket_wrapping',],
+      'android.security' : [
+          'cts.BannedFilesTest#testNoSu',
+          'cts.BannedFilesTest#testNoSuInPath',
+          'cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdp6Ports',
+          'cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdpPorts',
+          'cts.PackageSignatureTest#testPackageSignatures',],
+      'android.webkit' : [
+          'cts.WebViewClientTest#testDoUpdateVisitedHistory',
+          'cts.WebViewClientTest#testLoadPage',
+          'cts.WebViewClientTest#testOnFormResubmission',
+          'cts.WebViewClientTest#testOnReceivedError',
+          'cts.WebViewClientTest#testOnReceivedHttpAuthRequest',
+          'cts.WebViewClientTest#testOnScaleChanged',
+          'cts.WebViewClientTest#testOnUnhandledKeyEvent',
+          'cts.WebViewTest#testSetInitialScale',],
+      'android.widget' : [
+          'cts.GridViewTest#testSetNumColumns',],}
 
 def LogGenerateDescription(name):
   print 'Generating test description for package %s' % name
diff --git a/tools/utils/cts/tools.py b/tools/utils/cts/tools.py
index 6cd1b95..0a4c97c 100644
--- a/tools/utils/cts/tools.py
+++ b/tools/utils/cts/tools.py
@@ -120,6 +120,45 @@
     self.all_packages = all_packages
     self.map = None
 
+    self.includedTestsMap = {}
+    self.excludedTestsMap = {}
+
+
+  def IncludeTests(self, package, test_list):
+    """Include only specific tests in this plan.
+
+    package The package that contains the tests. e.g. android.mypackage
+      This package should must be included via Include.
+    test_list A list of tests with methods to be included. e.g.
+      ['TestClass#testA', 'TestClass#testB']
+    """
+    packaged_test_list = []
+    for test in test_list:
+      packaged_test_list.append(package + '.' + test)
+
+    if package in self.includedTestsMap:
+      self.includedTestsMap[package] += packaged_test_list
+    else:
+      self.includedTestsMap[package] = packaged_test_list
+
+
+  def ExcludeTests(self, package, test_list):
+    """Exclude specific tests from this plan.
+
+    package The package that contains the tests. e.g. android.mypackage
+      This package should must be included via Include.
+    test_list A list of tests with methods to be excluded. e.g.
+      ['TestClass#testA', 'TestClass#textB']
+    """
+    packaged_test_list = []
+    for test in test_list:
+      packaged_test_list.append(package + '.' + test)
+    if package in self.excludedTestsMap:
+      self.excludedTestsMap[package] += packaged_test_list
+    else:
+      self.excludedTestsMap[package] = packaged_test_list
+
+
   def Exclude(self, pattern):
     """Exclude all packages matching the given regular expression from the plan.
 
@@ -167,6 +206,10 @@
       if self.map[package]:
         entry = doc.createElement('Entry')
         entry.setAttribute('uri', package)
+        if package in self.excludedTestsMap:
+          entry.setAttribute('exclude', ';'.join(self.excludedTestsMap[package]))
+        if package in self.includedTestsMap:
+          entry.setAttribute('include', ';'.join(self.includedTestsMap[package]))
         plan.appendChild(entry)
     stream = open(file_name, 'w')
     doc.writexml(stream, addindent='  ', newl='\n', encoding='UTF-8')