Commit Graph

512 Commits

Author SHA1 Message Date
Adrian Roos
d6d253a5a1 Improved trust error messaging (2/2)
More detailed reason strings when trust or
fingerprint are not allowed.

Bug: 22704995
Change-Id: Ia9e22378d3fc0f5fb42e32adc789e313c3a2beb3
2016-04-13 13:17:57 -07:00
Evan Rosky
22d1201c39 Fixed PIN entry detecting gravity improperly
Bug: 28061319
Change-Id: I289584765203892b7dbac4220b515445b821d621
2016-04-07 14:34:37 -07:00
Evan Rosky
9042750788 Added padding and gravity support to PIN entry
Also made it more customizable via attributes

Bug: 25184308
Change-Id: I3cfd48b6bb964ea8db1539586ed70343fda5e40a
2016-04-06 16:35:25 +00:00
Toni Barzic
79675b326c Teach keyguard about PASSWORD_QUALITY_MANAGED
PASSWORD_QUALITY_MANAGED should have password security mode,
rather than None.

BUG=27923581

Change-Id: I6b2aeee0a79a37a868d7d30117c77f73495892ad
2016-03-30 17:23:50 -07:00
Evan Rosky
eff74b48a8 Make part of KeyguardSecurityContainer protected
In order to apply different styling to security methods,
we need getLayoutIdFor() to be protected instead of private.

Change-Id: Icc92240eec763c910ef334c22ff4b92fcdd83fe8
2016-03-29 23:55:52 +00:00
Adrian Roos
569edb8512 Log bouncer prompt reason
Bug: 27434873
Change-Id: I6918507b66506cf95b20f95fe4a5cb19c899122f
2016-03-04 15:13:28 -08:00
Selim Cinek
2854019979 Fixed the usage of the menu key to unlock
The menu key was not unlocking the keyguard properly
and didn't hide the notifications.

Bug: 26539875
Change-Id: I9dd89767f00d29c15d1d4e840a1ab22d59e58c8d
2016-02-22 15:57:02 -08:00
Selim Cinek
ce2bd0fac7 Fixed a bug where the numpad wasn't working correctly
Also accepting the enter key now from the numpad as a
confirm key.

Bug: 27108451
Change-Id: I63dbd4b6cad3d2dce74e297dcb7abad9c5e66cbe
2016-02-22 15:57:02 -08:00
Michal Karpinski
bc0ce99043 Merge "Logging of keyguard actions into security log" 2016-01-28 11:47:23 +00:00
Michal Karpinski
31502d3d95 Logging of keyguard actions into security log
Bug: 22860162
Change-Id: I7dbe68fff7d9d45b6c417d960cf025c8d0694917
2016-01-28 11:07:56 +00:00
Chris Wren
f6e9228b8a move framework metrics over to new proto
Change-Id: Ie46e946dc787350c15c10aa4385a6b7df7e181a8
2016-01-27 13:47:40 -05:00
Rakesh Iyer
a7aa4d6f0b Allow smart unlock right after boot.
This change enables relaxing the constraint by which
strong authentication is needed after device reboot.

There are very limited use cases where this might be
safe, one of which is in a car. Cars head units usually
are protected physically by the car and have hardware
anti-theft mechanisms so we can potentially allow for
Android to allow users to use smart unlock to avoid the
lockscreen just after boot.

This change adds in a config flag that sets the default
trust flags, which can be set to allow smart unlock after
boot for car head units.

Bug: 26559008
Change-Id: Id6338a97b617ddaf3d2fae5d51235429a42b81cc
2016-01-26 15:57:29 -08:00
Adrian Roos
c13723f22e Improved trust error messaging (1/2)
Tracks why trust agents are disabled and shows
a generic message on the keyguard. Dedicated strings
in follow-up.

Bug: 22704995
Change-Id: Ibb4fd9c9386c4dc12f0734004502b9a9cc6ded79
2016-01-25 08:04:42 -08:00
Michal Karpinski
779aad942f Logging of unlock attempts and device locking to security log
Bug: 22860162
Change-Id: Ice18a8f655030e52ae2d9e256b6120e5f87950c5
2016-01-22 11:15:34 +00:00
Xiyuan Xia
ce64cea383 Fix a race condition during async credential check
Do not dismiss keyguard if KeyguardUpdateMonitor.getCurrentUser() is
changed during the async credential check.

Bug:26415736
Change-Id: Id7e04c7100e0920fe86fe006840928a936f62dd8
2016-01-12 16:16:53 -08:00
Adrian Roos
eaf95c3643 Merge "Charging speed based on voltage" into mnc-dr2-dev am: 0ede75507c
am: 82cfaa813b

* commit '82cfaa813b994ff1e5aaedbdfeeb4ced6e5dfcdb':
  Charging speed based on voltage
2015-12-02 01:58:50 +00:00
Adrian Roos
0c859ae9c7 Charging speed based on voltage
Also takes into account the voltage
at which we charge to make speeds
at different voltages comparable.

Bug: 25229483
Change-Id: I62a192932a013036585cd9fc870808debceac0d3
2015-11-23 17:36:06 -08:00
Andrei Stingaceanu
04e245b152 Wire in the device owner info into the KeyguardStatusView
Display the device owner information if it has been provisioned by
DPC via DevicePolicyManager, else fallback into displaying the
current user owner information (if set).

Change-Id: Ie915d6669ecac06bfa7b57079b9dcd0fac56df57
2015-11-12 18:08:12 +00:00
Jim Miller
d72d5ac598 Log fingerprint state in KeyguardUpdateMonitor.
Attempt to track down bug 24508587

Change-Id: Ifb998e2752ec515c36dd302c2abeb1ab27f3a2f3
2015-11-07 00:48:33 +00:00
Toni Barzic
17fdb13a60 Reset lock pattern stealth mode when keygueard pattern view is reset
Stealth mode is not guaranteed to remain constant through keyguard pattern
view lifetime (it's user specific, and user context may be switched), so
update it when keyguard pattern is reset.

BUG=25017442

Change-Id: I798fe685cfaadd35462f54ab7e4fa9e6f6276436
2015-10-16 13:38:11 -07:00
Jorim Jaggi
aeaddadb0e am 8ba8c543: am b278ea0c: am 27f26df6: am 05b11bf3: Merge "Update message in SIM PIN view when configuration changes" into mnc-dr-dev
* commit '8ba8c543f77eb8d5abad2653c5a6ebaeccc3a241':
  Update message in SIM PIN view when configuration changes
2015-09-24 04:18:01 +00:00
Jorim Jaggi
05b11bf357 Merge "Update message in SIM PIN view when configuration changes" into mnc-dr-dev 2015-09-24 00:23:47 +00:00
Jorim Jaggi
86f868dc32 am 93d1a17b: am 1af3c6f4: am 1bcb3472: am 6a15d528: Do not go over handler to dispatch keyguard visibility
* commit '93d1a17bafd51daaf6ed7fc56c7c3e84c5c119df':
  Do not go over handler to dispatch keyguard visibility
2015-09-23 19:53:00 +00:00
Jorim Jaggi
ad371b2e22 Update message in SIM PIN view when configuration changes
Bug: 24273807
Change-Id: I497fcd2ee527ec22d14ff1b6c30be4ef9a878980
2015-09-23 11:52:12 -07:00
Jorim Jaggi
6a15d528c0 Do not go over handler to dispatch keyguard visibility
When going over the handler, it could happen with a bad interleaving
we thought that Keyguard was not showing when getting the
onFinishedGoingToSleep message, so we stopped fingerprint
authentication. For some reason our state machine for canceling
/restarting authentication didn't work correctly so the fingerprint
listening state was not correct.

Bug: 24178814
Change-Id: I2a4731f195982395244c12e4d33b2b7d561c5671
2015-09-23 18:44:20 +00:00
Jorim Jaggi
9196534f02 am 2c049cfc: am 3a565669: am 5c2bfa8f: am 58e378b0: Merge "Start fingerprint authentication in onStartedGoingToSleep" into mnc-dr-dev
* commit '2c049cfc613f91fbc9a93adf2ee49a3137f7402f':
  Start fingerprint authentication in onStartedGoingToSleep
2015-09-18 01:09:32 +00:00
Jorim Jaggi
95e4038bb1 Start fingerprint authentication in onStartedGoingToSleep
We used to start fingerprint authentication in onFinishedGoingToSleep.
This was a UX issue because then users couldn't place the finger on
the sensor immediately after pressing the power button because
onFinishedGoingToSleep is significantly delayed (around 900ms after
pressing the power button).

Bug: 23570959
Change-Id: I0bf557ebd10e6a8b033ab98a78aa338bf6538dcc
2015-09-18 00:39:13 +00:00
Jorim Jaggi
1988ea2b3a am 6a188487: am d5411598: am a58bff50: am 3cf7eef1: Listen for fingerprint when on bouncer
* commit '6a188487c4eaec361c812197d99a5c24ad4c65d4':
  Listen for fingerprint when on bouncer
2015-09-11 03:50:41 +00:00
Jorim Jaggi
3cf7eef1b1 Listen for fingerprint when on bouncer
To make unlocking work if keyguard is in occluded state and user
taps on a notification.

Bug: 22855718
Change-Id: Ide632f524a635e3e37741abaa77e258394c9a6e2
2015-09-11 01:54:10 +00:00
Adrian Roos
0e22872666 resolved conflicts for merge of 123fb19d to master
Change-Id: Ie029b8d72eaf968a5224cd0b90d97b112d51ba35
2015-09-03 15:02:49 -07:00
Adrian Roos
95200e6f4e Merge "Poke fingerprint timeout when vold password is correct" into mnc-dr-dev 2015-09-03 19:41:22 +00:00
Adrian Roos
f6d51acec6 Poke fingerprint timeout when vold password is correct
Bug: 23718313
Change-Id: I6c88fbba9ae460594b8e2f1a77c6545b305e5813
2015-09-03 12:34:11 -07:00
Jim Miller
8376cd717a am 9946c255: am 444f8d2d: am d050cc87: am e45761ff: Merge "Fix broken enter key after failed PIN attempts." into mnc-dr-dev
* commit '9946c255e2f1b51a3cdaf7c42193c8dc9e9d63fb':
  Fix broken enter key after failed PIN attempts.
2015-09-03 04:35:36 +00:00
Jim Miller
c467bd641f Fix broken enter key after failed PIN attempts.
Fixes bug 23699953

Change-Id: Id099443b830f5608c0bf955075c3407b401f3d53
2015-09-01 15:21:55 -07:00
Jorim Jaggi
6a89feae87 am 53c5dadb: am d302508d: am 4a306fd7: am 3a464785: Add a private API to get notified about lockout resets
* commit '53c5dadbb8ddf0898e91e129aee4a19f1028175a':
  Add a private API to get notified about lockout resets
2015-09-01 16:10:10 +00:00
Jorim Jaggi
3a46478508 Add a private API to get notified about lockout resets
SystemUI uses it to start authentication again after lockout reset
expired.

Bug: 22846755
Change-Id: I90a987c6aa4ac52cc7e7aff1bce262d1db3f12ee
2015-09-01 00:37:54 +00:00
Adrian Roos
0b48efaf32 am f094bde1: am c63a12b7: am 6fe373b1: am 16d7245b: Merge "Prevent Fingerprint when SIM is locked" into mnc-dr-dev
* commit 'f094bde15dbbe305d594e11dff5fa22737b93c2c':
  Prevent Fingerprint when SIM is locked
2015-08-27 22:06:49 +00:00
Adrian Roos
16d7245b64 Merge "Prevent Fingerprint when SIM is locked" into mnc-dr-dev 2015-08-27 18:06:44 +00:00
Xiaohui Chen
cc791bc47c More cleanup USER_OWNER
Bug: 19913735
Change-Id: I7fe1bb2a66231b7d1ae0670dff5e2ec736b2e541
2015-08-27 18:05:21 +00:00
Jim Miller
ed7dcc2dc5 Don't check the keyguard PIN a second time
If you tap the enter key twice on the keyguard PIN entry
screen, the second tap can sometimes register because keyguard
hasn't been dismissed yet.  The fix is to ignore a second attempt
after the PIN has already been verified.

Fixes bug 19216025

Change-Id: I73a004e91e43f3da65ec84f90de6943e717d737f
2015-08-26 18:17:37 -07:00
Adrian Roos
733b663cc2 Prevent Fingerprint when SIM is locked
Bug: 23214670
Change-Id: I8192ded696c1908871b2578194e2a226bb51b1e9
2015-08-26 16:38:28 -07:00
Adrian Roos
1de8bcb1e5 Invoke strong auth callback and default strong auth expired to true
Split off from I0af11da1b7cd7c8d837bc5ba3a62ef2ffca74b1b.

The initial value did not matter previously because
a SystemUI crash triggered the boot logic and forced
a manual entry before fingerprint works.

Long term the timeout logic should be moved to StrongAuthTracker
so it can be shared with the trust agent implementation (currently
implemented by the trust agents themeselfes)

Bug: 22846469
Bug: 22115393
Change-Id: I0af11da1b7cd7c8d837bc5ba3a62ef2ffca74b1b
2015-08-21 13:28:01 -07:00
Adrian Roos
b5e4722891 Add StrongAuthTracker
Bug: 22846469
Bug: 22115393
Change-Id: I6ef5322d02e540fc043e7f20d3aabf595ce7c224
2015-08-21 13:28:00 -07:00
Jorim Jaggi
86bed40605 Fix fingerprint listening state race conditions
When calling cancel() on the cancellation signal, it doesn't happen
immediately. Now, because of a state messup during boot, we go
through the sequence

startListeningForFingerprint
stopListeningForFingerprint
startListeningForFingerprint

However, the cancellation callback from stopListeningForFingeprint
happened AFTER the second startListeningForFingerprint, so we assumed
that fingerprint detection was not running anymore but in reality it
was - leading to weird states and all kinds of small state messups.

Introduce a state machine to track when we we called cancel but
waiting for the confirmation of FingerprintService in order to track
this properly.

Bug: 23380500
Change-Id: I403479fb749cf7c22b73611b69698e8b771777d0
2015-08-21 19:29:05 +00:00
Jorim Jaggi
71448a7003 Don't call authenticate immediately after getting valid fingerprint
After gettin a callback onAuthenticationSucceded we set the
fingerprint listening state to false. However, when waking up, we
immediately started listening again because the state was false.
Protect against that by only calling authenticate only once, except
when the unlock doesn't go through because unlocking with fingerprint
is not allowed.

Also fixes some animation "jank" because of the state messup.

Bug: 23304421
Change-Id: Ic83ac0f1590dd4f8017bb55dca9e19a60cfdf99f
2015-08-19 17:06:29 -07:00
Jorim Jaggi
0835f33a4d Merge "Improve motion for wake-and-unlocking while pulsing" into mnc-dr-dev 2015-08-19 01:04:58 +00:00
Jorim Jaggi
394686efbb Merge "Fix race condition for doze mode and wake-and-unlocking" into mnc-dr-dev 2015-08-19 01:04:54 +00:00
Jorim Jaggi
83eb6bb5d8 Improve motion for wake-and-unlocking while pulsing
- Move all fingerprint related to logic in on central class in
SystemUI that knows all the state of the UI so there is exactly ONE
place in which we decide what to do when we acquire a fingerprint.
- When pulsing and we get a valid finger, we fade the contents of the
Keyguard out and fade the scrim out almost the same way as we would do
in a normal wake-and-unlock sequence.
- Hide shadows while dozing, so we don't see the artifacts when we fade
the dozed Keyguard out.

Bug: 23225107
Change-Id: I82f78e61f2530cf7d507ade80f6f0a340c082567
2015-08-18 17:57:10 -07:00
Jorim Jaggi
ee2cfe48d4 Only call authenticate when we are not listening yet
Bug: 23304421
Change-Id: I5c589ba8992039ca995138d7d74abd123b911a5c
2015-08-19 00:51:23 +00:00
Jim Miller
bea9d7b94c Merge "Reset fingerprint lockout timer when strong auth is used." into mnc-dr-dev 2015-08-18 23:12:18 +00:00