Commit Graph

91 Commits

Author SHA1 Message Date
Maurice Lam
c41e408aea Refactor choose lock password scrolling
Replace the negative margin + inset background hack with a overriding
call to requestRectangleOnScreen, which will also make a best effort
to show all the password requirements if there are multiple of them.

Bug: 38236574
Test: Added ScrollToParentEditTextTest
Change-Id: Id570652b64434b2d0b25c231540375d93884aaa9
2017-05-11 19:26:12 +00:00
Fan Zhang
2d0b344736 Add InstrumentFragment for non-PreferenceFragment types.
This allows app fragment use a less heavyweight fragment as super class
if they don't need PreferenceFragment. Using this class as base is
generally easier to set up robolectric tests too.

Bug: 33354536
Test: RunSettingsRoboTests
Change-Id: I91c4d242ea0333c76c8767c03c3f18dee6b6e104
2016-12-05 17:13:33 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Andrew Scull
27ca263b7f Use PasswordMetrics to remove duplicated code.
Bug: 30558331
Test: manual
Change-Id: I832a0279d39dbe9900b284abd745d4cc40946a48
2016-10-20 15:13:44 +01:00
Doris Ling
7b3a5e0bd2 Fix crash in ChooseLockPassworkFragment. am: f958f2e14e am: 773a2ab217
am: 6ffe36cf79

Change-Id: I6792e6ac9bd209c7e2dc8b20a5173bb01ed788bc
2016-08-25 02:18:35 +00:00
Doris Ling
f958f2e14e Fix crash in ChooseLockPassworkFragment.
Check for null activity when the handler receives messages to ensure
that the fragment is still attached to the activity.

Fixes: 31034901

Test: Manual - Manually try to update password, verify it works. Run
monkey test on settings package and verify no crash seen.

Change-Id: I9753729ee64458fa1bc25d78abc946d2563a5067
2016-08-24 17:17:52 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Tony Mak
53aded222c Hide redundant restrictions am: 9ba765b875 am: 4de7f88830
am: 3578d8f18c

Change-Id: Id4798a1f4ec127335b5a9cf0a0d03888dc3f354d
2016-08-03 09:54:23 +00:00
Tony Mak
9ba765b875 Hide redundant restrictions
Change-Id: Id9b8ec6f045632a87092b4dccef5f7ff73a327cc
Fix: 30109035
2016-08-02 17:09:53 +01:00
Tony Mak
b1d8883254 Remove KeyboardView in ChooseLockPassword am: 9c26c9dba6
am: e7ab5e6a02

Change-Id: I4f147790ead4cd5e5bf357cd2d9850f6fe619ac3
2016-07-12 13:55:56 +00:00
Tony Mak
872933b55b Visualize password requirements and their fulfillment am: 0bbcdccdbf
am: 83f3117749

Change-Id: Ifbebb87d524899d35a69de538920b46c324dc86f
2016-07-12 13:55:55 +00:00
Tony Mak
9c26c9dba6 Remove KeyboardView in ChooseLockPassword
1. We actually use user installed keyboard
2. Request focus on the edittext instead of the keyboard

Bug: 24900754

Change-Id: I6257a592ad34875d46c5c05349098b891ef37d98
2016-07-12 13:06:26 +00:00
Tony Mak
0bbcdccdbf Visualize password requirements and their fulfillment
1. Aggregate policies and generate the requirements
2. When user modifies the password, check is each requirement fulfilled
   Update the view accordingly.

Change-Id: I962ed3b81ce844006be1024a493e94ce52a3fdec
Fix: 24900754
2016-07-12 11:19:45 +01:00
Maurice Lam
4ae9e0c27e Merge \\"Fix PIN screen title\\" into nyc-mr1-dev am: 79321c480f
am: 932b49408d

Change-Id: I5e7ecd3f4ad0af36622b16300f46dc155b0339b3
2016-07-12 02:44:19 +00:00
Maurice Lam
44f2736f54 Fix PIN screen title
Set the header text of the screen after Activity.setTitle is called,
so that the PIN screen will show the PIN text as header, as opposed to
the default which is always "password".

Bug: 30041779
Change-Id: I525bd4e5c51252410fdeb0424329bbfbd86e5b7d
2016-07-11 17:48:09 +00:00
Clara Bayarri
77c4345373 Fix crash when setting a password/pattern from private fragment
As of N+, we don't allow the addition of private fragments as this
causes problems with Configuration Change recreations.

Bug: 29565251
Change-Id: I6a4cf1011e1a4e6ba308565e010a51d2992e79e2
2016-06-23 11:11:42 +01:00
Maurice Lam
d189ac52a4 Use GLIF theme for Settings > Security > Screen lock
Bug: 24405946
Change-Id: I1fed96cbc228b6bb367637f83f9cd3bac2761417
2016-06-16 12:13:11 -07:00
Udam Saini
71fde52ae3 Fixes graybar as status bar and unshifts header view.
StickyHeaderListView will not layout all the way to the top of the screen
if fitsSystemWindows is true.

bug:27875272
Change-Id: I4150dc183778284df2f07f3a6220e0c0b2607774
2016-03-30 15:25:59 -07:00
Udam Saini
92779ce701 Prevents drawer menu from showing depending on intent.
When ChooseLockScreenGeneric is started via the set password
intents, it should not allow the drawer menu to show.

bug:26288300
Change-Id: I10d512e20fedab2be8c725c7d524db0c55666590
2016-03-28 16:43:57 -07:00
Udam Saini
9757152d16 Removes tap continue when done text
This text is hidden by the keyboard, and the continue/keyboard done
button seem more intuitive than with this text.

bug:27063940
Change-Id: I1a4dca31fbf1c1cf9c00a68f0bb00df760992cda
2016-02-16 19:42:48 +00:00
Udam Saini
686ae494f4 Start redaction activity after we finish current activity.
This is needed so that activity manager won't start a new task stack.
During setup, we want everything on the same task stack to allow
task locking.

Change-Id: Iaa1e13da8251ad37362ea41b374300268b6e9875
2016-02-02 17:02:29 -08:00
Clara Bayarri
c8457a8605 Merge "Make Lockscreen Notification Content work for profiles" 2016-02-01 10:09:18 +00:00
Robin Lee
c6ce1793f7 Merge "Only setCredentialRequiredToDecrypt if primary user" 2016-01-29 11:02:57 +00:00
Robin Lee
5bb1e4fb90 Only setCredentialRequiredToDecrypt if primary user
Change-Id: I3b68cc1169296aa95777e12fa27c3ede4291ec78
2016-01-29 11:00:27 +00:00
Adrian Roos
62775bf756 Move lock screen setting behind gear
Bug: 19003093
Change-Id: I15baa5b1d19324521070d641ae6a227d782a4e9e
2016-01-28 15:40:50 -08:00
Clara Bayarri
f6077f4757 Make Lockscreen Notification Content work for profiles
The settings for the Notification Content is user-dependent
and the correct values are used in the lock screen.

Bug: 26709332
Change-Id: I7acf94014771dacc2841da336bed645fdb948541
2016-01-28 17:54:39 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Benjamin Franz
194300dff3 Add background image for work challenge
If the challenge shown is for a work profile, add the default image and
color to the background of the fragment.

Change-Id: I148c6cd3a835a84c7bac78b020839dfdae4a6c36
2016-01-21 14:15:31 +00:00
Clara Bayarri
b8a22e42d4 Update Work Challenge check to take userId
Change-Id: I239bca2dc55066c717d74487105646df22768d93
2016-01-13 10:27:13 +00:00
Clara Bayarri
6934a044b8 Work Profile Passphrase Setting
Create a new section in Security Settings which includes all
settings for the Work Challenge.
Only some settings apply to the Work Challenge, so we reuse
the security settings layouts for items and compare them against
a whitelist to remove unwanted items.

Additionally, remove all usages of ChooseLockGeneric.KEY_USER_ID
in favor of Intent.EXTRA_USER_ID.

Change-Id: I3d1ba953a2056f7c61a7b3feeb8b49f1a352dff6
2016-01-11 10:30:18 +00:00
Clara Bayarri
fe432e838e Refactor Choose/Confirm Lock flow to take user id
This is a first step to allow this flow to be reused for setting
a work profile-specific lock, to be used with the work challenge.

Change-Id: Iaa65fdab9021cda5f0a1d3bc526a6b54f8a7dd16
2015-10-16 11:47:18 +01:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Xiyuan Xia
3e7e3d6c59 Fix ChoosePat/Pin/Pwd crash from async task
Use a retained worker fragment to track the asynchronous
save-and-finish task so that ChoosePattern/Password activity
is properly dismissed after a configuration change.

Bug:23424884
Bug:23521530
Change-Id: I328022c1603cfb0f6812cd8aa7916ae7b72c9950
2015-08-27 13:35:55 -07:00
Paul Lawrence
1f8fb0f8ce Stop crash on repeated enters on virtual keyboard
Change https://googleplex-android-review.git.corp.google.com/#/c/742462/
removed the mDone since graying out the button seemed to remove the need
for this. However, you can also enter this command repeatedly from the
soft keyboard.

Put mDone back.

Bug: 23181625
Change-Id: I42e8ecb9824b17825778c9c113130506cc3a200b
2015-08-18 16:25:00 +00:00
Paul Lawrence
cff37ecbdd Gray out confirm button on pattern/pin/password set dialog
Setting a pin/pattern/password can take a second. Gray out the confirm
button to avoid multiple submissions.

Note that this requires async tasks so that the button is shown as gray
in a timely way.

Also don't add another stage - this causes a11y to repeat the title.

Bug: 22882174
Change-Id: Ib8047fde9e12afa25e82ebfa3a1e799a4b7043f2
2015-08-11 15:17:04 -07:00
Alex Chau
ccade40278 Enforce Keyguard policy in Notification Settings
- Applied getKeyguardDisabledFeatures for notification settings and
    notification setup page (after settings a screenlock)
- If a notification settings is disabled, the next least secure setting
    will be chosen
- Although KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS can be set be
    profile, it will not be reflected in both settings page. This is
    because it does not affect the owner (user 0), as mentioned in
    DevicePolicyManagerService.PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER
- Skip RedactionInterstitial if there is <= 1 options for the user
- Tested with both Setup wizard and settings case, both pattern and
    password, as well as toggling the policy on and off

Bug: 19307118
Bug: 17099898

Change-Id: If640d5576caa0163e9942569f7b4643a30bbfe0a
2015-06-18 16:00:16 +01:00
Andres Morales
91e6c499ca [LockSettings] pipe through HW throttle timeout
Bug: 21118563
Change-Id: I23f5af2ebef9dac981281fb04c055a02f3b159b8
2015-05-26 08:25:12 -07:00
Maurice Lam
efbe46612d Merge "[LockScreen] Update initial string in choose lock screens" into mnc-dev 2015-05-20 01:42:42 +00:00
Maurice Lam
163dee9fb7 [LockScreen] Update initial string in choose lock screens
In choose password and PIN screens, change the initial string from
duplicate of the title ("Choose your password/PIN") to the
verification string ("PIN must be at least ? digits" / "Password must
be at least ? characters").

Bug: 20948877
Change-Id: I635ec625f2820e522cdfc983e13ee71706e7004e
2015-05-19 17:27:12 -07:00
Xiyuan Xia
f2c2c19339 No input instead of disabling password/pin entry
So that the keyboard does not come and go all the time.

Bug:21271425
Change-Id: If73109fca1417c43307dc6069307789031ffc607
2015-05-18 13:10:28 -07:00
Xiyuan Xia
bf9ac6b4fb Migrate settings UI to use async security check
Bug: 20697812
Change-Id: Ieb0090ddb61198a60abb1e34ff9c6e8476c33789
2015-05-13 15:32:45 +00:00
Adrian Roos
5437588abd Require explicit userId in LockPatternUtils
Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
2015-04-28 12:01:09 -07:00
Maurice Lam
3859643c5b [LockScreenSetup] Start SUW-style screens in setup flow
Implement the new overloaded methods in the setup-specific screens
so that the SUW-styled screens will be started instead of the regular
ones as seen in Settings.

Bug: 20304053
Change-Id: I68e778e6421cfe08e20c9b4af9ed98e0f5ebcee1
2015-04-16 18:21:31 -07:00
Andres Morales
6609b0c22a pipe auth token through confirm and set password
ConfirmDeviceCredentialsActivity and ChooseLockGeneric now understand
CLSH.EXTRA_KEY_HAS_CHALLENGE and CLSH.EXTRA_KEY_CHALLENGE in their
launching intents. If present, they return a hw_auth_token_t verifying
the challenge passed in as a field in keyed by
CLSH.EXTRA_KEY_CHALLENGE_TOKEN in their result intents.

Change-Id: I0b4e02b6a798a9e57d02522880a180dffadfcde1
2015-04-14 15:32:07 -07:00
Andres Morales
a0e1236fa9 [LockSettings] pipe old password through when setting new one
Change-Id: Ia98b93d1cdb8c2d0bff42de7ecb59f5b80fb780e
2015-04-13 18:38:46 -07:00
Jorim Jaggi
8a09b619ae Update confirm device credentials to spec, add fingerprint
- New strings in the screen.
- New layout/style.
- Clean up internal API's around it.
- Add fingerprint support if launched from externally
- Separate theme if launched from externally
- If launched from above Keyguard, use SHOW_WHEN_LOCKED flag

Change-Id: Icdf9bf9e0506841f24e8aab5f0f1d1f4b688951f
2015-04-13 14:59:26 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Robin Lee
d8338fb85c Don't reset the keystore during password change
There is absolutely no advantage to doing this.

Bug: 18817878
Change-Id: Ibb386696e67c316e65f53c28f9249ef2a2a48db6
2015-03-06 12:12:03 +00:00
Adrian Roos
4c00a61183 Ensure new credentails are valid
Follow-up to I6f369eb60f8f6bb1e33384cd06534c713ab52e79

Bug: 18931518
Change-Id: I311b255a034b0cec8fee70b0f4938e6ebb20d95e
2015-02-03 19:58:19 +01:00
Adrian Roos
f788718f21 Purge biometric weak from internal code
Bug: 18931518
Change-Id: I5da41908b1d6895a69f981e139f2d268327fafcd
2015-01-07 20:52:09 +01:00