Commit Graph

80 Commits

Author SHA1 Message Date
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
Kevin Chyn
fbc2ec831f 2/n: Add setRequestGatekeeperPassword to ChooseLockSettingsHelper
This change adds the plumbing on Settings side for ConfirmLock*.
ChooseLock* will be done in a follow-up CL. The changes in this CL
are not invoked by any code path yet. This will also be integrated
in a follow-up CL.

Bug: 161765592

Perform the following with a local change to use
ChooseLockSettingsHelper#setRequestGatekeeperPassword(true)

Test: GK PW is received when setRequestGatekeeperPassword(true)
Test: GK PW + Challenge sent to GK, GK verifies and caller receives
      GK HAT successfully

Change-Id: Ibd809784b5599343f34836bc5f3e709627b7f22a
2020-08-07 12:17:41 -07:00
Kevin Chyn
b13bc50542 1/n: Make ChooseLockSettingsHelper into a builder
The multitude of slightly different launchConfirmationActivity(*)
methods are a big unsustainable pyramid. It's too difficult to
read, too difficult to track which clients are interested in which
parameters, and too difficult to add new parameters, since we need to

1) Read through all of them and find one that's the closest
2) Try not to affect other callers, so potentially add yet another
3) Modify the internal paths, which all basically call each other
   until it reaches the biggest launchConfirmationActivity which
   has ALL of the parameters

This change should have no behavioral change.

Note: CredentialStorage doesn't need returnCredentials anymore as of
      ag/6073449

Test: make -j56 RunSettingsRoboTests
Test: Manually traced code paths for each invocation. A few hidden
      dependencies (such as explicitly setting challenge=0 with
      hasChallenge=true) were found. Left them the way they were in
      case they were intended
Test: Enroll face, fingerprint
Test: Enable developer options
Test: Change to PIN, Pattern, Password, then back to PIN (so each
      type requests confirmation)
Test: adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL,
      authenticate
Test: adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL
      (shows confirm credential screen)
Fixes: 138453993

Change-Id: Ic82ef3c3ac2e14d624281921f2d816bcdacbd82b
2020-07-24 11:13:13 -07:00
Rubin Xu
670a30e766 Remove password shards from memory
Force a garbage collection and zeroize some fields after Activity finishes

Test: Goes through password change flow, then grab a heap dump via
      adb shell 'am dumpheap $(pidof com.android.settings)
      /data/local/tmp/settings.hprof'
      And grep for password in the dump
Bug: 144537463
Change-Id: Idd0a04ada98900aeb2a6d20bb1270a4a4aec2cfd
2020-06-12 15:56:04 +01:00
Kevin Chyn
1895f8b5f2 Move ImeAwareTextEdit to android.widget
Allows it to be used in more projects

Bug: 154161590

Test: Manually opened each setting that was impacted
Change-Id: Ife59074e5f8ffa76c2c81cca4022ca200bb59526
2020-04-28 15:57:40 -07:00
Rubin Xu
f535e87e51 Improve work profile unification flow
When unifying work profile challenge, keep the device lock
as long as it will still meet password requirement after unification.
If not, prompt the user to set a new device lock and only unify
work challenge after a compliant device lock is set.

Bug: 148630506
Fix: 149682344
Test: make RunSettingsRoboTests
ROBOTEST_FILTER='ChooseLockGenericTest|ChooseLockPasswordTest|ChooseLockPatternTest|LockUnificationPreferenceControllerTest'

Change-Id: I99cde2650902927f6a4cc7c0cc7c6016e0dc283f
2020-04-08 14:43:48 +01:00
Pavel Grafov
69cac2c986 Password constraints cleanup.
Unified password validation code between DPMS and Settings.

Bug: 138375712
Test: atest tests/robotests/src/com/android/settings/password/ChooseLockPasswordTest.java
Change-Id: I55e4dae47526659594af3fcdbfc1292edceb5807
2019-10-16 15:36:21 +01:00
Rubin Xu
010116a173 Introduce LockscreenCredential
Bug: 65239740
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Change-Id: Icb73d639291d6d2eda8015e18e93d0906f916bb2
2019-10-13 21:20:02 +01:00
joshmccloskey
fc397f7406 Set the content description of pin/password boxes
Fixes: 79711253
Test: Talkback announces the correct string correctly upon
using either flow.

Change-Id: I01c4e308b8ef9d501f1f5d37e716956a12bea6dc
2019-08-27 12:01:30 -07:00
Fan Zhang
9db66a562c Clean up before making all setting page render edge-to-edge
These classes are casting view to LinearLayout unnecessarily. Later we
might change the root view away from LinearLayout. The cast will cause
crash.

Bug: 132182711
Test: go through SUW.
Change-Id: Iea31882f8edea0c87ef8e95b4da9b6bffa8ea7d0
2019-05-10 21:27:05 +00:00
Pasty Chang
393492438b Merge "Change to show generic lock screen before setup fingerprint or face" into qt-dev 2019-04-25 06:12:19 +00:00
pastychang
fa68ec4f56 Set suw description textview to fixed id
Heavy theme supports to costomize description text style. Modify it to fixed id
that can be customized by partner resource.

Heavy theme screenshot: https://screenshot.googleplex.com/TL4M7wmTaPg
Set fixed id screenshot: https://screenshot.googleplex.com/CA6QHoNTQBZ

Test: atest
Bug: 121988926
Change-Id: I8882acd49e7d57f24afa9dd6f3e9abfd06556053
2019-04-12 09:20:12 +00:00
pastychang
7a083f8f2f Change to show generic lock screen before setup fingerprint or face
Bug: 121235656
Test: atest
Change-Id: Ib2a4c7382334433a56225f5338896f70b752071d
2019-04-09 02:33:17 +00:00
Irina Dumitrescu
4b96dc3ec7 Fail the screen lock flow if the old password has already changed.
Test: atest RunSettingsRoboTests
Bug: 120039091
Change-Id: Ib0860ccbc1ba84a2ac8dafcf3cf33f6ddf160e4c
2019-03-22 11:49:00 +00:00
Rich Cannings
b27c4308a2 Refactor passwords/pins/patterns to byte[]
Relating to packages/apps/Settings

Bug: 120484642
Test: manual - test setting and unlocking passwords/pins/patterns.
      automated - 20 of about 500 tests fail due to fragile synthetic
      password test code.

Change-Id: Idec8338d141c185bef67ade12035fdb2fa9d17ea
2019-02-26 14:46:12 -08:00
Pasty Chang
0c6e676708 Merge "Rename ButtonFooterMixin to FooterBarMixin" 2019-01-25 03:58:56 +00:00
pastychang
9bdb59a764 Rename ButtonFooterMixin to FooterBarMixin
1. Change to FooterBarMixin
2. Move FooterButton to the same package with FooterBarMixin

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: Ic6937e3cbc515dd7bf877c9193932cd5800ac801
2019-01-24 16:18:28 +08:00
Bernard Chau
92db5bf4f7 New extra for ACTION_SET_NEW_PASSWORD to specify the min complexity
When an app that has the permission GET_AND_REQUEST_PASSWORD_COMPLEXITY
launches ACTION_SET_NEW_PASSWORD, it can use the DPM PASSWORD_COMPLEXITY_*
constants to specify the complexity it wants in a new extra
EXTRA_PASSWORD_COMPLEXITY.
The screen lock type picker would then filter out the options which
cannot fulfil the min complexity (and DPM restrictions) and will show a
footer with a brief description of the calling app and the requested type.
The same password requirements UI is used in ChooseLockPassword screen
to display the minimum requirements that can fulfil both DPM
restrictions and the min complexity.

The app must have permission GET_AND_REQUEST_PASSWORD_COMPLEXITY
otherwise the extra would be ignored.

ACTION_SET_NEW_PASSWORD is also updated to always display the calling app
name in the screen lock type picker if it is not launched by Settings,
with or without the new extra.

Bug: 111173457
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockGenericControllerTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockGenericTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockPasswordTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/PasswordUtilsTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/SetNewPasswordActivityTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java
      manual test with TestDpc (ag/5901733)

Change-Id: I21a25d28669bf1223c3b02ba85c0755e59feee2e
2019-01-24 08:02:33 +00:00
pastychang
76ad11c179 Migrating to new footer button for ChooseLockPassword page
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I1fb4588d0c2cf04bca88ec470d59945c2fcab01c
2019-01-22 15:10:36 +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
pastychang
382d34dc50 Change to show two footer buttons in SUW lockscreen page.
Bug: 121183851
Test: RunSettingsRoboTests
Change-Id: Id850e10a10bb8f3a344ef986e07bab1c39c37aa6
2019-01-02 15:32:29 +08:00
Pasty Chang
c1f8600d9f Change to use setupcompat and setupdesign for suw pages
1. remove the dependence of setupwizardlib.
2. add to use setupcompat and setupdesign.
3. modify new footer button in following up cl.

Bug: 120805516
Bug: 120872944
Test: RunSettingsRoboTests
Change-Id: I463dd35b799d4250b2aabce0cb0b8102cf9dd7d6
2018-12-12 03:16:29 +00:00
Fan Zhang
9864a70f12 Misc clean up.
- Remove unused SubSetingLauncher parameters: hide_drawer, is_shortcut

Test: robotests
Change-Id: Ic0e6c3aa2c1679010e7ca8356662899f0df7e272
2018-11-27 12:37:57 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Kevin Chyn
81dc0295d7 2/n: Add face to ChooseLock*
Bug: 110589286

Test: manual
Test: make -j56 RunSettingsRoboTests
Test: setting up new fingerprint still works
Change-Id: I1b7d2bb6bb417dae2c99e5abeb68d3f694cb3cb8
2018-06-29 18:19:34 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Pavel Grafov
5f139101e2 Simplify password length constraints checking
Currently minimum password length policy is queried twice:
1. When constructiong the intent in
   ChooseLockGenericFragment.getIntentForUnlockMethod and then
   passed into setPasswordLengthRange in getLockPasswordIntent
2. in ChooseLockPasswordFragment.processPasswordRequirements via
   LockPatternUtils.getRequestedMinimumPasswordLength().

These two values are then combined in processPasswordRequirements
using Math.max(), which doesn't make sense since it is the same
value.
With this CL it is only queried once in processPasswordRequirements.

+ cleaned up code filling in unused list.
+ removed unused extras, since they are never set anywhere.

Bug: 30558331
Test: atest ChooseLockPasswordTest
Test: atest SetupChooseLockPasswordTest
Test: atest ChooseLockGenericTest
Test: manual, set password policy and change password.

Change-Id: Ifc4946d5b3b26131da01178fa9c827de7a52c7c6
2018-05-14 12:09:15 +01:00
prochinwang
ae8fdff1af Using plurals to define for min length of string
When a number of min length of a string is singular,
the definition of <plurals> can show a localization with a correct
grammar for singular.

Bug: http://b/78537276
Test: Manual
Change-Id: Ic5d94078f1c80a81a37ff7c11d5d5e106a764bed
2018-05-03 06:35:15 +00:00
Rubin Xu
032bdf4f84 Merge "Switch to new checkPasswordHistory method" into pi-dev am: 4a1b84e613
am: 399675408d

Change-Id: I53198b254e2e93aee0ab8a7e980e46bd20745e05
2018-04-24 06:33:31 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00