Commit Graph

126 Commits

Author SHA1 Message Date
Toni Barzic
e7d6e4ddb2 Teach settings about PASSWORD_QUALITY_MANAGED constant
Add hooks for adding an option for selecting a managed password as
lock credential. By default this option will not be visible.

BUG=27923581

Change-Id: Id17bd8074bf23cbcffb96d8576cc760df6f2298a
2016-04-07 10:44:35 -07:00
Ricky Wai
751de37275 Delete all work fingerprints when unified lock changes to None/Swipe
Bug: 27551139
Change-Id: I64105621057e04be0e4d8073626ac3ed0f1e72d2
2016-04-07 15:41:18 +00:00
Ricky Wai
4bbf0653c0 Keymaster init for work profile
Changes:
(1) When unified work challenge is enabled and screen lock is secure
  - Store work profile secure key in primary profile
  - When primary user keystore unlocked, unlock work profile keystore
  - When primary user change lock to none, remove work secure key
(2) When unified work challenge is enabled but screen lock is not secure
  - When screen lock changes to secure, store work secure key in primary
(3) When user changes work challenge from unified to separated
  - Remove work secure key in primary
(4) When user changes work challenge from separate to unified
  - Do (1) and (2)

Bug: 27460698

Change-Id: Id7464c178e6ea7b561643477e7cd84f963048c87
2016-04-07 14:23:55 +00:00
Jeff Sharkey
a77652fea9 Mark UI components for tests to find.
Bug: 26498834
Change-Id: Id8ade0b9230a946c7facf8ebaf9700c196b31ee3
2016-04-01 23:18:11 -06:00
Udam Saini
5a1dbf8152 Wait for fingerprints to be removed (Partial fix).
This is a partial fix for b/27903189.
When we remove the lock screen and remove all fingerprints, wait for
them to all be removed before finishing the activity. This will let
the security screen accurately show how many fingerprints are available.

bug:27903189
Change-Id: I30908dbefb7a858f6d99e532841ed4ff894bfe62
2016-03-29 15:12:44 -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
Tony Mak
25c3c54c03 Should read specific user's password restriction
Bug: 27330307
Bug: 27543548

Change-Id: I385d190bdd8138f7189c657498f6a55bf84668ea
2016-03-18 14:49:52 +00:00
Paul Lawrence
23c2acfd4c Don't show secure startup options and strings when file encrypted
File encryption is secure by default, so we don't need to warn.

Bug: 27433949
Bug: 27435082

Change-Id: I3e856256188e6a7dcd58cabbde043395c314999e
2016-03-11 13:28:39 -08:00
Clara Bayarri
eb8962d273 Fixes for Work Challenge Fingerprint
When enrolling fingerprints on both personal and work and then setting
the lock to none or swipe, the fingerprints for that user were not being
correctly removed due to wrong userIds being passed in.

Also fix the wipe dialog message as it was always querying whether the
main user has fingerprints instead of the user the dialog applies to.

Bug: 27263452, 27199237
Change-Id: I8d170e36f31b5595bc0bb41168a87db9f57eda2f
2016-03-01 10:22:05 -08:00
Adrian Roos
77181e9478 Fix crash when changing encrypt with credential
Bug: 27173979
Change-Id: If8ef7a9342bcb1b0602791df1dc7634b3e980ee7
2016-02-25 15:43:50 -08:00
Udam Saini
8ef4c62003 Reworks lock screen flows.
This also adds frp warning dialogs in case the user skips lock
screen setup initially.

bug:26880444
Change-Id: I732b6a806e139fb6c1c1b334b8d1608c229f217c
2016-02-09 11:58:12 -08:00
Udam Saini
6de85e80a9 Adds the headers for choose lock generic inside onCreate
This will make sure the headers are set before the underlying
RecyclerView has made its first layout, and prevents an animation
from playing when rotating to landscape.

bug:26990364
Change-Id: I2838a07a145b4d6136e88125ab955006d84d135c
2016-02-09 10:32:56 -08:00
Clara Bayarri
7f2a013619 Make ChooseLockGeneric read the userId extra from the activitie's extras if there's no arguments
Some invocations of ChooseLockGeneric are done with arguments, but
when invoking it from FingerprintEnrollIntroduction we add the extra
to the activity intent so we need to support both.

Bug: 26901625
Change-Id: Iaabad18bf17160578f6b6d807dc6acfead1ba419
2016-02-08 14:16:24 +00:00
Clara Bayarri
719668508a Do not unify locks when Work lock is set to None
Bug: 26845805, 26892601
Change-Id: Ie78ef417a59b29246d4d3dde5dfe434ad49b195c
2016-02-08 13:49:45 +00:00
Sudheer Shanka
91e0ba7d40 Merge "Use the correct userId when checking if disabled by admin." 2016-02-04 19:14:16 +00:00
Sudheer Shanka
f755baf1c3 Use the correct userId when checking if disabled by admin.
And when adding accounts if only one account type is possible and
it is disabled by admin, show the admin support dialog.

Bug: 26897250
Bug: 26767564
Change-Id: I5cca64491a100efc34307c45aa35c14412f043cd
2016-02-02 20:31:48 +00:00
Paul Lawrence
fb4c583dba Don't show 'unlock at boot' for file encryption
Change-Id: I8906023942a2fa0c5c303aeabb48737ec43fc737
2016-01-29 13:25:36 -08:00
Adrian Roos
62775bf756 Move lock screen setting behind gear
Bug: 19003093
Change-Id: I15baa5b1d19324521070d641ae6a227d782a4e9e
2016-01-28 15:40:50 -08:00
Udam Saini
62a7280cb8 Dynamically checks if screen lock suggestion is needed
Fixes a bug where if you upgrade a device with screen lock,
screen lock suggestion would show (upgrade such as N->N developer
builds) or from a user test case like M->N

bug:26844580
Change-Id: Ic779ff28f5895e407c2c96771dbbc622e6026a7f
2016-01-28 13:03:54 -08:00
Udam Saini
aa693f6734 Merge "Adds screen lock as a suggested activity" 2016-01-27 18:08:48 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Clara Bayarri
4f5f7b4f9a Fix Profile Fingerprint Settings to use correct user id
Bug: 26790762
Change-Id: Id813c03041e6e727f535ec63f63ee8b187b06164
2016-01-27 12:46:17 +00:00
Udam Saini
7ad4a17c5c Adds screen lock as a suggested activity
Also, fixes a bug where the suggested activity stayed on screen
after the component was disabled causing a crash.

bug:25246207
bug:26770556
Change-Id: I28d784cdc57e464e49887483690ab514ca3bc46a
2016-01-26 17:09:02 -08:00
Udam Saini
bf1483c383 Improves flow for fingerprint
This reduces the # of screens, and makes the backup lock choice
for fingerprint more obvious that it is a backup.

bug:26377096
Change-Id: I4e75e1f3302c286587de106bcdf43537bda03390
2016-01-25 09:19:02 -08:00
Clara Bayarri
34ec5f97fe Fix Confirm/Choose Credentials strings related to profile
The messages in ConfirmDeviceCredentials have been updated to
inform the user that the pattern/pin/password to be entered is
the profile one.

The strings in the confirmation dialog when the user removes
the lock have also been updated.

Ideally we would have a parametrized approach to strings here,
but capitalization makes it a hard problem.

Bug: 26706338, 26709116
Change-Id: I9f5508d6f449f9e572d65e5b2dcb15cca23832b3
2016-01-25 13:20:55 +00:00
Benjamin Franz
454ce75a41 Merge "Add background image for work challenge" 2016-01-22 12:27:00 +00:00
Jason Monk
e07c947ea3 Fix build.
Change-Id: I43201fc9bb989d3f490ba26cb93956878745e366
2016-01-21 14:15:46 -05:00
Clara Bayarri
7402b25143 Fix bugs around unification when no password is set
- When in a unified state, selecting the work lock to be "none" caused
a security exception
- When the work lock was set to "none", unifying didn't work
- When in a unified state, the work lock type selection screen showed
"none" as the current type instead of the device lock type

Bug: 26577247
Change-Id: I853d77186e23b6a458eaa6c1047942a7eefddc9c
2016-01-21 15:27:38 +00: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
Sudheer Shanka
17b9fa3e52 Merge "Add padlocks to more preferences that can be disabled by policy." 2016-01-19 17:58:27 +00:00
Sudheer Shanka
9c32468cd5 Add padlocks to more preferences that can be disabled by policy.
Change-Id: I7cc999dd1d46c20c888e0ba67053564e4d50946b
2016-01-19 16:56:58 +00:00
Benjamin Franz
ae07b5080a Resolve new intent that allows setting the parent challenge
Have ChooseLockGeneric resolve the new intent that allows setting the
parent challenge. If the new intent is received or seperate work
challenge is not supported, default to setting the challenge of the
parent user, otherwise use the calling user.

Change-Id: Ibd0ce8ce81b1d5c9073d4eb0096fdc74de12ee95
2016-01-15 11:38:41 +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
Maurice Lam
e9d2abca86 [ScreenLock] Fix result code handling
Modify the back stack and result code propagation in the screen lock
scenarios.

- EncryptionInterstitial now propagates the result of ChooseLock*
  request instead of always returning RESULT_OK.
- ChooseLockGeneric now treats CHOOSE_LOCK_REQUEST and
  ENABLE_ENCRYPTION_REQUEST the same (since encryption can be a proxy
  for ChooseLock*). This means ChooseLockGeneric will now stay on
  back stack when going back from ChooseLock*, just like the case
  (indirectly) through EncryptionInterstitial.

Bug: 26177240
Change-Id: Id7f1256dcbff00d552a3e7db60c285f53f1e63e6
2015-12-15 11:56:45 -08:00
Udam Saini
edac136e16 Allows the user to go back to Encryption Screen
bug:22907221
Change-Id: I766407f4f130ac618da178e1b6c04029025db8f2
2015-12-10 09:32:44 -08:00
Clara Bayarri
93bcfcb14d Disable passphrase change flow encryption screen when not main user
When the user changing passphrase is not the process' user, disable
the "Ask for password on device startup" screen, as it makes no sense.

Change-Id: I521b5ec8702f7a39b94012a606794e04135e4c75
2015-10-23 13:32:42 +01:00
Clara Bayarri
386919bef8 Merge "Refactor Choose/Confirm Lock flow to take user id" 2015-10-23 10:13:37 +00:00
Xiaohui Chen
f9ee84dba4 Clean up UserHandle.isOwner() in settings
Bug: 24869636
Change-Id: I9cb05a7543024136935902047952f582ae57c07c
2015-10-21 11:26:14 -07: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
Sungmin Choi
05c7dde1f3 To hide none security option, use config_hide_none_security_option config
Use mcc config overlay mechanism to hide none security option
in countries where it is mandatory.
To hide none security option, set config_hide_none_security_option config
true as mcc config overlay.

Bug: 22209425
Bug: 22975388
Change-Id: I774c53e17d3b50393816622134e58f8e06b76fab
2015-09-02 13:51:44 -07:00
Jim Miller
c2f6813a83 Don't attempt to remove fp templates if none are enrolled
The code was blindly calling fpm.remove(0) to remove all
fingerprint templates and then waiting for them to be removed.

Fixes bug 23183484

Change-Id: Ie510097d85bba32d965ba3c7f324f6c042e08300
2015-08-21 18:07:50 -07:00
Jorim Jaggi
f92fbc1c49 Wait with finishing until fingerprints are removed
Bug: 22863210
Change-Id: I490157cc2f9b52ac87cc52e13c7eb57cb4a4a377
2015-08-12 18:12:58 -07:00
Maurice Lam
87fadbe6d9 [Fingerprint] Help text for backup screen lock
Show a help text saying "Choose your backup screen lock method" when
asking the user for backup screen lock during fingerprint enrollment.

A backup translation is specified, using the source string "Set up your
backup screen lock method".

Bug: 22879473
Change-Id: I9b9348141227103e695d1fc78601745cac0309a7
2015-08-03 23:12:09 +00:00
Adrian Roos
38c9b9eb5e Update FRP warning to spec
Bug: 22672924
Change-Id: Ie275d5099553539707f86bf0e8cec5d5022ad227
2015-07-24 15:09:34 -07:00
Maurice Lam
c0e7879684 [Fingerprint] Change message in encryption
Change the message for encryption interstitial when enrollin
fingerprint, to make it clear that fingerprint unlock is still used,
just that the backup unlock PIN / password / pattern will be needed
to start the device.

Bug: 22559146
Change-Id: Ia134e0d9b118151833a9118ff44667dcc9122185
2015-07-20 21:52:12 +00:00
Chad Brubaker
95e6fe0e21 No longer upgrade password quality based on keystore
Keystore no longer requires a password to operate and only deletes
encrypted at rest entries when the user removes their password, so
blocking password downgrade is no longer required.

Bug: 20764363
Change-Id: I6f06acc71a4165282985082203ae1194491844c7
2015-05-12 13:42:52 -07:00
Andrei Kapishnikov
146fc11958 Added support for DO_NOT_ASK_CREDENTIALS_ON_BOOT DPM flag
When DO_NOT_ASK_CREDENTIALS_ON_BOOT flag is set in
DevicePolicyManager, the Settings UI:
1) Should not encrypt the device with password when the
   user encrypts the device for the first time. The default
   encryption type should be used instead.
2) Should not give the choice to the user whether to
   encrypt the device with password/PIN or not but always
   encrypt the device without password.

Related CL: https://googleplex-android-review.git.corp.google.com/#/c/665371/

Change-Id: Ic09f02c033a0b16b7ffc45bf6d675b62d1be4bd8
2015-04-29 02:53:53 +00:00
Adrian Roos
5437588abd Require explicit userId in LockPatternUtils
Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
2015-04-28 12:01:09 -07:00