Commit Graph

11088 Commits

Author SHA1 Message Date
Darrell Shi
cc89d0bcbc Merge "Monitor add callback uniqueness." 2022-02-12 07:01:03 +00:00
Shawn Lin
a0b98ebfd9 Merge "Support hwc screen decoration layer" 2022-02-12 06:33:53 +00:00
TreeHugger Robot
5aee8c5d8f Merge "Remove QQS brightness controller" 2022-02-12 05:53:39 +00:00
TreeHugger Robot
ab4e525562 Merge "User switcher - Fix broken user addition" 2022-02-12 04:06:50 +00:00
Lyn Han
82212e908e Merge "Wrap short shelf width to icon count when less than lockscreen max" 2022-02-11 20:31:27 +00:00
Matt Pietal
f64485029f User switcher - Fix broken user addition
Adding users from accounts other than the non-system user was not
functional. Simply use the context to launch the CreateUserActivity in
a new task stack.

Also, address test failures where Dependency.get() was being used by
other tests with the wrong context, creating failures in the user
switcher tests. Remove this call from SystemUIDialog and update it
everywhere.

Fixes: 218989709
Fixes: 218824658
Test: atest KeyguardUserSwitcherAdapterTest UserDetailViewAdapterTest KeyguardSecurityContainerTest UserSwitcherControllerTest InternetDialogTest SystemUIDialogTest
Change-Id: Iaceb3dd2add7d2372f9ec646610c8e147c516e63
2022-02-11 14:40:23 -05:00
Fabian Kozynski
119975a765 Remove QQS brightness controller
This was not being used and it was leaking ContentObservers

Test: heapdump, switching between splitshade and not splitshade many
times
Test: atest com.android.systemui.qs
Fixes: 218888308

Change-Id: I63501bf573e006f52379192b7b766283fea40dda
2022-02-11 13:22:50 -05:00
TreeHugger Robot
444b42ef59 Merge "Remove QSDetail" 2022-02-11 14:28:00 +00:00
TreeHugger Robot
737a567c4b Merge "DozeScreenState unregisters for AuthControllerCB" 2022-02-11 11:14:44 +00:00
shawnlin
eb33c9cb51 Support hwc screen decoration layer
When the hwc supports screen decoration layer, we should:
  - create a fullscreen window and put the rounded corners and cutout in
    it.
  - set ViewRootImpl.setDisplayDecoration(true) for this window.
  - set COLOR_MODE_A8 for this window.
  - privacy dot should be put in windows with RGB color mode and only
    the window that the dot shows in will be shown. So there will be at
    most 2 windows(the fullscreen hwc window and the normal window that
    the visible dot is in) shown at the same time.

When the hwc not supports screen decoration layer, fallback to the
orignal 2 windows design.

Added a new class DisplayCutoutBaseView and move the common actions of a
cutout view from DisplayCutoutView to it:
  - Draw cutouts.
  - Handle camera protection.
  - Intercepts touches on cutout areas.

Handle the case when the support of hwc screen decorations is changed
due to display change.

Bug: 209498721
Test: atest ScreenDecorationsTest DisplayCutoutBaseViewTest
Change-Id: I286d5d368132381ad56798b794cd18f4ea5d03c5
2022-02-11 16:53:12 +08:00
TreeHugger Robot
095970a76a Merge "Clean up after test" 2022-02-11 07:18:36 +00:00
Shaowei Shen
15e0776fdb Merge changes from topic "presubmit-am-ce228227dd884d36b260736a830a50cf" into sc-v2-dev-plus-aosp am: 72ab33e79d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16689464

Change-Id: I62f7e4633f9d2d7fe6bd047f9ce6299eb5a7adf1
2022-02-11 04:08:39 +00:00
Shaowei Shen
72ab33e79d Merge changes from topic "presubmit-am-ce228227dd884d36b260736a830a50cf" into sc-v2-dev-plus-aosp
* changes:
  [automerge] [Output Switcher] Refresh list when data set changed 2p: 72f590464f
  [Output Switcher] Refresh list when data set changed
2022-02-11 03:48:51 +00:00
Darrell Shi
59594bee0e Monitor add callback uniqueness.
Only allow the same instance of callback registered once in the
conditions monitor.

Test: atest ConditionMonitorTest#addCallback_withMultipleInstancesOfTheSameCallback_registerOnlyOne
Fix: 218921598
Change-Id: Ibbce271446e4039759e27bf889c4c672ac026c16
2022-02-11 01:50:23 +00:00
Bryce Lee
52855a06e9 Merge changes from topics "216574997", "218744120"
* changes:
  Add flag for simulated docking.
  Allow overriding conditions for Conditions Monitor.
2022-02-11 01:14:04 +00:00
Beth Thibodeau
4f2645ae1b Merge "Add SystemAPI to override default media output switcher" 2022-02-11 00:22:07 +00:00
TreeHugger Robot
0bf4f64503 Merge "Support multiple dark tint areas in status bar" 2022-02-10 22:44:04 +00:00
TreeHugger Robot
2f0563bbb3 Merge "Always show the DPM locked by admin message" 2022-02-10 22:09:31 +00:00
Caitlin Cassidy
dc5dff8698 Merge "[Media TTT] Add app icon and name to the receiver SystemApi." 2022-02-10 21:35:27 +00:00
Fabian Kozynski
c292eff31f Remove QSDetail
Also remove related classes, calls, and resources that were used by QSDetail
and are no longer needed.

Test: atest SystemUITests
Test: TileService cts tests
Test: adb shell cmd statusbar expand-settings
Fixes: 198796184

Change-Id: Ib5c54f197d03794aca35d0305e3e62c7daedb23a
2022-02-10 16:17:00 -05:00
Beverly
8d68f1d00f DozeScreenState unregisters for AuthControllerCB
Test: atest DozeScreenStateTest
Fixes: 218885442
Change-Id: Ib6cbdf14c2a1ec6aedfb0924ed30983779f7d624
2022-02-10 20:34:43 +00:00
TreeHugger Robot
090a001e4d Merge changes I59ef37d2,Ia933b9c0
* changes:
  [Media TTT] Use the app's package name to fetch the icon content description.
  [Media TTT] Use the app's package name to fetch its icon.
2022-02-10 20:22:58 +00:00
Caitlin Cassidy
c7224ea6fc Merge changes from topic "ccassidy-media-sass"
* changes:
  [Media SASS] Unregister the muteAwaitConnectionCallback when the Entry stops.
  [Media SASS] Choose the correct device icon based on the device attributes.
  [Media SASS] Display about-to-connect device names in the media player device chip.
2022-02-10 19:45:58 +00:00
Bryce Lee
58836c9106 Allow overriding conditions for Conditions Monitor.
This changelist introduces overriding conditions to Conditions Monitor, which the state of one condition to take precedence over others that are present. To support this feature, the following changes have been made to the Monitor:
- Conditions can now be added and removed to the Monitor post construction.
- Changes to the callbacks and conditions are now handled on the main executor.
- The value for a condition is consulted on every update. Callbacks no longer include the updated value.

Bug: 218744120
Test: atest ConditionMonitorTest
Change-Id: If895732ae9fad120eccabb78207f4555c6236fde
2022-02-10 11:14:42 -08:00
Fabian Kozynski
6d9d817214 Clean up after test
Test: atest SystemUITests
Fixes: 218884426
Change-Id: I1d0499036f05a2a3bd64cee3f51b110daada4d77
2022-02-10 14:07:12 -05:00
Beverly Tai
556e1ae1c6 Merge "Decrease threshold for a consecutive UDFPS attempt" 2022-02-10 18:56:53 +00:00
TreeHugger Robot
bc661bfc3e Merge "Remove unused keyguard code" 2022-02-10 18:27:12 +00:00
Lucas Silva
db48e2b6a5 Merge "Fix small bug in DreamOverlayService destroy." 2022-02-10 17:45:49 +00:00
Beverly
f76f12f34d Always show the DPM locked by admin message
If the DPM locked the device, we always want to show
the "Device locked by admin" message. Previously,
the message would only show if there were trust agents
enabled or a biometric enrolled.

Test: manually lock device with DPM w/o a biometric or trust
agents enabled. See message in bouncer.
Test: atest KeyguardViewMediatorTest
Fixes: 188439183

Change-Id: I0fcee0646da11d4bc63b8224eb4cda2bb6c495c9
2022-02-10 17:38:50 +00:00
Winson Chung
6c5ebb36d8 Support multiple dark tint areas in status bar
- With ag/16678942 the system will now compute multiple appearance
  regions for all windows under the status bar, so we need to handle
  scenarios where multiple apps can create multiple dark tint areas

Bug: 208717544
Test: atest SystemUITests:LightBarControllerTest
Test: Install MultiAppeareanceRegionTest apk from b/208717544 and
      verify that that the multiple dark areas work in multiwindow
Change-Id: I0d8696f6b2fb7793ccbdcbfe7e2520fceb24e5ec
2022-02-10 17:36:47 +00:00
Dave Mankoff
c0715a6c1e Merge "Remove low-hanging Dep#get from sb.phone." 2022-02-10 16:09:34 +00:00
Caitlin Cassidy
b56e31385e [Media SASS] Unregister the muteAwaitConnectionCallback when the Entry
stops.

Bug: 206614671
Test: atest MediaMuteAwaitConnectionManagerTest
Test: atest MediaDeviceManagerTest
Change-Id: I370edb601412af85683fb4d2ff514f35ef44bceb
2022-02-10 16:09:00 +00:00
TreeHugger Robot
962c81453b Merge "Fix tile request dialog dismiss" 2022-02-10 16:00:41 +00:00
Beth Thibodeau
ded4a734d1 Add SystemAPI to override default media output switcher
To support RCN use case, allow system apps with the
MEDIA_CONTENT_CONTROL permission to declare that their MediaStyle notification
is for remote playback, and pass in their own device name, icon, and intent to
use in place of the default output switcher that appears on the media controls

Bug: 204910409
Test: atest
Test: manual with test app
Change-Id: Icbfa288c48da9c2ab2fdfdd6b0bfe2b545afaac0
2022-02-10 11:00:00 -05:00
Dave Mankoff
c4e5598cfd Merge changes from topic "b205725937-core-startable"
* changes:
  Remove config_additionalSystemUIServiceComponents
  Remove config_systemUIServiceComponents from SystemUI.
2022-02-10 15:37:34 +00:00
Beverly
2a01616032 Remove unused keyguard code
Test: atest SystemUITests
Bug: 218838846
Change-Id: If87a25d6349739d8ca931b094521dc8efa8eab0a
2022-02-10 15:24:14 +00:00
Matt Pietal
fce6976257 Merge changes from topic "mpietal_supervised_user"
* changes:
  User switcher - Manage users
  Add supervised user support
2022-02-10 15:23:10 +00:00
Beverly
a0de7ad663 Decrease threshold for a consecutive UDFPS attempt
Test: manually fail UDFPS multiple times, see bouncer
Test: atest BiometricUnlockControllerTest
Fixes: 218824540
Change-Id: I0e160f48edbc71ecb2bf114d68c7b3b65ed76a7f
2022-02-10 15:22:06 +00:00
Lyn Han
a683ab79ee Wrap short shelf width to icon count when less than lockscreen max
Move width updates into #updateAppearance.

Use numViewsInShelf for smooth width transitions.

Bug: 213480466
Test: add notif, shelf expands
Test: swipe away notif, shelf shrinks
Test: tap hidden/visible part of shelf
  => only visible part of shelf launches full shade
Test: the above in LTR/RTL

Change-Id: Icf5bfa6f901267446bd2dd16b39a6290538541b6
2022-02-09 19:25:08 -06:00
Caitlin Cassidy
1400c7a35f [Media SASS] Choose the correct device icon based on the device
attributes.

Bug: 206614671
Test: verify `adb shell cmd statusbar media-mute-await 9
MuteAwaitDevice start` shows the headphone icon
Test: verify `adb shell cmd statusbar media-mute-await 2
MuteAwaitDevice start` shows the smartphone icon
Test: atest DeviceIconUtilTest, PhoneMediaDeviceTest
Test: atest MediaMuteAwaitConnectionManagerTest

Change-Id: I7122828bd65a730b94d20d553509886fd166dcb2
2022-02-09 22:09:05 +00:00
Caitlin Cassidy
bc8c679093 [Media SASS] Display about-to-connect device names in the media player
device chip.

Bug: 206614671
Test: atest MediaMuteAwaitConnectionManagerTest
Test: manual: `adb shell am broadcast -a
com.android.systemui.action.SET_FLAG --ei id 904 --ez value 1` to flip
the flag then `adb shell cmd statusbar media-mute-await MuteAwaitDevice
start` and verify that the media player updates to show
"MuteAwaitDevice" as the device with a headphone icon. Video uploaded to
bug showing this interaction.

Change-Id: I4b3dde002904026334f03068dc3574d4b3c5fede
2022-02-09 22:09:01 +00:00
Beverly
205af35b52 Update KeyguardIndicationControllerTest
Test: atest SystemUITests
Fixes: 218698841
Change-Id: I8d67ff84a1e7f1bb3b319ef335496db8b131f3a9
2022-02-09 19:40:08 +00:00
Matt Pietal
2f5d6ec11e Add supervised user support
Supports adding a supervised user when configured. Modify the
UserSwitcherController so that all supports dialogs will get the new
"Add user" option if available.

Fixes: 218310361
Test: atest UserSwitcherControllerTest KeyguardUserSwitcherAdapterTest UserDetailViewAdapterTest KeyguardSecurityContainerTest
Change-Id: Ib79dcde2c726cc9508aef667b43662152d047137
2022-02-09 14:18:49 -05:00
Lucas Silva
9fbebce282 Fix small bug in DreamOverlayService destroy.
Currently we are registering the callback for the second time instead of
removing the callback.

Test: atest DreamOverlayService
Change-Id: I56aa05b52f85ce60b15cb73e9be3a25501534656
2022-02-09 18:57:11 +00:00
Lucas Dupin
618566051d Merge "Do not repeat doze amount callbacks" 2022-02-09 17:55:28 +00:00
Caitlin Cassidy
27378ee368 [Media TTT] Add app icon and name to the receiver SystemApi.
We typically get the app icon and name using
`context.packageManager.getApplicationIcon(mediaRoute2Info.packageName)`.
However, this may not work on the receiver device if the receiver
doesn't have the app installed.

The API will allow the caller to provide the app icon and name directly
so that we can ensure the chip on the receiver device is displaying the
necessary app information.

Bug: 216318437
Bug: 217418566
Test: atest MediaTttChipControllerReceiverTest
Test: CTS tests updated in different CL in same topic
Change-Id: Ib5150355a08ae389b218500b235b4bd9c686f919
2022-02-09 17:35:54 +00:00
Beverly Tai
29cf9f6211 Merge "Update messages with IPCs on a bg thread" 2022-02-09 16:10:16 +00:00
Dave Mankoff
f727dbbd9e Remove config_systemUIServiceComponents from SystemUI.
Remove's config_systemUIServiceComponents from SystemUI's config.xml
and replaces it with a list of Dagger providers that can easily be
defined and customized in code.

This is a step to removing our reliance on reflection and hopefully
lets SystemUI clients better tailor their binary to their needs.

Various other small code tweaks are included to address startup-order
dependent issues that were discovered while writing this CL.

Some startup customization still occurs via XML - one form factor
in particular has an overlay that relies on this. It is my intent
to find a way to move off of that in the future.

Bug: 205725937
Test: manual
Change-Id: I4c207bc9487718eddc21f364e81ec760f286bf30
2022-02-09 09:38:18 -05:00
Dave Mankoff
9e7a15f0ac Remove low-hanging Dep#get from sb.phone.
Removes the easy to refactor Dependency#get calls from the
com.android.systemui.statusbar.phone package. 10 calls are removed
between this cl and the 2 cls in the same topic.

Bug: 218354102
Test: manual && atest SystemUITests
Change-Id: Id57ac5cdd14129913a1d4e32cfbc149c7f9581f7
2022-02-09 07:45:41 -05:00
TreeHugger Robot
495ee4557d Merge "Transition NotificationInterruptStateProviderImpl to use NotifHeadsUpLog LogBuffer" 2022-02-09 05:08:30 +00:00