Commit Graph

463 Commits

Author SHA1 Message Date
Shawn Lin
b30887fff4 Merge "Revert "Fix lock pattern is truncated during SUW in folded state"" into udc-qpr-dev am: c23c6164bb am: 0e404ee882
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24100906

Change-Id: I8603c84920403b90f46e63ce0bd6d6a23a90a7df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-18 04:28:31 +00:00
Shawn Lin
c23c6164bb Merge "Revert "Fix lock pattern is truncated during SUW in folded state"" into udc-qpr-dev 2023-07-18 03:18:12 +00: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
Shawn Lin
072a0e0068 Revert "Fix lock pattern is truncated during SUW in folded state"
This reverts commit a2e032bb8e.

Reason for revert: b/290721507 

Change-Id: Ifaaecde6c168ebe22d3b2245df1fd5b0a9c1b8c2
2023-07-17 12:20:42 +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
Chun-Wei Wang
c680da15c3 Merge "ChooseLockPattern: remove redundant setting of visible pattern default" into udc-qpr-dev 2023-07-11 03:24:17 +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
5a0d4d1cc3 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 2023-07-10 03:06:07 +00:00
Eric Biggers
250f2727b0 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-07-08 04:04:01 +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
Shawn Lin
1c112249f3 Merge "Fix lock pattern is truncated during SUW in folded state" into udc-qpr-dev am: f733b7b0ff am: de251cc896
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23737990

Change-Id: Id6bc8a4b0545fb21f339d1eccf1c131c375de82d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 05:04:44 +00:00
Shawn Lin
a2e032bb8e Fix lock pattern is truncated during SUW in folded state
Remove the bottom margin of the header view.

Bug: 285290323
Test: 1. Go through SUW
      2. Select lock pattern
      3. Check if UI truncated
Test: m RunSettingsRoboTests ROBOTEST_FILTER=
      com.android.settings.password.SetupChooseLockPatternTest
Change-Id: I48ac3d897e6b876bd7a1c325cc4a5e797e140da2
2023-06-28 06:52:40 +00:00
Eric Biggers
d419163ecd Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" 2023-06-26 15:34:20 +00:00
Shawn Lin
5f17b1c9da Merge "Set the light status bar flag if not in dark mode" into udc-qpr-dev am: bf7b928f0c am: c7e8393778
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726369

Change-Id: I2a7dbaa9f9078e47683a0ecfbba7a99892f9c8e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-26 07:46:51 +00:00
Shawn Lin
bf7b928f0c Merge "Set the light status bar flag if not in dark mode" into udc-qpr-dev 2023-06-26 06:43:36 +00:00
Hao Dong
af36dfb674 Merge "Fix pattern rotation header text." into udc-qpr-dev am: a7af958f4c am: f24edbfc3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23699586

Change-Id: I6e1cd3c3b1965db0da12bd4115fd2e1c20858435
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 19:41:57 +00:00
Hao Dong
35ebdefcd8 Fix pattern rotation header text.
Bug: 278055194
Test: atest ChooseLockPatternTest
Change-Id: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
2023-06-23 02:37:22 +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
Shawn Lin
1c4eb9dc75 Set the light status bar flag if not in dark mode
To make the status bar content clearly visible we should set the light
status bar flag if the device is not in dark mode.

Bug: 241274551
Test: 1. Add an account and setup fingerprint unlock
      2. Go to "Settings>Passwords & accounts>add account" to add
         another account
      3. Wait for BiometricPrompt to pop up and check the status bar.
Change-Id: I7208b9c18c3734d150dfaaef6724948bd197066a
2023-06-19 06:20:53 +00:00
Rhed Jao
07f9d1ccbe Merge "[Settings] Add a verification flow for exiting repair mode" into udc-qpr-dev am: e1c9d65cda am: 721a7bacaa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23629341

Change-Id: If01a1c5c13433e85f9b91790375dc2f297777dd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 07:19:57 +00:00
Rhed Jao
b7a4a7daa4 [Settings] Add a verification flow for exiting repair mode
Handles the ACTION_CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
intent to launch the confirm device credential activity for
users to exiting repair mode. The activity passes a special
user id USER_REPAIR_MODE to the framework and verify credentials
that the user enrolled in normal mode.

Bug: 277561275
Test: am start -a android.app.action.PREPARE_REPAIR_MODE_DEVICE_CREDENTIAL
      settings put global repair_mode_active 1
      am start -a android.app.action.CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
      The credential is verified successfully.
Change-Id: I9ffe32f9925ee2b990c49d5674d27196a4c9edf7
2023-06-15 02:14:41 +00:00
Rhed Jao
1c7c01adb8 Merge "Passing the writing repair mode password flag to verify credential api" into udc-qpr-dev am: cc1fe61339 am: 6856e809b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23308384

Change-Id: I4e688e2034b1d33b141fb13a5383b7142b743901
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-13 03:00:36 +00:00
Rhed Jao
cc1fe61339 Merge "Passing the writing repair mode password flag to verify credential api" into udc-qpr-dev 2023-06-13 02:14:22 +00:00
Rhed Jao
f01b99e725 Passing the writing repair mode password flag to verify credential api
Handles the ACTION_PREPARE_REPAIR_MODE_DEVICE_CREDENTIAL intent to
prompt the user for device credentials. Passing the writing repair
mode password flag to the verify credential api when the user is
authenticating.

Bug: 277561275
Test: am start -a android.app.action.PREPARE_REPAIR_MODE_DEVICE_CREDENTIAL
Change-Id: Id018586b0ed535555c157b7516c9571b049978ad
2023-06-12 06:34:24 +00:00
Avinash Vadlamudi
c4c85c8d89 [Auto Pin Confirmation]: Add talkback capability for Auto-confirm correct PIN checkbox even if it is not in focus am: 01637b556e am: 3730239bd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23601571

Change-Id: I27b0bebd69fe6bdf344f434bae90b655540417ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-10 02:40:55 +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
Oli Thompson
e20d5d34f8 Merge "Fix emergency button not visible on pattern work challenge screen" into udc-dev am: 01b382546e am: 03bd83270a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23631338

Change-Id: I8f3631be2dc924fe8cf61278ccc6c2b9547c1629
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 16:59:57 +00:00
Oli Thompson
01b382546e Merge "Fix emergency button not visible on pattern work challenge screen" into udc-dev 2023-06-09 15:31:17 +00:00
Oli Thompson
dcce8fa662 Fix emergency button not visible on pattern work challenge screen
Hide the subtext for work challenge pattern,so everything fits and
adjust some spacing

Test: btest a.d.g.WorkTelephonyTest#workChallengePatternScreen_whenAllSubscriptionsManaged_hasEmergencyButton -nm
Bug: 283137301
Bug: 286391641
Change-Id: Ia6214b624f8d7328f7445f01a08166b8ab33fdec
2023-06-09 13:06:39 +00:00
Treehugger Robot
f575b51ce1 Merge "work challenge: allow backgroud biometric auth" into udc-dev am: 62193a6f56 am: 267a9a14bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23211177

Change-Id: Iad60145324234afaa488ca9328dcecfc493c1c52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 09:09:13 +00:00
Rubin Xu
5b42447d29 work challenge: allow backgroud biometric auth
We observed a race condition that when work challenge is launched from
notification, the biometric prompt quickly dismisses itself because
it detects the launcher is now the foreground app. This change attempts
to workaround the issue by enabling the setAllowBackgroundAuthentication
optin in BiometricPrompt so it no longer dismisses itself even if the
foreground app is different.

Bug: 279766640
Test: manual
Change-Id: I453b7d603c6eb65f329afb38d8a190e21a7e4c01
2023-05-12 16:35:15 +01:00
Bill Lin
4caa3ece94 [conflict] Merge "Refine SkipDialog title and desc by device configs" into udc-dev am: 4d5063ffdc am: f6d23468b1 am: e5dfcc0270 am: 547f6d63a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22779802

Change-Id: I61fed7e932c8dc476b689ca61bbf8ee919924bed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 16:29:52 +00:00
Bill Lin
4d5063ffdc Merge "Refine SkipDialog title and desc by device configs" into udc-dev 2023-05-09 23:09:38 +00:00
Nan Wu
00c3dabc48 Merge "Allow BAL for confirm device credential activity when work profile apps are protected by PIN prompt." into udc-dev am: 38b99012f4 am: 1671f75b46
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23087497

Change-Id: Ie3e738285db754e30aa447a501debaeaa72b6f57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 15:09:36 +00:00
Nan Wu
38b99012f4 Merge "Allow BAL for confirm device credential activity when work profile apps are protected by PIN prompt." into udc-dev 2023-05-09 13:49:06 +00:00
lbill
67d6dff7cc Refine SkipDialog title and desc by device configs
1. Wrap isFaceSupportedInSUW() in Settings Utils
2. Wrap getCombinedScreenLockOptions in Settings Utils
3. Add EXTRA_KEY_FOR_SUW to judge if in SUW flow
4. Refactor SetupSkipDialog by hasFace, hasFingerprint,
   isSuw, isFaceSupported conditions
5. Clean up the mapping logic of SetupSkipDialog
6. Replace bools with @LockPatternUtils.CredentialType
7. Refine the logic for isFaceSupported
   ---------------------------------------
   Config |SuwSupportFace|!SuwSupportFace|
    isSuw |    true      |      false    |
   !isSuw |   hasFace    |     hasFace   |

Bug: 263070591
Bug: 279389803
Bug: 279195215
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW(workprofile), post-SUW
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Test: m RunSettingsRoboTests ROBOTEST_FILTER=SetupSkipDialogTest
Change-Id: Ie7af4299695dc3983b4190929b4dd659c301c082
2023-05-09 09:55:52 +00:00
Shawn Lin
940af5b394 Merge "Set the talkback focus to the header text when Stage is NeedToConfirm" into udc-dev am: f5b4a2388d am: 4e48c03995
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23053883

Change-Id: Iee9ec23d81c9dd15ed76254d5805a51b1298c89b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 09:37:38 +00:00
Shawn Lin
f5b4a2388d Merge "Set the talkback focus to the header text when Stage is NeedToConfirm" into udc-dev 2023-05-09 02:11:48 +00:00
Nan Wu
a23f9a69e0 Allow BAL for confirm device credential activity when work profile
apps are protected by PIN prompt.

Test: manual test
Bug: 279889563
Change-Id: Ife319469cee908f54618986107b40bcc82886b06
2023-05-08 18:00:14 +00:00
Shawn Lin
4fef3fac2c Set the talkback focus to the header text when Stage is NeedToConfirm
Should set the talkback focus to the header text when the "Draw your
pattern again" page is shown.

Bug: 275728120
Test: 1. enable talk back
      2. Setup pattern lock
      3. In "Draw your pattern again" page, make sure the talkback focus
	 is set to the header view
Change-Id: If99a950488039840e8486ebb634f0070a9403916
2023-05-08 19:01:33 +08:00
Xiaozhen Lin
f8770a9d56 Merge "Password clearing in Settings App" into udc-dev am: be911918d0 am: 6326345a03
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22914954

Change-Id: Ib3d54d7075f217d01d407c20e0ba02c5dc4e627e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 18:14:14 +00:00
Xiaozhen Lin
bb54d71a33 Password clearing in Settings App
Pixel Imprint will call onDestroy() whenever its menu is invisible.
(https://cs.android.com/android/platform/superproject/+/master:packages/apps/Settings/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java;l=639?q=packages%2Fapps%2FSettings%2Fsrc%2Fcom%2Fandroid%2Fsettings%2Fbiometrics%2Ffingerprint%2FFingerprintSettings.java&ss=android)
However, Screen lock should have the same behavior as Pixel Imprint but
it doesn't.
onDestroy() for Screen lock should be called whenever we exit the menu
or the menu becomes invisible. Otherwise, the password may be leaked to
RAM unexpectedly in some situations.

Bug: 233373529
Bug: 278488549
Bug: 278530059
Test: manual
Change-Id: Ib11af7073aa1c49096a66c9f5a462e7caf18df5e
2023-05-03 02:04:59 +00:00
Eric Biggers
6c3de30086 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
2023-05-02 20:19:26 +00:00
Diya Bera
6fbfec99c8 Merge "Adding owners" am: b1aabec0db am: 49ea4e5d22 am: 8a31106496
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2546170

Change-Id: Ie1505f0272340b867648341bfe01f26e948f14b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-19 17:54:50 +00:00
Diya Bera
8a31106496 Merge "Adding owners" am: b1aabec0db am: 49ea4e5d22
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2546170

Change-Id: Ibfc5a6684f98c842f95f5cb125310d89a0035644
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-19 17:39:42 +00:00
Diya Bera
33fab7e415 Adding owners
Test: N/A
Bug: 278741020
Change-Id: Ife62f56fd0e3c83427347365a1eebfad3ec3ed6d
2023-04-18 22:56:31 +00:00
Treehugger Robot
6112e583d7 Merge "Revert "Destroy activity in onStop()"" into udc-dev 2023-04-18 19:07:33 +00:00
Daniel Chapin
b215d94d51 Revert "Destroy activity in onStop()"
This reverts commit 7a89f15fed.

Reason for revert: Droidfood blocking bug b/278178618

Change-Id: Ie26b73e1e9584f632625375d36168a42e95e5f02
2023-04-18 00:16:21 +00:00