Commit Graph

604 Commits

Author SHA1 Message Date
Alex Johnston
b3aa96f89f Add background protection when work biometrics is shown
* Remove existing coloured background.
* Add a background with a layout that includes a
  badged icon of the app being opened.

Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
  the biometric prompt

Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado

Bug: 206761107
Test: Manual testing
    WorkLockActivityControllerTest
    TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
2022-05-16 14:20:56 +01:00
Galia Peycheva
557fc354c1 Set TvBottomSheetActivity as unrestricted keep-clear area
This makes the Tv Pip move away from the dialog in order to not cover
its content

Bug: 227596282
Test: manual: start activity in Pip; start Duo and send:
      adb shell cmd sensor_privacy enable 0 microphone && \
      adb shell appops start com.google.android.apps.tachyon 27
Change-Id: Ifb0a11cc6c09b2b088d8a28c6016b831f5c57ac9
2022-05-05 18:11:09 +02:00
changbetty
628c28a3d8 [LE] Add intent action for MediaOutputBroadcastDialog
- Add MediaOutputConstants.ACTION_LAUNCH_MEDIA_OUTPUT_BROADCAST_DIALOG

 - Add MediaOutputBroadcastDialogFactory for creating the
   MediaOutputBroadcastDialog

Bug: 229577323
Test: Manual test
Change-Id: Ic8fc3d2a07e3752b03e08c08dd8f0bcf2df429a2
2022-04-27 08:14:35 +00:00
Evan Severson
6ec1172f3e Merge "Start SystemUI SensorUse activity as user 0" into tm-dev 2022-04-14 00:07:39 +00:00
Evan Severson
e679e73606 Start SystemUI SensorUse activity as user 0
SystemUI runs as user 0, we shouldn't be spawning new instances in other
users.

Bug: 227350805
Test: Manual
Change-Id: Ifd7c810ddbdb0c623a4f09d858ced1b7c814482b
2022-04-12 15:23:22 -07:00
Julia Reynolds
20a47d5ed0 Allow registered call notifications to always appear
Even if the app's notifications are disabled.

Test: NotificationManagerServiceTest
Test: NotificationInfoTest
Test: manually call device
Fixes: 227456870
Change-Id: Ib218e57d585a6066ddbc713d2d3a8445ac959ad2
2022-04-11 18:01:48 -04:00
Ganesh Olekar
3795120659 Merge "Add broadcast receiver to listen for safety center flag changes" into tm-dev 2022-03-28 18:32:53 +00:00
Ganesh Olekar
ff11a6e291 Add broadcast receiver to listen for safety center flag changes
Change-Id: I0a22edd85d10bdd1ccb6f26a48615e88a30e7cb3
Bug: 225294614
Test: atest com.android.systemui.qs.HeaderPrivacyIconsControllerTest -c
2022-03-25 17:36:10 +00:00
Matt Casey
64511afd04 Merge "Give LongScreenshotActivity a "Capture more" label" into tm-dev 2022-03-23 15:10:00 +00:00
Matt Casey
944a5c605a Give LongScreenshotActivity a "Capture more" label
It's read out by accessibility. Otherwise it just says "system UI".

Test: Enable talkback, listen when activity is invoked.
Bug: 208713927
Change-Id: I0d1714fc6492221cd803affaea1de7833f560749
2022-03-22 20:36:30 +00:00
Beth Thibodeau
a14e2883b5 Revert^2 "Use compat framework to gate session actions"
This adds ag/17208491 (check compat change with UserHandle) to the
original change

da972b8c71

Bug: 220034304
Test: manual
Test: make tradefed-all javac-check -j64 RUN_ERROR_PRONE=true
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.media.QSMediaPlayerContent

Change-Id: Ibaec0c9a0443fd3b0f2c5fae7c74b2110371b425
2022-03-16 13:56:51 -04:00
Miguel Aranda
da972b8c71 Revert "Use compat framework to gate session actions"
Revert "Update media flag descriptions"

Revert submission 17161599-b220034304-media-compat

Reason for revert: This seems to cause the break in b/224895002
BUG: 224895002
Reverted Changes:
Ifeecb4e13:Update media flag descriptions
Ie032fe9ec:Use compat framework to gate session actions

Change-Id: I8b309a69282f41b4a45bd82bd3dcc9f85751da7e
2022-03-16 11:34:51 +00:00
Beth Thibodeau
85dddfc3c6 Use compat framework to gate session actions
Adds CompatChange to check if an app posting media controls targets T,
and if so, that app's controls will use PlaybackState actions.
Otherwise, the notification actions will be used.

The MEDIA_SESSION_ACTIONS flag is set to false by default, and can be
used to override this and use session actions for all apps.

Fixes: 220034304
Test: atest com.android.systemui.media
Test: manual - verify in developer settings, override behavior works

Change-Id: Ie032fe9ec8ce7d46b1f9dc8f590ed6fbfa7ee9aa
2022-03-14 19:46:19 -04:00
Aaron Liu
c1903b0b1e Home Controls: Add max columns for edit activity.
Moved the findMaxColumns function from ControlsUiControllerImpl to
ControlAdapter to be used as a shared functin. It is used across 3
files.

I removed orientation from configChanges in the manifest so that the
recyclerview can recalculate max columns again after rotation.

I moved the spanCount calculation one level higher so that we can set
the spancount for ZONE type view holders to be the max number of
columns. This makes it so that the view holder will take up the whole
row.

Fixes: 222729341
Test: manual test on device
Change-Id: Id0819e417c8d5995474abb0a8060ee9e694fe4a7
2022-03-07 21:50:12 +00:00
Caitlin Cassidy
a3bcac58cf [Status Bar] Re-name StatusBar.java -> CentralSurfaces.java.
Also add some javadoc to CentralSurfaces.java to make its purpose
slightly clearer.

Bug: 197137564
Test: compiles
Test: atest SystemUITests
Change-Id: Id06e7ba7641d6d2bc276cce57101c9c7236bc758
Merged-In: Id06e7ba7641d6d2bc276cce57101c9c7236bc758
2022-02-28 03:20:04 +00:00
Nadav Bar
8fbe5b0fdb Merge "Integrate captions volume button with new CaptioningManager API" into tm-dev 2022-02-24 06:33:21 +00:00
Matt Casey
c749c370d4 Remove SysUI Chooser
It's unused and stale. Starting to acquire a bit of a smell.

Bug: N/A
Test: Builds
Change-Id: Ia194833351cdf29bac6461393601af459f3f0436
2022-02-23 19:18:34 +00:00
Nadav Bar
904975fd69 Integrate captions volume button with new CaptioningManager API
The code that checks for the captions service component will be removed
once the integration in the system captions side will happen.

Also cleans up the unused stream opt-out property.

Change-Id: I606f0d7a5319bbdc54b2e853fb70ea44ff9645a0
Bug: 221021539.
Bug: 136282740.
Test: Manually.
2022-02-23 18:04:18 +00:00
Caitlin Cassidy
ba6b756d0e [Nearby Media Devices] Add a SystemApi to get information about nearby
media devices from external clients.

Bug: 216313420
Test: CTS included in same topic
Test: atest NearbyMediaDevicesManagerTest
Change-Id: Ic5f26d3048a3475dbd232c913bb00bee46339b0a
2022-02-11 20:59:43 +00:00
Matt Pietal
d04be1df3c Fullscreen user switcher
Supports fullscreen user switcher launched from QS, and enabled by
config_enableFullscreenUserSwitcher. Allows adding guests, with
support for adding new users coming shortly. First round of work on
this feature.

Bug: 217365397
Test: atest UserSwitcherControllerTest
Change-Id: Ib81f44c9b950830a7d89b95cbaef53b7228ed5a4
2022-02-08 15:14:07 -05:00
Antonio Kantek
efccd1dfe9 Merge "(TouchMode Permission 2/n) Introduce permission for touch mode" 2022-02-04 22:42:56 +00:00
Antonio Kantek
d299b88323 (TouchMode Permission 2/n) Introduce permission for touch mode
This CL adds caller pid and uid for permission checks in the native
layer when switching touch mode state.

Bug: 198487159
Test: atest FrameworksCoreTests
Test: atest CtsInputMethodTestCases
Test: atest CtsInputTestCases
Test: atest CtsSecurityTestCases
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I64480c0284481b288ad0950c2e95726b9adb529f
2022-02-02 15:10:34 -08:00
Caitlin Cassidy
44386a5a2e [Media TTT] Add @SystemApis for all the media transfer callbacks.
This migrates the media transfer from just a service to a full-fledged
@SystemApi. Some of the testing infrastructure has not yet been migrated
to keep this CL slightly smaller.

Bug: 216318437
Test: systemui media.taptotransfer tests *still need to be updated*
Change-Id: Idf1f72de1343020668e158d74051c1dfb970cfcd
2022-02-02 16:14:33 +00:00
Caitlin Cassidy
8333b4f42f Merge "[Output Switcher] Implement nearby device callbacks." 2022-02-02 14:37:20 +00:00
Matt Casey
07a3663d96 Add clipboard toast suppression permission.
Grant that permission to SystemUI so that the clipboard overlay doesn't
generate a toast.

Test: Manual verification that toast is suppressed only after sysui
      requests the permission.
Test: atest ClipboardManagerTest
Bug: 216143343

Change-Id: Ia527a5d878f026b7939042b4b675037482846fbb
2022-02-01 15:07:18 -05:00
Stephanie Bak
c0d5a43288 Merge "Add QUERY_ADMIN_POLICY to SystemUI manifest" 2022-02-01 18:26:09 +00:00
Michal Olech
6c966b35ea Merge "Add system prompt for system language change after <Set Menu Language> CEC message" 2022-02-01 17:21:51 +00:00
Caitlin Cassidy
3594077b18 [Output Switcher] Implement nearby device callbacks.
Bug: 216313420
Test: atest NearbyMediaDevicesServiceTest
Change-Id: I7014df50afef1e845a6c8a62e6b3ef29cc7197a8
2022-02-01 16:58:17 +00:00
Michal Olech
6f1aecf1bf Add system prompt for system language change after <Set Menu Language> CEC message
Requires ro.hdmi.set_menu_language=true

Test: build; flash; manual test
Bug: 190810909
Change-Id: Ic0664e077e975bba0929dd871c3a4c9ab385814c
2022-02-01 12:39:53 +01:00
Stephanie Bak
7aad1791b5 Add QUERY_ADMIN_POLICY to SystemUI manifest
Bug: 217268655
Test: presubmit
Change-Id: I2ca4a0683a849e60517a8710d647336a750b2ad5
2022-01-31 23:39:38 +00:00
Miranda Kephart
6e294efacf Don't show clipboard actions for the source app
If the user copies a link from (say) chrome, we don't want to
show an action to open the link back in chrome. This change
suppresses actions where the target package is the same as the
source package.

Bug: 216658864
Test: manual
Change-Id: I4f2ee7ac30b2e54c702e3c9149f77eb5dd5d6243
2022-01-31 10:59:27 -05:00
Vania Desmonda
490527a9ce Merge "Grant SysUI SET_WALLPAPER_DIM_AMOUNT permission to set the lock screen dimming." 2022-01-20 08:55:45 +00:00
Lucas Silva
b292ef1910 Clean up CommunalManagerService
This system service is no longer needed, as there is no longer a shared
lockscreen.

Test: locally on device
Bug: 206054365
Ignore-AOSP-First: cleanup
Change-Id: Ib2db06c377cf632da77dc41c629debfe658bfc48
2022-01-18 17:04:02 +00:00
Vania Desmonda
044774b829 Grant SysUI SET_WALLPAPER_DIM_AMOUNT permission to set the lock screen
dimming.

Test: manual
Bug: 202841384
Change-Id: I8c514a7939fcf37d7bb9167ffabffb7169d12dac
2022-01-17 11:48:02 +00:00
TreeHugger Robot
71abd1233b Merge "[Media TTT] Add the aidl interface for the sender and a service that implements it." 2022-01-13 21:37:03 +00:00
Caitlin Cassidy
38aa601aa2 [Media TTT] Add the aidl interface for the sender and a service that
implements it.

More callbacks will be added in future CLs.

Bug: 203800643
Bug: 203800347
Test: manual (verify `adb shell cmd statusbar media-ttt-chip-add-sender
Tablet MoveCloserToTransfer` still triggers chip)
Test: media.taptotransfer tests

Change-Id: Ic44b770e8c98f7c9a06a0846fd166e4c8d51ea7d
2022-01-13 15:49:59 +00:00
Miranda Kephart
f2df8963ed Add clipboard overlay prototype
Adds a floating window/overlay (similar to screenshots) when
something is copied to the clipboard. Opens Markup or a lightweight
test editing activity (as appropriate) when edit is tapped.

Bug: 195554988
Test: manual (tested copying text/images, and interactions with
screenshots)

Change-Id: I02aff237a1245ed2fed130d5e43112472d320a9c
2022-01-12 11:19:54 -05:00
Treehugger Robot
20a60b02d7 Merge "Add QUERY_AUDIO_STATE permission" am: 6a5c5e23cc am: 4909c80b29 am: 2bc3c1daff am: 637ebd35aa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1933146

Change-Id: Ib99370c97425a2e38c1eb4ca94b0fb3e9afbc944
2022-01-04 19:06:29 +00:00
Treehugger Robot
637ebd35aa Merge "Add QUERY_AUDIO_STATE permission" am: 6a5c5e23cc am: 4909c80b29 am: 2bc3c1daff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1933146

Change-Id: I52b508e1ea906875f2933c3cc0bcfeede3b1e603
2022-01-04 18:52:31 +00:00
Treehugger Robot
2bc3c1daff Merge "Add QUERY_AUDIO_STATE permission" am: 6a5c5e23cc am: 4909c80b29
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1933146

Change-Id: I60a17fb458f925a9a782939dfd79133d776570a8
2022-01-04 18:38:13 +00:00
William Escande
d0ad455409 Add QUERY_AUDIO_STATE permission
Due to aosp/1863058, we need to add the associated permission

Bug: 190422401
Tag: #refactor
Test: None in this CL.
Change-Id: Id1809b85aca57929cba0197ba9d35f926dfeaf1b
2022-01-03 22:49:46 +01:00
Siarhei Vishniakou
b6071938fe Add ALLOW_SLIPPERY_TOUCHES permission
This permission allows the app to use FLAG_SLIPPERY. This means, windows
of the app that has this permission can let touches slip out when the
finger moves out of the window bounds.

Bug: 157929241
Bug: 206188649
Test: atest FlagSlipperyTest
Change-Id: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
Merged-In: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
2021-12-17 08:52:50 +00:00
Siarhei Vishniakou
d732692ba7 Add ALLOW_SLIPPERY_TOUCHES permission
This permission allows the app to use FLAG_SLIPPERY. This means, windows
of the app that has this permission can let touches slip out when the
finger moves out of the window bounds.

Bug: 157929241
Bug: 206188649
Test: atest FlagSlipperyTest
Change-Id: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
Merged-In: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
2021-12-15 21:51:22 +00:00
Julia Reynolds
b77d15fc92 Remove REVOKE runtime perms from systemui
Instead, limit them to only being able to revoke
the notification permission specifically

Fixes: 208562972
Test: DefaultPermissionGrantPolicyTest, enable flag and turn off notifs
for an app

Change-Id: Ie2769a49499eac404e015a703cd725858e23e79f
2021-12-13 03:27:19 +00:00
TreeHugger Robot
3f639bbc97 Merge "SystemUI: post notifications permission" 2021-12-08 22:59:34 +00:00
TreeHugger Robot
87e0403e43 Merge "Add ALLOW_SLIPPERY_TOUCHES permission" 2021-12-08 18:46:43 +00:00
Siarhei Vishniakou
ef804614e2 Add ALLOW_SLIPPERY_TOUCHES permission
This permission allows the app to use FLAG_SLIPPERY. This means, windows
of the app that has this permission can let touches slip out when the
finger moves out of the window bounds.

Bug: 157929241
Bug: 206188649
Test: atest FlagSlipperyTest
Change-Id: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
2021-12-07 11:04:21 -08:00
Julia Reynolds
4c5da4bebe SystemUI: post notifications permission
so the package can send notifications on T+

Bug: 194833441
Change-Id: I1e7b9a92010523ff12ad1aa48002a907da105df2
2021-12-07 11:35:34 -05:00
John Wu
04c77943cf Merge "Update SlicePermissionActivity component in manifest" 2021-12-06 23:35:17 +00:00
Aaron Tsai
7b2bced874 Revert "Remove unused resources"
Revert "Remove unused resources"

Revert submission 16213656-cherrypick-sysui_unused_resources_master-vi8fzf6lsj

Reason for revert: Fix broken test
Reverted Changes:
I7f76ca424:Remove unused resources
I96e2f7c7c:Remove unused resources

Bug: 209359845
Change-Id: Ifae925ef5525849ffb0bf9c651ec0ab9b91d070b
2021-12-06 07:03:31 +00:00