diff options
author | Alan Chen <alanschen@google.com> | 2023-02-21 16:09:51 -0800 |
---|---|---|
committer | Alan Chen <alanschen@google.com> | 2023-03-08 21:21:40 +0000 |
commit | f212a943a38bbdaa0d6488ab4d540f7c04dfd337 (patch) | |
tree | 342ce0437ee8306eb94438261151e2487b599c91 | |
parent | 47ea97536f5b3f4cec71473b1ec0365f94e4e6af (diff) | |
download | setupwizard-android13-qpr3-c-s1-release.tar.gz |
Add API to provide complexity validation errorandroid-13.0.0_r82android-13.0.0_r81android-13.0.0_r80android-13.0.0_r74android-13.0.0_r73android-13.0.0_r72android-13.0.0_r66android-13.0.0_r65android-13.0.0_r64android-13.0.0_r60android-13.0.0_r59android-13.0.0_r58android13-qpr3-c-s8-releaseandroid13-qpr3-c-s7-releaseandroid13-qpr3-c-s6-releaseandroid13-qpr3-c-s5-releaseandroid13-qpr3-c-s4-releaseandroid13-qpr3-c-s3-releaseandroid13-qpr3-c-s2-releaseandroid13-qpr3-c-s12-releaseandroid13-qpr3-c-s11-releaseandroid13-qpr3-c-s10-releaseandroid13-qpr3-c-s1-release
Currently there is no method for SUW to retrieve the
feedback String when user password/PIN/pattern does
not meet the complexity requirement.
We create a new API checkValidLockForMessage to
retrieve the respective Strings shown to users in
Settings when password does not meet the requirement.
Additionally, we update LIBRARY_VERSION to 2.
Bug: 268506426
Test: manual - build passes when InitialSetupService
in CarSettings implements the method
Change-Id: I37ca7d0b5eec178f993770ba806fc428b7eda0c8
Merged-In: I37ca7d0b5eec178f993770ba806fc428b7eda0c8
-rw-r--r-- | library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl | 14 | ||||
-rw-r--r-- | library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java | 6 |
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. |