Merge "Merge "Merge "Skip camera test on devices without a camera" into nougat-cts-dev am: 1a69216da0" into nougat-mr1-cts-dev am: 44d72186a0" am: 15405555cb am: 6288b50793
am: fb559d86be
Change-Id: I609ecfc35eca2d43993d8e437d79db7b91586bc9
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/admin/DeviceAdminKeyguardDisabledFeaturesActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/admin/DeviceAdminKeyguardDisabledFeaturesActivity.java
index b53392a..c8bffdf 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/admin/DeviceAdminKeyguardDisabledFeaturesActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/admin/DeviceAdminKeyguardDisabledFeaturesActivity.java
@@ -60,10 +60,13 @@
if (hasTrustAgents()) {
setupDisableTrustAgentsTest(adapter);
}
- adapter.add(new DialogTestListItem(this, R.string.device_admin_keyguard_disable_camera,
- getTestIdPrefix()+"KeyguardDisableCamera",
- R.string.device_admin_keyguard_disable_camera_instruction,
- new Intent(ByodHelperActivity.ACTION_LOCKNOW)));
+
+ if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
+ adapter.add(new DialogTestListItem(this, R.string.device_admin_keyguard_disable_camera,
+ getTestIdPrefix()+"KeyguardDisableCamera",
+ R.string.device_admin_keyguard_disable_camera_instruction,
+ new Intent(ByodHelperActivity.ACTION_LOCKNOW)));
+ }
adapter.add(new DialogTestListItem(this, R.string.device_admin_disable_notifications,
"DeviceAdmin_DisableNotifications",