Merge "Snap for 5126674 from 4ef1e73f9fcac8f201f36025c9e5814cd2eb53e6 to oreo-mr1-cts-release" into oreo-mr1-cts-release
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 12bdc69..ba9ded6 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -18,7 +18,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.android.cts.verifier"
       android:versionCode="5"
-      android:versionName="8.1_r11">
+      android:versionName="8.1_r12">
 
     <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27"/>
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/CameraOrientationActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/CameraOrientationActivity.java
index 49b34fd..d753d6a 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/CameraOrientationActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/CameraOrientationActivity.java
@@ -465,6 +465,10 @@
                 int viewHeight = mFormatView.getHeight();
                 int newWidth, newHeight;
 
+                if (viewWidth == 0 || viewHeight == 0){
+                    return;
+                }
+
                 if (mPreviewOrientations.get(mNextPreviewOrientation) == 0
                     || mPreviewOrientations.get(mNextPreviewOrientation) == 180) {
                     // make preview width same as output image width,
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/location/GpsTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/location/GpsTestActivity.java
index 4909497..c779a2a 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/location/GpsTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/location/GpsTestActivity.java
@@ -19,6 +19,8 @@
 import com.android.cts.verifier.PassFailButtons;
 import com.android.cts.verifier.R;
 
+import com.android.compatibility.common.util.CddTest;
+
 import android.content.Context;
 import android.graphics.Color;
 import android.graphics.Typeface;
@@ -41,6 +43,7 @@
 /**
  * CTS Verifier case for verifying GPS.
  */
+@CddTest(requirement="7.3.3/C-1-1")
 public class GpsTestActivity extends PassFailButtons.Activity implements PassFailLog {
     private LocationManager mLocationManager;
     private TextView mTextView;
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
index a6e5f98..1517641 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
@@ -24,9 +24,12 @@
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.android.compatibility.common.util.CddTest;
+
 import com.android.cts.verifier.PassFailButtons;
 import com.android.cts.verifier.R;
 
+@CddTest(requirement="3.8.8/C-1-2")
 public class ScreenPinningTestActivity extends PassFailButtons.Activity {
 
     private static final String TAG = "ScreenPinningTestActivity";
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java b/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
index 764ecb3..3f63489 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
@@ -41,6 +41,8 @@
 import android.widget.Button;
 import android.widget.Toast;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.IOException;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
@@ -58,6 +60,7 @@
 import javax.crypto.NoSuchPaddingException;
 import javax.crypto.SecretKey;
 
+@CddTest(requirement="9.11.1/C-2-1,C-2-2")
 public class FingerprintBoundKeysTest extends PassFailButtons.Activity {
     private static final boolean DEBUG = false;
     private static final String TAG = "FingerprintBoundKeysTest";
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/security/ScreenLockBoundKeysTest.java b/apps/CtsVerifier/src/com/android/cts/verifier/security/ScreenLockBoundKeysTest.java
index 863488b..450320b 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/security/ScreenLockBoundKeysTest.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/security/ScreenLockBoundKeysTest.java
@@ -33,6 +33,8 @@
 import android.widget.Button;
 import android.widget.Toast;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.IOException;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
@@ -50,6 +52,7 @@
 import javax.crypto.NoSuchPaddingException;
 import javax.crypto.SecretKey;
 
+@CddTest(requirement="9.11.1/C-2-1,C-2-2")
 public class ScreenLockBoundKeysTest extends PassFailButtons.Activity {
 
     /** Alias for our key in the Android Key Store. */
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/DeviceSuspendTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/DeviceSuspendTestActivity.java
index e5a262a..f688951 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/DeviceSuspendTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/DeviceSuspendTestActivity.java
@@ -11,6 +11,8 @@
 import com.android.cts.verifier.sensors.base.SensorCtsVerifierTestActivity;
 import com.android.cts.verifier.sensors.helpers.SensorTestScreenManipulator;
 
+import com.android.compatibility.common.util.CddTest;
+
 import android.app.AlarmManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -122,6 +124,7 @@
             }
         };
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenReportLatencyExpiresAccel() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true);
             if (wakeUpSensor == null) {
@@ -130,6 +133,7 @@
             return runAPWakeUpWhenReportLatencyExpires(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenReportLatencyExpiresGyro() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true);
             if (wakeUpSensor == null) {
@@ -138,6 +142,7 @@
             return runAPWakeUpWhenReportLatencyExpires(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenReportLatencyExpiresMag() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true);
             if (wakeUpSensor == null) {
@@ -146,6 +151,7 @@
             return runAPWakeUpWhenReportLatencyExpires(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenFIFOFullAccel() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true);
             if (wakeUpSensor == null) {
@@ -154,6 +160,7 @@
             return runAPWakeUpWhenFIFOFull(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenFIFOFullGyro() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true);
             if (wakeUpSensor == null) {
@@ -162,6 +169,7 @@
             return runAPWakeUpWhenFIFOFull(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAPWakeUpWhenFIFOFullMag() throws Throwable {
             Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true);
             if (wakeUpSensor == null) {
@@ -170,6 +178,7 @@
             return runAPWakeUpWhenFIFOFull(wakeUpSensor);
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAccelBatchingInAPSuspendLargeReportLatency() throws Throwable {
             Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
             if (accel == null) {
@@ -178,6 +187,7 @@
             return runAPWakeUpByAlarmNonWakeSensor(accel, (int)TimeUnit.SECONDS.toMicros(1000));
         }
 
+        @CddTest(requirement="7.3/C-1-8")
         public String testAccelBatchingInAPSuspendZeroReportLatency() throws Throwable {
             Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
            if (accel == null) {
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Activities/TestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Activities/TestActivity.java
index 9ca5f2c..157ca3d 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Activities/TestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Activities/TestActivity.java
@@ -39,6 +39,8 @@
 import com.android.cts.verifier.sensors.sixdof.Utils.PoseProvider.PoseProvider;
 import com.android.cts.verifier.sensors.sixdof.Utils.ResultObjects.ResultObject;
 
+import com.android.compatibility.common.util.CddTest;
+
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.res.Configuration;
@@ -62,6 +64,7 @@
  * Main Activity for 6DOF tests Handles calls between UI fragments and the Data fragment. The
  * controller in the MVC structure.
  */
+@CddTest(requirement="7.3.12/C-1-1")
 public class TestActivity extends Activity implements BaseUiListener, AccuracyListener,
         RobustnessListener, ComplexMovementListener {
 
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
index 00bac12..90dbaf8 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
@@ -27,6 +27,8 @@
 import com.android.tradefed.util.AbiUtils;
 import com.android.tradefed.util.RunUtil;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.BufferedReader;
 import java.io.EOFException;
 import java.io.File;
@@ -119,6 +121,7 @@
      * Test that an app that declares the same shared uid as an existing app, cannot be installed
      * if it is signed with a different certificate.
      */
+    @CddTest(requirement="9.2/C-0-2")
     public void testSharedUidDifferentCerts() throws Exception {
         Log.i(LOG_TAG, "installing apks with shared uid, but different certs");
         try {
diff --git a/hostsidetests/atrace/Android.mk b/hostsidetests/atrace/Android.mk
index eb6d14d..59d5e56 100644
--- a/hostsidetests/atrace/Android.mk
+++ b/hostsidetests/atrace/Android.mk
@@ -21,7 +21,7 @@
 # Must match the package name in CtsTestCaseList.mk
 LOCAL_MODULE := CtsAtraceHostTestCases
 
-LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed
+LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
 
 LOCAL_CTS_TEST_PACKAGE := android.host.atrace
 
diff --git a/hostsidetests/atrace/src/android/atrace/cts/AtraceHostTest.java b/hostsidetests/atrace/src/android/atrace/cts/AtraceHostTest.java
index 25c0b89..802affb 100644
--- a/hostsidetests/atrace/src/android/atrace/cts/AtraceHostTest.java
+++ b/hostsidetests/atrace/src/android/atrace/cts/AtraceHostTest.java
@@ -24,6 +24,8 @@
 import com.android.tradefed.testtype.DeviceTestCase;
 import com.android.tradefed.testtype.IBuildReceiver;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.Reader;
@@ -154,6 +156,7 @@
     /**
      * Tests that atrace exists and is runnable with no args
      */
+    @CddTest(requirement="6.1/C-0-9")
     public void testSimpleRun() throws Exception {
         String output = getDevice().executeShellCommand("atrace");
         String[] lines = output.split("\\r?\\n");
@@ -169,6 +172,7 @@
     /**
      * Tests the output of "atrace --list_categories" to ensure required categories exist.
      */
+    @CddTest(requirement="6.1/C-0-9")
     public void testCategories() throws Exception {
         String output = getDevice().executeShellCommand("atrace --list_categories");
         String[] categories = output.split("\\r?\\n");
@@ -195,6 +199,7 @@
     /**
      * Tests that atrace captures app launch, including app level tracing
      */
+    @CddTest(requirement="6.1/C-0-9")
     public void testTracingContent() throws Exception {
         String atraceOutput = null;
         try {
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/TrustAgentInfoTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/TrustAgentInfoTest.java
index 241a830..1c6804f 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/TrustAgentInfoTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/TrustAgentInfoTest.java
@@ -20,6 +20,8 @@
 import android.content.ComponentName;
 import android.os.PersistableBundle;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.List;
 
 
@@ -47,6 +49,7 @@
         super.tearDown();
     }
 
+    @CddTest(requirement="9.11.1/C-1-2")
     public void testSetAndGetTrustAgentConfiguration() {
         // Set the config
         mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT,
diff --git a/hostsidetests/devicepolicy/app/IntentReceiver/Android.mk b/hostsidetests/devicepolicy/app/IntentReceiver/Android.mk
index 08edf44..d1ed96f 100644
--- a/hostsidetests/devicepolicy/app/IntentReceiver/Android.mk
+++ b/hostsidetests/devicepolicy/app/IntentReceiver/Android.mk
@@ -29,7 +29,8 @@
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-support-v4 \
     ctstestrunner \
-    legacy-android-test
+    legacy-android-test \
+    compatibility-device-util
 
 LOCAL_SDK_VERSION := current
 
diff --git a/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/OwnerChangedBroadcastTest.java b/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/OwnerChangedBroadcastTest.java
index f305e86..5e4fb07 100644
--- a/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/OwnerChangedBroadcastTest.java
+++ b/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/OwnerChangedBroadcastTest.java
@@ -23,6 +23,8 @@
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.test.InstrumentationTestCase;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.lang.InterruptedException;
@@ -42,6 +44,7 @@
     // We can't just register a broadcast receiver in the code because the broadcast
     // may have been sent before this test is run. So we have a manifest receiver
     // listening to the broadcast and writing to a shared preference when it receives it.
+    @CddTest(requirement="3.2.3.4/C-0-1")
     public void testOwnerChangedBroadcastReceived() throws InterruptedException {
         final Semaphore mPreferenceChanged = new Semaphore(0);
 
diff --git a/hostsidetests/dumpsys/Android.mk b/hostsidetests/dumpsys/Android.mk
index d15996c..030a910 100644
--- a/hostsidetests/dumpsys/Android.mk
+++ b/hostsidetests/dumpsys/Android.mk
@@ -21,7 +21,7 @@
 # Must match the package name in CtsTestCaseList.mk
 LOCAL_MODULE := CtsDumpsysHostTestCases
 
-LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed
+LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
 
 LOCAL_CTS_TEST_PACKAGE := android.dumpsys
 
diff --git a/hostsidetests/dumpsys/src/android/dumpsys/cts/BatteryStatsDumpsysTest.java b/hostsidetests/dumpsys/src/android/dumpsys/cts/BatteryStatsDumpsysTest.java
index 4d51330..25bb65f 100644
--- a/hostsidetests/dumpsys/src/android/dumpsys/cts/BatteryStatsDumpsysTest.java
+++ b/hostsidetests/dumpsys/src/android/dumpsys/cts/BatteryStatsDumpsysTest.java
@@ -18,6 +18,8 @@
 
 import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
@@ -37,6 +39,7 @@
      *
      * @throws Exception
      */
+    @CddTest(requirement="6.1/C-0-3")
     public void testBatterystatsOutput() throws Exception {
         String batterystats = mDevice.executeShellCommand("dumpsys batterystats --checkin");
         assertNotNull(batterystats);
diff --git a/hostsidetests/dumpsys/src/android/dumpsys/cts/ProcessStatsDumpsysTest.java b/hostsidetests/dumpsys/src/android/dumpsys/cts/ProcessStatsDumpsysTest.java
index 4dfc1a3..5eb6a71 100644
--- a/hostsidetests/dumpsys/src/android/dumpsys/cts/ProcessStatsDumpsysTest.java
+++ b/hostsidetests/dumpsys/src/android/dumpsys/cts/ProcessStatsDumpsysTest.java
@@ -18,6 +18,8 @@
 
 import com.android.tradefed.log.LogUtil.CLog;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.BufferedReader;
 import java.io.StringReader;
 import java.util.HashSet;
@@ -50,6 +52,7 @@
      * Tests the output of "dumpsys procstats -c". This is a proxy for testing "dumpsys procstats
      * --checkin", since the latter is not idempotent.
      */
+    @CddTest(requirement="6.1/C-0-2/C-0-3")
     public void testProcstatsOutput() throws Exception {
         // First, run the helper app so that we have some interesting records in the output.
         checkWithProcStatsApp();
diff --git a/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/ErrorsTests.java b/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/ErrorsTests.java
index 630df5c..1fe704a 100644
--- a/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/ErrorsTests.java
+++ b/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/ErrorsTests.java
@@ -42,7 +42,7 @@
 
     private static final String CRASH_TAG = "data_app_crash";
     private static final String ANR_TAG = "data_app_anr";
-    private static final String NATIVE_CRASH_TAG = "SYSTEM_TOMBSTONE";
+    private static final String NATIVE_CRASH_TAG = "data_app_native_crash";
 
     private static final int TIMEOUT_SECS = 60 * 3;
 
diff --git a/hostsidetests/monkey/src/com/android/cts/monkey/CategoryTest.java b/hostsidetests/monkey/src/com/android/cts/monkey/CategoryTest.java
index f3bb5d9..44909c8 100644
--- a/hostsidetests/monkey/src/com/android/cts/monkey/CategoryTest.java
+++ b/hostsidetests/monkey/src/com/android/cts/monkey/CategoryTest.java
@@ -18,12 +18,15 @@
 
 import com.android.tradefed.device.CollectingOutputReceiver;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.concurrent.TimeUnit;
 
 public class CategoryTest extends AbstractMonkeyTest {
 
     private static final long MAX_TIMEOUT = 5 * 60 * 1000; // 5 min
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testDefaultCategories() throws Exception {
         String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " 5000";
         CollectingOutputReceiver receiver = new CollectingOutputReceiver();
@@ -39,6 +42,7 @@
         }
     }
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testSingleCategory() throws Exception {
         String cmd = MONKEY_CMD + " -v -p " + PKGS[0]
                 + " -c android.intent.category.LAUNCHER 5000";
@@ -69,6 +73,7 @@
         }
     }
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testMultipleCategories() throws Exception {
         String cmd = MONKEY_CMD + " -v -p " + PKGS[0]
                 + " -c android.intent.category.LAUNCHER"
diff --git a/hostsidetests/monkey/src/com/android/cts/monkey/MonkeyTest.java b/hostsidetests/monkey/src/com/android/cts/monkey/MonkeyTest.java
index 0241879..43f29d8 100644
--- a/hostsidetests/monkey/src/com/android/cts/monkey/MonkeyTest.java
+++ b/hostsidetests/monkey/src/com/android/cts/monkey/MonkeyTest.java
@@ -19,6 +19,8 @@
 import com.android.ddmlib.NullOutputReceiver;
 import com.android.tradefed.device.DeviceNotAvailableException;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.Scanner;
 
 public class MonkeyTest extends AbstractMonkeyTest {
@@ -26,11 +28,13 @@
     private static final String MONKEY = "@(>.<)@";
     private static final String HUMAN = "(^_^)";
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testIsMonkey() throws Exception {
         mDevice.executeShellCommand(MONKEY_CMD + " -p " + PKGS[0] + " 500");
         assertIsUserAMonkey(true);
     }
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testNotMonkey() throws Exception {
         mDevice.executeShellCommand("am start -W -a android.intent.action.MAIN "
                 + "-n com.android.cts.monkey/com.android.cts.monkey.MonkeyActivity",
diff --git a/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java b/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
index b3a22d6..1dea055 100644
--- a/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
+++ b/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
@@ -18,6 +18,8 @@
 
 import com.android.tradefed.device.CollectingOutputReceiver;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Pattern;
 
@@ -33,6 +35,7 @@
             Pattern.compile("^.*Allowing.*cmp=com\\.android\\.cts\\.monkey2/\\.ChimpActivity.*$",
                     Pattern.MULTILINE);
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testSinglePackage() throws Exception {
         String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " 5000";
         CollectingOutputReceiver receiver = new CollectingOutputReceiver();
@@ -63,6 +66,7 @@
         }
     }
 
+    @CddTest(requirement="6.1/C-0-8")
     public void testMultiplePackages() throws Exception {
         String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " -p " + PKGS[1] + " 5000";
         CollectingOutputReceiver receiver = new CollectingOutputReceiver();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
similarity index 82%
rename from hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java
rename to hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
index d04ebea..da8da31 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
@@ -16,24 +16,10 @@
 
 package android.security.cts;
 
-import com.android.tradefed.device.CollectingOutputReceiver;
-import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.ITestDevice;
-import com.android.tradefed.testtype.DeviceTestCase;
-
-import android.platform.test.annotations.RootPermissionTest;
 import android.platform.test.annotations.SecurityTest;
 
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Scanner;
-
 @SecurityTest
-public class Poc16_10 extends SecurityTestCase {
+public class Poc16_11 extends SecurityTestCase {
 
     /**
      *  b/30904789
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java
deleted file mode 100644
index 905965c..0000000
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
-0;256;0c * Copyright (C) 2016 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 com.android.tradefed.device.CollectingOutputReceiver;
-import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.ITestDevice;
-import com.android.tradefed.testtype.DeviceTestCase;
-
-import android.platform.test.annotations.RootPermissionTest;
-import android.platform.test.annotations.SecurityTest;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Scanner;
-
-@SecurityTest
-public class Poc16_12 extends SecurityTestCase {
-
-    //Criticals
-    /**
-     *  b/31797770
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8425() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
-            AdbUtils.runPoc("CVE-2016-8425", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/31799206
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8426() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvhost-gpu")) {
-            AdbUtils.runPoc("CVE-2016-8426", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/31799885
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8427() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvhost-gpu") ||
-              containsDriver(getDevice(), "/dev/nvhost-dbg-gpu")) {
-            AdbUtils.runPoc("CVE-2016-8427", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/31993456
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8428() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvmap")) {
-            AdbUtils.runPoc("CVE-2016-8428", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/32160775
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8429() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvmap")) {
-            AdbUtils.runPoc("CVE-2016-8429", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/32225180
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8430() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
-            AdbUtils.runPoc("CVE-2016-8430", getDevice(), 60);
-        }
-    }
-
-   /**
-     *  b/32402179
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8431() throws Exception {
-        if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
-            AdbUtils.runPoc("CVE-2016-8431", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/32447738
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8432() throws Exception {
-        if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
-            AdbUtils.runPoc("CVE-2016-8432", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/32125137
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8434() throws Exception {
-        if(containsDriver(getDevice(), "/dev/kgsl-3d0")) {
-            // This poc is very verbose so we ignore the output to avoid using a lot of memory.
-            AdbUtils.runPocNoOutput("CVE-2016-8434", getDevice(), 60);
-        }
-    }
-
-    /**
-     *  b/31668540
-     */
-    @SecurityTest
-    public void testPocCVE_2016_8460() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvmap")) {
-            String result = AdbUtils.runPoc("CVE-2016-8460", getDevice(), 60);
-            assertTrue(!result.equals("Vulnerable"));
-        }
-    }
-
-    /**
-     *  b/32659848
-     */
-    @SecurityTest
-    public void testPoc32659848() throws Exception {
-        String command =
-            "echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb";
-        AdbUtils.runCommandLine(command, getDevice());
-    }
-}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
index 934cacd..3446507 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
@@ -21,13 +21,117 @@
 @SecurityTest
 public class Poc17_01 extends SecurityTestCase {
 
+    //Criticals
     /**
-     *  b/31799863
+     *  b/31797770
      */
     @SecurityTest
-    public void testPocCVE_2016_8482() throws Exception {
-        if(containsDriver(getDevice(), "/dev/nvmap")) {
-            AdbUtils.runPoc("CVE-2016-8482", getDevice(), 60);
+    public void testPocCVE_2016_8425() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
+            AdbUtils.runPoc("CVE-2016-8425", getDevice(), 60);
         }
     }
- }
+
+    /**
+     *  b/31799206
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8426() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvhost-gpu")) {
+            AdbUtils.runPoc("CVE-2016-8426", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/31799885
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8427() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvhost-gpu") ||
+              containsDriver(getDevice(), "/dev/nvhost-dbg-gpu")) {
+            AdbUtils.runPoc("CVE-2016-8427", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/31993456
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8428() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvmap")) {
+            AdbUtils.runPoc("CVE-2016-8428", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/32160775
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8429() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvmap")) {
+            AdbUtils.runPoc("CVE-2016-8429", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/32225180
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8430() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
+            AdbUtils.runPoc("CVE-2016-8430", getDevice(), 60);
+        }
+    }
+
+   /**
+     *  b/32402179
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8431() throws Exception {
+        if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
+            AdbUtils.runPoc("CVE-2016-8431", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/32447738
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8432() throws Exception {
+        if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
+            AdbUtils.runPoc("CVE-2016-8432", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/32125137
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8434() throws Exception {
+        if(containsDriver(getDevice(), "/dev/kgsl-3d0")) {
+            // This poc is very verbose so we ignore the output to avoid using a lot of memory.
+            AdbUtils.runPocNoOutput("CVE-2016-8434", getDevice(), 60);
+        }
+    }
+
+    /**
+     *  b/31668540
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8460() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvmap")) {
+            String result = AdbUtils.runPoc("CVE-2016-8460", getDevice(), 60);
+            assertTrue(!result.equals("Vulnerable"));
+        }
+    }
+
+    /**
+     *  b/32659848
+     */
+    @SecurityTest
+    public void testPoc32659848() throws Exception {
+        String command =
+            "echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb";
+        AdbUtils.runCommandLine(command, getDevice());
+    }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java
new file mode 100644
index 0000000..98e45ff
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2018 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 android.platform.test.annotations.SecurityTest;
+
+public class Poc17_02 extends SecurityTestCase {
+    /**
+     *  b/31799863
+     */
+    @SecurityTest
+    public void testPocCVE_2016_8482() throws Exception {
+        if(containsDriver(getDevice(), "/dev/nvmap")) {
+            AdbUtils.runPoc("CVE-2016-8482", getDevice(), 60);
+        }
+    }
+}
diff --git a/tests/ProcessTest/src/com/android/cts/process/ProcessTest.java b/tests/ProcessTest/src/com/android/cts/process/ProcessTest.java
index a64a900..8faee83 100644
--- a/tests/ProcessTest/src/com/android/cts/process/ProcessTest.java
+++ b/tests/ProcessTest/src/com/android/cts/process/ProcessTest.java
@@ -25,6 +25,8 @@
 import android.content.pm.PackageManager;
 import android.test.AndroidTestCase;
 
+import com.android.compatibility.common.util.CddTest;
+
 import com.android.cts.process.activity.NoSharePidActivity;
 import com.android.cts.process.activity.SharePidActivity;
 import com.android.cts.process.activity.SharePidSubActivity;
@@ -32,6 +34,7 @@
 public class ProcessTest extends AndroidTestCase {
     private final int WAIT_TIME = 2000;
 
+    @CddTest(requirement="9.2/C-0-1")
     public void testUid() throws Exception {
         String enableApp = "com.android.cts.process.shareuidapp";
         String disableApp = "com.android.cts.process.noshareuidapp";
@@ -46,6 +49,7 @@
         assertNotSame(uid2, uid3);
     }
 
+    @CddTest(requirement="9.2/C-0-1")
     public void testPid() throws Exception {
         ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
         String shareProcessName = mContext.getPackageName() + ":shareProcess";
diff --git a/tests/admin/Android.mk b/tests/admin/Android.mk
index 24fdda3..eefc44e9 100644
--- a/tests/admin/Android.mk
+++ b/tests/admin/Android.mk
@@ -21,7 +21,7 @@
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
-    ctstestrunner mockito-target-minus-junit4
+    ctstestrunner mockito-target-minus-junit4 compatibility-device-util
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
diff --git a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
index 4b9e5fa..3c2dd59 100644
--- a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
+++ b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
@@ -32,6 +32,8 @@
 import android.test.suitebuilder.annotation.Suppress;
 import android.util.Log;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.List;
 
 /**
@@ -92,6 +94,7 @@
         assertTrue(mDevicePolicyManager.isAdminActive(mComponent));
     }
 
+    @CddTest(requirement="7.3.10/C-1-10,9.11.1/C-5-2")
     public void testKeyguardDisabledFeatures() {
         if (!mDeviceAdmin) {
             Log.w(TAG, "Skipping testKeyguardDisabledFeatures");
diff --git a/tests/app/src/android/app/cts/SystemFeaturesTest.java b/tests/app/src/android/app/cts/SystemFeaturesTest.java
index 69564be..1a7a66d 100644
--- a/tests/app/src/android/app/cts/SystemFeaturesTest.java
+++ b/tests/app/src/android/app/cts/SystemFeaturesTest.java
@@ -55,6 +55,7 @@
 /**
  * Test for checking that the {@link PackageManager} is reporting the correct features.
  */
+@CddTest(requirement="7/C-0-7")
 public class SystemFeaturesTest extends InstrumentationTestCase {
 
     private Context mContext;
@@ -297,6 +298,7 @@
      * Check that the sensor features reported by the PackageManager correspond to the sensors
      * returned by {@link SensorManager#getSensorList(int)}.
      */
+    @CddTest(requirement="7.3/C-0-1,C-0-2,C-0-3")
     public void testSensorFeatures() throws Exception {
         Set<String> featuresLeft = getFeatureConstantsNames("FEATURE_SENSOR_");
 
diff --git a/tests/app/src/android/app/cts/WallpaperManagerTest.java b/tests/app/src/android/app/cts/WallpaperManagerTest.java
index e267503..7b32c03 100644
--- a/tests/app/src/android/app/cts/WallpaperManagerTest.java
+++ b/tests/app/src/android/app/cts/WallpaperManagerTest.java
@@ -45,6 +45,8 @@
 import android.view.Display;
 import android.view.WindowManager;
 
+import com.android.compatibility.common.util.CddTest;
+
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -112,6 +114,7 @@
         }
     }
 
+    @CddTest(requirement="3.2.3.4/C-0-1")
     @Test
     public void wallpaperChangedBroadcastTest() {
         Bitmap tmpWallpaper = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
diff --git a/tests/sensor/src/android/hardware/cts/SensorBatchingTests.java b/tests/sensor/src/android/hardware/cts/SensorBatchingTests.java
index 1b2b25c..25512ec 100644
--- a/tests/sensor/src/android/hardware/cts/SensorBatchingTests.java
+++ b/tests/sensor/src/android/hardware/cts/SensorBatchingTests.java
@@ -25,6 +25,8 @@
 import android.hardware.cts.helpers.sensorverification.EventBasicVerification;
 import android.hardware.cts.helpers.sensorverification.ISensorVerification;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -55,10 +57,12 @@
      */
     private static final int BATCHING_PADDING_TIME_S = (int) Math.ceil(BATCHING_PERIOD * 0.1f + 2);
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testAccelerometer_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_ACCELEROMETER, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testAccelerometer_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_ACCELEROMETER, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -95,10 +99,12 @@
         runFlushSensorTest(Sensor.TYPE_ACCELEROMETER_UNCALIBRATED, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testMagneticField_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testMagneticField_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -131,10 +137,12 @@
         runFlushSensorTest(Sensor.TYPE_ORIENTATION, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGyroscope_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GYROSCOPE, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGyroscope_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GYROSCOPE, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -147,10 +155,12 @@
         runFlushSensorTest(Sensor.TYPE_GYROSCOPE, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testPressure_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_PRESSURE, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testPressure_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_PRESSURE, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -163,10 +173,12 @@
         runFlushSensorTest(Sensor.TYPE_PRESSURE, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGravity_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GRAVITY, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGravity_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GRAVITY, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -179,10 +191,12 @@
         runFlushSensorTest(Sensor.TYPE_GRAVITY, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testRotationVector_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testRotationVector_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -211,10 +225,12 @@
         runFlushSensorTest(Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGameRotationVector_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GAME_ROTATION_VECTOR, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testGameRotationVector_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_GAME_ROTATION_VECTOR, RATE_50HZ, BATCHING_PERIOD);
     }
@@ -243,10 +259,12 @@
         runFlushSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_50HZ, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testLinearAcceleration_fastest_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_FASTEST, BATCHING_PERIOD);
     }
 
+    @CddTest(requirement="7.3/C-1-3")
     public void testLinearAcceleration_50hz_batching() throws Throwable {
         runBatchingSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_50HZ, BATCHING_PERIOD);
     }
diff --git a/tests/sensor/src/android/hardware/cts/SensorDirectReportTest.java b/tests/sensor/src/android/hardware/cts/SensorDirectReportTest.java
index 77852f1..8f65c54 100644
--- a/tests/sensor/src/android/hardware/cts/SensorDirectReportTest.java
+++ b/tests/sensor/src/android/hardware/cts/SensorDirectReportTest.java
@@ -31,6 +31,8 @@
 import android.os.SystemClock;
 import android.util.Log;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.IOException;
 import java.io.UncheckedIOException;
 import java.nio.ByteBuffer;
@@ -204,6 +206,7 @@
                        (mHardwareBuffer != null && mHardwareBufferSecondary != null));
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerAshmemNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -211,6 +214,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeAshmemNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -218,6 +222,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldAshmemNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
@@ -225,6 +230,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerAshmemFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -233,6 +239,7 @@
 
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeAshmemFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -240,6 +247,7 @@
                 SensorDirectChannel.RATE_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldAshmemFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
@@ -247,6 +255,7 @@
                 SensorDirectChannel.RATE_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerAshmemVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -255,6 +264,7 @@
 
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeAshmemVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -262,6 +272,7 @@
                 SensorDirectChannel.RATE_VERY_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldAshmemVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
@@ -269,6 +280,7 @@
                 SensorDirectChannel.RATE_VERY_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerHardwareBufferNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -276,6 +288,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeHardwareBufferNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -283,6 +296,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldHardwareBufferNormal() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
@@ -290,6 +304,7 @@
                 SensorDirectChannel.RATE_NORMAL);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerHardwareBufferFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -297,6 +312,7 @@
                 SensorDirectChannel.RATE_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeHardwareBufferFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -304,6 +320,7 @@
                 SensorDirectChannel.RATE_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldHardwareBufferFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
@@ -311,6 +328,7 @@
                 SensorDirectChannel.RATE_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testAccelerometerHardwareBufferVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_ACCELEROMETER,
@@ -318,6 +336,7 @@
                 SensorDirectChannel.RATE_VERY_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testGyroscopeHardwareBufferVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_GYROSCOPE,
@@ -325,6 +344,7 @@
                 SensorDirectChannel.RATE_VERY_FAST);
     }
 
+    @CddTest(requirement="7.3.9/C-3-1,C-3-2")
     public void testMagneticFieldHardwareBufferVeryFast() {
         runSensorDirectReportTest(
                 Sensor.TYPE_MAGNETIC_FIELD,
diff --git a/tests/sensor/src/android/hardware/cts/SensorParameterRangeTest.java b/tests/sensor/src/android/hardware/cts/SensorParameterRangeTest.java
index 44135bc..fe8408f 100644
--- a/tests/sensor/src/android/hardware/cts/SensorParameterRangeTest.java
+++ b/tests/sensor/src/android/hardware/cts/SensorParameterRangeTest.java
@@ -23,6 +23,8 @@
 import android.hardware.cts.helpers.SensorCtsHelper;
 import android.text.TextUtils;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -75,6 +77,7 @@
         mVrModeHighPerformance = pm.hasSystemFeature(PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE);
     }
 
+    @CddTest(requirement="7.3.9/C-2-1,7.3/C-1-1")
     public void testAccelerometerRange() {
         checkSensorRangeAndFrequency(
                 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
@@ -83,6 +86,7 @@
                 ACCELEROMETER_MAX_FREQUENCY);
   }
 
+   @CddTest(requirement="7.3.9/C-2-3,7.3/C-1-1")
   public void testGyroscopeRange() {
         checkSensorRangeAndFrequency(
                 mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),
@@ -91,7 +95,8 @@
                 GYRO_MAX_FREQUENCY);
   }
 
-    public void testMagnetometerRange() {
+   @CddTest(requirement="7.3.9/C-2-5,7.3/C-1-1")
+   public void testMagnetometerRange() {
         checkSensorRangeAndFrequency(
                 mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
                 MAGNETOMETER_MAX_RANGE,
@@ -99,6 +104,7 @@
                 MAGNETOMETER_MAX_FREQUENCY);
     }
 
+    @CddTest(requirement="7.3.9/C-2-7,7.3/C-1-1")
     public void testPressureRange() {
         if (mHasHifiSensors) {
             checkSensorRangeAndFrequency(
@@ -129,11 +135,13 @@
                 maxFrequency - 0.1);
     }
 
+    @CddTest(requirement="7.3.9/C-2-1")
     public void testAccelerometerFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(Sensor.TYPE_ACCELEROMETER, ACCELEROMETER_MIN_FIFO_LENGTH);
     }
 
+    @CddTest(requirement="7.3.9/C-2-6")
     public void testUncalMagnetometerFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(
@@ -141,21 +149,25 @@
                 UNCAL_MAGNETOMETER_MIN_FIFO_LENGTH);
     }
 
+    @CddTest(requirement="7.3.9/C-2-7")
     public void testPressureFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(Sensor.TYPE_PRESSURE, PRESSURE_MIN_FIFO_LENGTH);
     }
 
+    @CddTest(requirement="7.3.9/C-2-8")
     public void testGameRotationVectorFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(Sensor.TYPE_GAME_ROTATION_VECTOR, GAME_ROTATION_VECTOR_MIN_FIFO_LENGTH);
     }
 
+    @CddTest(requirement="7.3.9/C-2-17")
     public void testProximityFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(Sensor.TYPE_PROXIMITY, PROXIMITY_SENSOR_MIN_FIFO_LENGTH);
     }
 
+    @CddTest(requirement="7.3.9/C-2-10")
     public void testStepDetectorFifoLength() throws Throwable {
         if (!mHasHifiSensors) return;
         checkMinFifoLength(Sensor.TYPE_STEP_DETECTOR, STEP_DETECTOR_MIN_FIFO_LENGTH);
diff --git a/tests/sensor/src/android/hardware/cts/SensorTest.java b/tests/sensor/src/android/hardware/cts/SensorTest.java
index 11ead36..f62bb7a 100644
--- a/tests/sensor/src/android/hardware/cts/SensorTest.java
+++ b/tests/sensor/src/android/hardware/cts/SensorTest.java
@@ -45,6 +45,8 @@
 import android.platform.test.annotations.Presubmit;
 import android.util.Log;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
@@ -115,6 +117,7 @@
         }
     }
 
+    @CddTest(requirement="7.3/C-0-1,7.3.1/C-1-2,7.3.2/C-1-1")
     @SuppressWarnings("deprecation")
     public void testSensorOperations() {
         // Because we can't know every sensors unit details, so we can't assert
@@ -260,6 +263,7 @@
         }
     }
 
+    @CddTest(requirement="7.3/C-0-3")
     public void testRequestTriggerWithNonTriggerSensor() {
         mTriggerSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
         if (mTriggerSensor == null) {
@@ -270,6 +274,7 @@
         assertFalse(result);
     }
 
+    @CddTest(requirement="7.3/C-0-3")
     public void testCancelTriggerWithNonTriggerSensor() {
         mTriggerSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
         if (mTriggerSensor == null) {
@@ -280,6 +285,7 @@
         assertFalse(result);
     }
 
+    @CddTest(requirement="7.3/C-0-3")
     public void testRegisterWithTriggerSensor() {
         Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION);
         if (sensor == null) {
diff --git a/tests/sensor/src/android/hardware/cts/SingleSensorTests.java b/tests/sensor/src/android/hardware/cts/SingleSensorTests.java
index a626957..17f73c6 100644
--- a/tests/sensor/src/android/hardware/cts/SingleSensorTests.java
+++ b/tests/sensor/src/android/hardware/cts/SingleSensorTests.java
@@ -25,6 +25,8 @@
 import android.hardware.cts.helpers.sensoroperations.TestSensorOperation;
 import android.content.pm.PackageManager;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -150,6 +152,7 @@
         runSensorTest(Sensor.TYPE_ACCELEROMETER, RATE_100HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-1-1,C-1-2,C-1-3,C-1-6,7.3/C-1-7")
     public void testAccelerometer_50hz() throws Throwable {
         runSensorTest(Sensor.TYPE_ACCELEROMETER, RATE_50HZ);
     }
@@ -234,14 +237,17 @@
         runSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_15HZ);
     }
 
+    @CddTest(requirement="7.3.2/C-1-1,C-1-2,C-1-3,C-1-9,7.3/C-1-7")
     public void testMagneticField_10hz() throws Throwable {
         runSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3.2/C-1-1,C-1-3,7.3/C-1-2")
     public void testMagneticField_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3.2/C-1-1,C-1-3,7.3/C-1-2,7.3/C-1-7")
     public void testMagneticField_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_MAGNETIC_FIELD, RATE_1HZ);
     }
@@ -302,6 +308,7 @@
         runSensorTest(Sensor.TYPE_GYROSCOPE, RATE_100HZ);
     }
 
+    @CddTest(requirement="7.3.4/C-1-1,C-1-7,7.3/C-1-7")
     public void testGyroscope_50hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE, RATE_50HZ);
     }
@@ -322,6 +329,7 @@
         runSensorTest(Sensor.TYPE_GYROSCOPE, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3.4/C-1-2,C-1-7,7.3/C-1-7")
     public void testGyroscope_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE, RATE_1HZ);
     }
@@ -354,6 +362,7 @@
         runSensorTest(Sensor.TYPE_PRESSURE, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3.5/C-1-1,C-1-2,7.3/C-1-7,C-1-2")
     public void testPressure_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_PRESSURE, RATE_5HZ);
     }
@@ -362,6 +371,7 @@
         runSensorTest(Sensor.TYPE_PRESSURE, RATE_1HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_fastest() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, SensorManager.SENSOR_DELAY_FASTEST);
     }
@@ -378,26 +388,32 @@
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_50HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_25hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_25HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_15hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_15HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_10hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testGravity_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GRAVITY, RATE_1HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-4-1,7.3.2/C-2-1")
     public void testRotationVector_fastest() throws Throwable {
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, SensorManager.SENSOR_DELAY_FASTEST);
     }
@@ -410,6 +426,7 @@
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_100HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-4-1")
     public void testRotationVector_50hz() throws Throwable {
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_50HZ);
     }
@@ -422,14 +439,17 @@
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_15HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-4-1,7.3.2/C-2-1")
     public void testRotationVector_10hz() throws Throwable {
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-4-1,7.3.2/C-2-1")
     public void testRotationVector_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-4-1,7.3.2/C-2-1")
     public void testRotationVector_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_ROTATION_VECTOR, RATE_1HZ);
     }
@@ -498,14 +518,17 @@
         runSensorTest(Sensor.TYPE_GAME_ROTATION_VECTOR, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGameRotationVector_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GAME_ROTATION_VECTOR, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGameRotationVector_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GAME_ROTATION_VECTOR, RATE_1HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGyroscopeUncalibrated_fastest() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, SensorManager.SENSOR_DELAY_FASTEST);
     }
@@ -518,6 +541,7 @@
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_100HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGyroscopeUncalibrated_50hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_50HZ);
     }
@@ -530,14 +554,17 @@
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_15HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGyroscopeUncalibrated_10hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGyroscopeUncalibrated_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3/C-2-1")
     public void testGyroscopeUncalibrated_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, RATE_1HZ);
     }
@@ -554,26 +581,32 @@
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_100HZ);
     }
 
+     @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_50hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_50HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_25hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_25HZ);
     }
 
+     @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_15hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_15HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_10hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_10HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_5hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_5HZ);
     }
 
+    @CddTest(requirement="7.3.1/C-3-1")
     public void testLinearAcceleration_1hz() throws Throwable {
         runSensorTest(Sensor.TYPE_LINEAR_ACCELERATION, RATE_1HZ);
     }
diff --git a/tests/signature/intent-check/DynamicConfig.xml b/tests/signature/intent-check/DynamicConfig.xml
index a2052af..fdda549 100644
--- a/tests/signature/intent-check/DynamicConfig.xml
+++ b/tests/signature/intent-check/DynamicConfig.xml
@@ -22,6 +22,37 @@
     Bug: 115848568 android.intent.action.ACTION_AIRPLANE_MODE_CHANGED
          Will be removed after v17 of CS.apk is released.
     Bug: 114804753 android.intent.action.DISMISS_TIMER (public in API 28)
+    Bug: 117590943 android.intent.action.View
+         Fixed in GMSCore v14.7.68.
+    Bug: 67109014
+    android.intent.action.EMERGENCY_STATE_CHANGED
+    android.intent.action.USER_ADDED
+    android.intent.action.OMADM_BROWSER_SET_HOMEPAGE
+    android.intent.action.OMADM_BROWSER_GET_HOMEPAGE
+    android.intent.action.CSC_BROWSER_SET_HOMEPAGE
+    android.intent.action.CSC_BROWSER_SET_SEARCH_ENGINE
+    android.intent.action.STK_BROWSER_GET_HOMEPAGE2
+    android.intent.action.SBROWSER_QR_SCAN_RESULT
+    android.intent.action.BCS_REQUEST
+    android.intent.action.STK_BROWSER_GET_HOMEPAGE
+    android.intent.action.SBROWSER_VIEW_FOR_EXTERNAL_APP
+    android.intent.action.CHAMELEON_BROWSER_SET_HOMEPAGE
+    android.intent.action.USER_ADDED
+    android.intent.action.PEDOMETER_SETTING_SYNC
+    android.intent.action.OMADM_BROWSER_SET_HOMEPAGE
+    android.intent.action.OMADM_BROWSER_GET_HOMEPAGE
+    android.intent.action.CSC_BROWSER_SET_HOMEPAGE
+    android.intent.action.CSC_BROWSER_SET_SEARCH_ENGINE
+    android.intent.action.STK_BROWSER_GET_HOMEPAGE2
+    android.intent.action.SBROWSER_QR_SCAN_RESULT
+    android.intent.action.BCS_REQUEST
+    android.intent.action.STK_BROWSER_GET_HOMEPAGE
+    android.intent.action.SBROWSER_VIEW_FOR_EXTERNAL_APP
+    android.intent.action.CHAMELEON_BROWSER_SET_HOMEPAGE
+    android.intent.action.STOP_NETWORK_BOOSTER
+    android.intent.action.START_NETWORK_BOOSTER
+    android.intent.action.BADGE_COUNT_UPDATE
+        All of them(except BADGE_COUNT_UPDATE) will be fixed on P.
 -->
 <dynamicConfig>
     <entry key ="intent_whitelist">
@@ -31,5 +62,33 @@
       <value>android.intent.action.HDMI_PLUGGED</value>
       <value>android.intent.action.ACTION_AIRPLANE_MODE_CHANGED</value>
       <value>android.intent.action.DISMISS_TIMER</value>
+      <value>android.intent.action.View</value>
+      <value>android.intent.action.EMERGENCY_STATE_CHANGED</value>
+      <value>android.intent.action.USER_ADDED</value>
+      <value>android.intent.action.OMADM_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.OMADM_BROWSER_GET_HOMEPAGE</value>
+      <value>android.intent.action.CSC_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.CSC_BROWSER_SET_SEARCH_ENGINE</value>
+      <value>android.intent.action.STK_BROWSER_GET_HOMEPAGE2</value>
+      <value>android.intent.action.SBROWSER_QR_SCAN_RESULT</value>
+      <value>android.intent.action.BCS_REQUEST</value>
+      <value>android.intent.action.STK_BROWSER_GET_HOMEPAGE</value>
+      <value>android.intent.action.SBROWSER_VIEW_FOR_EXTERNAL_APP</value>
+      <value>android.intent.action.CHAMELEON_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.USER_ADDED</value>
+      <value>android.intent.action.PEDOMETER_SETTING_SYNC</value>
+      <value>android.intent.action.OMADM_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.OMADM_BROWSER_GET_HOMEPAGE</value>
+      <value>android.intent.action.CSC_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.CSC_BROWSER_SET_SEARCH_ENGINE</value>
+      <value>android.intent.action.STK_BROWSER_GET_HOMEPAGE2</value>
+      <value>android.intent.action.SBROWSER_QR_SCAN_RESULT</value>
+      <value>android.intent.action.BCS_REQUEST</value>
+      <value>android.intent.action.STK_BROWSER_GET_HOMEPAGE</value>
+      <value>android.intent.action.SBROWSER_VIEW_FOR_EXTERNAL_APP</value>
+      <value>android.intent.action.CHAMELEON_BROWSER_SET_HOMEPAGE</value>
+      <value>android.intent.action.STOP_NETWORK_BOOSTER</value>
+      <value>android.intent.action.START_NETWORK_BOOSTER</value>
+      <value>android.intent.action.BADGE_COUNT_UPDATE</value>
     </entry>
 </dynamicConfig>
diff --git a/tests/tests/background/src/android/app/cts/backgroundrestrictions/BroadcastsTest.java b/tests/tests/background/src/android/app/cts/backgroundrestrictions/BroadcastsTest.java
index 3a8b43f..1a033f7 100644
--- a/tests/tests/background/src/android/app/cts/backgroundrestrictions/BroadcastsTest.java
+++ b/tests/tests/background/src/android/app/cts/backgroundrestrictions/BroadcastsTest.java
@@ -55,7 +55,7 @@
      * receiver.
      */
     @Test
-    @CddTest(requirement="3.5/C-0-6")
+    @CddTest(requirement="3.5/C-0-6,3.2.3.4/C-0-1")
     public void testNonSupportedBroadcastsNotDelivered_runtimeReceiver() throws Exception {
 
         // Need a reference here to initialize it in a lambda.
@@ -82,7 +82,7 @@
      * receiver, even if an intent is targeted to the component.
      */
     @Test
-    @CddTest(requirement="3.5/C-0-6")
+    @CddTest(requirement="3.5/C-0-6,3.2.3.4/C-0-1")
     public void testNonSupportedBroadcastsNotDelivered_manifestReceiver() throws Exception {
         // Need a reference here to initialize it in a lambda.
         final AtomicReference<BroadcastReceiver> receiverRef = new AtomicReference<>();
diff --git a/tests/tests/graphics/src/android/graphics/cts/Bitmap_CompressFormatTest.java b/tests/tests/graphics/src/android/graphics/cts/Bitmap_CompressFormatTest.java
index 30294d0..9089baa 100644
--- a/tests/tests/graphics/src/android/graphics/cts/Bitmap_CompressFormatTest.java
+++ b/tests/tests/graphics/src/android/graphics/cts/Bitmap_CompressFormatTest.java
@@ -24,6 +24,8 @@
 import android.support.test.filters.SmallTest;
 import android.support.test.runner.AndroidJUnit4;
 
+import com.android.compatibility.common.util.CddTest;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,6 +34,8 @@
 @SmallTest
 @RunWith(AndroidJUnit4.class)
 public class Bitmap_CompressFormatTest {
+
+    @CddTest(requirement="5.1.4/C-0-1,C-0-2,C-0-3")
     @Test
     public void testValueOf(){
         assertEquals(CompressFormat.JPEG, CompressFormat.valueOf("JPEG"));
@@ -39,6 +43,7 @@
         assertEquals(CompressFormat.WEBP, CompressFormat.valueOf("WEBP"));
     }
 
+    @CddTest(requirement="5.1.4/C-0-1,C-0-2,C-0-3")
     @Test
     public void testValues(){
         CompressFormat[] comFormat = CompressFormat.values();
diff --git a/tests/tests/hardware/src/android/hardware/fingerprint/cts/FingerprintManagerTest.java b/tests/tests/hardware/src/android/hardware/fingerprint/cts/FingerprintManagerTest.java
index f11b6bc..bda8c12 100644
--- a/tests/tests/hardware/src/android/hardware/fingerprint/cts/FingerprintManagerTest.java
+++ b/tests/tests/hardware/src/android/hardware/fingerprint/cts/FingerprintManagerTest.java
@@ -24,9 +24,12 @@
 import android.platform.test.annotations.Presubmit;
 import android.test.AndroidTestCase;
 
+import com.android.compatibility.common.util.CddTest;
+
 /**
  * Basic test cases for FingerprintManager
  */
+@CddTest(requirement="7.3.10/C-1-2")
 public class FingerprintManagerTest extends AndroidTestCase {
     private enum AuthState {
         AUTH_UNKNOWN, AUTH_ERROR, AUTH_FAILED, AUTH_SUCCEEDED
@@ -82,6 +85,7 @@
         assertTrue(!hasEnrolledFingerprints);
     }
 
+    @CddTest(requirement="7.3.10/C-1-2")
     public void test_authenticateNullCallback() {
         if (!mHasFingerprintManager) {
             return; // skip test if no fingerprint feature
@@ -99,6 +103,7 @@
         }
     }
 
+    @CddTest(requirement="7.3.10/C-1-2")
     public void test_authenticate() {
         if (!mHasFingerprintManager) {
             return; // skip test if no fingerprint feature
diff --git a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
index b09a679..2a39dab 100644
--- a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
+++ b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
@@ -30,6 +30,8 @@
 
 import android.keystore.cts.R;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.OutputStream;
@@ -2144,6 +2146,7 @@
         }
     }
 
+    @CddTest(requirement="9.11/C-0-1")
     @LargeTest
     public void testKeyStore_LargeNumberOfKeysSupported_EC() throws Exception {
         // This test imports key1, then lots of other keys, then key2, and then confirms that
@@ -2242,6 +2245,7 @@
         }
     }
 
+    @CddTest(requirement="9.11/C-0-1")
     @LargeTest
     public void testKeyStore_LargeNumberOfKeysSupported_AES() throws Exception {
         // This test imports key1, then lots of other keys, then key2, and then confirms that
@@ -2332,6 +2336,7 @@
         }
     }
 
+    @CddTest(requirement="9.11/C-0-1")
     @LargeTest
     public void testKeyStore_LargeNumberOfKeysSupported_HMAC() throws Exception {
         // This test imports key1, then lots of other keys, then key2, and then confirms that
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java b/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
index 0ea3ae0..397d6f1 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecCapabilitiesTest.java
@@ -186,8 +186,10 @@
             return; // skip
         }
 
-        String urlString = dynamicConfig.getValue(AVC_BASELINE_12_KEY);
-        playVideoWithRetries(urlString, 256, 144, PLAY_TIME_MS);
+        if (checkDecodeWithDefaultPlayer(MIMETYPE_VIDEO_AVC, AVCProfileBaseline, AVCLevel12)) {
+            String urlString = dynamicConfig.getValue(AVC_BASELINE_12_KEY);
+            playVideoWithRetries(urlString, 256, 144, PLAY_TIME_MS);
+        }
     }
 
     public void testAvcBaseline30() throws Exception {
@@ -195,8 +197,10 @@
             return; // skip
         }
 
-        String urlString = dynamicConfig.getValue(AVC_BASELINE_30_KEY);
-        playVideoWithRetries(urlString, 640, 360, PLAY_TIME_MS);
+        if (checkDecodeWithDefaultPlayer(MIMETYPE_VIDEO_AVC, AVCProfileBaseline, AVCLevel3)) {
+            String urlString = dynamicConfig.getValue(AVC_BASELINE_30_KEY);
+            playVideoWithRetries(urlString, 640, 360, PLAY_TIME_MS);
+        }
     }
 
     public void testAvcHigh31() throws Exception {
@@ -204,8 +208,10 @@
             return; // skip
         }
 
-        String urlString = dynamicConfig.getValue(AVC_HIGH_31_KEY);
-        playVideoWithRetries(urlString, 1280, 720, PLAY_TIME_MS);
+        if (checkDecodeWithDefaultPlayer(MIMETYPE_VIDEO_AVC, AVCProfileHigh, AVCLevel31)) {
+            String urlString = dynamicConfig.getValue(AVC_HIGH_31_KEY);
+            playVideoWithRetries(urlString, 1280, 720, PLAY_TIME_MS);
+        }
     }
 
     public void testAvcHigh40() throws Exception {
@@ -217,8 +223,10 @@
             return;
         }
 
-        String urlString = dynamicConfig.getValue(AVC_HIGH_40_KEY);
-        playVideoWithRetries(urlString, 1920, 1080, PLAY_TIME_MS);
+        if (checkDecodeWithDefaultPlayer(MIMETYPE_VIDEO_AVC, AVCProfileHigh, AVCLevel4)) {
+            String urlString = dynamicConfig.getValue(AVC_HIGH_40_KEY);
+            playVideoWithRetries(urlString, 1920, 1080, PLAY_TIME_MS);
+        }
     }
 
     public void testHevcMain1() throws Exception {
@@ -312,15 +320,26 @@
     }
 
     private boolean hasDecoder(String mime, int profile, int level) {
-        return supports(mime, false /* isEncoder */, profile, level);
+        return supports(mime, false /* isEncoder */, profile, level, false /* defaultOnly */);
     }
 
     private boolean hasEncoder(String mime, int profile, int level) {
-        return supports(mime, true /* isEncoder */, profile, level);
+        return supports(mime, true /* isEncoder */, profile, level, false /* defaultOnly */);
+    }
+
+    // Checks whether the default AOSP player can play back a specific profile and level for a
+    // given media type. If it cannot, it automatically logs that the test is skipped.
+    private boolean checkDecodeWithDefaultPlayer(String mime, int profile, int level) {
+        if (!supports(mime, false /* isEncoder */, profile, level, true /* defaultOnly */)) {
+            MediaUtils.skipTest(TAG, "default player cannot test codec");
+            return false;
+        }
+        return true;
     }
 
     private boolean supports(
-            String mime, boolean isEncoder, int profile, int level) {
+            String mime, boolean isEncoder, int profile, int level,
+            boolean defaultOnly) {
         MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
         for (MediaCodecInfo info : mcl.getCodecInfos()) {
             if (isEncoder != info.isEncoder()) {
@@ -344,6 +363,11 @@
                         return true;
                     }
                 }
+                // the default AOSP player picks the first codec for a specific mime type, so
+                // we can stop after the first one found
+                if (defaultOnly) {
+                    return false;
+                }
             } catch (IllegalArgumentException e) {
             }
         }
diff --git a/tests/tests/midi/src/android/midi/cts/MidiEchoTest.java b/tests/tests/midi/src/android/midi/cts/MidiEchoTest.java
index a1a2156..27711ad 100644
--- a/tests/tests/midi/src/android/midi/cts/MidiEchoTest.java
+++ b/tests/tests/midi/src/android/midi/cts/MidiEchoTest.java
@@ -31,6 +31,8 @@
 import android.os.Bundle;
 import android.test.AndroidTestCase;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Random;
@@ -326,6 +328,7 @@
         tearDownEchoServer(mc);
     }
 
+    @CddTest(requirement="5.9/C-1-2")
     public void testEchoSmallMessage() throws Exception {
         PackageManager pm = mContext.getPackageManager();
         if (!pm.hasSystemFeature(PackageManager.FEATURE_MIDI)) {
@@ -411,6 +414,7 @@
         tearDownEchoServer(mc);
     }
 
+    @CddTest(requirement="5.9/C-1-2")
     public void testEchoMultipleMessages() throws Exception {
         PackageManager pm = mContext.getPackageManager();
         if (!pm.hasSystemFeature(PackageManager.FEATURE_MIDI)) {
@@ -485,6 +489,7 @@
     }
 
     // What happens if the app does bad things.
+    @CddTest(requirement="5.9/C-1-2")
     public void testEchoBadBehavior() throws Exception {
         PackageManager pm = mContext.getPackageManager();
         if (!pm.hasSystemFeature(PackageManager.FEATURE_MIDI)) {
diff --git a/tests/tests/os/src/android/os/cts/ParcelTest.java b/tests/tests/os/src/android/os/cts/ParcelTest.java
index 305f0c8..8a221e6 100644
--- a/tests/tests/os/src/android/os/cts/ParcelTest.java
+++ b/tests/tests/os/src/android/os/cts/ParcelTest.java
@@ -19,7 +19,11 @@
 import java.io.FileDescriptor;
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 
 import android.content.pm.Signature;
 import android.os.BadParcelableException;
@@ -3158,4 +3162,58 @@
         assertEquals(42, list.get(0).getValue());
         assertEquals(56, list.get(1).getValue());
     }
+
+    public void testMaliciousMapWrite() {
+        class MaliciousMap<K, V> extends HashMap<K, V> {
+            public int fakeSize = 0;
+            public boolean armed = false;
+
+            class FakeEntrySet extends HashSet<Entry<K, V>> {
+                public FakeEntrySet(Collection<? extends Entry<K, V>> c) {
+                    super(c);
+                }
+
+                @Override
+                public int size() {
+                    if (armed) {
+                        // Only return fake size on next call, to mitigate unexpected behavior.
+                        armed = false;
+                        return fakeSize;
+                    } else {
+                        return super.size();
+                    }
+                }
+            }
+
+            @Override
+            public Set<Map.Entry<K, V>> entrySet() {
+                return new FakeEntrySet(super.entrySet());
+            }
+        }
+
+        Parcel parcel = Parcel.obtain();
+
+        // Fake having more Map entries than there really are
+        MaliciousMap map = new MaliciousMap<String, String>();
+        map.fakeSize = 1;
+        map.armed = true;
+        try {
+            parcel.writeMap(map);
+            fail("Should have thrown a BadParcelableException");
+        } catch (BadParcelableException bpe) {
+            // good
+        }
+
+        // Fake having fewer Map entries than there really are
+        map = new MaliciousMap<String, String>();
+        map.put("key", "value");
+        map.fakeSize = 0;
+        map.armed = true;
+        try {
+            parcel.writeMap(map);
+            fail("Should have thrown a BadParcelableException");
+        } catch (BadParcelableException bpe) {
+            // good
+        }
+    }
 }
diff --git a/tests/tests/packageinstaller/adminpackageinstaller/Android.mk b/tests/tests/packageinstaller/adminpackageinstaller/Android.mk
index 0e24292..adf0b2b 100755
--- a/tests/tests/packageinstaller/adminpackageinstaller/Android.mk
+++ b/tests/tests/packageinstaller/adminpackageinstaller/Android.mk
@@ -30,7 +30,8 @@
 	ub-uiautomator \
 	android-support-test \
 	android-support-v4 \
-	legacy-android-test
+	legacy-android-test \
+	compatibility-device-util
 
 LOCAL_SDK_VERSION := test_current
 
diff --git a/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/SessionCommitBroadcastTest.java b/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/SessionCommitBroadcastTest.java
index 17f97fe..55d0c3a 100644
--- a/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/SessionCommitBroadcastTest.java
+++ b/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/SessionCommitBroadcastTest.java
@@ -28,6 +28,8 @@
 import android.os.UserManager;
 import android.text.TextUtils;
 
+import com.android.compatibility.common.util.CddTest;
+
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -49,6 +51,7 @@
         mThisAppLauncher = new ComponentName(mContext, LauncherActivity.class);
     }
 
+    @CddTest(requirement="3.2.3.4/C-0-1")
     public void testBroadcastNotReceivedForDifferentLauncher() throws Exception {
         if (!mHasFeature) {
             return;
@@ -85,6 +88,7 @@
         assertEquals(TEST_APP_PKG, info.getAppPackageName());
     }
 
+    @CddTest(requirement="3.2.3.4/C-0-1")
     public void testBroadcastReceivedForNewInstall() throws Exception {
         if (!mHasFeature) {
             return;
@@ -107,6 +111,7 @@
         setLauncher(mDefaultLauncher.flattenToString());
     }
 
+    @CddTest(requirement="3.2.3.4/C-0-1")
     public void testBroadcastReceivedForEnablingApp() throws Exception {
         if (!mHasFeature || !UserManager.supportsMultipleUsers()) {
             return;
diff --git a/tests/tests/provider/src/android/provider/cts/CalendarTest.java b/tests/tests/provider/src/android/provider/cts/CalendarTest.java
index 8db5e45..fcd873a 100644
--- a/tests/tests/provider/src/android/provider/cts/CalendarTest.java
+++ b/tests/tests/provider/src/android/provider/cts/CalendarTest.java
@@ -2516,8 +2516,8 @@
         // instances, and it's stored as minutes since midnight in the device's time zone.
         // Things won't be consistent if the event and the device have different ideas about DST.
         String timeZone = eventValues.getAsString(Events.EVENT_TIMEZONE);
-        String testStart = "1999-04-18T00:00:00";
-        String testEnd = "1999-05-16T23:59:59";
+        String testStart = "1999-07-02T00:00:00";
+        String testEnd = "1999-08-04T23:59:59";
         String[] projection = { Instances.BEGIN, Instances.START_MINUTE, Instances.END_MINUTE };
 
         Cursor instances = getInstances(timeZone, testStart, testEnd, projection,
diff --git a/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java b/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
index 56e3e13..1a2f620 100644
--- a/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
+++ b/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
@@ -26,6 +26,7 @@
 import android.security.cts.IsolatedService;
 import android.test.AndroidTestCase;
 import android.util.Log;
+import com.android.compatibility.common.util.CddTest;
 import com.android.internal.util.ArrayUtils;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -74,6 +75,7 @@
                 mLatch.await(BIND_SERVICE_TIMEOUT, TimeUnit.MILLISECONDS));
     }
 
+    @CddTest(requirement="9.2/C-0-1")
     public void testGetCachedServicesFromIsolatedService() throws RemoteException {
         String[] cachedServices = mService.getCachedSystemServices();
         for (String serviceName : cachedServices) {
@@ -82,6 +84,7 @@
         }
     }
 
+    @CddTest(requirement="9.2/C-0-1")
     public void testGetServiceFromIsolatedService() throws RemoteException {
         for (String serviceName : RESTRICTED_SERVICES_TO_TEST) {
             IBinder service = mService.getSystemService(serviceName);
diff --git a/tests/tests/systemui/res/values/colors.xml b/tests/tests/systemui/res/values/colors.xml
index 6f0558a..d16ae02 100644
--- a/tests/tests/systemui/res/values/colors.xml
+++ b/tests/tests/systemui/res/values/colors.xml
@@ -15,5 +15,6 @@
   ~ limitations under the License
   -->
 <resources>
+    <color name="navigationBarColor">#0000ff</color>
     <color name="navigationBarDividerColor">#ff0000</color>
 </resources>
\ No newline at end of file
diff --git a/tests/tests/systemui/res/values/styles.xml b/tests/tests/systemui/res/values/styles.xml
index dd95114..3a546b3 100644
--- a/tests/tests/systemui/res/values/styles.xml
+++ b/tests/tests/systemui/res/values/styles.xml
@@ -19,7 +19,7 @@
     <style name="LightBarTheme" parent="@android:style/Theme.Material.Light.NoActionBar">
         <item name="android:windowLightStatusBar">true</item>
         <item name="android:windowLightNavigationBar">true</item>
-        <item name="android:navigationBarColor">@android:color/white</item>
+        <item name="android:navigationBarColor">@color/navigationBarColor</item>
         <item name="android:navigationBarDividerColor">@color/navigationBarDividerColor</item>
     </style>
 </resources>
\ No newline at end of file
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarBaseActivity.java b/tests/tests/systemui/src/android/systemui/cts/LightBarBaseActivity.java
index 1b228f3..b4c4e38 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarBaseActivity.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarBaseActivity.java
@@ -16,10 +16,12 @@
 
 package android.systemui.cts;
 
+import android.annotation.MainThread;
 import android.app.Activity;
 import android.os.Bundle;
 import android.view.View;
 import android.view.ViewGroup.LayoutParams;
+import android.view.WindowInsets;
 
 public class LightBarBaseActivity extends Activity {
 
@@ -34,6 +36,11 @@
         setContentView(mContent);
     }
 
+    @MainThread
+    public WindowInsets getRootWindowInsets() {
+        return getWindow().getDecorView().getRootWindowInsets();
+    }
+
     public int getSystemUiVisibility() {
         return mContent.getWindowSystemUiVisibility();
     }
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java b/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
index 10ce913..f1d52a1 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
@@ -27,9 +27,10 @@
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.support.test.InstrumentationRegistry;
+import android.support.test.rule.ActivityTestRule;
 import android.util.Log;
-import android.view.KeyCharacterMap;
 import android.view.KeyEvent;
+import android.view.WindowInsets;
 
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -71,10 +72,13 @@
         }
     }
 
-    private boolean hasVirtualNavigationBar() {
-        boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);
-        boolean hasHomeKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_HOME);
-        return !hasBackKey || !hasHomeKey;
+    private boolean hasVirtualNavigationBar(ActivityTestRule<? extends LightBarBaseActivity> rule)
+            throws Throwable {
+        final WindowInsets[] inset = new WindowInsets[1];
+        rule.runOnUiThread(()-> {
+            inset[0] = rule.getActivity().getRootWindowInsets();
+        });
+        return inset[0].getStableInsetBottom() > 0;
     }
 
     private boolean isRunningInVr() {
@@ -101,18 +105,26 @@
         assumeTrue(ActivityManager.isHighEndGfx());
     }
 
-    protected void assumeHasColoredStatusBar() {
+    protected void assumeHasColoredStatusBar(ActivityTestRule<? extends LightBarBaseActivity> rule)
+            throws Throwable {
         assumeBasics();
 
         // No status bar when running in Vr
         assumeFalse(isRunningInVr());
+
+        final WindowInsets[] inset = new WindowInsets[1];
+        rule.runOnUiThread(()-> {
+            inset[0] = rule.getActivity().getRootWindowInsets();
+        });
+        assumeTrue("Top stable inset is non-positive.", inset[0].getStableInsetTop() > 0);
     }
 
-    protected void assumeHasColorNavigationBar() {
+    protected void assumeHasColorNavigationBar (
+            ActivityTestRule<? extends LightBarBaseActivity> rule) throws Throwable {
         assumeBasics();
 
         // No virtual navigation bar, so no effect.
-        assumeTrue(hasVirtualNavigationBar());
+        assumeTrue(hasVirtualNavigationBar(rule));
     }
 
     protected void checkNavigationBarDivider(LightBarBaseActivity activity, int dividerColor) {
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java b/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
index 38d9c63..dfce551 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
@@ -68,7 +68,7 @@
 
     @Test
     public void testLightStatusBarIcons() throws Throwable {
-        assumeHasColoredStatusBar();
+        assumeHasColoredStatusBar(mActivityRule);
 
         mNm = (NotificationManager) getInstrumentation().getContext()
                 .getSystemService(Context.NOTIFICATION_SERVICE);
@@ -139,7 +139,7 @@
 
     @Test
     public void testLightNavigationBar() throws Throwable {
-        assumeHasColorNavigationBar();
+        assumeHasColorNavigationBar(mActivityRule);
 
         requestLightBars(Color.RED /* background */);
         Thread.sleep(WAIT_TIME);
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java b/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
index 9363586..f8661d2 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
@@ -60,8 +60,8 @@
     }
 
     @Test
-    public void testNavigationBarDividerColor() throws Exception {
-        assumeHasColorNavigationBar();
+    public void testNavigationBarDividerColor() throws Throwable {
+        assumeHasColorNavigationBar(mActivityRule);
 
         // Wait until the activity is fully visible
         mDevice.waitForIdle();
diff --git a/tests/tests/view/src/android/view/cts/KeyCharacterMapTest.java b/tests/tests/view/src/android/view/cts/KeyCharacterMapTest.java
index 6207b9b..2ba7972 100644
--- a/tests/tests/view/src/android/view/cts/KeyCharacterMapTest.java
+++ b/tests/tests/view/src/android/view/cts/KeyCharacterMapTest.java
@@ -29,10 +29,13 @@
 import android.view.KeyCharacterMap.KeyData;
 import android.view.KeyEvent;
 
+import com.android.compatibility.common.util.CddTest;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+@CddTest(requirement="7.2.3/H-0-1,T-0-1,A-0-1,7.2.1/C-1-3")
 @SmallTest
 @RunWith(AndroidJUnit4.class)
 public class KeyCharacterMapTest {
diff --git a/tests/tests/view/src/android/view/cts/KeyEventTest.java b/tests/tests/view/src/android/view/cts/KeyEventTest.java
index fde3f81..666e585 100644
--- a/tests/tests/view/src/android/view/cts/KeyEventTest.java
+++ b/tests/tests/view/src/android/view/cts/KeyEventTest.java
@@ -41,6 +41,8 @@
 import android.view.KeyCharacterMap.KeyData;
 import android.view.KeyEvent;
 
+import com.android.compatibility.common.util.CddTest;
+
 import junit.framework.Assert;
 
 import org.junit.Before;
@@ -514,6 +516,7 @@
         assertTrue(mKeyEvent.getDisplayLabel() > 0);
     }
 
+    @CddTest(requirement="7.2.3/H-0-1,T-0-1,A-0-1")
     @Test
     public void testIsSystem() {
         mKeyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU);
diff --git a/tests/tests/webkit/src/android/webkit/cts/TestHtmlConstants.java b/tests/tests/webkit/src/android/webkit/cts/TestHtmlConstants.java
index 68d944b..2996c76 100644
--- a/tests/tests/webkit/src/android/webkit/cts/TestHtmlConstants.java
+++ b/tests/tests/webkit/src/android/webkit/cts/TestHtmlConstants.java
@@ -69,6 +69,7 @@
     public static final String STOP_LOADING_URL = "webkit/test_stop_loading.html";
     public static final String BLANK_TAG_URL = "webkit/blank_tag.html";
     public static final String PAGE_WITH_LINK_URL = "webkit/page_with_link.html";
+    public static final String URL_IN_PAGE_WITH_LINK = "http://foo.com/";
     // Not a real page, just triggers a 404 response.
     public static final String NON_EXISTENT_PAGE_URL = "webkit/generate_404.html";
     public static final String BAD_IMAGE_PAGE_URL = "webkit/test_bad_image_url.html";
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
index 58e59e5..3ce66ac 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
@@ -137,6 +137,7 @@
 
         final WebView childWebView = mOnUiThread.createWebView();
 
+        WebViewOnUiThread childWebViewOnUiThread = new WebViewOnUiThread(this, childWebView);
         mOnUiThread.setWebChromeClient(new WebChromeClient() {
             @Override
             public boolean onCreateWindow(
@@ -152,21 +153,26 @@
                 return true;
             }
         });
-        mOnUiThread.loadUrl(mWebServer.getAssetUrl(TestHtmlConstants.BLANK_TAG_URL));
+        {
+          final int childCallCount = childWebViewClient.getShouldOverrideUrlLoadingCallCount();
+          mOnUiThread.loadUrl(mWebServer.getAssetUrl(TestHtmlConstants.BLANK_TAG_URL));
 
-        new PollingCheck(TEST_TIMEOUT) {
-            @Override
-            protected boolean check() {
-                return childWebViewClient.hasOnPageFinishedCalled();
-            }
-        }.run();
-        assertEquals(mWebServer.getAssetUrl(TestHtmlConstants.PAGE_WITH_LINK_URL),
-                childWebViewClient.getLastShouldOverrideUrl());
+          new PollingCheck(TEST_TIMEOUT) {
+              @Override
+              protected boolean check() {
+                  return childWebViewClient.hasOnPageFinishedCalled();
+              }
+          }.run();
+          new PollingCheck(TEST_TIMEOUT) {
+              @Override
+              protected boolean check() {
+                  return childWebViewClient.getShouldOverrideUrlLoadingCallCount() > childCallCount;
+              }
+          }.run();
+          assertEquals(mWebServer.getAssetUrl(TestHtmlConstants.PAGE_WITH_LINK_URL),
+                  childWebViewClient.getLastShouldOverrideUrl());
+        }
 
-        // Now test a navigation within the page
-        //TODO(hush) Enable this portion when b/12804986 is fixed.
-        /*
-        WebViewOnUiThread childWebViewOnUiThread = new WebViewOnUiThread(this, childWebView);
         final int childCallCount = childWebViewClient.getShouldOverrideUrlLoadingCallCount();
         final int mainCallCount = mainWebViewClient.getShouldOverrideUrlLoadingCallCount();
         clickOnLinkUsingJs("link", childWebViewOnUiThread);
@@ -177,8 +183,8 @@
             }
         }.run();
         assertEquals(mainCallCount, mainWebViewClient.getShouldOverrideUrlLoadingCallCount());
-        assertEquals(TEST_URL, childWebViewClient.getLastShouldOverrideUrl());
-        */
+        assertEquals(
+            TestHtmlConstants.URL_IN_PAGE_WITH_LINK, childWebViewClient.getLastShouldOverrideUrl());
     }
 
     private void clickOnLinkUsingJs(final String linkId, WebViewOnUiThread webViewOnUiThread) {
@@ -781,7 +787,6 @@
         @Override
         public void onLoadResource(WebView view, String url) {
             super.onLoadResource(view, url);
-            assertTrue(mOnPageStartedCalled);
             mOnLoadResourceCalled = true;
         }
 
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
index dd081ff..6f86a11 100755
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
@@ -1358,7 +1358,7 @@
         assertNull(mWebView.getUrl());
         String imgUrl = TestHtmlConstants.SMALL_IMG_URL; // relative
         // Snippet of HTML that will prevent favicon requests to the test server.
-        final String HTML_HEADER = "<html><head><link rel=\"shortcut icon\" href=\"#\" /></head>";
+        final String HTML_HEADER = "<html><head><link rel=\"shortcut icon\" href=\"%23\" /></head>";
 
         // Trying to resolve a relative URL against a data URL without a base URL
         // will fail and we won't make a request to the test web server.
@@ -1965,8 +1965,8 @@
         final String imgUrl = mWebServer.getAssetUrl(TestHtmlConstants.LARGE_IMG_URL);
         mOnUiThread.loadDataAndWaitForCompletion(
                 "<html><head><title>Title</title><style type=\"text/css\">"
-                + "#imgElement { -webkit-transform: translate3d(0,0,1); }"
-                + "#imgElement.finish { -webkit-transform: translate3d(0,0,0);"
+                + "%23imgElement { -webkit-transform: translate3d(0,0,1); }"
+                + "%23imgElement.finish { -webkit-transform: translate3d(0,0,0);"
                 + " -webkit-transition-duration: 1ms; }</style>"
                 + "<script type=\"text/javascript\">function imgLoad() {"
                 + "imgElement = document.getElementById('imgElement');"
diff --git a/tools/cts-tradefed/Android.mk b/tools/cts-tradefed/Android.mk
index 74dbe1e..2e55c15 100644
--- a/tools/cts-tradefed/Android.mk
+++ b/tools/cts-tradefed/Android.mk
@@ -29,7 +29,7 @@
 LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
 LOCAL_SUITE_NAME := CTS
 LOCAL_SUITE_FULLNAME := "Compatibility Test Suite"
-LOCAL_SUITE_VERSION := 8.1_r11
+LOCAL_SUITE_VERSION := 8.1_r12
 LOCAL_STATIC_JAVA_LIBRARIES += cts-tradefed-harness
 
 LOCAL_MODULE := cts-tradefed
diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml
index f04239b..5d43956 100644
--- a/tools/cts-tradefed/res/config/cts-known-failures.xml
+++ b/tools/cts-tradefed/res/config/cts-known-failures.xml
@@ -203,5 +203,8 @@
     <!-- b/67377433 -->
     <!-- fails only on angler/bullhead userdebug -->
     <option name="compatibility:exclude-filter" value="CtsLiblogTestCases liblog#wrap_mode_blocks" />
+    <!--b/118833202 -->
+    <!-- test fails if usb charging is disabled which is not mandatory -->
+    <option name="compatibility:exclude-filter" value="CtsDumpsysHostTestCases  android.dumpsys.cts.StoragedDumpsysTest#testStoragedOutput" />
 
 </configuration>