Commit Graph

527 Commits

Author SHA1 Message Date
Sunny Shao
bee65b4109 Merge "Revert^2 "Nullability Annotations replacement"" into main 2024-01-10 08:35:06 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Eric Biggers
6482c08de3 Merge "Use isCeStorageUnlocked() in ConfirmDeviceCredentialActivity" into main 2024-01-09 20:01:38 +00:00
Eric Biggers
45f71ab1ce Use isCeStorageUnlocked() in ConfirmDeviceCredentialActivity
isUserKeyUnlocked() is being renamed to isCeStorageUnlocked() to make it
clear what it does (considering that there are many types of user keys).
Temporarily, the method exists under both names.  Change
ConfirmDeviceCredentialActivity to use the new name.  No change in
behavior.

Bug: 306204742
Flag: exempt, mechanical refactoring
Test: presubmit
Change-Id: I9a3f686b57cfbf99b6c915565e5ecc38ddfe9b22
2024-01-09 18:12:41 +00:00
Jigar Thakkar
d4d9c4fe59 Merge "Disable strong auth for all profiles after successful unlock" into main 2024-01-09 16:49:31 +00:00
Jigar Thakkar
3adb65b84d Disable strong auth for all profiles after successful unlock
The change generalizes the workflow to disable strong auth requirements
for all profiles that require authentication to disable quiet mode,
once a successful unlock has happened through CDCA.
Currently, the call to disable the strong auth requirements is only
being done for work-profile.

Test: Tested locally on device with private space setup with a separate
challenge and tested the strong auth tracker values post this change.
Bug: 312184187

Change-Id: Ib41c51d1df78eea9415d72724b8cc693344e2c26
2024-01-05 15:06:15 +00:00
Sunny Shao
946f52b2a1 Merge "Revert "Nullability Annotations replacement"" into main 2023-12-29 03:18:24 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
Rhed Jao
b1ab7f0373 Merge "Do not finish the activity if the activity result is required" into main 2023-12-22 01:57:58 +00:00
Rhed Jao
19dcf2dc19 Do not finish the activity if the activity result is required
Repair mode requires the completion result after an user chooses
a new screen lock. This change defers finishing the activity until
the activity result is available.

Bug: 281641188
Test: atest SettingsRoboTests:com.android.settings.password
Change-Id: If635521ef7e1c509950d9683c15dffe45375cf4f
2023-12-20 09:47:51 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Joseph Vincent
65ae0d8219 Merge "Show customized message for private space while choosing lock" into main 2023-12-19 10:37:05 +00:00
josephpv
223737e0b5 Show customized message for private space while choosing lock
The change adds private profile checks in addition to the exisiting
managed profile check to show customized message while choosing lock for
private profile in Pattern, PIN and Password screens.

Bug: 311343571
Test: Verify lock screen message for private space
Change-Id: Ic8173ff8c1af23fc593390acaff4c67390f99b9c
2023-12-18 19:34:29 +00:00
Vincent Wang
54a1c53c2a Add talkback feedback when setting passowrd/pin/pattern complete
Bug: 297959385
Test: 1. Enable talkback
      2. Change or Set a password/pattern/pin
      3. Check if there is a feedback after setting complete
Change-Id: I9a63bc99575e27b504dd3130e416f65dac068b4e
2023-12-13 08:23:40 +00:00
Jigar Thakkar
66fb046c70 Enable biometric support to unlock profiles
This change ensures the ConfirmCredentialActivity allows biometric
authentication to unlock (or disable quiet mode for) a profile if
the profile storage is unlocked when in quiet mode.

Test: atest SettingsRoboTest
Bug: 312184187
Change-Id: Iefcebf2f93403591a1a4c50ff5da8d6055a37b03
2023-12-11 23:50:10 +00:00
josephpv
2d7985fbf3 Show customized message for private space lock setup screen
go/ss/3kmkEkasv6vmDDo.png
go/ss/7CzzSXZthbJVcEr.png

Bug: 308862923
Test: atest ChooseLockGenericTest and Verified manually customized
message is shown when passed with intent.

Change-Id: I784d42c4702801ec45bc8d4c5e911a404f549d46
2023-12-06 20:39:51 +00:00
Jigar Thakkar
41cda1f8bb Enable auth check for profiles with shared credentials
This change adds a separate block to handle auth checks for all profiles
that have the property alwaysRequireAuthenticationToDisableQuietMode set
to true. The force verify path is to be invoked for all such profiles
that share credentials with parent.

Test: m -j RunSettingsRoboTests or atest SettingsRoboTest
Bug: 293571176

Change-Id: Iec133bd9dfb22299cbd56ab811f341fa3957ead3
2023-11-13 20:14:33 +00:00
Chun-Wei Wang
d1de1b532b Revert "Settings ChooseLockscreen* dismiss in background."
This reverts commit 302aa72446.

Reason for revert: b/308468754

Change-Id: I27ab7e374324b99e7a039b06ad698c214d97592a
2023-10-31 06:59:48 +00:00
Joshua McCloskey
302aa72446 Settings ChooseLockscreen* dismiss in background.
Whenever launching
ChooseLockGeneric/ChooseLockPassword/ChooseLockPassword the activity
will finish itself when it goes into the background. This is to ensure
that a user only has an opporunity to complete this process once the
activity is shown. (It cannot be resumed after a power button press, or
sending the activity to the background)

Test: Verified in Settings that the ChooseLockGeneric,
ChooseLockPassword and the ChooseLockPattern activities now exit if they
are sent to the background.
Test: Same as above but in SUW
Test: m -j40 RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password.ChooseLockPatternTest
Test: m -j40 RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password.ChooseLockPasswordTest
Fixes: 287473148

Change-Id: Icc9142ff4672ab3669b2f425ff351b03ce7a223a
2023-10-24 21:45:16 +00:00
Bill Lin
ccdee28340 Merge "Revert fixing the style of Choose screen lock wasn’t consistent in initial setup and deferred setup" into udc-qpr-dev am: 2943132aff am: 624ebae395
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24942007

Change-Id: I0ceb3a5aec8537fa31c821bdee3a78a89d118071
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-20 01:51:02 +00:00
Bill Lin
624ebae395 Merge "Revert fixing the style of Choose screen lock wasn’t consistent in initial setup and deferred setup" into udc-qpr-dev am: 2943132aff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24942007

Change-Id: Ic76d9917222bdab7ce268639ac622409fab677c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-20 00:38:06 +00:00
Jason Chang
fdf80bd5c9 Revert fixing the style of Choose screen lock wasn’t consistent
in initial setup and deferred setup

Bug: 301383804

Test: manually test with reproduciable steps in PO mode:
1. Set up offline and skip initial setup.
2. Navigate to home screen.
4. Connect to WiFi.
3. Sign in corp account during deferred setup.
5. Navigate to screen lock setup.
4. When landing on Choose screen lock, observe the behavior.

Change-Id: I5d9d1d30d280311875d8bd8604aed0fd0c08ab2c
2023-10-19 11:05:24 +00:00
Joshua McCloskey
e53b90ebdf Fixed bug w/ ConfirmLock error text flickering
Test: Manually verified that the patterns text does not get
set to the empty string.
Fixes: 301214189

Change-Id: I768c9693b6be28a4cabaadc404465a172e2e5564
2023-10-17 21:34:13 +00:00
Eric Biggers
faaee7a843 Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" into main am: 00f5d9e7a6 am: 335752ed98 am: be262063a7 am: a6448e9389
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2776714

Change-Id: Ifade3ffd8878fc8c738ffa1eb927d2f3507fc643
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 23:26:11 +00:00
Eric Biggers
a6448e9389 Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" into main am: 00f5d9e7a6 am: 335752ed98 am: be262063a7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2776714

Change-Id: Ie1cba1fa73d9cfbf12aca28027854bf9afcfcd7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 22:21:50 +00:00
Eric Biggers
be262063a7 Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" into main am: 00f5d9e7a6 am: 335752ed98
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2776714

Change-Id: I7aa857ea6fd3bb5f36e8d6fda1fa27ce6df27f2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 21:47:02 +00:00
Eric Biggers
b2ea672670 ChooseLockPassword: convert to use PasswordMetrics#validateCredential()
Fix the check for invalid characters in new passwords by switching from
PasswordMetrics#validatePassword() to
PasswordMetrics#validateCredential().  For more information, see
frameworks/base change I5c3c55367c3a294578cd0f97ac0e315a11ed517e.

Bug: 219511761
Bug: 232900169
Bug: 243881358
Test: Verified no regressions in 'atest ChooseLockPasswordTest'.  Note,
      this test is currently @Ignored and has 2 failures.  I didn't
      attempt to address that.
Test: Set a password containing non-ASCII characters on a device running
      an older build.  Upgraded and verified unlocking still works.
      Tested that setting a new non-ASCII password is not allowed.
Change-Id: I5f1822a34688473cb103eb64dca56e4c19d4dd08
Merged-In: I5f1822a34688473cb103eb64dca56e4c19d4dd08
(cherry picked from commit b547094366)
2023-10-06 17:16:55 +00:00
Xin Li
f0ba9c8b60 Merge UP1A.231005.007
Bug: 291102124
Merged-In: I74cde8ebf8214b314a89452e73b834eac7ae8b1e
Change-Id: If0cc9b99ea3e0e6d908d8c1ed476232d3056cb5d
2023-09-27 16:05:12 -07:00
Treehugger Robot
65c34137da Merge "Fixed a11y announcement while setting a PIN" into udc-qpr-dev am: 620ac5cefa am: 9447ed2ac3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24774257

Change-Id: Ica4e97988d09d27272f741281a3caf75cc19144e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 06:27:15 +00:00
Bhavuk Jain
0c7ac1bdc6 Fixed a11y announcement while setting a PIN
This CL removes explicitly setting the disabled state of the confirm
button while reconfirming the PIN in the setting of PIN flow. We do this
since otherwise a11y services announces the state of the button which is
confusing for users.

Bug: b/281953347
Test: Tested by building and installing Settings APK on local device,
and checking a11y announcement. Also setup a PIN to see if the setup
flow is working properly.

Change-Id: I91b592310e240c3994049330c8a881740a3a0d59
2023-09-15 19:31:16 +00:00
Jason Chang
711a0ee76a Merge "Fix the style of Choose screen lock wasn’t consistent in initial setup and deferred setup" into udc-qpr-dev am: f6fdfb0ddc am: 99882cb3bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24499558

Change-Id: I891daf59d1c0ebd0789a5741778cbc6e65a2af66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 23:05:39 +00:00
Jason Chang
f6fdfb0ddc Merge "Fix the style of Choose screen lock wasn’t consistent in initial setup and deferred setup" into udc-qpr-dev 2023-09-07 06:20:21 +00:00
Xin Li
6b3d512b63 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I17a6c8a571b4a0b7d943dfd710cde0f18d03da39
Change-Id: I4ed5b2e4c6c59527bb544e8b6dff2b9d4cee9025
2023-08-25 13:50:56 -07:00
Joe Bolinger
cadc70a0db Merge "Fix talkback not announcing requirement in ChooseLock" into udc-d1-dev am: d27e383edf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24498831

Change-Id: Ie403cfa86823a7d53fab020cd1019cb9d83a2698
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 04:23:18 +00:00
Jason Chang
8a9be07f0a Fix the style of Choose screen lock wasn’t consistent in initial
setup and deferred setup

Make the style the same as DO mode SUW's Choose screen lock.

Bug: 237347124

Test: manually test with reproduciable steps in PO mode:
1. Set up offline and skip initial setup.
2. Navigate to home screen.
4. Connect to WiFi.
3. Sign in corp account during deferred setup.
5. Navigate to screen lock setup.
4. When landing on Choose screen lock, observe the behavior.

Change-Id: I03c7ba5e129fab121b4144fef0aa9a32dd95bcb5
2023-08-23 09:11:42 +00:00
Eric Biggers
fc5e4e4576 RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()
When LockPatternUtils#setLockCredential() fails, it can either return
false or throw an exception.  Catch the exception and treat it the same
way as a false return value, to prevent crashing com.android.settings.

Bug: 253043065
Test: Tried setting lockscreen credential while in secure FRP mode using
      smartlock setup activity launched by intent via adb.  Verified
      that com.android.settings no longer crashes due to the exception
      from LockPatternUtils#setLockCredential().
(cherry picked from commit 05f1eff1c9)
(moved change into ChooseLockPassword.java and ChooseLockPattern.java,
 which are merged into SaveAndFinishWorker.java on udc-qpr-dev and main)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8f3ca8daeb583b8d46ad0d1045c2b953b83f5903)
Merged-In: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
Change-Id: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
2023-08-22 02:15:27 +00:00
Austin Delgado
e7377fc73c Merge "Fix talkback not announcing requirement in ChooseLock" into udc-qpr-dev am: fdb53691b1 am: 7f18843856
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24502371

Change-Id: I78f52d9f6a248cc9b0bb8461d97a63190a454f7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-21 23:26:25 +00:00
Austin Delgado
a73cee24d4 Fix talkback not announcing requirement in ChooseLock
Fix: 281955512
Test: Manual, verify talkback reads out password requirement on 17th digit
Change-Id: Ia274af9cc515d3ac9d344bd41d008ab5b4dbcabd
Merged-In: Ia274af9cc515d3ac9d344bd41d008ab5b4dbcabd
2023-08-21 20:35:39 +00:00
Austin Delgado
5a4105b324 Fix talkback not announcing requirement in ChooseLock
Fix: 281955512
Test: Manual, verify talkback reads out password requirement on 17th digit
Change-Id: Ia274af9cc515d3ac9d344bd41d008ab5b4dbcabd
2023-08-21 13:33:49 -07:00
Oli Thompson
111b073ca9 Add show emergency button call to biometric prompt
useDefaultSubtitle has to be set explicitly from promptInfo rather than being assumed true

remove subtext for managed profile challenge screen to create space for emergency call button

Test: manually tested
Bug: 286391641
Bug: 286422726
Change-Id: I848e00dcd0013124e59ef711c3615e6773c3d210
2023-08-15 16:52:36 +00:00
Eric Biggers
99abeaeec1 Merge changes from topic "locksettings-aosp-first" into main am: 137235a27f am: 71814b355c am: fdf07d6c35
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2700640

Change-Id: Ic208bc0ed3d9ff73a77fed35bc4cdc501f41e149
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-11 02:22:36 +00:00
Eric Biggers
fdf07d6c35 Merge changes from topic "locksettings-aosp-first" into main am: 137235a27f am: 71814b355c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2700640

Change-Id: Ife2292b6bfa6c032701c1f44e4f40e969d83e929
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-11 01:37:55 +00:00
Eric Biggers
6cb2d5a795 ChooseLockPattern: remove redundant setting of visible pattern default
Remove the code that set LOCK_PATTERN_VISIBLE to true the first time a
pattern was set, since LOCK_PATTERN_VISIBLE now defaults to true when
unset (ag/22912136).  The explicit defaulting to true was only needed
before because the low-level default value was wrong.

Bug: 270013005
Test: Set a pattern.  Verified that Keyguard uses visible pattern.
      Disabled the "Make pattern visible" option in Settings.  Verified
      that Keyguard doesn't use visible pattern.
Change-Id: I63f29c68f9a508fee0ee2f03f2cca33317fb8a32
Merged-In: I63f29c68f9a508fee0ee2f03f2cca33317fb8a32
(cherry picked from commit 6c3de30086)
2023-08-09 04:03:18 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Eric Biggers
00885a8cb5 Merge "RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()" into udc-qpr-dev 2023-08-08 00:50:18 +00:00
Wenhui Yang
ed505c25fa Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev am: c2b7914778 am: b41875eff3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24211335

Change-Id: I413b6692409ca97f48f6c68ad99b894d12e4734a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 20:33:36 +00:00
Wenhui Yang
c2b7914778 Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev 2023-08-07 19:55:44 +00:00
Liahav Eitan
e30a1c19ec Merge "Fix theming on Forgot your password work challegne screen" into udc-qpr-dev am: 804104ce36 am: daf168e2b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23845009

Change-Id: I2c19e08ef9f24514fb8e298d97e7f98424a369aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 18:46:10 +00:00
Liahav Eitan
804104ce36 Merge "Fix theming on Forgot your password work challegne screen" into udc-qpr-dev 2023-08-04 17:19:02 +00:00