Commit Graph

16 Commits

Author SHA1 Message Date
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