Commit Graph

556 Commits

Author SHA1 Message Date
Treehugger Robot
78beeb1d30 Merge "Gray out admin-disabled screenlock option properly" into main 2024-07-05 01:31:34 +00:00
Rubin Xu
935cea2ca7 Gray out admin-disabled screenlock option properly
Fix an issue where some sceenlock options are disabled
by admins but not showing up as grayed out.

Bug: 288081292
Flag: EXEMPT bug fix
Test: manually with `am start  -a android.app.action.SET_NEW_PASSWORD
  --ez isSetupFlow true --ei android.app.extra.PASSWORD_COMPLEXITY 327680`
Change-Id: I4aab61a052bc2c5146f44d0bfcd8153e3f2cee92
2024-07-03 10:55:47 +00:00
Diya Bera
049de84f2d Add mandatory biometric prompt to platform surfaces (1/N)
1. Face settings
2. Fingerprint settings
3. Change device credential

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest UtilsTest

Change-Id: I69778d1733ea9fb312e7c26ae0fa23b6008dde5d
2024-07-01 21:35:19 +00:00
Hao Dong
facbd33839 Fix res not found in ConfirmDeviceCredentialActivity
Bug: 346447223
Test: atest RepairModeUnitTests
Change-Id: I3267c046b0e9eebdd2d0505cd5f2bc04c67c1bd0
2024-06-11 03:54:50 +00:00
Hao Dong
96537caa6d Update to use PromptInfo.setLogo()
Bug: 341697368
Test: Manually verified on the device
Change-Id: Ie350ef4551367ce65b065f38e924f8ff93d16021
2024-06-07 21:41:12 +00:00
Olivier Nshimiye
14d4b41363 Update the biometric unlock logo to Private Space logo
All activities that use biometric login through the CDCA class show a
Settings icon in the prompt. This cl adds a capability for the client of
the CDCA to set icon and icon description as extras to the unlock
intent.

Screenshot: http://shortn/_OpKTYFtddM

Bug: 333528540
Test: Manually verified on the device

Change-Id: Id7b5a3fe575069bef1810769e4f437e717d2d3c6
2024-06-05 10:36:25 +00:00
Jigar Thakkar
176f1a630a Do not request confirmation by default for private space unlocks
Fix face unlock confirmation button behavior to respect "always
require confirmation" setting. Adjust the description of the
confirmation toggle in private space face unlock settings to
reflect this change.
Screenshot: https://screenshot.googleplex.com/4uHfm9Z3ZE56ZaT.png

Bug: 342383195
Test: Tested manually by flashing local build
Change-Id: I0f742839a862fe66cacad9f5704dbe8b0df3a0c2
2024-05-28 17:59:17 +00:00
Treehugger Robot
ae230aa12c Merge "Fixed issue with pattern not appearing disabled." into main 2024-05-17 04:38:45 +00:00
Joshua McCloskey
ee5ddeda6f Fixed issue with pattern not appearing disabled.
Test: Verified that the pattern option now appears disabled when
setting up COPE profile
Fixes 288081292

Change-Id: I43992dc4518a47a41e58e7b9cfd47fb22542e749
2024-05-16 19:13:24 +00:00
Hao Dong
76b3bc8a20 Merge "Override package name for logo in ConfirmDeviceCredentialActivity." into main 2024-05-14 01:18:03 +00:00
David Liu
ae68cfca44 Merge "Set noparent to avoid it recursively looks up. Android biometric team should approve all change in this subdirectories." into main am: 7220a11daf am: aa9702134d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3080723

Change-Id: Ia7c3895dd1f4baef3b64c26fa0fa2e46af333c49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-13 17:29:32 +00:00
Hao Dong
3b9c3cf530 Override package name for logo in ConfirmDeviceCredentialActivity.
Test: TODO
Flag: ACONFIG android.hardware.biometrics.custom_biometric_prompt NEXTFOOD
Bug: 337082634

Change-Id: If0c4851c8c0cb0fae01e9f30d6a6486f2ab2c71f
2024-05-13 15:31:20 +00:00
David Liu
836e14e665 Set noparent to avoid it recursively looks up. Android biometric team should approve all change in this subdirectories.
Change-Id: Ib5bdc23660cc18af0f57ffdec1dbf582db734a43
2024-05-09 22:15:14 +00:00
Oli Thompson
fb08a80955 Correctly unlock storage for work profiles with unified challenge
When turning off quiet mode for work profiles, ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER is fired
to confirm the device/profile PIN in order to decrypt the profile's storage. For work profiles with
unified challenge, we are expected to call LockPatternUtils.verifyTiedProfileChallenge() that
specifically decrypts the work profile's storage using the device PIN. This code flow is only reachable
when mForceVerifyPath is true in ConfirmDeviceCredentialActivity. In
I8b61e7d2df5792cbdb2e12b19e5a5582ea2290b7 a regression was introduced that caused the wong condition
to be used, and as a result work profile with unified challenge is no longer unlocked correctly in
this unlock flow. This bug is normally masked since we cache the unified work profile's password and
don't ask the user for device PINs most of the time. It's only reproducible when turning on work
profile from the keyguard, when we don't use the password cache. Fix this by using the right condition.



Bug: 328640625
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: I5eb9379dc140c9803f033beee38fcd63aa9a85c0
2024-04-29 11:13:05 +00:00
Kholoud Mohamed
85c38bc078 Fix incorrect password attempts messaging on headless
Bug: 257276847
Test: manual
Flag: ACONFIG android.app.admin.flags.headless_single_user_fixes DISABLED
Change-Id: I2fb70d99203228ce4ee36f84eb4dfed36fa6fd8c
2024-04-19 12:49:31 +00:00
josephpv
e1acfb3db1 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
Merged-In: Ic8173ff8c1af23fc593390acaff4c67390f99b9c
2024-04-02 23:12:43 +00:00
Jigar Thakkar
eb612580d8 Use allowPrivateProfile to guard BiometricFragment changes
The BiometricPrompt API setAllowBackgroundAuthentication is
now guarded by allowPrivateProfile flag. This change ensures the
references to this API are flagged by the same flag, and the uber
private space implementation flag - enablePrivateSpaceFeatures, as
well.

Bug: 312184187
Test: Tested by flashing changes on a test device
Flag: Flags.ALLOW_PRIVATE_PROFILE
Change-Id: Icfdc5a2c2f07177c25fa3d545837052209b76551
2024-03-26 16:02:33 +00:00
Joseph Vincent
6ec3ac32a5 Merge "To skip face enrollment for PS unlock setup based on intent extra" into main 2024-03-19 13:28:10 +00:00
josephpv
f9bc323633 To skip face enrollment for PS unlock setup based on intent extra
For private space lock setup as part of both PS setup and separate lock
form private space settings we need to show only traditional unlock
factors and Fingerprint but not show Face enrolment even on devices
where Face unlock is supported by hardware.
Once LSKF is enrolled it should be followed by Fingerprint enrollment
flow and after that Face enrollment should not be shown and exit lock
setup flow.

Currently for separate profile lock setup ACTION_SET_NEW_PASSWORD intent
is used in private space setup.
With this intent the options of LSKF+fingerprint+Face is shown in
devices supporting both fingerprint and face hardware. After the LSKF
ennrollment BiometricEnrollActivity is started which continues with
fingerprint and Face enrollment.

With this change we are passing an extra along with the intent to enroll
fingerprint only. Based on the intent extra value if set even if hardware
support exists the lock enrollment for the profile will support only
LSKF and fingerprint enrollment but not start Face enrollment.

User will still have the option to enroll Face from the dedicated settings
entrypoint in private space settings.

Recording link : b/323839067#comment4

Bug: 323839067
Test: Manual, verified option for face enrollment is shown or not shown
based on the intent extra. When extra is not passed the behaviour will be
default.

Change-Id: Idf92084052e02df9ca89f288c618796750e563e6
2024-03-19 11:58:08 +00:00
Eran Messeri
47973b88ac Auth-bound keys usability: Update strings
Update the strings for the warning shown to the user when they are about
to remove their screen lock and there are authentication-bound keys
that would be invalidated.

These strings are provided by Android UXW.

Additionally, apply the new string to all types of device lock screen:
Pattern, password and unknown.

Bug: 302109605
Test: Manual, flashed a device and added different types of screen lock.
Change-Id: Ida6f5f16c5aa1671f3f2c1358160b8173a1d1407
2024-03-15 14:55:51 +00:00
Olivier Nshimiye
0f3799cbad Add an additional flag guard for Private Space implementation
This a layer of flag guarding only for the implementation of Private Space features excluding the APIs. The MVP flag allow_private_profile still guards all the features including the APIs.

Bug: 326060689
Test: Manual - a few verifications that some feeatures are unavailable when this flag is disabled
Test: Run presubmits and verify that nothing breaks
Change-Id: I05f7e2f20c6132b33484bb133ce03a933ece485f
2024-03-04 15:43:24 +00:00
Treehugger Robot
8f0c7f63ee Merge "Use parent profile for device credential" into main 2024-02-17 05:30:38 +00:00
Diya Bera
f7ffa201f4 Use parent profile for device credential
Flag: Flags.ENABLE_BIOMETRICS_TO_UNLOCK_PRIVATE_SPACE
Bug: 320458435
Test: N/A
Change-Id: I9ee46d53df5f0617da643f1cf51db811a5eec478
2024-02-13 11:05:28 -08:00
Eran Messeri
a200371d1c Warn user when removing LSKF in the presence of auth-bound keys
When the user goes through the flow of removing the device's lockscreen
knowledge factor (LSKF), warn them in case they have apps with
auth-bound keys on the device. Auth-bound keys that are bound to the
LSKF's secure user ID (that is, auth-bound keys that can be
authenticated by the user entering their LSKF) will be invalidated
when the LSKF is removed.

That means apps will not be able to decrypt the data encrypted with
these keys or use them to sign anything anymore (potentially effectively
losing the user's ability to prove their identity).

In this case, change the warning message that is shown to the user,
to make it clear wallet apps (that typically use such keys) will stop
working as well as other apps.

Bug: 302109605
Test: Manual, enrolled a PIN, face and fingerprint and tried removing PIN.
      A CtsVerifier test will be added later.
Change-Id: I276b744f54763e291abe1f20824da4f8f156679d
2024-02-08 14:56:02 +00:00
Xin Li
6b4b7336bc Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: If21ca5e914a5ee5aff3fbeeee9595bb77a8fc3d0
Change-Id: I87182e72d0ceb75499528f9011d009d772045e09
2024-01-30 09:24:25 -08:00
Hao Dong
62fddbf478 Show generic ChooseLockPattern title for suw.
Test: atest SetupChooseLockPatternTest
Bug: 301260673
Change-Id: I7df499015a1f4c0559f425ad47042dd2a459d1df
2024-01-18 23:58:58 +00:00
josephpv
149a06cfdf Add biometric enrollment support for private profile
During a new lock setup for profile whose credential is shareable with
its parent first the user is authenticated with device lock after which
an activity having options of Pin/Pattern/Password with fingerprint and
face combinations is shown.
On choosing any option which has combination to set LSFK and biometric
it is expected that after setting LSKF the Biometric enroll activity is
started but currently this does not work as expected as the
ChooseLockGeneric activity is finished after adding LSKF and it does not
start the biometric enrollment for the profile.
The issue also exists with non-profile users using this workflow through
SET_NEW_PASSWORD intent and if already have LSKF assigned.

This change adds a new boolean which takes care to not finish the
activity till the Biometric enrollment is started.

Below conditions are taken care with this change
- For new lock setup when device lock already exists then after
  authentication of current device lock make sure the activity is not
  finished untill the biometrics enrollment activity is started.
- On choosing continue without fingerprint or face option the biometrics
  enrollment is not started

screen recordings uploaded to buganizer - b/316109077

Bug: 316109077
Test: Manual
Change-Id: Ifcbaa7d89195d87d432fc848092f2301752c3c22
2024-01-16 21:07:38 +00:00
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
Xin Li
4f1ec8cb8a Merge UQ1A.231205.015
Bug: 308969284
Merged-In: I5d9d1d30d280311875d8bd8604aed0fd0c08ab2c
Change-Id: I22fa193e9846fdb998810c93c9c26344a40d89a9
2023-12-07 15:48:03 -08: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
5c7a73a8fb 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.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fdf80bd5c945f142e8529f104ca8b6d38d66d158)
Merged-In: I5d9d1d30d280311875d8bd8604aed0fd0c08ab2c
Change-Id: I5d9d1d30d280311875d8bd8604aed0fd0c08ab2c
2023-10-20 00:00:37 +00:00