From aa625a7cafc8c29efb63c24cefea235d4b6c7434 Mon Sep 17 00:00:00 2001 From: Lenka Trochtova Date: Thu, 31 Jan 2019 11:32:35 +0100 Subject: [PATCH] Add @RequiresFeature to setPasswordHistoryLength. Add the @RequiresFeature(FEATURE_SECURE_LOCK_SCREEN) annotation to setPasswordHistoryLength for the sake of consistency - the other password history APIs already have the annotation. Bug: 123270501 Bug: 111072170 Bug: 111071972 Test: make Change-Id: I0a321d6bb1b8fb2a4c7ccebfd7c46b2dc9ad8956 --- core/java/android/app/admin/DevicePolicyManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index f0d0aad76f98f..24d3b989a4714 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3149,6 +3149,7 @@ public class DevicePolicyManager { * @throws SecurityException if {@code admin} is not an active administrator or {@code admin} * does not use {@link DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD} */ + @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN) public void setPasswordHistoryLength(@NonNull ComponentName admin, int length) { if (mService != null) { try {