Commit Graph

90 Commits

Author SHA1 Message Date
Matt Pietal
67f4a29d74 Merge changes I645115ab,I73b51987,Id1b79253 into tm-qpr-dev am: 2c34290e87 am: c52dcfa7d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20427727

Change-Id: I0b6eb3cad7f3de3614f303969f937c29c3044671
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 21:43:13 +00:00
Matt Pietal
a9094c9563 Transitions - Add dreaming state
Add support for states in and out of dreaming. At the moment, AOD is
equivalent to DOZING but these will be separated out in the future.

Test: atest KeyguardTransitionRepositoryTest
KeyguardRepositoryImplTest
Bug: 195430376

Change-Id: I73b51987f01540cc3d321f23286a3344d0847f9c
2022-11-10 13:13:41 +00:00
Matt Pietal
d3783f7bac Transitions - Make them cancelable
Data layer - Add 'isKeyguardGoingAway' information, allow transitions
to be cancelable and add in Cancel state.

Domain layer - Listen for state transitions and then attempt to
cancel/interrupt them under the right circumstances, such as when the
power button is pressed in the middle of an aod -> lockscreen
transition.

Bouncer fixes - hide() was never called when using the back gesture,
resulting in incorrect bouncer state.

Test: atest KeyguardTransitionRepositoryTest
KeyguardRepositoryImplTest KeyguardBouncerTest BouncerInteractorTest
Bug: 195430376

Change-Id: Id1b79253ab6334e8e5941c89e94e267126b08ecb
2022-11-10 13:02:19 +00:00
Dave Mankoff
13f0ffc61f Merge changes I29bf2065,Ic858826c,I7fe0bd12 into tm-qpr-dev am: 2dcc550cb7 am: df1cee3f22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20414824

Change-Id: Id6d2e970541f246a2ec6f1510b9ebdd85f3107b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 02:51:52 +00:00
Dave Mankoff
85dc1d1174 Add server flag support to flags. am: 96c315ea7b am: bae2e74f7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20313762

Change-Id: I8463d62d2ba505457a98a9abde19a4840a078778
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 02:50:28 +00:00
Dave Mankoff
57d1b2afa2 Define server flag names for all existing flags.
Removes reflection from our flag infrastructure.

Bug: 249121873
Fixes: 258235428
Test: manual
Change-Id: I29bf2065ba5885789e3fe94c0d6cdbae5e42a4d0
2022-11-09 17:10:09 +00:00
Dave Mankoff
96c315ea7b Add server flag support to flags.
Bug: 249121873
Test: atest SystemUITests
Change-Id: I7fe0bd122cbcc3365abe7f4071a76a04783ff3d0
2022-11-09 17:10:06 +00:00
Brad Hinegardner
c6028cf13e Merge "Now Playing is too low on the lock screen" into tm-qpr-dev am: b82ce0fe96 am: 8c013038d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20402614

Change-Id: If1590d46f5268147feb70cf90386eddf38412a31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 19:30:14 +00:00
Brad Hinegardner
b82ce0fe96 Merge "Now Playing is too low on the lock screen" into tm-qpr-dev 2022-11-08 18:24:36 +00:00
Brad Hinegardner
66d793649b Now Playing is too low on the lock screen
NOTE: on udfps devices while now playing + on pixel stand 2, and max density, there remains overlapping related to the assistant icon.

Test: manually test UI on Pixel Stand 2
Test: manually test UI by pushing song to NowPlaying via adb
Test: manually test on devices both with and without udfps, on large screen density and low density
Fixes: 230466568

9761c10a5c

Change-Id: I3c67e92d5d9076938c55852898d80903de1d0202
2022-11-07 23:06:46 +00:00
Dave Mankoff
d99c94977d Merge "Include all flags in our flag list." into tm-qpr-dev am: 8fd3032fce am: 1becd8179a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20318731

Change-Id: Ia3bc2402a607fea56234fece38f8214c253e3bfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-06 15:09:59 +00:00
Dave Mankoff
8fd3032fce Merge "Include all flags in our flag list." into tm-qpr-dev 2022-11-06 14:12:44 +00:00
Dave Mankoff
9f825a8ba1 Include all flags in our flag list.
This improves the use of reflection to include all the flags listed
in Flags.kt. One interseting finding: I can't figure out how to
get the value of a field marked with just `@Keep`. It needs to
also have `@JvmField` or not have any annotations at all.

More changes to this code will come in follow up cls, using string
names where appropriate, but this improves existing functionality.

Key takeaways:
- Reflection is terrible
- Reflection in Kotlin is worse
- Reflection on `object` instances is worse still
- Reflection mixing Java with Kotlin follows the trend line
- Reflection on annotated fields is nigh impossible

Bug: 249121873
Test: adb shell cmd statusbar flag
Change-Id: I69a96501876b01570233c3fd80b6bc7334d9fe73
2022-11-05 23:57:51 +00:00
Aaron Liu
12a29b5045 Merge "[User Switcher] Fix username sync in bouncer." into tm-qpr-dev am: 6a5411f6ee am: b5d7a255fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20388389

Change-Id: I5848484a2a788053f64ee7d8ff224df951114ee2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-05 04:50:27 +00:00
Aaron Liu
6a5411f6ee Merge "[User Switcher] Fix username sync in bouncer." into tm-qpr-dev 2022-11-05 02:46:11 +00:00
Aaron Fan
aa598d0701 Merge "Revert "Now Playing is too low on the lock screen"" into tm-qpr-dev am: 91d982458c am: f7cb297816
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20389248

Change-Id: I038638522ff065803ae12f167dfad75fca541751
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 21:05:04 +00:00
Aaron Fan
91d982458c Merge "Revert "Now Playing is too low on the lock screen"" into tm-qpr-dev 2022-11-04 20:40:14 +00:00
Brad Hinegardner
9761c10a5c Revert "Now Playing is too low on the lock screen"
Revert "Now Playing is too low on the lock screen"

Revert submission 20274762-b230466568_move_now_playing

Reason for revert: b/257493331 and others
Reverted Changes:
I6f92c92f6:Now Playing is too low on the lock screen
I5c93f310e:Now Playing is too low on the lock screen

Change-Id: I86d28733b581fc238fb4a0f73ae8c6915f49ef24
2022-11-04 19:25:50 +00:00
Aaron Liu
d1638a8b62 [User Switcher] Fix username sync in bouncer.
The user name is not updated when userinfo changes (name and avatar).
Updated usertracker to listen to this intent and updated repository to
listen to these changes. Corresponding tests have also been updated.

Fixes: 254678959
Test: Observed username in bouncer. I unlock the device and change the
username for the current user. Turn device screen off and on and go back
to bouncer. Observe that the username is the same as the one changed in
settings.

Change-Id: Ie6e289dfc65c14f9b0a35f031c46122d10dca9d0
2022-11-04 10:34:07 -07:00
Brad Hinegardner
ba553950af Merge "Now Playing is too low on the lock screen" into tm-qpr-dev am: 82d4e1f9c1 am: 4c45b0e0a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20274762

Change-Id: Iaecdf6629efaef6e92f7dc68aa3cb309e889befd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 14:44:34 +00:00
Dave Mankoff
2454ac83df Merge "Enable Int and String flags." into tm-qpr-dev am: ebe96fbb8f am: 0b5fe143fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20372836

Change-Id: I47d2afe4b212f311fefeefe049f51662b1a119a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 14:43:17 +00:00
Brad Hinegardner
82d4e1f9c1 Merge "Now Playing is too low on the lock screen" into tm-qpr-dev 2022-11-04 13:49:08 +00:00
Dave Mankoff
ebe96fbb8f Merge "Enable Int and String flags." into tm-qpr-dev 2022-11-04 13:31:08 +00:00
Michael Mikhail
6e14ebc01c Merge "Adding isFalseLongTap method" into tm-qpr-dev am: 4562cb6733 am: 5e22656d84
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20190664

Change-Id: I8e02a8bbd63108b888ae9a9d9486a4d6195e3c12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 04:58:21 +00:00
Michael Mikhail
ca9d7ae4cc Adding isFalseLongTap method
Adds isFalseLongTap method and makes an absract class for SingleTap and
LongTap as they only differ in touch slop.

Bug: 241487855
Test: atest BrightLineClassifierTest
Test: atest BrightLineFalsingManagerTest
Change-Id: Ia606afe2ebe5c454bcc74294210ced52f63e33ef
2022-11-03 23:04:41 +00:00
Caitlin Shkuratov
58beeba18b Merge changes I7125da88,Id6a26bd0 into tm-qpr-dev am: 6019444593 am: 0660b921d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20315601

Change-Id: I3cd79b457d02f0d26561af51e76cd1758fe73c3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 18:19:40 +00:00
Dave Mankoff
f3df059ebe Enable Int and String flags.
Puts mechanics in to support IntFlag and ResourceIntFlag.

Also adds support for both IntFlag and StringFlag via the
command line.

Support in the app will come later.

Bug: 257066497
Test: manual via the command line.
Change-Id: I378f0f1e0db028cee33f729c47a63262124389d7
2022-11-03 15:42:17 +00:00
Brad Hinegardner
bbbca1933b Now Playing is too low on the lock screen
NOTE: on udfps devices while now playing + on pixel stand 2, and max density, there remains overlapping related to the assistant icon.

Test: manually test UI on Pixel Stand 2
Test: manually test UI by pushing song to NowPlaying via adb
Test: manually test on devices both with and without udfps, on large screen density and low density
Fixes: 230466568
Change-Id: I6f92c92f616363bf1812d221d31e614501b872df
2022-11-03 15:11:27 +00:00
Caitlin Shkuratov
6019444593 Merge changes I7125da88,Id6a26bd0 into tm-qpr-dev
* changes:
  [SB Refactor] Define flags that allow us to run the backend without updating the UI.
  [SB Refactor] Define WifiUiAdapter to interface between the new data pipeline and the old UI.
2022-11-03 14:13:45 +00:00
Matt Pietal
e2a06426c7 Merge changes Iaef3c67b,I983277fd into tm-qpr-dev am: 9dca500295 am: 558ed11961
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20341513

Change-Id: Id789c03e80d9848fddc89ca8e15ade3b7d2a0f4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 14:04:09 +00:00
Matt Pietal
01d160afd6 Transitions - Add more source data, refine existing transitions
Data sources - Listen for events from the BiometricUnlockController
and KeyguardStateController#isBouncerShowing

Repositories - Add isBouncerShowing and WakeAndUnlock events into
KeyguardRepository

Interactors - Refine keyguard transitions so that states are more
accurate

BiometricUnlockController - Allow multiple listeners so that events
can make it into the KeyguardRepository. Cleanup redundant callback.

Test: ClockEventControllerTest KeyguardRepositoryImplTest
KeyguardTransitionRepositoryTest KeyguardTransitionInteractorTest
BiometricsUnlockControllerTest CentralSurfacesImplTest
Bug: 195430376

Change-Id: I983277fd9764d88c078bbf6da117cec3dd12dede
2022-11-02 16:07:49 +00:00
Matt Pietal
e12c348385 Merge "Transitions - Add GONE state" into tm-qpr-dev am: 66fc5b3ccd am: 2ea61480fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20293565

Change-Id: If5d44abaf1d746a929a6e97c9af8da402c5585e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 11:52:39 +00:00
Caitlin Shkuratov
c1c24a6a97 [SB Refactor] Define WifiUiAdapter to interface between the new data
pipeline and the old UI.

When the new data pipeline detects a valid wifi icon, it will notify
StatusBarIconController to inflate a wifi icon if necessary.
This matches the pattern of MobileUiAdapter.

Bug: 238425913
Test: verify old wifi icon still works as expected
Test: verify new wifi icon still works as expected
Test: atest ModernStatusBarWifiViewTest StatusBarIconControllerTest
Change-Id: Id6a26bd00ee661a28e89585ea7b1293282a50c4d
2022-10-31 16:17:41 +00:00
Matt Pietal
02dc8128fa Transitions - Add GONE state
When keyguard is dismissed, transition to a new GONE state. This helps
address an issue with the ClockEventController, where the clock was
not properly animating back to its AOD state.

Adding audit capability via KeyguardTransitionAuditLogger

Migrated to MutableSharedFlow. MutableStateFlow was conflating too
many events, some of them fairly important.

Test: atest ClockEventControllerTest KeyguardRepositoryImplTest
KeyguardTransitionRepositoryTest KeyguardTransitionInteractorTest
Bug: 195430376

Change-Id: Ic4bd48cea6e783cfdc116fa2776639da0641c100
2022-10-28 18:49:02 +00:00
Joe Bolinger
7dd4037f4d Refactor biometric prompt credential screens - domain layer
Step 2/3, add domain layer for business logic wrapping credential verification.

Bug: 251476085
Test: atest CredentialInteractorImplTest PromptCredentialInteractorTest BiometricPromptRequestTest
Test: manual (use test app and verify credential screens)
Change-Id: Ia26a19be35d466390aaaa7144203393a8197dc14
2022-10-26 06:23:47 +00:00
Joe Bolinger
edefc7a7b2 Refactor biometric prompt credential screen - data layer.
Step 1/3, add repo layer for global application state of biometric prompt.

Bug: 251476085
Test: atest PromptRepositoryImplTest
Change-Id: Ide096c435b58ece7962f8a5b6d1c3af992885554
2022-10-26 06:22:14 +00:00
Yining Liu
297cc8e00a Merge changes from topic "b244522899_fix_notify_height_with_bubble" into tm-qpr-dev am: 90e8476e3c am: 318daf2093
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20245711

Change-Id: I5a0abf166c8dc8980c8d3e03cb687a4eabc4d64b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 04:38:24 +00:00
Yining Liu
90e8476e3c Merge changes from topic "b244522899_fix_notify_height_with_bubble" into tm-qpr-dev
* changes:
  Add test code for `Fix the height of NotificationContentView when there's no actions but bubble button`
  Convert NotificationContentViewTest to Kotlin
2022-10-25 03:24:59 +00:00
Yining Liu
3650a601e7 Convert NotificationContentViewTest to Kotlin
Conversion from Java to Kotlin to enable future added tests written with Kotlin.

Bug: 244522899

Test: `atest NotificationContentViewTest`
Change-Id: Ib02c2c45682b8977004748a2a134b7520abe4a49
2022-10-24 18:58:17 +00:00
Dave Mankoff
968ac900c3 Convert Flags.java to Flags.kt
Bug: 249121873
Test: manual
Change-Id: I187d4eb8fbf6834eaafeaf465ff07d2f94122f2b
Merged-In: I187d4eb8fbf6834eaafeaf465ff07d2f94122f2b
2022-10-22 18:08:32 +00:00
Dave Mankoff
2a2379061b Convert Flags.java to Flags.kt
Bug: 249121873
Test: manual
Change-Id: I187d4eb8fbf6834eaafeaf465ff07d2f94122f2b
2022-10-21 23:18:00 +00:00
TreeHugger Robot
e5862263b0 Merge "Use Expandable instead of View in FooterActionsViewModel (1/2)" into tm-qpr-dev am: 4017df44ea am: 66c008ff36
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20222588

Change-Id: Ia18ee6cbb9645749d907b485151faa83a34b41a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 21:09:09 +00:00
Jordan Demeulenaere
e61069746b Use Expandable instead of View in FooterActionsViewModel (1/2)
This CL replaces the reference to View by Expandable in
FooterActionsViewModel. That way, this view model can now be used by
Compose code as well.

Bug: 242040009
Test: atest FooterActionsViewModelTest
Change-Id: I6674d9a39d5daf699d67f1bb8e8ae317c85e9240
2022-10-20 10:45:49 +02:00
Matt Pietal
0e8f2a2eff Add KeyguardTransitionRepository
Added in order to better control transitions within
keyguard. Transitions must begin with a call to startTransition and
can be either animated or manually controlled. The domain layer is
responsible for both triggering these transitions and listening to
flowable events emitted by this repository, and should respond by
updating the UI elements.

Bug: 195430376
Test: atest KeyguardTransitionRepositoryTest ClockEventControllerTest
Change-Id: I56bd9d560db265c523fa3e0b8c03310e9f4067de
2022-10-18 13:25:22 +00:00
Matt Pietal
8c49232ba6 [DO NOT MERGE] Add KeyguardTransitionRepository
Added in order to better control transitions within
keyguard. Transitions must begin with a call to startTransition and
can be either animated or manually controlled. The domain layer is
responsible for both triggering these transitions and listening to
flowable events emitted by this repository, and should respond by
updating the UI elements.

Bug: 195430376
Test: atest KeyguardTransitionRepositoryTest ClockEventControllerTest
Change-Id: I56bd9d560db265c523fa3e0b8c03310e9f4067de
2022-10-18 11:29:25 +00:00
Bryce Lee
9f60c21e55 Merge "Condition Refactor." into tm-qpr-dev am: a4ba2978e6 am: c7edee1c76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20071267

Change-Id: I23f97ab5b6d6dd58baa6c242f1d86111308e0d04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-11 22:56:06 +00:00
Bryce Lee
a4ba2978e6 Merge "Condition Refactor." into tm-qpr-dev 2022-10-11 22:03:10 +00:00
Dave Mankoff
c59594b7c9 Merge "Use less SysUI specific code in Flags." into tm-qpr-dev am: 45e2aafa26 am: a46aac018c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20084471

Change-Id: Id6bc563d0611275297edc3b6b36476bcdd05734f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-11 19:43:02 +00:00
Dave Mankoff
45e2aafa26 Merge "Use less SysUI specific code in Flags." into tm-qpr-dev 2022-10-11 16:41:28 +00:00
Bryce Lee
50a91d4035 Condition Refactor.
This changelist modifies conditions in two ways:
1. Conditions now can be unset. In the unset state, the condition is
no longer considered when evaluating whether all conditions are met
by the monitor.
2. The overriding feature of a condition is a construction time
decision.

Test: atest ConditionMonitorTest
Test: atest ConditionTest
Bug: 252888175
Change-Id: If254657ef87d12778850a44e1e99fe69d0460476
2022-10-10 23:19:36 +00:00