Commit Graph

29 Commits

Author SHA1 Message Date
Aaron Liu
88fb7256a4 [Bouncer] Match spec for pattern view.
Spec should be TextColorSecondary instead of TextColorPrimary

Bug: 18951060
Test: Manual on device
Change-Id: I6adbcc36cd70e542268f3ad99c6f0a249cc59e7e
2022-05-04 19:01:59 +00:00
Aaron Liu
7657fa90b5 Revert "Bouncer: Add title for each auth screen."
This reverts commit 22941ed02d.

Reason for revert: title is shown when viewcontroller onPause is called. We might want to set the title in a more specific place

Change-Id: I9a1618aa1961f5a2a37de92cb5ecc87bebcbbdeb
2022-03-10 03:23:22 +00:00
Aaron Liu
22941ed02d Bouncer: Add title for each auth screen.
On reset state in the view controller, set the security message to be
the default text. It seems like this copy already exists.

Bug: b/218833792
Test: Manual test on multiple devices
Change-Id: I5d704255622864a8593ce1b31747a36ec95224bb
2022-03-04 22:07:44 +00:00
Beverly
725a9a5f1e Show msg in bouncer on weak biometric timeout
Show "PIN/pattern/password required for additional security"
on the bouncer when primary auth is required due to
STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT.

Previously, the strongAuth reason wasn't mapped to any prompt
reason string.

Test: manual
Bug: 204254599
Change-Id: I879a13233738f7ca5e7e29657b2070025cd3dd98
2022-02-10 20:33:15 +00:00
Calvin Pan
2801e6de4f Merge changes Ib484fc0c,I2b9ff69c,I0a31b117,I888c65c8,I03723cfe, ...
* changes:
  Clean <plurals> in DateTimeView
  Clean <plurals> in CertificateMonitor
  Clean <plurals> in FillUi
  Clean <plurals> in BugreportProgressService
  Clean <plurals> in keyguard
  Clean <plurals> in ChooserActivity
  Clear <plurals> in TextUtils
  Clean <plurals> in FindActionModeCallback
  Clean <plurals> in ZenModeConfig
  Add util class for plurals
2022-01-27 06:31:58 +00:00
Calvin Pan
bf4e15d017 Clean <plurals> in keyguard
Bug: 199230228
Test: make
Change-Id: I03723cfe18e5c948ca1896c5c2c389f46c48d891
2022-01-26 11:55:10 +08:00
Lais Andrade
a01a1f6993 Deprecate boolean settings for haptic feedback and vibrate when ringing
Deprecate HAPTIC_FEEDBACK_ENABLED in favor or HAPTIC_FEEDBACK_INTENSITY,
and VIBRATE_WHEN_RINGING in favor or RING_VIBRATION_INTENSITY.

Introduce hidden flag
VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF
to represent HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING in the
vibrator service. This is applied by:

- PhoneWindowManager, that converts HapticFeedbackConstants into
(VibrationEffect, VibrationAttributes).

- CellBroadcastAlertAudio, that triggers alerts using AudioAttributes
with flags FLAG_BYPASS_INTERRUPTION_POLICY (that translates to same flag
in VibratorManager, to bypass DnD) and FLAG_BYPASS_MUTE (that translates
to this new flag, to bypass the new alarm intensity settings).

The new flag is erased from request that are not from privileged apps,
similar to the other bypass flag. The public
HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING has also been
deprecated in T with a documentation explaining the removal of platform
support.

Remove SysUI dependencies on the deprecated settings, it should use the
USAGE_TOUCH attribute and rely on the vibrator service to apply the user
settings.

Keep other SysUI dependencies that needs to run in older Android
versions (like Launcher3).

Bug: 185351540
Test: VibrationSettingsTest + manual
Change-Id: I0372e4db19e09523795d7e79b9f7a15ae48a8cd9
2022-01-18 18:57:10 +00:00
Jamie Garside
2b3f7ef27f Make the keyguard pattern view shrink when the device is half open.
This is done by converting it to use a ConstraintLayout. This allows us
to set a guideline based on the screen percentage to size the pattern
view. After doing that, we can resize the entry method in much the same
was as we do it for the PIN pad.

Note: this CL also moves the pattern view unconditionally to the bottom
of the screen. This is by design; the new UX designs anchor all keyguard
input methods to the bottom of the screen instead.

Bug: 191347942
Test: Manually tested.
Change-Id: I1b53cad22ae4d2c7d738c2b48110283f53aa2e68
2021-08-04 11:56:06 +01:00
Ahan Wu
97f0fe2709 Instrument jank and latency of the unlock animation of lockscreen
Instrument jank and latency of unlock animation.

Bug: 169735612
Bug: 169735198
Bug: 169220953
Test: take trace to validate
Change-Id: I1721d7d3373f99b4aca618f86464d44ecd1e618e
2021-06-02 01:15:30 -08:00
Dave Mankoff
db4ee91dce Revert^2 "Add Controller for Emergency Button."
f23acf33ff

Change-Id: Id555c35af9a5ed2570504cd6b4e3ca3b5892c340
2021-03-23 10:48:27 -04:00
Dave Mankoff
4124a204c6 Add more logging for falsing.
Makes the FalsingManager slightly less stateful (passing the
interaction type directly to the classifiers as needed). It also
includes more logging than we had before, listing all the failed
classifiers for a gesture, along with the HistoryTracker's
belief and confidence.

Logs are now delayed one gesture. Instead of immediately logging when
a falsing call is made, it waits until the gesture is marked as
complete. This confers two advantages:

1) If multiple calls to #isFalseGesture (and similar) are made, we
   don't log multiple times. We only log the result once.

2) It allows us to log the effects on the HistoryTracker, as that only
   updates itself when the gesture is marked as completed.

Bug: 172655679
Test: atest SystemUITests && manual
Change-Id: I653ac2abb03a91ff000b46075e58137b04226023
2021-03-18 09:29:29 -04:00
Dave Mankoff
03c717447d Add continuous falsing to keyguard.
With this change, taps outside of the bouncer inputs increase the
FalsingManager's belief that erroneous taps are happening. If the
belief becomes strong enough, the bouncer will be retracted.

Special attention is given to ensure that actual password inputs
are not recorded by the falsing manager. Valid button and pattern
inputs do not have their motion events recorded, but do _decrease_
the FalsingManager's belief in pocket dialing. Thus, a few bad taps
mixed with good taps will not retract the bouncer.

Test: atest SystemUITests && manual
Bug: 172655679
Change-Id: Iac8d2a2f41764f3c1cccb66b9d332c489cabca77
2021-03-10 16:42:23 -05:00
Alec Mouri
f23acf33ff Revert "Add Controller for Emergency Button."
Revert submission 13536242-b179775696-depenency-get-keyguard

Reason for revert: Candidate reversion for broken tests: b/180440298
Reverted Changes:
I6d0271692:Add ViewController to CarrierText.
I4d9a4a21f:Add Controller for Emergency Button.
I4c76d99f9:Remove Dependency.get from KeyguardSliceTextView.
I730593fcf:Add injection to ClockProvider.
Ifbb93e624:Remove Dependency.get from KeyguardStatusView.
I237215456:Remove final calls to Dependency.get from keyguard...

Change-Id: I7b46dbad24050cfe6a363131549169602fda1f13
2021-02-18 11:39:15 -05:00
Dave Mankoff
f8cb6b2458 Add Controller for Emergency Button.
This removes all the calls to Dependency.get from EmergencyButton.

Bug: 179775696
Test: atest SystemUITests && manual
Change-Id: I4d9a4a21fe8a8a0306b110a2fbaaa3ea91507d05
2021-02-16 12:28:55 -05:00
Lucas Dupin
7b8636fdb0 1/N The road to Material NEXT (bouncer and shade)
Styling bouncer and shade so they have solid backgrounds and read colors
from themes instead of named resources.

Scrim now fetches colorBackgroundFloating, and views get their background
from colorBackground.
Switching from light to dark theme will make bouncer colors update without
re-inflating any views.

Bug: 173561906
Bug: 173561901
Test: atest ScrimControllerTest
Test: atest KeyguardSecurityContainerControllerTest
Test: manual, switching to dark theme annd showing notif guts
Change-Id: I372e8b688d7bbddd698381accd074b7655788cd0
2020-12-01 14:23:16 -08:00
Dave Mankoff
a2d4ed196c Change ViewController#initInternal to #onInit
Bug: 171472009
Test: manual
Change-Id: Iddc6c0240486b0d3005216bba0c40bfb481b94b3
2020-10-23 09:14:58 -04:00
Dave Mankoff
dd1341ec62 Add initInternal to ViewController.
ViewController's init method was not ideal to override. On the one hand,
if you put a call super.init() first your onViewAttach method is called
before you're subclass's init.

Further, if you put your own code befer super.init(), you are still left
with the problem that your init is not automatically idempotent, and
multiple calls to #init() could result in multiple executions of your
code unless you handle it yourself.

With this change, #initInternal() is introduced, giving ViewControllers
a place to put their run-once code such that it runs before any
view-attachment callbacks are fired.

Fixes: 171472009
Test: manual
Change-Id: I2e284024c82e3f7c7b6f29f22a1ffa3c8aae9fcb
2020-10-22 10:49:13 -04:00
Dave Mankoff
9a80cc2ec8 Revert^2 "9/N Clean Up Keyguard Class Structure"
b00c929394

Change-Id: I42d17262a789d2eb106a924b442a9d3debcc35e4
2020-09-24 11:04:52 -04:00
Dave Mankoff
3b7e026c06 Revert^2 "8/N Remove View Injection from KeyguardMessageArea"
dd7312c20a

Change-Id: Idca486311380b48e1f0808c8d08cfce46c929473
2020-09-24 11:04:51 -04:00
Dave Mankoff
dc01930044 Revert^2 "7/N controllers for remaining Keyguard Password ..."
Revert submission 12656261-revert-12585643-b166448040-keyguard-message-area-NUUJOVRYJS

This also fixes the original issue introduced in this CL.
KeyguardAbsKeyInputViewController#reset would call mView#resetState
instead of its own internal resetState method. However, all the logic
from the various resetState methods had been moved from the views to
their controllers. Simply calling resetState direclty resolves the
issue (line 105 of KeyguardAbsKeyInputViewController).

Reason for revert: Fixing http://b/169231892 and http://b/169145796
Reverted Changes:
I7683b2234:Revert "4/N Setup Controller fo KeyguardSecurityCo...
I5cbe04c0c:Revert "5/N Add KeyguardSecurityViewFlipperControl...
I11dff38ad:Revert "6/N Add Controller for KeyguardPatternView...
I55c250121:Revert "7/N controllers for remaining Keyguard Pas...
Ie84234cb8:Revert "8/N Remove View Injection from KeyguardMes...
Ic62f199a5:Revert "9/N Clean Up Keyguard Class Structure"

Change-Id: Ie3669e0c9a23ffd4443ced0fb08ec754f1df55db
Fixes: 169145796
2020-09-24 11:04:51 -04:00
Dave Mankoff
6350a9f10b Revert^2 "6/N Add Controller for KeyguardPatternView"
87f6d21e67

Change-Id: Id01e3ba154a6fe1d73f720b9389920dad60332ac
2020-09-24 11:04:51 -04:00
Dave Mankoff
87f6d21e67 Revert "6/N Add Controller for KeyguardPatternView"
Revert submission 12585643-b166448040-keyguard-message-area

Reason for revert: http://b/169081305 & http://b/169020145
Reverted Changes:
I6fa05012c:4/N Setup Controller fo KeyguardSecurityContainer....
Iecf265744:5/N Add KeyguardSecurityViewFlipperController.
I90ab99b2f:6/N Add Controller for KeyguardPatternView
I4b74eddd1:7/N controllers for remaining Keyguard Password Vi...
I805286374:8/N Remove View Injection from KeyguardMessageArea...
I362755980:9/N Clean Up Keyguard Class Structure

Change-Id: I11dff38ad9c36e0de5eec8f6e8662a173e1191cc
Fixes: 169081305
Fixes: 169020145
2020-09-22 13:26:30 +00:00
Dave Mankoff
bdc667325a Revert "7/N controllers for remaining Keyguard Password Views."
Revert submission 12585643-b166448040-keyguard-message-area

Reason for revert: http://b/169081305 & http://b/169020145
Reverted Changes:
I6fa05012c:4/N Setup Controller fo KeyguardSecurityContainer....
Iecf265744:5/N Add KeyguardSecurityViewFlipperController.
I90ab99b2f:6/N Add Controller for KeyguardPatternView
I4b74eddd1:7/N controllers for remaining Keyguard Password Vi...
I805286374:8/N Remove View Injection from KeyguardMessageArea...
I362755980:9/N Clean Up Keyguard Class Structure

Change-Id: I55c250121c2e234a41b30f2d647c44f6cb631028
Fixes: 169081305
Fixes: 169020145
2020-09-22 13:25:57 +00:00
Dave Mankoff
dd7312c20a Revert "8/N Remove View Injection from KeyguardMessageArea"
Revert submission 12585643-b166448040-keyguard-message-area

Reason for revert: http://b/169081305 & http://b/169020145
Reverted Changes:
I6fa05012c:4/N Setup Controller fo KeyguardSecurityContainer....
Iecf265744:5/N Add KeyguardSecurityViewFlipperController.
I90ab99b2f:6/N Add Controller for KeyguardPatternView
I4b74eddd1:7/N controllers for remaining Keyguard Password Vi...
I805286374:8/N Remove View Injection from KeyguardMessageArea...
I362755980:9/N Clean Up Keyguard Class Structure

Change-Id: Ie84234cb8ae9eaae6ec52900cb215ddf6e6213f1
Fixes: 169081305
Fixes: 169020145
2020-09-22 13:25:48 +00:00
Dave Mankoff
b00c929394 Revert "9/N Clean Up Keyguard Class Structure"
Revert submission 12585643-b166448040-keyguard-message-area

Reason for revert: http://b/169081305 & http://b/169020145
Reverted Changes:
I6fa05012c:4/N Setup Controller fo KeyguardSecurityContainer....
Iecf265744:5/N Add KeyguardSecurityViewFlipperController.
I90ab99b2f:6/N Add Controller for KeyguardPatternView
I4b74eddd1:7/N controllers for remaining Keyguard Password Vi...
I805286374:8/N Remove View Injection from KeyguardMessageArea...
I362755980:9/N Clean Up Keyguard Class Structure

Change-Id: Ic62f199a51a15d8384450b8f181f3c5a0b988d7f
Fixes: 169081305
Fixes: 169020145
2020-09-22 13:24:51 +00:00
Dave Mankoff
4a3d800016 9/N Clean Up Keyguard Class Structure
KeyguardInputView no longer implements KeyguardSecurityView.

This cl seeks to clean up some of the lingering vestiges from this
large chain of refactors.

I have manually tested none, swipe, pattern, pin, and password views
for successfully unlocking, as well as multiple failed attempts
resulting in temporary lock outs.

Fixes: 166448040
Test: atest SystemUITests && manual
Change-Id: I36275598001184e774677cf2dbb16dec8dc7ab5b
2020-09-16 16:27:56 -04:00
Dave Mankoff
720c7c6eff 8/N Remove View Injection from KeyguardMessageArea
Bug: 166448040
Test: manual && atest SystemUITests
Change-Id: I805286374d16162703b333452e5e35015449d1fe
2020-09-16 16:27:51 -04:00
Dave Mankoff
1d569867a4 7/N controllers for remaining Keyguard Password Views.
No real functionality changes (hopefully). Just moving
objects into controllers.

Test: manual
Bug: 166448040
Change-Id: I4b74eddd18d29dd8966caa32c5960ff8be2e6f43
2020-09-16 16:24:56 -04:00
Dave Mankoff
21d6698b4a 6/N Add Controller for KeyguardPatternView
Test: manual && atest SystemUITests
Bug: 166448040
Change-Id: I90ab99b2f241e21fdfcaeefb2e9443a1d3f2c9be
2020-09-16 16:24:11 -04:00