Commit Graph

129 Commits

Author SHA1 Message Date
TreeHugger Robot
8a871ae898 Merge "Add logic to show apps running certain jobs in Task Manager." into tm-qpr-dev am: 816123320d am: 1d46223708
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20405795

Change-Id: I80338eee8546d9f33a15f6a6024b4233eab36dc6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 07:21:43 +00:00
TreeHugger Robot
816123320d Merge "Add logic to show apps running certain jobs in Task Manager." into tm-qpr-dev 2022-12-03 06:20:53 +00:00
Kweku Adams
4167f0c3d6 Add logic to show apps running certain jobs in Task Manager.
For now, we will show apps with an active FGS or jobs that the user
should be aware of (ie. "user-visible jobs") in the exact same way.
Users will be able to stop the ongoing FGS and user-visible jobs
using the same button. This won't be used to show apps on TM, so
the JobScheduler implementation is empty.
We'll add the JobScheduler implementation in U.

Bug: 255767350
Change-Id: Iaf482926c1f568aee26a2798ce827c6138f3f779
Test: atest SystemUITests
Test: Manually start jobs and interact with the Task Manager
2022-12-02 23:26:38 +00:00
Josh Tsuji
7c7ec6fe81 Merge "Migrate LightRevealScrim and all dependencies to flows." into tm-qpr-dev am: dd1d999b88 am: 687039f7df
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20470589

Change-Id: If148f817bb3d8e9152618e5b71305b7376fa114d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 18:26:43 +00:00
Aaron Liu
a0f28fddb2 Merge "Fix fatal exception in FakeBroadcastReceiver." into tm-qpr-dev am: 78f097adda am: 14ad4fac46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20616560

Change-Id: I6ec0d0cd796c27ab032bafdb162c49c93b7825c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 18:23:00 +00:00
Josh Tsuji
dd1d999b88 Merge "Migrate LightRevealScrim and all dependencies to flows." into tm-qpr-dev 2022-12-02 18:13:10 +00:00
Aaron Liu
78f097adda Merge "Fix fatal exception in FakeBroadcastReceiver." into tm-qpr-dev 2022-12-02 17:53:00 +00:00
David Saff
7ef14a9e3f Merge "Clear TestableLoopers in SysuiTestCase" into tm-qpr-dev am: 78f5ef56e1 am: 35338b5f65
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20609771

Change-Id: Idb9ecc9ce7204c4ca25a7641a0bf65fbd2d72dd1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 15:27:48 +00:00
David Saff
78f5ef56e1 Merge "Clear TestableLoopers in SysuiTestCase" into tm-qpr-dev 2022-12-02 14:38:01 +00:00
Jordan Demeulenaere
723f9d25f8 Merge changes Ia3b1ae8f,Ie87220a7 into tm-qpr-dev am: 52c7bc24e2 am: b28ae70b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20562448

Change-Id: Ibc9f3be9dc5afc0a1d553a541dc90c192b0cd4c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 10:42:42 +00:00
Jordan Demeulenaere
52c7bc24e2 Merge changes Ia3b1ae8f,Ie87220a7 into tm-qpr-dev
* changes:
  Clean-up FooterActionsViewModelTest
  Introduce TestScope.collectLastValue(Flow)
2022-12-02 09:30:12 +00:00
Aaron Liu
8b5178beac Fix fatal exception in FakeBroadcastReceiver.
It seems like an exception is thrown because ArraySet is not
thread-safe.

Use a synchronized hash set for the receivers.

Fixes: 261099639
Test: atest KeyguardQuickAffordanceProviderTest
Change-Id: I39c43bb2d5dbdc6705b5dec4b362d75189c136d9
2022-12-01 19:06:54 -08:00
Ale Nijamkin
01c614b27e Merge "Multi-user customizable quick affordances." into tm-qpr-dev am: eda61eeeeb am: 551b4f4eb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20584117

Change-Id: Id889a7f4f31697154a4333acbe3ef967947044ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:25:44 +00:00
Ilya Matyukhin
d71de2614a Merge changes from topic "new-udfps-touch" into tm-qpr-dev am: 0672ae40db am: 858442e50d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20550191

Change-Id: I15ceb55ba19a1b07605d80614ca4c538c557cff5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:06:40 +00:00
David Saff
669b633e9d Clear TestableLoopers in SysuiTestCase
Bug: 261039202
Test: presubmit to verify this doesn't break existing tests
Test: See b/259992416 for analysis of how this improves memory pressure.
Change-Id: Ifa1b489b8dff354a29727fb61342ac9b82ec65e7
2022-12-01 12:58:50 -05:00
Josh Tsuji
206f2e7894 Migrate LightRevealScrim and all dependencies to flows.
Bug: 195430376
Test: atest LightRevealScrimRepositoryTest
Test: atest LightRevealScrimInteractorTest
Change-Id: I5ddede5301b4f3cf92d678e9276785823ae29d25
2022-11-30 14:05:59 -05:00
Ale Nijamkin
eda61eeeeb Merge "Multi-user customizable quick affordances." into tm-qpr-dev 2022-11-30 17:51:53 +00:00
Ilya Matyukhin
0672ae40db Merge changes from topic "new-udfps-touch" into tm-qpr-dev
* changes:
  Integrate new touch architecture with UdfpsController
  Change computed properties to regular in UdfpsOverlayParams
  Introduce testable UDFPS touch architecture
  Add rotatePointF to RotationUtils
  Add tryDismissingKeyguard() to UdfpsController
2022-11-30 06:12:34 +00:00
Alejandro Nijamkin
74df4ef2f0 Multi-user customizable quick affordances.
This CL adds support for multi-users to the customizable lock screen
quick affordance system.

The process that creates windows and renders System UI is always the
primary user's system UI process. The process that owns the content
provider accessed by Wallpaper Picker is bound to the currently-selected
user on the system, which may be different than the primary user.

What this means is that, when switching to a secondary user, what the
Wallpaper Picker sees is fed to it from a secondary system UI process
which is not the same system UI process that is rendering the
affordances on the lock screen. Therefore, it didn't work.

This CL adds a "remote user" selection manager which the repository can
switch to when it's running on the primary user process but needs to
query the state of the selected affordances for a secondary user.

The "remote user" selection manager queries the content provider
associated with the system UI process linked to the secondary user. This
way, we can display the correct affordances on the screen, even when
switching to a secondary user.

Fix: 260251307
Test: included new and expanded unit tests. Manually verified that the
selection of quick affordances for the primary and secondary user are
correctly reflected on the lock screen when switching users and is
retained even after switching away and back.

Change-Id: I281577ed6efb987c23b19c2078e77c91e45ce9f2
2022-11-29 13:53:07 -08:00
Ilya Matyukhin
8698dbdf55 Integrate new touch architecture with UdfpsController
Bug: 218388821
Bug: 218374828
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: Ifb32d5f6a94b2b5a1daf9e972414476db4122047
2022-11-29 21:37:42 +00:00
Brad Hinegardner
2b2cfe5787 Merge "Create Flashlight Prebuilt quick affordance" into tm-qpr-dev am: b96b7ad9e9 am: 5149cb0218
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20545048

Change-Id: Id0bf6bb09d04dc64f08bd35f172dc81e54fb7326
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 20:30:59 +00:00
Brad Hinegardner
072497479a Create Flashlight Prebuilt quick affordance
Bug: 256687331
Test: New Unit test, verified manually via toggling flag and activating flashlight quick affordance
Change-Id: I833f60bcd0f6b2f4049a0a2a5de2de0b41f6283f
2022-11-28 09:38:46 -05:00
Jordan Demeulenaere
09e8750a91 Clean-up FooterActionsViewModelTest
This CL cleans up FooterActionsViewModelTest and FooterActionsTestUtils
by making sure that the same TestCoroutineScheduler is used by all
TestDispatchers, and by using the new collectLastValue(Flow) API instead
of manually collecting each Flow.

Bug: 242040009
Test: atest FooterActionsViewModelTest
Change-Id: Ia3b1ae8fba05c2ed9cf3a46d3cc7546161092f42
2022-11-28 10:56:21 +01:00
Jordan Demeulenaere
d94681b394 Introduce TestScope.collectLastValue(Flow)
This CL introduces a helper function to easily collect value from an
infinite Flow from a test. See ag/20562448 for an example.

Bug: 242040009
Test: atest FooterActionsViewModelTest
Change-Id: Ie87220a7382424dc9c25728fca03c601952da5c0
2022-11-28 10:56:18 +01:00
Hawkwood Glazier
f19409d1ea Add Customization Lib am: b8eef87bc2 am: ee8cc9a2b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20448929

Change-Id: I943e5df4635e4cab995621a4e88400129018ea8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 21:37:02 +00:00
Hawkwood Glazier
b8eef87bc2 Add Customization Lib
Bug: 258424862
Test: Manually rebuilt everything
Change-Id: If683023d2f592bb09827a50fbc79559b5b57cb3a
2022-11-18 21:13:35 +00:00
Matt Pietal
fcec6e0bea Merge "Transitions - Add doze transition information" into tm-qpr-dev am: 2850e3301a am: fa0dfd8cc3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20495869

Change-Id: I40881c46ba38c6365ce95b6bfa41ec52d45d42c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:09:52 +00:00
Matt Pietal
2850e3301a Merge "Transitions - Add doze transition information" into tm-qpr-dev 2022-11-18 12:25:23 +00:00
Lucas Silva
42051221a0 Merge "Add ability to AND and OR conditions together" into tm-qpr-dev am: 9038b06da0 am: 6e17b1195e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20489827

Change-Id: Ibb85d289200eec5134b3b1eb5503d2da7140a024
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 04:11:45 +00:00
Lucas Silva
9038b06da0 Merge "Add ability to AND and OR conditions together" into tm-qpr-dev 2022-11-18 03:26:08 +00:00
Hassan Ali
a26037f821 Merge "Remove ActivityThread from deviceconfig.java" 2022-11-17 16:54:14 +00:00
Evan Laird
33064f00dc Merge changes I8d766f4a,I3f5e212f,Ia78513a0 into tm-qpr-dev am: 7ae85de520 am: 429d952778
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20454553

Change-Id: I24f6c7969ea142da8b1d32f6cd34767e99758109
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 16:03:17 +00:00
Hassan Ali
4dc91d8e98 Remove ActivityThread from deviceconfig.java
As part of moving DeviceConfig.java to packages/modules/ConfigInfrastructure.
Need to move activity thread dependency to setting.config as the new
module will not have access to hidden apis (ActivityThread).

Test: m
Bug: 258220607
Change-Id: Ib7b20caaec128d64908349918ec7bce9a53cc2e6
2022-11-17 11:33:50 +00:00
Evan Laird
7292f2549b Replace StatusBarUserSwitcherController with UserInteractor
Originally, the user chip in the status bar was controlled by
StatusBarUserSwitcherController, which was backed by
UserInfoControllerImpl. This data source would sometimes show incorrect
data for the current user name.

Since UserRepository/UserInteractor exist now, this CL hooks up the
existing StatusBarUserSwitcherContainer view to a new class,
StatusBarUserChipViewModel, which is backed by the new repository class.

This allows us to fix 2 bugs at once:

1. The chip now only shows when there are > 1 users AND the config is
   true
2. Hooking the chip up to the same data source that populates the user
   switcher screen means that the names will always be consistent

Also removed the now-unused StatusBarUserSwitcherController, and its
associated feature controller and tracker classes.

Test: atest StatusBarUserChipViewModelTest
Test: atest UserInteractorRefactoredTest
Test: atest KeyguardStatusBarViewControllerTest
Test: atest PhoneStatusBarViewControllerTest

Bug: 254246505
Bug: 254680435
Change-Id: I3f5e212fed485b5697dedbe0510ab6c34d3b2ade
2022-11-16 16:06:36 -05:00
Matt Pietal
7dee55afa3 Transitions - Add doze transition information
Add a new DozeMachine.Part in order to emit granular doze state to the
KeyguardRepository. Use that new information to make better decisions
about when to transition state to/from dreaming.

Upcoming: Support for pulsing and dozing (non-AOD) states

Bug: 195430376
Test: atest KeyguardRepositoryImplTest
Change-Id: If759ba0d286eca907af615b9e2e56cadef224f4d
2022-11-16 18:02:57 +00:00
Evan Laird
27ff98f799 Move showUserSwitcher to UserInteractor
This method will be needed by the status bar user chip, and has the
equivalent behavior that was defined in `FooterActionsInteractor`. This
CL moves the implementation + tests up from `FooterActionsInteractor` to
a new dependency on `UserInteractor`

Test: atest UserInteractorTest
Bug: 254246505
Change-Id: Ia78513a0f86a5ade8727855f677919abac82b3b1
2022-11-16 12:27:54 -05:00
Lucas Silva
fb2123974d Add ability to AND and OR conditions together
In the dock setup flow, we have complex triggering which could be made
simpler with the ability to OR conditions together. To cover the case
where the value is undefined, this change introduces 3-valued AND/OR
operators which can be used to construct new conditions from an existing
condition.

To keep the syntax readable, we add or() and and() methods to
conditions, so the caller can simply say condition1.or(condition2)

Bug: 255372044
Test: atest com.android.systemui.util.condition.ConditionTest
Test: atest com.android.systemui.util.condition.ConditionMonitorTest
Change-Id: Iac583492669cbb573c84807c9c0e78c35dfc02a0
2022-11-16 10:18:22 -05:00
Ale Nijamkin
e6bdfa5528 Merge "Cleans up old user switcher impl. and flags." into tm-qpr-dev am: c588abbb72 am: 8dc22f5335
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20454890

Change-Id: I51a6249d8a821e237d65b41b58c47fbcdc042bba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 16:09:30 +00:00
Alejandro Nijamkin
bbc6083009 Cleans up old user switcher impl. and flags.
Fix: 246631653,254513286,254513102
Test: tests updated, all pass
Test: manually verified full screen and popup dialog user switchers both
still work

Change-Id: I74b09ae8d64073b7b6b9019195e9bc0fcbb2ae40
2022-11-13 09:01:34 -08:00
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