Commit Graph

110 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Austin Delgado
fefbdc7922 Merge "Announce requirements when setting PIN/Pass" into udc-d1-dev am: c6e7b93f28 am: 0abddc88bc am: 2f1b844997
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24270037

Change-Id: I7929ac906d7661635604fcd7de5225db49ad6ae3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 00:32:39 +00:00
Austin Delgado
2f1b844997 Merge "Announce requirements when setting PIN/Pass" into udc-d1-dev am: c6e7b93f28 am: 0abddc88bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24270037

Change-Id: I0d3fcbf3af5b717b76b9b07974b687ba770d89db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 23:47:08 +00:00
Austin Delgado
35579efcaf Merge "Announce requirements when setting PIN/Pass" into udc-d1-dev am: c6e7b93f28
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24270037

Change-Id: I5ffe93b5c0fe5a52ad841e5e5942363cf0a0d6dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 23:06:10 +00:00
Austin Delgado
035b661ea4 Announce requirements when setting PIN/Pass
Test: Manual, verify requirement is read
Fixes: 281955512
Change-Id: I6d963d545c68c4ec891d9ad8a7da8c0a0f6e9d6b
2023-07-31 17:50:39 -07:00
Chun-Wei Wang
56d26ff56c Merge changes from topic "simplify_pw" into udc-qpr-dev am: e414d40e60 am: 3f4b3fdce8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23840849

Change-Id: I3e2974a91c86aecf459ce51f9afdbf6175b8faed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-18 02:36:44 +00:00
Chun-Wei Wang
e414d40e60 Merge changes from topic "simplify_pw" into udc-qpr-dev
* changes:
  Handle EXTRA_KEY_REQUEST_WRITE_REPAIR_MODE_PW
  Extract common code to SaveChosenLockWorkerBase
2023-07-18 01:17:13 +00:00
Chun-Wei Wang
c726bd48b4 Handle EXTRA_KEY_REQUEST_WRITE_REPAIR_MODE_PW
So the new password can be saved per caller's request.

This will remove the additional step to ask the user
to enter the new credential again and thus simplifying
the UI flow.

Bug: 271968977
Bug: 277561275
Test: atest SettingsUnitTests:SaveAndFinishWorkerTest
Test: atest ChooseLockPasswordTest
Change-Id: I20232619225b17edda0a72dad43b120d5a249203
2023-07-17 23:04:45 +00:00
JW Wang
73dcb47ecb Extract common code to SaveChosenLockWorkerBase
* Extract common code of ChooseLockPassword.SaveAndFinishWorker and
ChooseLockPattern.SaveAndFinishWorker to the parent class.

* Make setters return this to make it easy to chain setter calls.

* Rename SaveChosenLockWorkerBase to SaveAndFinishWorker.

This will make the code changes in the next CL much easier.

Bug: 271968977
Bug: 277561275
Test: 1. Add screen lock (password/PIN/pattern) using Settings
      2. check screen lock works correctly
Change-Id: I98acd25f2dd81ab4608cc6943e4f238070003c17
2023-07-12 05:33:15 +00:00
Jason Chang
c805b2e163 Merge "Fix the “screen lock option” and password restriction view are in the wrong position on PIN/Password/Pattern in the landscape mode." into udc-qpr-dev am: 5a0d4d1cc3 am: 17d1e70930
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23712165

Change-Id: Ic73f5be63e2d9de3ede40fcfdb63357cab867634
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-10 04:19:00 +00:00
Jason Chang
c0f0b0ca1a Fix the “screen lock option” and password restriction view are
in the wrong position on PIN/Password/Pattern in the landscape mode.

1. Move the description position under the GlifLayout header
2. Move the position "Screen lock options" button under the
GlifLayout header

Bug: 272676038
Bug: 285271342

Test: manully test with reproducible steps:
STEPS TO REPRODUCE:
1. Go through the setup flow
2. Continue steps until “set pin” page
3. The “screen lock option” is in the wrong position

Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings
.password.SetupChooseLockPasswordTest"

Change-Id: I24464e6b7e93f20abbeb59426919ed7fec5c7cbb
2023-06-29 07:11:42 +00:00
Eric Biggers
b547094366 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
2023-06-22 20:59:22 +00:00
Avinash Vadlamudi
01637b556e [Auto Pin Confirmation]: Add talkback capability for Auto-confirm correct PIN checkbox even if it is not in focus
- set accessibilityLiveRegion as Polite mode to allow talkback to announce the state of checkbox even if is not in focus

Bug: 281950677
Test: Manual test by flashing on device and checking in talkback mode
Change-Id: Ia1066e2df1f40e6c339a4cd63f92acf0858f8f3d
2023-06-10 01:25:18 +00:00
Avinash Vadlamudi
a4cf551d25 [Auto Pin Confirm]: Trigger PIN verification when auto confirm setting is being turned on or off
- Fix the logic to set the pin_auto_confirm setting before triggering the password save workflow in ChooseLockPassword

Bug: 275385372
Test: atest AutoPinConfirmPreferenceControllerTest
Test: Manual Test
Change-Id: Id6774bc9afcd6d3161e023dc52911ae3e1f556c9
2023-03-28 15:33:40 +00:00
Avinash Vadlamudi
7da92e9295 [Auto Pin Confirmation]: Save the autoPinConfirmOptionSetManually field state
- Save and restore the autoPinConfirmOptionSetManually field during activity restart (because of orientation change)
- This helps to retain the state of the auto confirm unlock checkbox  during an orientation change during set PIN stage.

Bug: 268592440
Test: Manual Test
Test: atest ChooseLockPasswordTest
Change-Id: I48ce9080b6007fb4e3a5ca5013d6c21ed4ba664f
2023-02-28 11:54:16 +00:00
Avinash Vadlamudi
e644d26b95 [Auto Pin Confirm]: Fix the usage of LockPatternUtils#isAutoPinConfirmFeatureAvailable method
- The method isAutoPinConfirmFeatureAvailable is changed to static, so refactoring the code to use it properly.

Bug: 270315296
Test: Manual Test
Test: atest AutoPinConfirmPreferenceControllerTest
Test: atest ChooseLockPasswordTest
Change-Id: Idecaeca296b9ae9acdd0c094dcbb736db31b74b3
2023-02-23 05:56:58 +00:00
Avinash Vadlamudi
4c8ad8f911 [Auto Pin Confirm]: Changes to allow PIN auto confirm feature to be controllable by the user
- Add SwitchPreference to allow user to control the pin auto confirm feature
- Add Checkbox option during the PIN setup in Security app
- Disable the opt-in checkbox during SUW entry point for PIN setup
- Update SwitchPreference availability appropriately according to current PIN length
- Update the pin_auto_confirm setting appropriately according to state of switchPreference or checkbox state (in PIN setup)
- Update the error-message when PIN Too short to let user know six digit is recommended

Bug: 262926000
Bug: 262936383
Bug: 262934702
Bug: 262935305
Test: Manual Test
Test: atest SettingsRoboTests
Change-Id: Ib9e09bd5ce44652158e77f80e8be19c4dd50f3bf
2023-01-30 14:35:41 +00:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Eric Biggers
5f1d894252 Remove EncryptionInterstitial for Full Disk Encryption
Support for Full Disk Encryption was removed in Android 13, since now
File Based Encryption is always used instead.  It turns out that I
missed a fairly large chunk of obsolete code: EncryptionInterstitial,
which is the screen that asks whether the device will require the
primary user's lockscreen credential when it starts up.  This used to be
shown when setting the primary user's lockscreen credential, to
determine whether the full-disk encryption key would be tied to that
lockscreen credential or not.  But now it's unused code.

This CL removes all this unused code.

This should not change any behavior, with one very minor exception:
Settings will no longer explicitly set the REQUIRE_PASSWORD_TO_DECRYPT
setting to 0 whenever the primary user's lockscreen credential is
changed.  (This happened in SaveChosenLockWorkerBase.)  This setting is
a @SystemApi, but it no longer has any meaning, since it is never set to
1 anymore.  If there is a reason to keep it explicitly set to 0, instead
of unset, we should make LockSettingsService in system_server set it.

Test: Went through SUW, set a PIN, cleared the PIN, set a PIN again (all
      using the UI).  Nothing unusual seen.
Bug: 208476087
Change-Id: I039cc7a284e3f43e1e284970a5869958c909d1b7
2022-12-15 20:47:20 +00:00
lbill
526d5c692d Request hiding IME before starting next activity transition
Since legacy hideSoftInputFromWindow() for IME hiding animation
will be scheduled on the focus app's UI thread, so if activity
transition has running the animation on UI thread, the
IME hiding animation will be delayed until the animation finish.

Make sure calling WindowInsetsController#hide(ime()) before starting
activity transition to prevent flicker issue.

Bug: 204732064
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW set/confirm pin and move to setup fingerprint(back and forth)
Test: make -j RunSettingsRoboTests

Change-Id: I33278dd5c993c0bc299ebd065011e5d18c7242e0
2022-10-31 03:16:14 +00:00
Milton Wu
98239c0da6 Add FLAG_SECURE for ChooseLockPassword and Pattern
Prevent ChooseLockPassword and ChooseLockPatten being projected to
remote views, add FLAG_SECURE for these screens.

Bug: 179725730
Test: Check these 2 screens not projected to chromecast
Test: robo test for SetupChooseLockPatternTest ChooseLockPatternTest
      SetupChooseLockPasswordTest ChooseLockPasswordTest
Change-Id: I7449a24427c966c1aa4280a7b7e7e70b60997cca
2022-08-09 04:12:10 +00:00
Chaohui Wang
140cb75566 Display TOO_SHORT_WHEN_ALL_NUMERIC
To distinguish the requirement between all numeric
and not all numeric when COMPLEXITY_HIGH.

Fix: 227149118
Fix: 173167839
Test: manual & robolectric
Change-Id: I1f682625d8e86963218dda43b626a9e55d169fb3
2022-05-04 21:51:06 +08:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Marie Matheson
9f7374b045 On Settings lockscreen changes send new safety status to Safety Center.
Bug: 215518847
Test: atest SettingsUnitTests
Test: make RunSettingsRoboTests
Change-Id: Id8e957e58c45195260157b2b61b93ecbc203164b
2022-02-28 16:36:46 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Rubin Xu
70172863a7 Remove subtext from work challenge screens
Bug: 201045654
Test: manual
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: Ibd65e27d5ed2762d04aa7750908506d0353a0727
2021-12-09 13:27:03 +00:00
Curtis Belmonte
dc9b53c446 Remove/replace old fingerprint icon in SUW/Settings
Replaces instances of the old fingerprint icon shown during Setup Wizard
or in Settings with either an updated version or an entirely different
icon.

Test: Manual

Fixes: 196600265
Change-Id: If78e8f0dbdb033f557614a019d4c9dde4493b6c6
2021-08-16 14:44:15 -07:00
Curtis Belmonte
a8d7fb68ca Use correct choose lock password/pattern subtitles
Ensures that the existing subtitle strings for the choose lock
password/pattern screens are shown during SUW and from Settings.

Test: Manually tested PIN/pattern/password in SUW and Settings

Fixes: 193802664
Change-Id: Ibbb5f0c7bcd3885e63c02d8b68cd3205ffb529fd
2021-07-15 11:35:07 -07:00
Mill Chen
9edcc5b5e3 Tweak the layout for Pattern/PIN/Password enrollment
- Fix the problem with invisible title
- Fix the wrong layout for landscape mode
- Apply color extraction

Fix: 185076320
Fix: 182339941
Fix: 182440016
Fix: 184715547
Fix: 183710293
Test: robotests and visual verified
Change-Id: Ib8e2a015bc52fcac2d285777972177e53bde7489
2021-05-18 03:23:37 +08:00
Rubin Xu
8e4acdbf51 Refactor ChooseLockGenericController
* Move all logics around aggregating password policies
  to the controller
* Replace HIDE_DISABLED_PREFS and MINIMUM_QUALITY_KEY
  with HIDE_INSECURE_OPTIONS as all call sites are just
  using them to hide insecure screenlock options.
* Remove password policy aggregation logic from
  ChooseLockPassword and make it use policies passed in.
* Remove padlock from disabled screen lock options,
  per UX mock.
* Increase char limit for some strings

Bug: 177638284
Bug: 177641868
Bug: 182561862
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Test: 1. set profile password quality/complexity and enroll device lock
      2. set profile password quality/complexity and enroll work challenge
      3. set parent password quality/complexity and enroll device lock
      4. set parent password quality/complexity and enroll work challenge
      5. set profile and parent password complexity, then enroll work challenge
      6. set profile and parent password complexity, then unify work challenge
      7. Enroll device lock during SUW
Change-Id: Iba1d37e6f33eba7b7e8e1f805f8e37aaec108404
2021-05-06 23:09:27 +01:00
Rubin Xu
1ac05237ab Update titles & messages for password enrolment flows
Show different titles and description messages when
enrolling password under various conditions:
* personal lock verus work lock
* adding a new lock versus updating existing lock
* enrolling a PIN verus password versus pattern

Add icons to options in screen lock picker.

Add an option to redirect to work lock flow if the admin
has set device-wide password requirement.

Bug: 183922696
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: I40417b113814659d3226a44eb7f9d553386e3c58
2021-04-09 14:35:36 +01:00
Rubin Xu
da09a8547d Correctly save credential on config changes
Need to make a copy of the LockscreenCredential in
onSaveInstanceState() since the credential will be
zeroized in onDestroy() while Bundle.putParcelable()
only keeps a reference of the object without any
copying.

Bug: 179108398
Test: manual
Change-Id: I090b691630f82406d1ae2f625dd2e0d578b83707
2021-04-06 14:23:45 +01:00
Rubin Xu
ff1b547548 Support EXTRA_DEVICE_PASSWORD_REQUIREMENT_ONLY
When set, only enforce password requirement explicitly set device-wide.

As part of the change, restructure the code such that ChooseLockGeneric
becomes the central place for aggregating password requirements from
different parties, while ChooseLockPassword only enforces whatever
password reuirement it is told (by ChooseLockGeneric via intent extras)

Bug: 169832516
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password

Change-Id: I0acbea4819c13d4a8444c7b06928baccead18837
2021-01-20 11:16:22 +00:00
Mill Chen
82777ba0c0 Disable toolbar title of screen lock pages
After applying collapsing toolbar in the Settings app, the toolbar title
will be shown in every subsetting pages. However some pages in the
security category don't need the title, like set screen lock page and
lock screen page. This CL is to disable these titles through overriding
isToolbarEnabled method.

Bug: 176883575
Test: manual test and visual verified
1) Navigate to Settings -> Security -> Screen lock ->
Pattern/PIN/Password
2) Observe and check if there is a duplicated title.

Change-Id: I6dfa4fbe1b5e2ac3582804ba1e125196f3bdba6c
2021-01-11 18:31:54 +08:00
Eran Messeri
d8e49b45b1 Enforce password complexity in lockscreen setting
Enforce a lock screen that adheres with the required complexity set by
the admin.

This is done by querying the DevicePolicyManager for the complexity set
for the given user, and merging it with the complexity from the "change
lock screen" intent (if any).

If the admin sets a higher complexity requirement than the app
triggering the lock screen change request, then the admin-set complexity
is enforced and the user is not shown information about the requesting
app.

Bug: 165573442
Test: Manually, set complexity using TestDPC and see it applies.
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password.ChooseLockGenericTest
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password.ChooseLockPasswordTest
Change-Id: If3f24f7430bdcbcd34265339f7d2a1ff82a44fc1
2020-11-30 22:26:50 +00:00
pihuei
55fb2b745d Use system day/night to switch theme instead of from intent extra.
Use value-night to give theme instead of directly from intent extra when Setup day/nNight mode enabled and in Setup flow

Before:
<vision settings>
https://hsv.googleplex.com/4837266235064320
<wifi dialog>
https://hsv.googleplex.com/5687053981319168
<lock screen with disabling button>
https://hsv.googleplex.com/4843506419892224
<lock screen with enabling button>
https://hsv.googleplex.com/5650348922372096
<fingerprint intro>
https://hsv.googleplex.com/5133769046491136
<fingerprint touch>
https://hsv.googleplex.com/5681937198874624
<fingerprint left touch>
https://hsv.googleplex.com/5767441676238848
<squeeze release>
https://hsv.googleplex.com/6632476812247040

After:
<vision settings>
https://hsv.googleplex.com/6213298875793408
<wifi dialog>
https://hsv.googleplex.com/6025790804197376
<lock screen with disabling button>
https://hsv.googleplex.com/5747461219942400
<lock screen with enabling button>
https://hsv.googleplex.com/5766700781797376
<fingerprint intro>
https://hsv.googleplex.com/6751334529236992
<fingerprint touch>
https://hsv.googleplex.com/5625963293442048
<fingerprint left touch>
https://hsv.googleplex.com/4518139360444416
<squeeze release>
https://hsv.googleplex.com/5220720579706880

Bug: 169734655
Test: robo test
Change-Id: I4aab843e28a932c7b823f36f1d8df1e5b2341f4e
2020-11-05 05:09:14 +00:00
Kevin Chyn
87bb772e16 2/n: Add default implementation for multi-biometric enroll
1) Adds a layout for multi-biometric selection in BiometricEnrollActivity
2) Adds widgets for checkboxes
3) Shows ConfirmLock*/ChooseLock* for multi-biometric devices in
   BiometricEnrollActivity
4) finish()'s when loses foreground
5) Adds default string for ChooseLock* and multi-biometrics, e.g.
   "Set up Password + Biometrics", as well as associated plumbing
   to bring the user back to BiometricEnrollActivity once the
   credential is enrolled
6) When max templates enrolled, checkbox becomes disabled and
   description string is updated

Bug: 162341940
Bug: 152242790
Fixes: 161742393

No effect on existing devices with the following:
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW
Test: make -j RunSettingsRoboTests

Exempt-From-Owner-Approval: Biometric-related change
to EncryptionInterstitial

Change-Id: I855460d50228ace24d4ec5fbe330f02ab406cc02
2020-09-16 23:30:11 -07:00
Kevin Chyn
202494365c Update settings together with frameworks/base
LockSettingsService returns a handle to the gatekeeper password
instead of the password itself now. As such, update areas of code
accordingly.

Bug: 161765592

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Ibc71ec88f8192620d041bfd125f400371708b296
2020-08-16 12:38:27 -07:00
Kevin Chyn
7b0867c6d3 4/n: Remove challenge from choose/confirm, use new path
Biometric enrollment will not request a Gatekeeper HAT during
initial credential setup or credential confirmation anymore.
Instead, it is broken down into the following steps now.

Bug: 161765592

1) Request credential setup / confirmation to return a
   Gatekeeper Password
2) Biometric enrollment will generate a challenge
3) Biometric enrollment will request LockSettingsService to
   verify(GatekeeperPassword, challenge), and upon verification,
   the Gatekeeper HAT will be returned.

Since both LockSettingsService and Biometric enroll/settings
make use of biometric challenges, this allows us to make the
challenge ownership/lifecycle clear (vs. previously, where
LockSettingsService has no idea who the challenge belongs to).

Exempt-From-Owner-Approval:For files not owned by our team,
(StorageWizard), this change is just a method rename

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Idf6fcb43f7497323d089eb9c37125294e7a7f5dc
2020-08-07 12:49:15 -07:00
Kevin Chyn
e67a0afc41 3/n: verifyCredential no longer returns RequestThrottledException
Bug: 161765592

Test: Accept/Reject/Lockout on the following
      1) Owner profile
      2) Managed profile with separate challenge
      3) Managed profile with unified challenge
Change-Id: Ia7b670a29e9e8ee1fe65bd09965a454601a06871
2020-08-07 12:17:41 -07:00