Commit Graph

23 Commits

Author SHA1 Message Date
Alexandru-Andrei Rotaru
aeb3e4473b Check password blacklist when setting credential
If the password is valid by all other checks, see if it is present on
the blacklist and disallow it if it is.

Test: set a password blacklist, try and set a blacklisted password and
see an explanation, set a non-blacklisted password successfully.
Test: make ROBOTEST_FILTER=ChooseLockPasswordTest RunSettingsRoboTests

Bug: 63578054
Fix: 65659151
Change-Id: Id155b824ad4b5839c23b6f5fd3fdfdcfc78c3df1
2017-12-18 13:34:21 +00:00
Maurice Lam
ac8024ef44 Update confirm button label
Test: Existing tests pass
Bug: 65123475
Change-Id: Ib730507db54fe2bab881fa040ead737c6736ee1a
2017-10-18 16:16:35 -07:00
Pavel Grafov
40e187b364 Preserve old password when handling SET_NEW_PASSWORD.
Currently the only way mUserPassword can be set is when it comes
from onActivityResult. This way when the user chooses "Continue
without Pixel Imprint", and we switch ChooseLockGeneric->InternalActivity,
mUserPassword becomes null (it is not preserved in intent extras).
And then this null is used in getLockPasswordIntent which causes the issue.

Another issues is that when the user chooses to use fingerprint,
mHasChallenge is set to true and password is not forwarded to
ChooseLock(Password|Pattern). I changed the intent builders so that both
old password and challenge can be sent at the same time, so the password
is not lost when fingerprint is set.

Bug: 67672081
Test: cd packages/apps/Settings/tests/robotests/ && mma
Test: manual, adb shell am start -a android.app.action.SET_NEW_PASSWORD,
      tried setting pin/password with and without fingerprint.
Test: manual, tried to change lock via Settings -> Security&Location
Test: manual, set pin + fingerprint in Setup Wizard, FBE and FDE devices
Test: manual, set pin + added account, used pin to unlock FRP in SUW
Change-Id: I38d56d84f95c63fef24c2aa1a031d629f22756a1
2017-10-17 13:19:35 +01:00
Maurice Lam
209410dd2a Fix bad string reference
The source string was removed but there are still references to it.
Updating the references as well in this CL.

Test: mma with ANDROID_AAPT_IGNORE on locale files
Bug: 64763091
Change-Id: I43ef63207e884cbaa92ff3853b0f1fd690cf05f8
2017-08-16 13:39:12 -07:00
Maurice Lam
3eb4c8333e Update strings for screen lock setup
Test: Manual, existing tests pass
Bug: 64084524
Change-Id: Iff4b004aaf504ae3d574428e41bf91fd46a66f30
2017-08-11 13:12:20 -07:00
Ajay Nadathur
be2246bee7 Add 'clear' button to pin/password lock screen
bug: 62904466
Test: Manually tested, added functional tests
Change-Id: I5f5555d99b47550a8fef6995222d12155b4072a9
2017-08-03 17:46:51 +00:00
Ajay Nadathur
7af28ecb66 Use fingerprint icons during setupwizard flow
Use fingerprint icon when lock screens are loaded on
fingerprint setup's behalf.

bug: 63809908
Test: Manually tested and verified. Also added robolectric tests
Change-Id: I773a1eec2466e7ab626cc3330f5ce987a21b048f
2017-07-24 11:45:13 -07:00
TreeHugger Robot
0288cf34f4 Merge "Show keypad while setting PIN in setup wizard" into oc-dr1-dev 2017-07-15 01:59:39 +00:00
Tarandeep Singh
b0bcbed372 Show keypad while setting PIN in setup wizard
Currently The activity not requesting showSoftInput() and hence keypad
doesn't show up.
Activity.onResume(), we should call ImeAwareEditText.scheduleSoftInput()
to request schedule ShowSoftInput() when EditText gains focus.

Fixes: 63582564
Test: Manually launch com.google.android.setupwizard/.SetupWizardTestActivity

Change-Id: Ib75ba0f361b8b46c3b717cc1ffb864726958ed82
2017-07-14 13:42:11 -07:00
Maurice Lam
62c0c3c324 Hide screen lock options button in confirm lock
Hide the screen lock options button in the confirmation stage of
SetupChooseLockPassword, so the user cannot skip out of that screen
while the screen lock is being saved.

Test: Manual
Bug: 63526104
Change-Id: I8ee8938f3ddcd9f0ff3b1812fcae667eddaf09ab
2017-07-10 18:15:10 -07:00
TreeHugger Robot
4545d636ec Merge "Use config_headlineFontFamily for password screens." into oc-dr1-dev 2017-07-07 02:02:51 +00:00
TreeHugger Robot
8218511fb7 Merge "Hide skip button when setting backup lock screen" into oc-dr1-dev 2017-07-06 22:08:51 +00:00
Andrew Sapperstein
ccbb4cfc2c Use config_headlineFontFamily for password screens.
These screens are used whenever setting or confirming the
lockscreen PIN or password. Set them to a consistent textSize (24sp)
and a consistent fontFamily.

Would have set the fontFamily in the style, but unfortunately
setInputType is called on the TextViews after inflation which blows
away the fontFamily. Instead, we set it in code right after that
call.

Change-Id: I77c3f94e2b1ce6d1f19697394c5caa09aac423b0
Fixes: 62873478
Test: manual
2017-07-06 14:30:28 -07:00
Maurice Lam
9990f39722 Read theme for lock screen flows
Move the applyThemeResource calls up from the setup wizard specific
subclasses up to the settings classes so that it will get GLIF v2
theme on devices that request it.

Test: Manual
Bug: 62906814
Change-Id: I6ff4ff8d9ed3e6090b35b4ae7197e5d01f5a61f8
2017-06-28 15:06:09 -07:00
Maurice Lam
562e539516 Hide skip button when setting backup lock screen
Test: Manual
Bug: 62896253
Change-Id: If16de0b4276b55101f35543bbbf107a36ad7a8e9
2017-06-27 17:38:06 -07:00
Maurice Lam
fbfca43e6e Merge "Rename buttons in lock screen setup" into oc-dr1-dev 2017-06-27 01:10:49 +00:00
Maurice Lam
c57b19d80c Rename buttons in lock screen setup
- "Continue" in choose lock flows are renamed to "Next"
- "Done" in fingerprint enroll finish screen is renamed to "Next"
  during setup flow.

Test: Manual
Bug: 62839648
Change-Id: I3ea77b759b654d7c1da1f7b545781c9dfd74caa3
2017-06-23 19:15:06 -07:00
Maurice Lam
d793590678 Add fingerprint backup message
Test: Manual
Bug: 62844631
Change-Id: I7ce5fd4033c9f37f7aa170750edc7ffe0b583fcf
2017-06-23 11:33:41 -07:00
Maurice Lam
4c930fc2d5 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
(cherry picked from commit 0f897d79f6)
2017-06-15 20:23:21 +00:00
Maurice Lam
b49526ee28 Show fingerprint text in backup screen lock
When setting up fingerprint's backup screen lock, show a different
header text that says
"To use fingerprint, set {PIN/pattern/password}" instead of
"Choose your {PIN/pattern/password}".

Test: Manual. Existing tests pass
Bug: 62187833
Change-Id: If1084e64b99291a0eda63c174793b5a091ab4bae
2017-06-05 18:22:14 +00:00
Maurice Lam
8df7173043 Change header in choose lock password
Instead of a separate headerText view, change the header in the
GlifLayout directly.

Test: Manual. Existing tests pass
Bug: 38180862
Change-Id: I02d692870f5e2230ccae87a5ac2aee4def8f61af
2017-05-26 01:00:41 +00:00
Maurice Lam
edb3944984 Default setup wizard to use PIN
- Added "Screen lock options" button in PIN screen, controlled by
  extra EXTRA_SHOW_OPTIONS_BUTTON, which will create a dialog to ask
  the user to choose another screen lock type.
- Extracted ScreenLockType enum and ChooseLockGenericController that
  can be shared by ChooseLockGeneric and the dialog
  ChooseLockTypeDialogFragment.
- The intent extra EXTRA_SHOW_OPTIONS_BUTTON will be set if
  ChooseLockGeneric screen starts ChooseLockPassword /
  ChooseLockPattern without asking the user. (Although the extra is
  ignored by ChooseLockPattern currently)
- Fix layout alignment for the password entry field to remove the
  extra 4dp padding on the sides.

Test: cd tests/robotests && mma
Bug: 35442933
Bug: 38002299
Change-Id: I877fbe08a0c05bb97175e1cbf0260ea6dbda22e2
2017-05-15 21:12:23 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00