diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-07-10 16:36:59 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-07-10 16:36:59 +0000 |
commit | 27764a59cb20b05fc32f038d0ad276760c3517ab (patch) | |
tree | cdcb8bd82550707c44869930030cde4f553d1a38 | |
parent | 453f138f95d22629f70bfadec56a087af774f2be (diff) | |
parent | d614b8b85299278da88be53ca8042d4496126399 (diff) | |
download | platform_cts-27764a59cb20b05fc32f038d0ad276760c3517ab.tar.gz platform_cts-27764a59cb20b05fc32f038d0ad276760c3517ab.tar.bz2 platform_cts-27764a59cb20b05fc32f038d0ad276760c3517ab.zip |
Merge "DO NOT MERGE: DirectBootHostTest on the device that doesn't support secure lock screen" into nougat-cts-dev
-rw-r--r-- | hostsidetests/appsecurity/src/android/appsecurity/cts/DirectBootHostTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/DirectBootHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/DirectBootHostTest.java index a4686aac77e..297485841d6 100644 --- a/hostsidetests/appsecurity/src/android/appsecurity/cts/DirectBootHostTest.java +++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/DirectBootHostTest.java @@ -220,11 +220,25 @@ public class DirectBootHostTest extends DeviceTestCase implements IAbiReceiver, if (featureList.contains("feature:android.hardware.type.watch\n") || featureList.contains("feature:android.hardware.type.television\n")) { return false; + } else if (!hasSecureLockScreen(featureList)) { + // skip if device doesn't have secure lock screen + return false; } else { return true; } } + /* + * Device that don't report android.software.device_admin doesn't have secure lock screen + * because device with secure lock screen MUST report android.software.device_admin . + * + * https://source.android.com/compatibility/7.0/android-7.0-cdd.html#3_9_device_administration + * + */ + private boolean hasSecureLockScreen(final String featureList) { + return featureList.contains("feature:android.software.device_admin\n"); + } + private void waitForBootCompleted() throws Exception { for (int i = 0; i < 45; i++) { if (isBootCompleted()) { |