Commit Graph

630 Commits

Author SHA1 Message Date
Kenneth Ford
1f7737e951 Merge "Adds RearDisplay education dialog to SysUI" into tm-qpr-dev am: 34b99a23d3 am: 7c406753e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20482626

Change-Id: I8a53ccb442379a6b6c5344e12a20d9e8f7e99467
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 16:47:43 +00:00
Kenneth Ford
6e1f4770aa Adds RearDisplay education dialog to SysUI
To accompany the rear display API's to allow
apps to move their content to the cover screen
on a foldable device, to use the powerful rear
cameras for selfies, there needs to be a consisten
educational dialog to let users know what is going
to happen. This will be shown for all apps that use
the rear display jetpack API's, to keep consistency
and remove any knowledge an app would have to know
about the device they are on.

Bug: 207686851
Test: Manual RearDisplay flow testing
Change-Id: Ib9e2b286c0d84e2411f19f7cf0b0397486e4d4b1
2022-11-24 01:26:50 +00:00
Alejandro Nijamkin
04777dbab2 Content provider for quick affordances.
This is the content provider that wallpaper picker will be using to
query for slots, affordances, and selections, and for setting or
unsetting selections.

Fix: 254857637
Test: Manually verified the API by
issuing adb shell content commands and seeing affordances appear and
disappear on the actual lock screen.

Change-Id: Ia47a8ee322028042bb3e118ddb82a92a27eae191
Merged-In: Ia47a8ee322028042bb3e118ddb82a92a27eae191
2022-11-14 18:10:22 +00:00
Alejandro Nijamkin
c6c5ae9594 Content provider for quick affordances.
This is the content provider that wallpaper picker will be using to
query for slots, affordances, and selections, and for setting or
unsetting selections.

The CL also includes a contract definition and "client" utility
functions that any customer can use to query and update the content
provider.

Fix: 254857637
Test: end-to-end unit tests included. Manually verified the API by
issuing adb shell content commands and seeing affordances appear and
disappear on the actual lock screen.

Change-Id: Ia47a8ee322028042bb3e118ddb82a92a27eae191
2022-11-11 00:15:55 +00:00
Ale Nijamkin
5d94227f66 Revert "Content provider for quick affordances."
Revert submission 20425400-cherrypick-clsqa-wppg-content-provider-w0hk7thrjq

Reason for revert: b/258619039
Reverted Changes:
I207e4acfa:Adds gradle dependencies for viewmodel.
I08eefc931:Content provider for quick affordances.

Change-Id: I493e44e5acdb463b72de861eb36c4acf71fd4da2
2022-11-10 15:46:53 +00:00
Alejandro Nijamkin
2836309851 Content provider for quick affordances.
This is the content provider that wallpaper picker will be using to
query for slots, affordances, and selections, and for setting or
unsetting selections.

The CL also includes a contract definition and "client" utility
functions that any customer can use to query and update the content
provider.

Fix: 254857637
Test: end-to-end unit tests included. Manually verified the API by
issuing adb shell content commands and seeing affordances appear and
disappear on the actual lock screen.

Change-Id: I08eefc931dcc7b5133c412f7b97715fedfe84f30
2022-11-09 21:37:31 +00:00
Bishoy Gendy
6234d7472a Add support for a generic action to show output switcher in the platform.
- We need to add this action in the platform so that WearOS can also handle it, not only SysUi.
- Add tests for MediaOutputDialogReceiver class.
- Add android:priority=1 to the MediaOutputDialogReceiver so that it's always the default handler for the action.

Bug: 246997969
Test: atest MediaOutputDialogReceiverTest
Change-Id: I25d60eef7d4170b5f0b748b9b61ebf043a7c189c
2022-11-08 11:25:39 +00:00
Eun-Jeong Shin
fc13cb1d68 Generate consent dialog when device log access is requested in SystemUI
This change is to implement device log access dialog from SystemUI rather than
 system server.

Bug: 238434889, 244173014
Test: GtsVerifier
Ignore-AOSP-First: migration of device log access dialog
Change-Id: I17058c008084f91099cd45a51ec8d8fbab1d78bb
2022-11-07 19:54:17 +00:00
Valentin Iftime
165ddc4bdf Add new TV bottom sheets for HTT mic mute
For near-field file-based audio transfer and
 explicit user audio interaction.

Bug: 253416313
Bug: 235618473
Test: m -j
Change-Id: I4379f395496f0c49936798f74222a767ed79385c
2022-11-02 19:59:12 +01:00
Marcello Galhardo
2d8652fb59 Open Notes from a KeyEvent dispatch
Dispatches any system `KeyEvent` from `PhoneWindowManager` to SystemUI, allowing SystemUI to handle the KeyEvent with custom behaviour. How the `KeyEvent` is handled will depend on the context:
- If user is in the lockscreen, it will launch a full screen experience.
- Otherwise, it will launch a floating task.

Once the context is decided, we will query for any Activity that can handle the new action `android.intent.action.NOTES` to execute the launch. If no `Activity` is available, nothing will happen.

To enable the feature, one must run the following ADB commands:
- adb shell setprop "persist.wm.debug.floating_tasks" 1 # enables floating windows
- adb shell setprop "persist.wm.debug.floating_tasks_as_bubbles" 1 # optional: enables bubble windows
- adb shell setprop ""persist.sysui.debug.note_tasks"" 1 # enables note tasking experience
- adb reboot # restart to load the new configs

Test: atest SystemUITests:WMShellTest
Test: atest SystemUITests:NoteTaskControllerTest
Test: atest SystemUITests:NoteTaskInitializerTest
Test: atest SystemUITests:NoteTaskIntentResolverTest

Fixes: 248274123

Change-Id: I36f30b3cbfe9e538729471d531b1b4b770738544
2022-10-25 15:26:07 +00:00
Matt Casey
1b5fc70898 Fix share/edit actions for work profile.
In order to be able to proxy the permissions to read/write the
screenshot when editing/sharing, the intents must be launched from a
service running *as* the work profile user (if the screenshot is work
profile). That is done with ScreenshotProxyService.

In order to untangle action execution to accomodate this, I created
ActionIntentExecutor, which does the following:
1. Dismisses the keyguard
2. Launches the intent (either directly if it's the main user, or
   delegating to the cross profile service if it's not)
3. Override some transition logic for shared element.

This flow is used whenever the work profile flag is set (it works for
either profile, but is required for work profile).

Once we switch to this model, we can drop a lot of the
SaveImageInBackgroundTask action code, drop ActionProxyReceiver entirely,
etc.

Extracted intent creation to its own class so it could be tested.

All behavior changes covered by currently-off flags.

Known issues:
1. This doesn't fix smart actions
2. If you do an action on the lock screen, the bouncer doesn't come up
   in the new implementation. I verified that the same call is being
   made and it's even getting to the bouncer's show() call but haven't
   figured out what's wrong here yet.

Bug: 231957192
Test: manual sharing and editing screenshtos of wp and non-wp apps.

Change-Id: Id2b423c22d209fc73f796ed6ba6e3d153e0f638e
2022-10-14 19:39:34 +00:00
Aurélien Pomini
369f1b973e Move ImageWallpaper.java into package 'com.android.systemui.wallpapers'
Test: Manual on mobile (try to download & attach a wallpaper, check that
nothing breaks)
Test: atest ImageWallpaperTest
Bug: 243402530

Change-Id: I5af1acf08bb1c43a5e119597a9cef2ea667723c3
2022-09-12 09:49:31 +00:00
Lili Zou
1ae9003cd8 Merge "Change SystemUI manifest to use permission ACCESS_AMBIENT_CONTEXT_EVENT" into tm-qpr-dev 2022-08-31 13:41:34 +00:00
TreeHugger Robot
8ad9016b31 Merge "Revert "[User Manager] Add NETWORK_STACK permission."" into tm-qpr-dev 2022-08-30 13:12:10 +00:00
Alan Huang
e03186af0e [VolumePanel] Move the Settings' volume panel into a SystemUIDialog
Move most of the logic of the Settings' volume panel to a SystemUIDialog
to make the dialogs consistent with other system dialog.

Bug: 202262476
Test: manual build and launch the new dialog.
Change-Id: Ic27dcca77072dee2b78827e1eb58c28022b47265
2022-08-29 18:59:51 +00:00
Lili Zou
c7eeaf2df0 Change SystemUI manifest to use permission ACCESS_AMBIENT_CONTEXT_EVENT
Test: local build with 'm'
BUG: 242800729
Change-Id: I9ee87d284b36742fa09fcaa08f233dc1ad414afe
2022-08-29 06:47:19 +00:00
Aaron Liu
fd44ccc230 Revert "[User Manager] Add NETWORK_STACK permission."
This reverts commit 633f19a08e.

Reason for revert: fails CTS test. Cannot add this for security reasons: b/243542908

Change-Id: I35f06ae38776eb58c1ec5e7e1252084e36a42617
2022-08-23 20:24:07 +00:00
Aaron Liu
99a34b5ed9 Merge "[User Manager] Add NETWORK_STACK permission." into tm-qpr-dev 2022-08-23 14:22:12 +00:00
Mark Renouf
ea7c33f75c Initial work profile screenshot policy handling
When a request is received, screen contents are inspected
to determine the most appropriate owner. If the primary
content belongs to a work profile app, the screenshot will
be isolated to the task content.

See: go/work-profile-screenshots for details.

This change also enables the foreground app package name to
be provided with uievent logging.

Additional functionality to follow.

To activate, enable the flag WORK_PROFILE_SCREENSHOT_POLICY

  adb shell cmd statusbar flag 1301 on

This also requires the flag SCREENSHOTS_REQUEST_PROCESSOR

  adb shell cmd statusbar flag 1300 on

Bug: 159422805
Bug: 231957192
Bug: 200294244
Test: atest RequestProcessorTest
      manual; enable flags,
      take screenshot of launcher
      take screenshot of work profile app
      observe logs and screenshot content
Change-Id: Idc74b04ddd449bfd9765ab9a456e9f9344c3aa2c
2022-08-22 18:39:48 +00:00
Aaron Liu
633f19a08e [User Manager] Add NETWORK_STACK permission.
Add this permission to enable the UserManager to read if the user is in
a call and determine user switchability.

Bug: 242957252
Test: Built on device and switched users.
Change-Id: I09bb8fea927d78d0d44d70c6e19e8868edd0d612
2022-08-19 10:42:16 -07:00
Nick Chameyev
2bcb37a7ab [Partial screen sharing] App selector initial version
Adds an activity that inherits ChooserActivity
to select an app in the partial screen sharing
flow under a feature flag.
It doesn't have a proper visual design, analytics,
enterprise policies handling.

Bug: 218314434
Test: start partial screen sharing
Change-Id: Ia7d9ae07e2ef35d33f85530f26cab4e6cdc1f94a
2022-07-04 16:14:09 +00:00
Alex Johnston
ec62dd046b Merge "Make WorkLockActivity theme translucent" into tm-dev am: 916e42bd21 am: df9326f6d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18929026

Change-Id: Ie60c28fef2e9c96dbba7b93b7bed58a26afd6f43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 19:50:56 +00:00
Alex Johnston
b6db15ac2f Make WorkLockActivity theme translucent
* Instead, set the background in the auth_biometric_background view
* This fixes a bug where there is an infinite loop to start the confirm device credential intent

Bug: 234536059
Test: Manual testing with TestDPC

Manual testing steps
* Setup device with TestDPC
* Set a work lock
* Open TestDPC in the work profile
* Select "lock now"
* Verify there is no infinite loop

Change-Id: I866e3d48a66e562050ad89ebc7f2ae0ac0455737
2022-06-16 12:24:53 +01:00
Bryce Lee
90844a62e1 Merge "Remove configuration for enabling dream overlay service." into tm-qpr-dev 2022-06-08 21:09:47 +00:00
Matt Casey
408ac032b8 Accessibility fixes for clipboard overlay
Add/fix content descriptions for content preview, share button and remote copy.
Add labels for the overlay window and the edit activity.
Reset timeout on hover so that a11y exploration keeps the UI up.

Bug: 232485623
Bug: 232494683
Bug: 232487324

Test: Manual evaluation with talkback enabled.
Change-Id: I995083a8b00f68d85d0a1c3f699a7f27a3c40aad
2022-06-03 20:53:05 +00:00
Bryce Lee
6eba38702f Remove configuration for enabling dream overlay service.
This configuration is no longer needed with component overrides.

Test: manual
Bug: 204626521
Change-Id: I4843ba3644fc8bad97a44044c3a12fc3989cbc9b
2022-05-24 21:27:06 +00:00
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