Commit Graph

47 Commits

Author SHA1 Message Date
joshmccloskey
593b5671c8 Require attention pref not searchable by default
Test: Attempted to search with the keyword eyes and found nothing.
Bug: 150933895
Change-Id: Ic69d4fc9fe495fe6d133b695ce48055f6fd65d35
2020-03-16 22:03:28 +00:00
Stanley Wang
e037faf830 Fix Settings search crashed.
Add the check condition in the getNonIndexableKeys to
check if the FaceManager exist or not.

Fixes: 147076221
Test: manual
Change-Id: I898c936403ce90869a9da28aa14297eb6bf5d730
2020-01-06 14:10:40 +08:00
Curtis Belmonte
4ac1d25c2a Finish biometric enroll screens when backgrounded
Currently, there are some biometric security setting and enrollment
screens which remain open after the user has backgrounded them. This
means that they can later be resumed without requiring the user to
confirm their device credential as normal.

This commit fixes the issue in AOSP by adding logic to the affected
biometric enrollment/setting activities in to finish() with
RESULT_TIMEOUT in onStop(). We don't want to finish() these activities
prematurely if the user is currently in a wizard setup flow, however. In
that case, this commit ensures that the newly added logic will not run.

Test: Pixel 3 - Background at each step of fingerprint enroll => finish
Test: Pixel 3 - Rotate at each step of fingerprint enroll => no finish
Test: Pixel 3 - Proceed though fingerprint setup wizard => no change

Bug: 142544519
Change-Id: I8ec0fa1e30bafe097d9dc82991ff786ebf24844b
2020-01-02 11:06:29 -08:00
Stanley Wang
e81d6b7b31 The index implementation for face unlock settings.
- Index the delete face unlock preference and set up face unlock preference.

Fixes: 147031175
Test: manual
Change-Id: Ia984a116947d0c2e6a909f53914d081e25496f87
2019-12-31 18:59:46 +08:00
Automerger Merge Worker
5921312f43 Merge "Add feature provider for face unlock" into qt-qpr1-dev am: 8472279900 am: 619d8b3418
Change-Id: I61ae5ff018d97c84fcdcccaefa1159d0ee3716d0
2019-12-17 05:51:13 +00:00
Kevin Chyn
15f241b296 Add feature provider for face unlock
Bug: 146085546

Test: Builds
Change-Id: If5c7d57c12a3f679d81cee22fb94a53fce1de29a
2019-12-16 18:19:20 -08:00
Automerger Merge Worker
37811f9754 Fix Settings crash when clicks Notifications am: 2790889921 am: be513533f3
Change-Id: Ie237c391bf2feeb85d10715f85286d1b8e672bc0
2019-12-12 10:19:48 +00:00
Raff Tsai
2790889921 Fix Settings crash when clicks Notifications
- FaceSettingsLockscreenBypassPreferenceController's preference key
is different from that in xml. Use DashboardFragment generic way to
create PreferenceController which bind the preference key defined in
xml.
- Also refine the way of fixing b/140878309

Fixes: 145893081
Test: manual check FaceSettings and Notification Settings
Change-Id: Ia80e755e3f86b44e771b0cf80c9bf53a8ef8f430
2019-12-12 07:41:36 +00:00
Ilya Matyukhin
1de3feb026 Fix "Skip lock screen" not working for secondary user
Bug: 140878309
Test: the option is not grayed out for secondary user.
Change-Id: I2413aa3c634e89a90d104e9ad60df15e49c75ed2
(cherry picked from commit e17caeea3f)
2019-12-05 04:11:49 +00:00
Ilya Matyukhin
e17caeea3f Fix "Skip lock screen" not working for secondary user
Bug: 140878309
Test: the option is not grayed out for secondary user.
Change-Id: I2413aa3c634e89a90d104e9ad60df15e49c75ed2
2019-12-04 00:35:27 +00:00
Kevin Chyn
7bd69425ab Merge "Revert "Remove attention controller"" into qt-qpr1-dev am: 1876b8c6dd
am: ca51533d56

Change-Id: I7f1e7b3ddc83ce806d826bfd2ff40b89c44bc386
2019-11-01 10:14:32 -07:00
Raff Tsai
68927639ee Remove mVideoPaused from VideoPreference
- We destoryed the MediaPlayer when VideoPreference is onPause().
When VideoPreference is onResumed, MediaPlayer always start from
pause state, we don't need a data save/restore current video state.

Bug: 143270527
Test: robolectric, manual
Change-Id: I544e933e4237f6d92aeff8a7eb04b52e89d74a4a
2019-11-01 10:44:47 +08:00
Kevin Chyn
eac6fcff2d Revert "Remove attention controller"
Bug: 142979808

This reverts commit 8e1d1ca3ab.

Change-Id: I78b7572bcb384de2984f4d81946aceb03aec6758
2019-10-31 20:50:35 +00:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Raff Tsai
1f30b1cd67 Merge similar BaseSearchIndexProvider code together
Bug: 135053028
Test: robolectric, check search_index.db contains the same items
Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
2019-09-12 11:09:09 +08:00
Kevin Chyn
b21799dc09 Merge "Remove attention controller" into qt-r1-dev am: 41aafab963 am: 88936d4a46
am: 6dc15d7976

Change-Id: If992a629986d1873f3908668dd2c05aeff3f1aa3
2019-08-19 20:15:09 -07:00
TreeHugger Robot
41aafab963 Merge "Remove attention controller" into qt-r1-dev 2019-08-20 02:37:20 +00:00
Kevin Chyn
8e1d1ca3ab Remove attention controller
Bug: 139484065

Test: manual
Change-Id: Ideed761c978ba0831b04ed2cc294e9655dddb01c
2019-08-16 16:34:09 -07:00
Edgar Wang
677b943ae1 Merge "Add skip lock screen in Notification & security lock screen settings" into qt-r1-dev am: 8e3b202070 am: 3448917d8e
am: fc0aec7f1a

Change-Id: Icb23c10cf6f6b4bf4c8fcb81d23d1c2b8d7ddd33
2019-08-01 23:13:14 -07:00
Edgar Wang
58a5be4401 Add skip lock screen in Notification & security lock screen settings
Users may have trouble finding this setting in face auth.
Heard this from dogfood/executive feedback and customer support discussion.
So add Skip Lock Screen preference in
Display > Lock screen display > What to show >
and
App & Notifications > Notifications > Lock Screen >

Bug: 138458558
Test: robotest & manual

Change-Id: I10e420821423821743d65b00c8b7e6d4d1224e00
2019-08-01 11:17:05 +08:00
Kevin Chyn
f0e9fb7e02 Add ability to finish() ConfirmDeviceCredential if it loses foreground am: e27a304b97 am: 7baab69bdc
am: bdebaf4396

Change-Id: I34626608c014668887e33da40b80585aa5e66d7c
2019-07-26 18:46:38 -07:00
Kevin Chyn
e27a304b97 Add ability to finish() ConfirmDeviceCredential if it loses foreground
If user enters face settings but does not enter the password, then
turns off the screen, it's possible the challenge is invalidated. Instead,
we should finish() the device credential screen as well as FaceSettings.

This prevents
1) The user from being prompted for credential with lack of context
2) Credential returning a HAT that wraps an invalidated challenge

The user will be returned to the security settings screen, where they
have more context and can decide if they want to enter face settings again.

Fixes: 138273242

Test: 1) Open face settings, do not enter password
      2) Press power button
      3) Unlock keyguard
      4) User is not presented with credential screen
Test: Go through SUW, turning on/off the screen at various security
      screens. Able to enroll successfully

Change-Id: I3c3d4600138012821bb0eea7d2927df00011cdb0
2019-07-26 16:42:14 -07:00
Raff Tsai
b848474b91 Check FaceManager before get system service
Bug: 136788181
Test: adb shell am start -a android.settings.FACE_SETTINGS is not
      crashed

Change-Id: If727ab4aa3b4043fa2e4e8c13392e32d566b1bbb
2019-07-12 12:18:16 +08:00
Raff Tsai
a99a85fdf3 Fix Settings crash
Fixes: 136788181
Test: adb shell am start -a android.settings.FACE_SETTINGS will not
      crash

Change-Id: I10168ce83ceb8646dce5d5e086b14ca2e3ed8284
2019-07-11 11:29:37 +08:00
Kevin Chyn
bd6e80e56d Retrieve help URL
Fixes: 118644802

Test: Help page is seen
Change-Id: Ib89d21ce5027f9ca9c3b6709a9a1301f988a0675
2019-06-18 11:13:31 -07:00
Kevin Chyn
5d8cd009fa Merge "Update string for work profile face unlock" into qt-r1-dev 2019-06-15 00:49:36 +00:00
Kevin Chyn
2d586f18f8 Update string for work profile face unlock
Fixes: 134053456

Test: With work profile and fully managed device, strings are correct
Change-Id: I358b94acfa0626083fdc422b6333765dcc2bc158
2019-06-14 12:56:59 -07:00
Kevin Chyn
059980d215 Make bypass controller consistent with rest of face unlock settings
1) Should only be shown for owner profile
2) Should be disabled if A) not enrolled, B) DevicePolicyManager, C) HAL issue

Fixes: 134700640
Test: Manual test of conditions above
Change-Id: Id72db59c662df6c529c98aafd610de8c86c77ebd
2019-06-12 13:27:22 -07:00
Kevin Chyn
f20bb1c635 Resolve challenge lifecycle race conditions
1) FaceSettings now gets closed when it loses foreground. This prevents
   A) Keyguard/LockSettingsService's resetLockout's revokeChallenge from
   leaving FaceSettings with a stale HAT which prevents users from
   enrolling or toggling elements that require the HAT.
   B) generateChallenge has a timeout, which may already have been met
   C) User may have forgotten FaceSettings was open and lost context. Thus
   it makes no sense to show ConfirmLock* since the user may have no idea
   why it's showing anymore.

2) FaceSettings now generatesChallenge in onResume. onCreate is too early
   since again, FaceSettings can be launched via intent while on Keyguard.
   Similarly, we must ensure that Settings's challenge is generated
   late enough (e.g. when it actually gains foregroundness)

Fixes: 133440610
Fixes: 133498264

Test: Open face settings, confirm password, lock screen. After unlocking,
      user needs to re-open face settings.

Test: Modify HAL/framework to show re-enroll notification
      Tap re-enroll notificaton on keyguard
      Delete and re-enroll in settings, successful

Test: FaceSettings enroll works accross orientation change

Test: Tapping enroll button doesn't cause challenge to be revoked
      due to onStop()

Change-Id: I60f606314c458a61e9c1b4f4b66bc27bc44287da
2019-06-04 14:27:28 -07:00
Kevin Chyn
e716ce107d Revert "Add generateChallenge() in onResume()"
This reverts commit d59150eca6.

Bug: 133498264
Bug: 133440610

Reason for revert: Fixing in a different way

Change-Id: Ie444278a9e8b8aac259c31d311757ab8a39567f4
2019-06-04 13:29:57 -07:00
Ilya Matyukhin
d59150eca6 Add generateChallenge() in onResume()
Fixes: 133498264
Fixes: 133440610
Test: open FaceSettings from Settings with and without an enrolled face
Test: open FaceSettings from the notification that asks to re-enroll
Change-Id: I80ca7644f96a538614962232fb3951d1a91d87c7
2019-05-30 15:01:22 -07:00
Ilya Matyukhin
172d03c758 Merge "Use auth token from intent extras" into qt-dev 2019-04-24 16:27:55 +00:00
Ilya Matyukhin
3be240fd8a Use auth token from intent extras
Bug: 124324349
Test: confirmation dialog doesn't show up when intent has auth token
Change-Id: I9e071b06e1041b0d3c78932d8cb2c16c4c32bca5
2019-04-23 20:53:31 -07:00
Kevin Chyn
0dfc2769cf Stay in face settings unless the user explicitly backs out
Bug: 130898604

Test: Builds
Change-Id: I7159c3a6259d298f78b8328b2c6974ba46fb56f9
2019-04-23 17:05:47 -07:00
Kevin Chyn
e596ba6863 Settings should be per-profile
Also, don't show keyguard option for work profile

Fixes: 129905061

Test: Builds
Change-Id: I18f573f39ee4e54a3385cc65079bb794633cc560
2019-04-04 15:39:00 -07:00
Kevin Chyn
39ca021586 Add face profile settings
Fixes: 110907543

Test: Builds

Change-Id: I9761f289bb250c5d9f5b5e75cf682d164c591050
2019-04-04 13:18:04 -07:00
Kevin Chyn
e00f7e029f Show confirmation dialog for removing enrollment
Fixes: 123605413
Test: builds

Change-Id: I9e918977909bcf461a29eb36f157c3a261c6dcc4
2019-03-19 21:22:15 -07:00
Antony Sargent
7b08531b6a Fix the failing PreferenceControllerContractTest
In FaceSettings.SearchIndexProvider's createPreferenceControllers
method, we need to check isAvailable() before trying to create the
controllers.

Bug: 127852616
Test: runtest --path ./tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
Change-Id: Ib05ba05b8752583eeda61ded78f08f7998d48ba7
2019-03-08 09:43:09 -08:00
Kevin Chyn
ee922128e4 Check for null before invoking finish()
Fixes: 124406109

Test: manual
Change-Id: Idee87c060ffd84395355ccdc5248166f1a6aeaf0
2019-02-13 18:23:08 -08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Kevin Chyn
51fe2e9c12 Add face settings video
Test: make -j56 RunSettingsRoboTests
Bug: 120991336

Change-Id: I13bc0114d37b97e7d61cafa6df04f2bcab893e81
2019-01-14 17:02:28 -08:00
Kevin Chyn
15128cf2e2 Update Settings to match new mocks
Fixes: 122119972

Test: layout looks good
Change-Id: I259f7e706a6be18edc0e595ff6c3fdccf41b1178
2019-01-10 19:09:25 -08:00
Kevin Chyn
5652550c84 Persist token across activity lifecycle
Test: token is persisted

Bug: 122372584
Change-Id: Id3221d1a06c48779c743a685a49a70edff6e912c
2019-01-09 14:53:21 -08:00
Kevin Chyn
950f638320 Plumb remove functionality through
Bug: 120981508

Test: manual
Change-Id: I4c9570ee1ed397b48d4948b79bb6f72188735e97
2018-12-13 17:35:36 -08:00
Kevin Chyn
a8843f2959 Update FaceSettings to match mocks
Settings page should not show if device credential is not confirmed

Bug: 111548037
Fixes: 116531896

Test: adb shell settings get secure face_unlock_app_enabled
Test: make -j56 RunSettingsRoboTests

Change-Id: I651ee88e9ee4017ee3dc52fa8a5d05cb8f092e1d
2018-09-26 11:50:02 -07:00
Kevin Chyn
7189997bfa 5/n: Add face settings
This change connects the face status preference controller with the
settings fragment/activity. This change also implements the basic settings
page showing a video, a toggle for keyguard, improve/remove targets,
and footer.

Bug: 111321762

Test: manual
Change-Id: Ifc65f5acbf6551679074df63ef22ffba75229f37
2018-07-23 14:34:48 -07:00