diff options
author | Ryohei Takeuchi <takeuchi.ryohei@sts-tottori.com> | 2019-06-19 09:16:53 +0900 |
---|---|---|
committer | Ryohei Takeuchi <takeuchi.ryohei@sts-tottori.com> | 2019-06-19 00:24:28 +0000 |
commit | d614b8b85299278da88be53ca8042d4496126399 (patch) | |
tree | 8b21b66ad287ace186cc76015dabb5886c1417e3 | |
parent | b29aa1aaf6191e1b99d5ff98d447448a48391a43 (diff) | |
download | platform_cts-d614b8b85299278da88be53ca8042d4496126399.tar.gz platform_cts-d614b8b85299278da88be53ca8042d4496126399.tar.bz2 platform_cts-d614b8b85299278da88be53ca8042d4496126399.zip |
DO NOT MERGE: DirectBootHostTest on the device that doesn't support secure lock screen
DirectBootHostTest is failed on the device that doesn't have secure lock screen
because this test changes "Screen lock" setting to "PIN" but such device doesn't support "PIN" lock.
Therefore, this test should be passed on the device that doesn't support secure lock screen.
This patch is for the above purpose.
Change-Id: Id9e5398711af07cc0f5666ed72ce057ef63a0cf7
Signed-off-by: Ryohei Takeuchi <takeuchi.ryohei@sts-tottori.com>
-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()) { |