Commit Graph

509 Commits

Author SHA1 Message Date
Jeff Sharkey
7b14b87647 Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I39f45e7d22d132d44c84017cd98e6d9e98533c7f
2021-03-22 15:34:05 -06:00
Matt Casey
b8090a0c40 Layout and style updates for LongScreenshotActivity
- Give save button accent color.
- Remove cancel button (may come back in another form later)
- Share button becomes and icon on the right.
- Edit button moves to the bottom, gets icon + text

Bug: 180967468
Test: Visual eval with light and dark themes
Change-Id: I19ccea06e7dbec47b26ffd0684ebb7e31bdfe8b4
2021-03-19 15:55:08 -04:00
Flavio Fiszman
560acb653b Remove People Tile flag and clean up
Change-Id: Ia4d3f72933bd624fbc414354f8cdca7003737687
Test: manual
Bug: 170396074
2021-03-19 09:27:41 +00:00
Flavio Fiszman
d5a379653b Prompt People tile on marking as priority
Change-Id: I4ee1566762d381b6288e3b19c89db904a5d86d8b
Test: manual
Bug: 182570341
2021-03-17 16:24:37 +00:00
TreeHugger Robot
01ab7bcd20 Merge "Controls in QS" into sc-dev 2021-03-11 15:04:27 +00:00
Anna Zappone
b98280defc Strings for Beta 1
Test: none
Bug: 163617224
Change-Id: I8d75a4c2bb4645ea51814db46101bf228e380106
2021-03-10 17:34:37 +00:00
Matt Pietal
7d969181e9 Controls in QS
Continue to support launching from both global actions as well as the
QS tile. Use an activity for QS tile launches, which supports
lockscreen visibility.

Bug: 172360102
Test: manual
Change-Id: I002aa32f9126745ee310e203ad45f9c28f39fa8d
2021-03-10 12:14:36 -05:00
Matt Casey
7fbe02a1dd Merge "Image state restoration for LongScreenshotActivity" into sc-dev 2021-03-01 19:26:42 +00:00
Matt Casey
2bb3ca0c85 Image state restoration for LongScreenshotActivity
- When long screenshot is acquired, save image to a temporary file.
- When restoring state, read in that bitmap.
- Moved bitmap export code from ScrollCaptureController to
  LongScreenshotActivity because it needs to be able to export any
  drawable regardless of source.
- Currently deleting the temporary file onDestroy.

Bug: 181087631
Test: Enable "don't keep activities" debug setting. Take long
screenshot, go to overview and return. Rotate UI. Verify that image
restores along with crop bounds and export still works properly.

Change-Id: I892ad78025c818c8c65d16f2844daa955cc0b005
2021-03-01 12:25:03 -05:00
Evan Severson
0f9d5aea50 Expose SensorPrivacy as SystemApi
Rename the apis to be more consistent.
Also expose to test api.
Have the aosp mark that it supports the toggle features by default.

Test: atest CtsSensorPrivacyTestCases
Bug: 162549680

Change-Id: Ib38c16adfc5cec931347e1a1891618983d78248b
2021-02-24 15:39:19 -08:00
Matt Casey
0606a73455 Move long screenshot UI to an Activity
Separate UI code from image acquisition.
Using a static variable to get scroll capture connection from the
Activity, can do something more elegant later.
Doesn't do full activity restoration yet.

Bug: 179906912
Test: Running through long screenshot flow, turning screen on/off,
returning to task.

Change-Id: If5715c7008bbf3a1c8918a202a733fb3f8e8f876
2021-02-18 12:14:37 -05:00
Flavio Fiszman
6f24a63ba1 Creates People ContentProvider
Change-Id: I00a901a8fb713b4ce1989bb76f054a47f60892f1
Test: PeopleProviderTest
Bug: 179988318
2021-02-16 16:55:57 +00:00
Galia Peycheva
fc49b64e0c Revert "Add permission for blur SystemApi"
Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: If8c915c716dacf3319974eaf118e10f323538c4b
Merged-In: If8c915c716dacf3319974eaf118e10f323538c4b
2021-02-02 23:08:39 +01:00
Philip P. Moltmann
85712bdfeb Merge "Fine tune what sensor use UI to show" 2021-01-21 00:26:50 +00:00
Philip P. Moltmann
6cc4906547 Fine tune what sensor use UI to show
Sometimes we want to show a dialog, sometimes a notification, sometimes
nothing.

- Also some minor UI tuning to match mocks.
- Also suppress dialog while dialog is visible and shortly after. This
  avoids a dialog directly after closing previous dialog.

Test: Triggered dialog. Needs exhaustive test of all
      cases though.
Bug: 162549680
Change-Id: I52ccd22858969823d8670a9e345d3da994ec1c19
2021-01-20 10:20:42 -08:00
Winson Chung
94891df66a Merge "Move the overflow ui to the bubble window" 2021-01-20 17:48:55 +00:00
Winson Chung
ebf6903682 Move the overflow ui to the bubble window
- An activity always runs on the main looper of the process
  and this simplifies threading since all bubble data will
  run on the shell thread
- The BubbleExpandedView will not initialize the task view
  when mIsOverflow is set.  We still snapshot the overflow
  view to keep the existing selection animation logic the
  same between overflow/task bubbles

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SytemUITests

Change-Id: If3632a3030c58c9ec334afcb06aac4c51e28938b
2021-01-19 14:39:39 -08:00
Galia Peycheva
18b5ed4db6 Add permission for blur SystemApi
Bug: 177336952
Bug: 177524486
Test: m
Change-Id: If5d8344a582f8170c20f638a27b426127563e274
2021-01-18 11:28:25 +01:00
Fabian Kozynski
4d2758609c Migrate to WifiPickerTracker
Migrates AccessPointControllerImpl to use WifiPickerTracker and
WifiEntry. Also migrates the detail in WifiTile.

Test: manual, using detail (needs code to trigger)
Test: atest AccessPointControllerImplTest
Test: atest SystemUITests

Fixes: 153813490
Change-Id: I8ac5c104ea75a74f174d47eac1822f4d148388a4
2021-01-12 10:38:29 -05:00
Flavio Fiszman
8415720b76 Enable PeopleSpaceActivity by default.
We were previously enabling the activity via flag,
but we're not using the flag anymore.

Change-Id: I02494a3ff9dfc591dbe49473283ce5a46ad226d6
Test: manual
Bug: 176094791
2021-01-06 17:17:45 +00:00
Flavio Fiszman
d48706535c Remove PeopleSpace icon, enable widget by default.
Change-Id: Ied1cc8aa2dc35d8f9ad7d4cbf48b08c120998f02
Test: manual
Bug: 170396074
2020-12-16 17:30:44 +00:00
Wale Ogunwale
062b17a171 Rename splitscreen package to legacysplitscreen
Split-screen implementations moving forward would be based on app-pairs
and main/side stage models. So, renaming existing package to avoid
confusion.

Bug: 175416931
Test: They pass!
Change-Id: I55ab1d27fb1c00ba7a58d685ea7eb2840efb9437
2020-12-14 12:13:11 -08:00
Bernardo Rufino
4216bb64d7 Add BROADCAST_CLOSE_SYSTEM_DIALOGS to System UI
Bug: 159105552
Test: Verify that the package has permission via adb shell dumpsys
      package

Change-Id: I9471323420735a7bd65b867af176136330d2e385
2020-12-14 14:07:52 +00:00
Anna Zappone
2ec38a18f7 Support single conversation in People Space widget
Via flag value, allow user to select one conversation or see all
conversations. Updates UX to make single conversation fit a 2x1 tile.

Test: PeopleSpaceWidgetManagerTest
Change-Id: I2fac077f4fab32a9a597437a3834dab27539ba75
Bug: 174850448
2020-12-08 10:58:23 +00:00
Ben Lin
819f82ba1d TV-PiP: Migrate Menu to SystemWindows.
Bug: 169574665
Test: Run PiP on TV

Change-Id: Ia6d0e6f7c88c4cc59e21700b70d74e09cf8fc519
2020-12-01 16:51:25 -08:00
Jacqueline Bronger
5333b04ee0 Merge "Adds a tv notification panel for aosp which is shown when keyevent NOTIFICATION is received" 2020-12-01 16:20:53 +00:00
Jacqueline Bronger
5c395a46a5 Adds a tv notification panel for aosp which is shown when keyevent NOTIFICATION is received
Bug: 174025821
Test: manual
Change-Id: Idd68d30fde5ddd00531a61d9c7754c827ee05083
2020-12-01 14:43:58 +00:00
Robin Lee
6335ad6565 Move keyguard enabled to Component Override
When using RROs, android:enabled="@bool/form_factor_flag" won't work any
more. So we need to use a component override flag per b/135048762.

Test: Flash an adt3 with RRO enabled. see that systemui is coming up.
Bug: 173138807
Change-Id: If9a99f850ebb34755b4146b786c189f9fb590c3d
2020-11-20 13:34:40 +01:00
Fabian Kozynski
c45d61cfdf Refactor ToggleSliderView
ToggleSliderView logic is refactored into a separate controller. A
factory that creates the controller inflates the correct view so the
behavior is transparent to consumers.

The new prototype for brightness slider is here.

Allows to switch between regular brightness slider and thick one:

`adb shell settings put secure sysui_thick_brightness X`

where X is one of:
0 - regular brightness slider
1 - thick brightness slider with mirror
2 - thick brightness slider without mirror

After changing restart device or sysui:
`adb shell am crash com.android.systemui`

Test: manual
Test: atest SystemUITest
Change-Id: Ica7b31d6880c3be831d3f99115945b330ba3d618
2020-11-10 16:41:00 -05:00
Tony Huang
eb01a25c87 Migrate Bubbles to wm-shell (5/n)
Move bubbles package and related resources to shell package,
also copied some used codes and resources.

Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
2020-11-04 11:01:56 +08:00
Louis Chang
5510ecdfa9 Deprecate MANAGE_ACTIVITY_STACKS permission
Adding MANAGE_ACTIVITY_TASKS permission as the replacement, but
still grant the deprecated MANAGE_ACTIVITY_STACKS permission for
app compatibility.

Bug: 157876448
Test: presubmit

Change-Id: I894ee66e058b1024a731d3be4b33b69626451f08
2020-10-28 09:20:00 +08:00
Flavio Fiszman
b1c5289c1c Launch conversation when widget card is clicked.
Change-Id: I08acb426154099aa280b6963a8c83d3b6a024f24
Test: Build, add widget, click on widget card.
Bug: 169783793
2020-10-26 10:12:49 +00:00
Flavio Fiszman
bf47d90aa0 Creates a widget for People Space.
Change-Id: Ic53532d7de1a7d410493e46b4398d03142f78e40
Test: Build, boot, add new widget, see it update.
Bug: 169783793
2020-10-21 14:41:54 +01:00
Flavio Fiszman
83d6f38f42 Enable People Space launch icon based on flag.
Change-Id: I96cdca776feafa738f96b8bffa61c780e68067da
Test: Boot device with both flag values and check if icon is present.
Bug: 169783793
2020-10-19 10:45:13 +00:00
Anna Zappone
a2a42892af Merge "Create & populate People Space activity" 2020-10-07 17:45:33 +00:00
Andras Kloczl
7f3c2dc240 Add user name photo dialog to user creation
- Remove unused method switchTo
- Move edit user controllers from settings module
- Create new activity for new user creation
- Add ActivityStarter for delegating activity starting
- Add UserCreator for user creation logic
- Add UserCreatingDialog to display while user is creating

Test: manual test && atest EditUserInfoControllerTest
Doc: http://shortn/_cJE9o6pBZR
Screenrecords: http://shortn/_VEN6rr5ta6
Bug: 147653252
Change-Id: I6a7f1dba499e95891c69569ab731f86e6fd1dc16
2020-10-06 20:43:41 +01:00
Anna Zappone
d5a3ab0e91 Create & populate People Space activity
Populates an activity with a tile per "priority" conversation. To start
the activity run:
$ adb shell am start -n
com.android.systemui/com.android.systemui.people.PeopleSpaceActivity

Test: build and run
Change-Id: Ie75382306c002c0dbabf807d61f08851a0995f8b
2020-10-06 16:46:55 +01:00
Bill Lin
2b3bd57805 Move Pip codes from SysUI to WMShell lib (9/N)
Bug: 161118569

Test: make SystemUI
Test: make ArcSystemUI
Test: make WMShellUnitTests
Test: lunch cf_x86_tv-userdebug & make
Test: atest CtsSystemUiTestCases:BasicPipTests
Test: atest CtsSystemUiTestCases:CustomPipActionsTests
Test: atest CtsSystemUiTestCases:FlickerPipTests
Test: atest CtsSystemUiTestCases:PipNotificationTests
Test: atest SystemUITests
Test: atest WMShellUnitTests
Test: manual test PIP demo AP
Test: manual test TV PIP function
Test: manual test disabled PIP
Test: adb shell input keyevent 171(KEYCODE_WINDOW)
Test: adb shell am start -n android.systemui.cts.tv.pip/.PipTestActivity
    -a android.systemui.cts.tv.pip.PipTestActivity.enter_pip
Test: adb root;adb shell am start \
    -n com.android.systemui/com.android.wm.shell.pip.tv.PipMenuActivity
Test: adb shell dumpsys activity service com.android.systemui
Change-Id: I0ec0e9b9bfc4795a10483acd225f14bde9c72407
2020-09-30 08:54:52 +08:00
timhypeng
f6ee792fd5 Add dismiss intent and method for MediaOutputDialog
-Add filter in Manifest
-Add dismiss method in MediaOutputDialogFactory

Bug: 155822415
Test: build pass
Change-Id: Ica5b5a22e0fa20ffec5ab9ea291f72c06e39c2fe
2020-09-22 07:35:40 +00:00
timhypeng
8549c420de Rename MediaOutDialogReceiver to MediaOutputDialogReceiver
-Typo

Bug: 155822415
Test: build pass
Change-Id: Ib275b97f5ff03dffb8aeb91b658dbb7c035b96f4
2020-09-18 01:13:05 +00:00
timhypeng
6d31848fb2 Add a receiver to launch Output Switcher dialog
-The receiver launches dialog with TYPE_APPLICATION_OVERLAY window
type
-Add receiver in manifest
-Add bindMediaOutDialogReceiver() for Dagger

Bug: 155822415
Test: build pass

Change-Id: Icb5a1f241e644307491030ed721939c18269ff86
2020-09-14 16:40:09 +08:00
Fabian Kozynski
06e5d762c3 Merge "Make dialog not exported" into rvc-qpr-dev am: 3223c578cb am: 816ffebb7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512644

Change-Id: If5304cf994d6f4db971922e6aed1dba6c985e758
2020-09-03 13:55:25 +00:00
Fabian Kozynski
3223c578cb Merge "Make dialog not exported" into rvc-qpr-dev 2020-09-03 13:20:03 +00:00
Fabian Kozynski
e92b7d792c Make dialog not exported
Apps must go through ControlsProviderService.requestAddControl

Test: test app
Fixes: 167566024
Change-Id: I50424cb0ff1c66eeacaa7a8af5beed9d5e973384
2020-09-02 12:46:00 -04:00
Jerry Chang
10ec5e479e Migrate splitscreen to WM shell lib (4/n)
Moves systemui.stackdivider package to wm.shell.splitscreen package.

Bug: 161116823
Test: atest SystemUITests
Test: atest SystemUIGoogleTests
Test: atest CarSystemUITests
Test: manual verified split screen behavior
Change-Id: Ib62450b78da454a7dc93a88272c87b8c12fcc1d8
2020-09-02 13:12:54 +08:00
Bill Lin
98adca4c73 Integrate PipUI PipManager to PipController (7/N)
For SystemUI

1) Integrate PipUI & PipManager to PipController
2) Rename interface BasePipManager to Pip and implement by PipController
3) Dagger provides PipController through WMShellModule/TvWMShellModule
4) Let dagger provides PipBoundsHandler to ensure correctly init in ArcSystemUI
5) dagger provides PipTaskOrganizer and let ArcSystemUI to customize
6) Move CommandQueue to WMShell for handling keyevent KEYCODE_WINDOW of Pip

Bug: 161118569
Bug: 166181820
Test: make SystemUI
Test: make ArcSystemUI
Test: lunch aosp_tv_arm-userdebug & make
Test: atest WindowManagerShellTests
Test: atest SystemUITests
Test: adb shell input keyevent 171(KEYCODE_WINDOW)
Test: manual test Pip demo AP

Change-Id: I4b923b9c5ef00da3666a2d36ff098906921e15ed
2020-08-31 14:16:30 +08:00
Ben Lin
abaefa0c67 Migrate from PipMenuActivity -> PipMenuView.
Bug: 161710689
Test: Build and run
Change-Id: I879502085daefd3dbfbe437410a29c3353c5cf1a
2020-08-24 15:42:56 -07:00
TreeHugger Robot
e5d6841e7c Merge "Introduce INPUT_CONSUMER permission for InputConsumer" 2020-08-19 08:04:00 +00:00
arthurhung
0d0ad1b60b Introduce INPUT_CONSUMER permission for InputConsumer
Add the permission protect to createInputConsumer/destoryInputConsumer
in WindowManagerService to prevent it is possible for an app to consume
all the touch events and deny them from even reaching System UI.

Also fix the wallpaper inputconsumer should only show when we found a
visible wallpaper window.

Also limit 'createInputConsumer' to the defined types.

Test: atest PermissionPolicyTest
Test: ceate/destory an inputconsumer and test input
Fix: 162324374
Change-Id: I7a4c2c4cba7ea670873ab2ac49b9880d9a65cd86
2020-08-18 09:14:26 +08:00
Fabian Kozynski
5d434a4a05 Merge "Add MODIFY_AUDIO_ROUTING permission to systemui" into rvc-qpr-dev am: d951edaa48 am: a7149e7a53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12378082

Change-Id: Id9c81ccd72c10fa12b3972f466c6684fcf13c9ec
2020-08-17 19:13:17 +00:00