VerifiedBoot: Remove Low Ram Exemption

Per the 9.0 CDD (section 9.10), we require Verified Boot on all
devices.

Since this requirement began with 9.0 (P release), we do allow
an exemption for low Ram devices which first shipped before P.

Bug: 111449785
Test: Not yet
Change-Id: Ie82de13ae85ec64ec77bd35886de74b2b674ebf5
diff --git a/tests/tests/security/src/android/security/cts/VerifiedBootTest.java b/tests/tests/security/src/android/security/cts/VerifiedBootTest.java
index 33a1b7a..a3209fc 100644
--- a/tests/tests/security/src/android/security/cts/VerifiedBootTest.java
+++ b/tests/tests/security/src/android/security/cts/VerifiedBootTest.java
@@ -26,10 +26,21 @@
 public class VerifiedBootTest extends AndroidTestCase {
   private static final String TAG = "VerifiedBootTest";
 
+  private static boolean isLowRamExempt(PackageManager pm) {
+    if (pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL)) {
+      // No exemption for normal RAM
+      return false;
+    }
+    return (PropertyUtil.getFirstApiLevel() < Build.VERSION_CODES.P);
+  }
+
   /**
-   * Asserts that Verified Boot is supported on devices that report the feature flag
-   * android.hardware.ram.normal. If a device launched on a pre-O_MR1 level without verified boot
-   * then it is exempt from this requirement.
+   * Asserts that Verified Boot is supported.
+   *
+   * A device is exempt if it launched on a pre-O_MR1 level.
+   *
+   * A device without the feature flag android.hardware.ram.normal is exempt if
+   * it launched on a pre-P level.
    */
   public void testVerifiedBootSupport() throws Exception {
     if (PropertyUtil.getFirstApiLevel() < Build.VERSION_CODES.O_MR1) {
@@ -37,11 +48,10 @@
     }
     PackageManager pm = getContext().getPackageManager();
     assertNotNull("PackageManager must not be null", pm);
-    boolean isRAMNormal = pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL);
-    if (!isRAMNormal) {
+    if (isLowRamExempt(pm)) {
       return;
     }
-    assertTrue("Verified boot must be supported on a device with normal RAM",
+    assertTrue("Verified boot must be supported on the device",
         pm.hasSystemFeature(PackageManager.FEATURE_VERIFIED_BOOT));
   }
 }