summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2023-04-18 16:34:10 -0700
committerXin Li <delphij@google.com>2023-04-18 16:34:10 -0700
commitfcc59aac1efbf6ea79e16bcf3f1fb2c5ffc7ee95 (patch)
treefcaa6753977be61919cea5cebb4a0275453779e6
parent2e3fcecf1226542a4df0bef084d3d87d5c80b624 (diff)
parent8fde294d5f07154fe6baab8a01e5a045b7ad36a6 (diff)
downloadsetupwizard-fcc59aac1efbf6ea79e16bcf3f1fb2c5ffc7ee95.tar.gz
Merge Android 13 QPR3 tm-qpr-dev-plus-aosp-without-vendor@9936994temp_275386652
Bug: 275386652 Merged-In: I37ca7d0b5eec178f993770ba806fc428b7eda0c8 Change-Id: If24bfd238bf87d11b4107887c0a60afc06206743
-rw-r--r--library/main/tests/robotests/Android.bp1
-rw-r--r--library/utils/src/com/android/car/setupwizardlib/IInitialLockSetupService.aidl14
-rw-r--r--library/utils/src/com/android/car/setupwizardlib/InitialLockSetupConstants.java6
3 files changed, 20 insertions, 1 deletions
diff --git a/library/main/tests/robotests/Android.bp b/library/main/tests/robotests/Android.bp
index 9d91639..5adead1 100644
--- a/library/main/tests/robotests/Android.bp
+++ b/library/main/tests/robotests/Android.bp
@@ -34,4 +34,5 @@ android_robolectric_test {
],
instrumentation_for: "CarSetupWizardLib",
+ upstream: true,
}
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.