summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Chen <alanschen@google.com>2023-03-07 18:52:41 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-07 18:52:41 +0000
commitf8b6d90d1d2644850c7ca72a6e8b274644a05440 (patch)
treefcaa6753977be61919cea5cebb4a0275453779e6
parent4d5115987bf6d9f520129193d7085840caac067d (diff)
parent329a8ab46a5bb27fac9cd98f84f11d84bfee1c84 (diff)
downloadsetupwizard-f8b6d90d1d2644850c7ca72a6e8b274644a05440.tar.gz
Merge "Add API to provide complexity validation error" into udc-dev am: 2d67d57a4d am: 329a8ab46a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/car/setupwizard/+/21572471 Change-Id: I9d65c8f7ed6787e6a4746fcf9785399cbf284638 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl14
-rw-r--r--library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java6
2 files changed, 19 insertions, 1 deletions
diff --git a/library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl b/library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl
index 305195b..3cc4bd4 100644
--- a/library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl
+++ b/library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl
@@ -44,5 +44,19 @@ interface IInitialLockSetupService {
* deserializable by the service.
*/
int setLock(in int lockType, in byte[] password) = 3;
+
+ /**
+ * Added in LIBRARY_VERSION = 2.
+ *
+ * Returns a message String combing all input validation error messages to
+ * directly display to user. If there is no error and the credentialBytes
+ * is valid then it will return an empty String. The String returned should
+ * be the same message as shown to users in the Security Settings page
+ * and should be properly localized.
+
+ * @param credentialBytes input value in bytes representing one of
+ * Password, PIN, or Pattern input.
+ */
+ String checkValidLockAndReturnError(in int lockType, in byte[] credentialBytes) = 4;
}
diff --git a/library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java b/library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java
index 8ca5c6e..7362cd1 100644
--- a/library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java
+++ b/library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java
@@ -27,8 +27,12 @@ public interface InitialLockSetupConstants {
/**
* The library version. All relevant changes should bump this version number and ensure
* all relevant parts of the interface handle backwards compatibility.
+ *
+ * Library version 1: Initial implementation
+ * Library version 2: Add API checkValidLockAndReturnError to allow complexity validation
+ * error to be retrieved from Settings.
*/
- int LIBRARY_VERSION = 1;
+ int LIBRARY_VERSION = 2;
/**
* Lock types supported by the InitialLockSetupService.