Commit Graph

558 Commits

Author SHA1 Message Date
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
Peter Kalauskas
91ebd74d39 Support single-user ImageWallpaper service
Bug: 206118673
Test: Manually check image wallpaper works for multi-user
Change-Id: Ic56fe799b2c6891f52db7a79348fdac4e0ef208b
2021-12-03 18:12:33 -08:00
John Wu
c43c6f53e1 Update SlicePermissionActivity component in manifest
After ag/15315839, all explicit intents has to match the component's
intent filter declared in the manifest xml if the target package is
targeting T+. An incomplete intent filter has been set for
SlicePermissionActivity, which causes all slice permission request
intents fail to resolve and deliver to SystemUI.

Because SliceProvider.SLICE_TYPE is not a valid MIME type that can be
used for intent filters, the least complicated solution is to remove the
intent filter altogether and check the intent in the activity code.

Bug: 207782463
Test: atest SlicePermissionsTest#testPermissionIntent
Change-Id: I47b1e5d860976bbcd446ae3d21fab0e988279c5e
2021-12-02 15:33:46 -08:00
Bryce Lee
c4e3502346 Remove BIND_DREAM_SERVICE permission from SystemUI.
This permission was added for the initial dream overlay
approach, but is not needed for the submitted implementation.

Test: atest CtsPermissionTestCases:android.permission.cts.ServicePermissionTest#testServicePermissions
Bug: 205419141
Change-Id: I347c7cb08d7c507a0896b680d637bf9f53e7a56a
2021-11-11 14:44:31 -08:00
Jordan Demeulenaere
3258c75a95 Merge changes from topic "record-dialog-animation" into sc-v2-dev am: 041b74abfa am: 1d1e7a6359
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16212772

Change-Id: I315b062ad9a28fda8ad2a375ce181e69c29118ca
2021-11-09 16:17:01 +00:00
Jordan Demeulenaere
4233b5b63d Animate the screen recording dialog (1/2)
This CL animates the screen recording dialog when opened from its QS
tile.

See b/202257558#comment3 and #comment4 for before/after videos.

Bug: 202257558
Test: Manual
Test: atest ScreenRecordTileTest
Test: atest RecordingControllerTest
Change-Id: I49cff0381c85ef870fea03b62bfe8d9c5fb0a110
2021-11-09 13:43:57 +01:00
Bryce Lee
54b8f33ec7 Add Support for App Widgets as Overlays.
This changelist adds support for loading App Widgets
from a ComponentName. This functionality is wrapped in
an OverlayProvider for integration with
DreamOverlayService.

Bug: 201675932
Test: atest AppWidgetOverlayProviderTest
Change-Id: Iddc6297ee0a9eb6c945a70368ba1f1b7ef0b1a0b
2021-11-04 20:47:24 -07:00
Bryce Lee
92fdf1d25b SystemUI IDreamOverlay Implementation.
This changelist implements IDreamOverlay in the form of
the DreamOverlayService. DreamOverlayRegistrant is
responsible for registering this service with the system
as the dream overlay component. This changelist also
introduces a series of interfaces, such as OverlayProvider,
which define the entities DreamOverlayService interacts
with the generate overlay content.

Bug: 201676597
Test: atest DreamOverlayServiceTest
Change-Id: Idb14172672642580fdfa042449b6cad4bf68969b
2021-11-04 20:47:23 -07:00
Lucas Dupin
2ed8b57bea Remove unused resources
After deleting these files - mostly automated by Android Studio -
our final apk size went from 43MB to 37MB.

Test: make
Test: manual
Test: presubmit/integration tests
Fixes: 204361342
Change-Id: I7f76ca4249431fb226972ed48cc1a4a10328a556
2021-10-29 13:22:24 -07:00
Julia Reynolds
cfebf84c8d Remove GRANT_RUNTIME_PERMISSION
SystemUI only needs to turn notifications off, so GET_ and REVOKE_ are sufficient
Test: DefaultPermissionGrantPolicyTest
Fixes: 204103103

Change-Id: Iab09832551fb50d45ebe5831fab1d926ded6a486
2021-10-28 21:18:30 +00:00
Julia Reynolds
85a82f4532 Add permission permissions to SystemUI
So it can read/write the new notification permission

Test: make, check granted permissions in bugreport
Bug: 194833441
Change-Id: I77683c2bdc5e7efc353ae2ebabaff6a8aa398e60
2021-10-20 09:37:01 -04:00
Lucas Silva
2bc99eb334 Add new system service which enforces SLS allowlist.
The new service will intercept all activity starts in communal mode and
enforce that the activity is allowed by ensuring the user has enabled
the package and the activity has showWhenLocked=true.

Test: locally on device
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest
Bug: 191994709
Bug: 191996331
Bug: 200324021
Change-Id: I1892881481cf055bd4938d4cf0b624027ec2be3e
2021-10-15 19:15:46 +00:00
TreeHugger Robot
c511b9a64e Merge "Add ability to set/erase flags via intents." into sc-v2-dev am: 155b0fe36a am: 9d3f6d809f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16049898

Change-Id: I60c9c5b60d3c9f1cefccfa0221a3acbc989acc20
2021-10-15 15:10:39 +00:00
Dave Mankoff
f6db05e59f Add ability to set/erase flags via intents.
A flag can be set with a command like the following:
adb shell am broadcast -a com.android.systemui.action.SET_FLAG \
--ei id 1 --ez value 1

A flag can be "erased" with the same command, but leaving the value
unset.

Bug: 202860494
Test: manual
Change-Id: If1097e230692df49a6de7cbbb71ed37b0499c663
2021-10-14 17:39:09 -04:00
Philip Junker
b67178d6c7 Add TV specific TvUsbConfirmActivity and TvUsbPermissionActivity.
The new activities are based on the TvBottomSheetActivity and do not
show the "always use" checkbox because we did not find any strong use
case for it.
Extracted common logic into UsbDialogHelper which can be used also for
non-TV counterparts.

Bug: 196780010
Test: Open camera app that requests access to USB camera. Verify that TvUsbPermissionActivity is shown and verify functionality.
Test: Have an app installed which registers for USB_DEVICE_ATTACHED broadcast in its AndroidManifest. Attach USB camera device and verify that TvUsbConfirmActivity is shown and verify functionality.
Change-Id: Ib100e117ea0ea12adbca1c56e4ec8fc3d0bfc52f
2021-09-29 17:30:50 +02:00
Bryce Lee
afabf95f73 Move communal service classes out of SystemUI.
This change moves the communal service implementation
out of SystemUI. It also removes the Communal host
service, which is no longer in use.

Test: manual (code and tests refactored).
Bug: 198004715
Change-Id: Ie2c63a51d792dd77271e7748d7a0e1cc291f5713
2021-09-03 08:05:04 -07:00
Jacqueline Bronger
dfba637b72 Fix launchMode of TvUnblockSensorActivity.
Unblock bottom sheet was showing multiple times in some apps. LaunchMode
change prevents it from doing so and now matches the mobile equivalent
of the dialog.

Test: enable camera privacy and open Duo with a camera attached to the
device.
Bug: 198129996

Change-Id: If014e8c3b6dbb5420c520b2c0ce3941d6074079e
2021-08-31 10:00:59 +00:00
Bryce Lee
4ffc67d791 CommunalService Implementation.
This changelist introduces CommunalService and
related interfaces. These interfaces allow other
components to specify a communal surface to be
displayed in SystemUI.

This changelist also includes an implementation
of CommunalService that wires up the previously
defined communal support in SystemUI.

Test: manual
Bug: 193911222
Change-Id: Idf38777f948d877ad299c75fa76ad396fa035e06
2021-07-22 23:08:50 -07:00
Lucas Dupin
c505ed1b54 Apply early wake-up flags when requesting blur
Test: atest BlurUtilsTest
Fixes: 191969790
Change-Id: Iba1d0e1b1d5f61d1ecf08744484d02283d6e04e8
2021-07-16 16:54:06 -07:00
Evan Severson
85d7336db0 Update the sensor use dialog if more sensors are accessed
If another sensor is accessed after the dialog has been shown we now
update the dialog to reflect all accessed sensors.

Test: Wrote app which opens mic/cam at different times
Fixes: 187139024
Fixes: 187132341
Change-Id: I178bb4f6ea1913e3ee0e2153cf8ac3b2f24e4623
2021-07-09 13:38:47 -07:00
Flavio Fiszman
e54f26157f Conversations Widget - Backup and Restore
Change-Id: I46a8359ffd4b462add31f5cecce70ff05870db6f
Bug: 183084949
Test: PeopleBackupHelperTest, PeopleSpaceWidgetManagerTest..
2021-06-29 15:53:44 +01:00
Jacqueline Bronger
536a5f789f Show a bottom sheet when the mic/camera is blocked
On mobile a normal dialog is shown when a sensor is blocked by the
global toggle.

Bug: 186720017
Test: manual
For one sensor and both sensors together:
1) Block sensor(s) in settings or with 'adb shell cmd sensor_privacy enable 0 microphone' (/camera)
2) open the Duo app
3) Try to access blocked sensor(s): 'adb shell appops start
com.google.android.apps.tachyon 27' (/26)
4) Sensor(s) should be unblocked if 'unblock' is selected or remain
blocked if cancelled (check in settings or 'adb shell dumpsys sensor_prvacy' where disabled means unblocked or privacy indicator will show up)

Change-Id: I69fb67478460d05acf6b1d570705dc4f73ca8d1e
2021-06-17 12:30:11 +00:00
Anna Zappone
514ce64531 UX polish updates
Padding, color, and dynamic text resizing. See full details in
b/183084168.

Bug: 185131475, 183084168, 1804014433
Test: PeopleTileViewHelperTest
Change-Id: Ie6a4da771b9735ccce7b0549acfea4c17231d915
2021-05-18 12:29:35 +01:00
Narayan Kamath
94ff9d8ce2 SystemUI: Set usesPermissionFlags="neverForLocation"
System UI requires BT permissions in order to present device
state to users, and these permissions are never used to derive
user location.

This change also removes the COARSE_LOCATION permission that
was added in commit a86101724b to receive BluetoothDevice.ACTION_FOUND
broadcasts. This is no longer necessary.

Test: atest SystemUITests
Bug: 187069003

Change-Id: I0c9e6603aeb99d3ccfc21d4e26314740e08cf166
2021-05-04 12:32:57 +01:00
Matt Pietal
0caab1c800 Controls - Restart activity on rotation
The user can get stuck with 2 or 4 controls per row. Let the system
restart the activity to get the proper layout.

Fixes: 185364758
Test: manual, rotate with controls open
Change-Id: I501820c29e556b63363decd5a78769f5d6bb09e9
2021-04-16 11:56:35 +00:00
Fabian Kozynski
b4f9164e5c Merge "Fix colors and themes in QS" into sc-dev 2021-04-12 13:04:39 +00:00
Cecilia Hong
d8dd3010d4 Revert^2 Initial data pipeline for Smartspace media recommendations data in media carousel.
This reverts commit 1967209719.

Reason for revert: Forward fix with removing the bcsmartspace dependency.

Test: Tested manually on local builds
Bug: 182813345
Change-Id: Icb8cbac4e27abfa9346f9ed0ef6513f6874db556
2021-04-10 02:07:17 +00:00
Fabian Kozynski
37342cb837 Fix colors and themes in QS
Fix in:
* QSCustomizer
* QSSecurityFooter
* PrivacyDialog
* BrightnessSlider dialog and mirror

Test: manual
Fixes: 184862982
Change-Id: Ie2e4a17a72b31215e7294dac1afc0e2d39c4ff91
2021-04-09 09:55:59 -04:00
Jeff Sharkey
7627719334 Merge "New BLUETOOTH_ADVERTISE manifest permission." into sc-dev 2021-04-09 05:22:23 +00:00
Jeff Sharkey
6dcac06a84 New BLUETOOTH_ADVERTISE manifest permission.
This change is part of defining a distinct BLUETOOTH_ADVERTISE
permission to guard the BluetoothLeAdvertiser APIs, since that's a
distinct enough of an operation from SCAN and CONNECT.  It'll
continue to be covered under the general "Nearby devices" runtime
permission group.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Change-Id: I8b62e4d625df1e201f12a73025cd29c431feea79
2021-04-08 20:15:02 -06:00
Matt Pietal
20744ed3b4 Revert^3 "Enable smartspace"
3b67a00d95

Change-Id: I4711f24b1ed3535dbf40ffd6ab893e6cd661fe49
2021-04-08 18:16:22 -07:00
Matt Pietal
3b67a00d95 Revert^2 "Enable smartspace"
Address issue with component init and tests

Bug: 184642387
Test: com.android.devicehealthchecks.SystemAppCheck

Change-Id: I51ad3fb2e9df47a8f426a356fc34c8499b94892f
2021-04-07 09:13:09 -04:00
Jack He
b1f4cb5b83 Merge "Revert "Initial data pipeline for Smartspace media recommendations data in media carousel."" into sc-dev 2021-04-07 00:01:57 +00:00
Jack He
1967209719 Revert "Initial data pipeline for Smartspace media recommendations data in media carousel."
This reverts commit 3f4f355af2.

Bug: 184684030
Reason for revert: Break builds

Change-Id: Idc67e1eb4d114fd0342444815c0bfbb514523385
2021-04-06 23:59:38 +00:00
Cecilia Hong
9d274e7b2d Merge "Initial data pipeline for Smartspace media recommendations data in media carousel." into sc-dev 2021-04-06 20:26:01 +00:00
Matt Pietal
f8fa4efc58 Merge "Revert "Enable smartspace"" into sc-dev 2021-04-06 18:32:43 +00:00
Ulyana Trafimovich
a4fc6da238 Revert "Enable smartspace"
Revert "Enable smartspace"

Revert submission 13984710-smartspace_ls

Reason for revert: Broken test: com.android.devicehealthchecks.SystemAppCheck#system_app_crash on git_master on redfin-userdebug at 7262114

Reverted Changes:
I77a4ef72c:Enable smartspace
I77a4ef72c:Enable smartspace

Bug: 184642387
Change-Id: I299bef5e730c632803c56cf0f1cd858caac4e49f
Test: forrest run for the broken test
2021-04-06 16:34:41 +00:00
TreeHugger Robot
83bfac2e6d Merge "Enable smartspace" into sc-dev 2021-04-06 14:57:34 +00:00
Matt Pietal
ffb1601d49 Controls in QS
1. Migrate Android 11 users to a priority QS tile position
2. New Android 12 control users will see a tile appear at the end,
with seeding already initiated.
3. Add a new method to QSTileHost to position a tile in the middle
4. Remove all Controls code from GlobalActionsDialog

Bug: 172360102
Test: atest QSTileHostTest TileServicesTest QSFragmentTest
GlobalActionsDialogTest DeviceControlsTileTest

Change-Id: I1e52681b2cf7948b732808b1ff426d09b379ed93
2021-04-06 07:45:58 -04:00
cecilia
3f4f355af2 Initial data pipeline for Smartspace media recommendations data in media carousel.
Test: Tested manually on local builds
Bug: 182813345
Change-Id: I650e2970de3ae94e3ac3cc77f591500c340802ce
2021-04-06 01:16:48 -04:00
Matt Pietal
37d3636c37 Enable smartspace
Allow KeyguardSliceProvider to be replaced by content coming from the
BcSmartspaceDataPlugin, only when the plugin is enabled.

Bug: 172360102
Test: manual
Change-Id: I77a4ef72c7131f955fe37763e02542726c36927b
2021-04-05 20:47:51 -04:00
Lucas Dupin
32d406516b Rename SysUI base theme
For historical reasons, the base theme was called QuickSettings.
I'm renaming it to SystemUI because QS won't respond to dark theme
changes anymore.

Test: make
Bug: 183953523
Change-Id: I685c1a4c3fb5ffded8e2f44f13a6ba68e9c45686
2021-04-02 17:09:58 -07:00
Silin Huang
80142305f6 Add an activity for wallet card carousel screen.
The WalletActivity initializes a WalletScreenController to query the
wallet cards and present on the content view.
The next step is to launch the new activity from QuickAccessWalletTile.

Test: manually test on deivce
Test: atest
Bug: b/182964813
Change-Id: Idbf0918e111db0d00f3b60b8c26b968c961df202
2021-04-02 11:08:29 -07:00
Flavio Fiszman
e4931c88d5 Change People Tile config activity layout
Change-Id: I7df41980e1d9fe6b14a91be9ff68fad0c1c7185f
Test: manual
Bug: 183721209
2021-03-31 10:34:13 +00:00
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