Commit Graph

404 Commits

Author SHA1 Message Date
Joshua Duong
21819bf32d [adbwifi] SysUI: Add WifiDebuggingActivity.
This will prompt the user whether they trust the current wireless access
point when enabling wireless debugging.

Bug: 147814644

Test: make
Exempt-From-Owner-Approval: already approved
Change-Id: I56a7c022f26d4e3d93a22d9022f19f1b8d997d70
2020-02-20 13:49:58 -08:00
Wesley.CW Wang
5db44f0ece Enable custom clock feature
- Enable ClockOptionsProvider and the flag let SystemUI(keyguard) have
the ability to apply custom clock
- Remove Analog and Bubble clock from SystemUI

Bug: 146530441
Test: `adb shell content query --uri content://com.android.keyguard.clock/list_options` will list available provider, `adb shell settings put secure lock_screen_custom_clock_face "com.android.keyguard.clock.BubbleClockController"` will not switch to Bubble clock.
Change-Id: Iecfb5e2ea0cc72ca6eb1e16ca0dc0213a3257b6e
2020-02-19 15:04:28 +08:00
Fabian Kozynski
9aa23af654 Changes to favorite management screen
This changes are to include the new UX flows:

* The list of controls is split by zones. All controls that do not have
a zone (blank or null) are shown at the beginning of the list. Zones are
sorted "alphabetically".
* Controls are split into Favorites and All, with Favorite controls
appearing twice. Toggling the checkbox in a control from any of the two
lists will change the state and make it appear/dissapear from the
favorites list.
* Changes to favorites are only saved on Done.
* Favorites can be rearranged by dragging and dropping.

Test: manual
Test: atest
Bug: 149138395

Change-Id: Ib5fdbc66cafe03e95855eb6c16c27127afa8d565
2020-02-10 10:31:05 -05:00
Fabian Kozynski
8b5404502d Minor controls fixes
* Check setting for correct user
* Remove admin restriction
* Cache available setting in ControlsController
* Make activities exported=false
* Add settings listener

Test: manual
Test: atest ControlsControllerImplTesst
Bug: 147732882

Change-Id: I003ee3ea8f725d4da79729ce76816d4a1615fb0d
2020-02-04 20:38:44 -05:00
Fabian Kozynski
5fc5f6ba48 Polish controls management activities
* Change to no toolbar and add title and subtitle
* Change individual controls to use lozenges (same layouts as in the
controls space).

Test: manual
Bug: 148207527
Change-Id: Ie0f3c53ca12dbe29aa1e4469fc0146e29f548d76
2020-02-04 11:33:08 -05:00
Fabian Kozynski
7988bd464d Add multi-user support to Controls
This commit adds multi-user support by doing the following:
* Listening when user changes and switching the controllers user (and
context).
* Using activities that show for all users and are finished on user
switched.

The setting has to be enabled for each user separately.

Also:
* fixes calling subscribe when on load to the ControlsProviderService.
* better dumps.

Test: atest
Test: check that files are not shared between users
Test: check that user folder is removed when user is deleted
Bug:147732882
Change-Id: I349b0136473016e6bd6b71e26045f11a839272d1
2020-01-31 09:11:38 -05:00
Zim
72c7ef5034 Request MANAGE_EXTERNAL_STORAGE permission
With the deprecation of WRITE_MEDIA_STORAGE in R. Apps should migrate
to requesting MANAGE_EXTERNAL_STORAGE permission

Test: m
Bug: 144914977
Change-Id: I6ea64006fbba7a792d7c59a1c5ae526357fe8894
2020-01-24 22:37:46 +00:00
Sean Pont
d00aefb43c Add QuickAccessWallet API
Adds a new API that allows applications to provide payment cards and
other relevant passes to SysUI which are then shown in the Quick Access
Wallet (long press on Pixel). See go/aospqaw-dd for details.

Bug: 144342153
Test: manual - started device, didn't blow up
Test: atest - run from frameworks/base dir
Change-Id: I8fef3116e6e4bd1f8a4f5a907892ea8993b49b0e
2020-01-21 14:18:34 -08:00
Automerger Merge Worker
2a7b367d06 Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" am: 3950a24dca am: 8d82c3cbd9 am: 8e92458626
Change-Id: Id94e38dafad3dd6a5316c53ba357a8004a7d7b9e
2020-01-16 07:58:53 +00:00
Automerger Merge Worker
8e92458626 Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" am: 3950a24dca am: 8d82c3cbd9
Change-Id: I0ef7475de6266ac7534e549a89a8418c8ea5bb3d
2020-01-16 07:47:01 +00:00
TreeHugger Robot
0b56225ecf Merge "Add screen recording QS tile" 2020-01-15 21:29:10 +00:00
Fabian Kozynski
d31226a0a6 Merge "Adding controllers for Controls" 2020-01-15 21:10:00 +00:00
Fabian Kozynski
f10b6ab522 Adding controllers for Controls
This CL adds the following controllers for dealing with Controls in
SystemUI:

* ControlsController - Handles favorites and communication with other
controllers
* ControlsBindingController - Handles binding to the different services
and comunication with them.
* ControlsProviderLifecycleManager - Handles binding with one service
and forwards API calls to it.
* ControlsListingController - Handles finding and listing apps that
satisfy the service requirement

Additionally, this CL adds first versions of the management screen to
add or remove favorites. These are persisted.

To enable:
* adb shell settings put secure systemui.controls_available 1
* restart

To launch management activity:
* Enable controls
* adb shell am start
com.android.systemui/.controls.management.ControlsProviderSelectorActivity

Missing from this CL:
* Multi user support
* Documentation in the controller classes
* Graceful rebinding
* Throttling of Binder calls
* Better dumps

Test: atest com.android.systemui.controls
Test: manual testing of favorite management activities
Bug: 147732882

Change-Id: Ib4932b7f8fd3f2e3ee0ef1c28ddda1bec66c41e4
2020-01-15 10:27:32 -05:00
Rhed Jao
59a40df716 Accessibility shortcut improvement (9/n)
The setting key of navigation bar magnification state already
deprecated. Sysui need to use accessibility manager api to get
a11y button state.

Bug: 136293963
Test: atest NavigationBarFragmentTest
Change-Id: I52d19c16b3eb3b7168890f8c27cf3500a401779a
2020-01-14 11:59:47 +08:00
Beth Thibodeau
77c2545dd9 Add screen recording QS tile
Currently defaults to no taps, no audio. This adds a 3s countdown before
actually launching the recording, which can be stopped from either the
notification or the tile.

Bug: 137153302
Test: manual
Change-Id: I0e194dc8d43d8834e07e1f6d8de90a2c703a4c3a
2020-01-10 15:05:49 -05:00
Matt Pietal
10eae31846 Controls API - Adding service impl
Adding a basic service implementation for apps to implement if they
would like to contribute to the new controls space. This is a WIP
while the controls design is worked.

Test: atest + Home Mock Service
Change-Id: Iae3de21ebf5b15b0df498dce2add51f53bbd229d
2019-12-18 13:08:27 -05:00
Winson Chung
f2b41770d4 Remove a few hard coded references to SystemUI in fw/base/services
Bug: 143775123
Test: atest ScreenshotHelperTest
Test: atest AlarmManagerTest
Change-Id: I2fefe2968e23bc2d06aa52266c2eeeb90f4733ee
2019-12-13 13:59:31 -08:00
Lyn Han
cd6465e921 Overflow activity scaffold, xml, manifest, style
Bug: 138116789
Test: manual - overflow compiles and works as expected in separate xl cl
Test: atest SystemUITests
Change-Id: I7142527442c01dca87c88fd6034af184df6f93d6
2019-12-10 17:56:26 -08:00
paulhu
ceb5a89284 Replace CONNECTIVITY_INTERNAL in SystemUI
Since CONNECTIVITY_INTERNAL has been deprecated from Android R
and replace by other permissions. Change CONNECTIVITY_INTERNAL to
another proper peremission.

Bug: 32963470
Test: atest SystemUITests
Change-Id: Ibdaee8c3c06caa3aaf6944d4b258cb5b1d078179
2019-12-10 15:56:18 +08:00
Govinda Wasserman
bb1588b06b Creates test service for on-device intelligence to request handles
Test: Tested locally
Change-Id: I0c3a6b76c7e9fd2432261be1e942d0daeea1645a
2019-12-05 16:16:17 +00:00
Mady Mellor
b547e5ed52 Flag to allow notifs with shortcuts to have BubbleMetadata
- Add shortcut option to experiment class
- Attempts to create BubbleMetadata off of ShortcutInfo, unfortunately
  it doesn't really have a lot of info about the shortcut.... so using
  an intent extra to note that
- Adds new API to ActivityView to support launching shortcuts

Test: manual - enable flags, post a notification with valid shortcut info,
               longpress on it to bubble, tap on bubble
Bug: 143173197
Bug: 138116133
Change-Id: Id631bf4a4b97e0bb1f76760f48dbfc11ffc0630e
2019-12-03 16:15:04 -08:00
Satakshi
da07b0eec5 Passing feedback for screenshots in SysUI
(cherry picked from commit aaf695366e)

Test: Took a screenshot and verified that AiAi gets notified for
share/edit/delete/smart action clicked and exceptions thrown.
Ran tests-
'atest ScreenshotNotificationSmartActionsTest'
'atest ScreenshotNotificationSmartActionsGoogleTest'
Bug: 141634285
Change-Id: Ief6400549b30cf1c0c8a374aa443cf6347f84875
Merged-In: Ief6400549b30cf1c0c8a374aa443cf6347f84875
2019-11-20 09:51:00 -08:00
Satakshi Rana
2e3f844107 Merge "Passing feedback for screenshots in SysUI" 2019-11-19 22:47:13 +00:00
Satakshi
aaf695366e Passing feedback for screenshots in SysUI
Test: Took a screenshot and verified that AiAi gets notified for
share/edit/delete/smart action clicked and exceptions thrown.
Ran tests-
'atest ScreenshotNotificationSmartActionsTest'
'atest ScreenshotNotificationSmartActionsGoogleTest'
Bug: 142669323
Change-Id: Ief6400549b30cf1c0c8a374aa443cf6347f84875
2019-11-19 13:18:17 -08:00
Satakshi
ce35ce9f08 Screenshot Notification Smart Action: AiAi and - Sys UI integration
Create a constant in ContentSuggestionsManager, which will
be used to pass a hardware bitmap to ContentSuggestionsService.
In the presence of this key in the request extras, we skip taking a
snapshot in ContentSuggestionsPerUserService.
Bitmap is extracted from reading this value from extras in
ContentSuggestionsService.

Create ScreenshotNotificationSmartActionsProvider, which is overridden
in GoogleSystemUI.
Calling AiAi is guarded by a device config flag created in cl/277143225.

(cherry picked from commit d2010f2628 and c45d86fc15)

Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle.
Took a screenshot and verified that AiAi gets invoked and the screenshot notification
shows smart actions.
Ran new tests added in this CL
'atest ScreenshotNotificationSmartActionsTest'
'atest ContentSuggestionsPerUserServiceTest'
Bug: 141634285
Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
Merged-In: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
2019-11-18 16:06:08 -08:00
Anthony Hugh
39f0e4cd88 Delete SwitchToGuestTimer
Feature was never used in production and we felt the experience was not
the right one.  So remove support for it to reduce maintenance burden
and potential for buggy code.

Fixes: 144382004
Test: Boot and see no crashes
Test: Add lock to user and show UserPicker.  Run adb command to put car
into drive, wait 30 seconds and see no changes.
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 8
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30

Change-Id: I257df02a8f669899c7a49df12815b302ec5965bb
2019-11-14 13:40:32 -08:00
Satakshi
d2010f2628 Screenshot Notification Smart Action: AiAi and - Sys UI integration
This change creates ScreenshotNotificationSmartActionsProvider, which is overridden
in GoogleSystemUI.
Calling AiAi is guarded by a device config flag created in cl/277143225.

Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle.
Took a screenshot and verified that AiAi gets invoked and the screenshot notification
shows smart actions.
Ran new tests added in this CL 'atest ScreenshotNotificationSmartActionsTest'
Bug: 143556894

Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
2019-11-06 13:46:08 -08:00
Patrick Baumann
b71657a60a Grants SysUI access to all packages on device
With the new go/app-enumeration feature in R, apps will need to declare
the packages that they have access to or hold the QUERY_ALL_PACKAGES
permission. This change updates sysUI to acquire that permission so it
can act on any app on device.

Test: Device starts without sysui being blocked
Bug: 136675067
Change-Id: Ib88434c17a42936a48095ea040c4e40590a8898f
2019-10-09 14:12:35 +00:00
Matt Pietal
553d8a4dd3 Resolver - Fix NGA (voice interaction) crash in resolver
A race condition existed whereby placeholder targets were attempting
to be published without any target information, due to bg thread
processing of resolved intents. Detect this scenario, and wait. Also
have SysUI ChooserActivity accept voice interactions in the intent
filter. Does not use DEFAULT category, as it should only ever be used
by explicit intents.

Bug: 139729579
Test: atest ResolverActivityTest
Change-Id: If8fc0c3595da47c26b1edab75bd6fc82a6dcb35e
(cherry picked from commit 2cf4c6c3d4)
2019-09-11 14:06:12 +00:00
Matt Pietal
2cf4c6c3d4 Resolver - Fix NGA (voice interaction) crash in resolver
A race condition existed whereby placeholder targets were attempting
to be published without any target information, due to bg thread
processing of resolved intents. Detect this scenario, and wait. Also
have SysUI ChooserActivity accept voice interactions in the intent
filter. Does not use DEFAULT category, as it should only ever be used
by explicit intents.

Bug: 139729579
Test: atest ResolverActivityTest
Change-Id: If8fc0c3595da47c26b1edab75bd6fc82a6dcb35e
2019-09-10 10:21:17 -04:00
Dave Mankoff
1a0e382745 Allow Services to be created through Dagger.
This is a significant change that allows Services to have their
constructed injected into.

The DozeService is now labeled as injectable (thought it takes no arguments).
At least one Service has to be marked as injectable for Dagger to be happy
compiling this code.

Bug: 138787339
Test: atest SystemUITests
Change-Id: I0ec92e01dd236bcee3083c8f8744c53b7ccc92d3
Merged-In: Ib58f8763c996fbc2aea07ead56493d2d9e936f5b
2019-08-14 14:52:41 -04:00
Dave Mankoff
2ea5a83202 Allow Services to be created through Dagger.
This is a significant change that allows Services to have their
constructed injected into.

This change includes DozeService as an example, injecting the
FalsingManager into its constructor.

Bug: 136279712
Test: atest SystemUITests
Change-Id: Ib58f8763c996fbc2aea07ead56493d2d9e936f5b
2019-07-08 16:56:11 -04:00
Robert Snoeberger
ceb2bc6e79 Disable ClockOptionsProvider so clocks don't appear in picker app
Bug: 136090066
Test: `adb shell content query --uri content://com.android.keyguard.clock/list_options` fails with could not find provider
Change-Id: I88433c3d4cfbde388c4ace9b726fb4f53f404d48
2019-06-26 16:22:39 -04:00
Fabian Kozynski
ade26fa73a Restore WATCH_APPOPS permission for systemui
This permission is necessary for Q as it allows systemui to tag
notifications of apps that are using certain AppOps. This is a P
feature that has regressed when the permission was made privileged.

This is used by AppOpsController in order to obtain updates on any apps
(onOpActiveChanged, onOpNoted). There is no other way to obtain the
updates from apps that are not systemui, as specified in AppOpsManager.

Talked to moltmann@ to verify that this is the correct API to use for this feature.
I'll remove this permission once SystemUI does not need it anymore.
In particular, if AppOpsController does not require it for being notified of AppOps changes.

Fixes: 134747188
Test: build
Test: dumpsys SystemUI. Check that AppOpsController is getting updates.
Change-Id: I08cca4361a7fbfa8b2eb419f1459b0b8bce93a5f
2019-06-07 17:38:01 +00:00
Jeff Sharkey
b66f4f4bad Aggresive performance optimizations.
Now that we have LocalCallingIdentity, we can start caching it in
very narrow cases.  We must be careful to not cache too long, since
any changes to granted permissions for the UID mean we need to
re-evaluate any cached answers.

The best middle-ground for this in the Q release is to use an active
camera session as a proxy for when we should create a cache object
and then later invalidate it.  (It's very unlikely that a user
changes permissions while actively using the camera, and this is
a strong signal that the caller is sensitive to performance.)

Many other sprinkled optimizations to avoid extra binder calls into
the OS, such as aggressively caching VolumeInfo related details.

Track IDs that are owned by each LocalCallingIdentity, to speed up
all future security checks.

Dispatch all change notifications asynchronously, and delay them by
several seconds while the camera is being actively used, to give
more important foreground work a fighting chance.  Invalidate
thumbnails asynchronously.

Optimizations to ModernMediaScanner where it's safe to skip the
"reconcile" and "clean" steps when we're focused on a single file
that we successfully scanned.

Local tests show this CL improves performance of a test app that
takes 100 rapid shots by 45%.  (All the collective optimizations
done so far this week add up to a 70% improvement.)

Bug: 130758409
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial manifest change
Change-Id: I38cc826af47d41219ef44eae6fbd293caa0c01d5
2019-05-18 05:48:21 +00:00
Narayan Kamath
05f010b8e4 Improve polish for the MediaProjectionPermissionActivity.
- Change title styling / padding per UX spec.
- Also, fully support dark theme..

Test: visual, both in dark and light themes.
Bug: 131210470
Bug: 129787693
Change-Id: I150533c063feaa1be2879f34b5b6ac604f265e23
2019-05-10 18:34:01 +01:00
Lucas Dupin
046282eabd Dark Theme QS tile
Creates Dark Theme tile and adds it to the default config,
under the fold.

Test: manually toggle tile
Fixes: 130253100
Change-Id: I2859d2eb20db1c6d9dd8e8e24979294316b905bb
2019-04-11 09:58:11 -07:00
Sunny Goyal
a6a581279a Using input monitor for edge swipe handling for back
Bug: 112934365
Bug: 124299674
Bug: 124298541
Test: Verified build on device
Change-Id: Ic4cc4339b22aee63b0d96587f05dae3d8c01563f
2019-04-03 10:22:34 -07:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
Jeff Sharkey
859856d8d6 Unify media permissions enforcement in framework.
This opens the door to the same consistent logic being shared by
anyone across the OS who wants to enforce storage permissions.

Bug: 126788266
Test: atest --test-mapping packages/apps/MediaProvider
Exempted-From-Owner-Approval: Trivial permissions refactoring
Change-Id: I3107425f8dafa6ba05918bb67c3c0cb5d3899657
2019-03-26 23:54:08 +00:00
Narayan Kamath
b4bfa1b4e9 SystemUI: Update styling of media projection permission dialog.
Test: Visual
Bug: 128426351
Change-Id: I73e0af423157ccda11632fb96d13e4f981bb57bb
2019-03-20 13:21:13 +00:00
Philip P. Moltmann
e3dbb5ad0a Show only user sensitive ops in system ui
Test: Looked at system ui button when starting maps and camera
Change-Id: Id6a9a64162200281c5c94671668255f258db36b3
2019-03-08 14:50:23 -08:00
Stanislav Zholnin
0ec928db47 Add READ_DEVICE_CONFIG permission to SystemUI to
allow access to DeviceConfig API. Permission checks in DeviceConfig
API will be added later.

Test: tested locally with permission checks patch in.
Change-Id: Id5c72eb80f59820d461d74772243ed357df7cb37
2019-03-05 16:28:58 +00:00
Ahan Wu
67e7f1054f Render ImageWallpaper with OpenGL ES and apply visual effects. (Fix bug)
We have to render image wallpaper with OpenGL ES to apply some amazing
visual effects.

Bug: 122803209
Bug: 124073420
Bug: 123616712
Bug: 123615467
Test: Manually.
Change-Id: I0123d4ba2acb5a84b709c0468910e006c8e49563
2019-02-16 16:19:33 +08:00
Kevin Chyn
ca21820979 Add MANAGE_BIOMETRIC permission to SysUI
It's required for resetting lockout

Test: manual
Change-Id: If6a7172dbd7efe26d40b80d629bef33db11f0a48
2019-02-14 16:01:12 -08:00
TreeHugger Robot
a42845b025 Merge "Revert "Render ImageWallpaper with OpenGL ES and apply visual effects."" 2019-02-07 02:02:34 +00:00
Lucas Dupin
98897ce6c5 Revert "Render ImageWallpaper with OpenGL ES and apply visual effects."
This reverts commit 9a8e260af1.
Bug: 118658627

Reason for revert:
I've received a few bug reports indicating that images were getting stretched, animations were gone and sometimes nothing would be rendered.

I'll revert the CL to have something for stable for Beta 1. We can then work on the fixes after the Taiwan team is back from vacation.

Change-Id: Id09ba3d7f372af9153c056a12e676c0227d19939
2019-02-06 20:43:36 +00:00
TreeHugger Robot
92a70d42d2 Merge "Add ClockOptionsProvider for more realistic previews." 2019-02-05 14:31:30 +00:00
Robert Snoeberger
6b244b093c Add ClockOptionsProvider for more realistic previews.
This change enables the picker app to move to the new
ContentProvider but it doesn't change any of the
assets. A follow-up change will dynamically generate
a realistic preview image from the clock.

Bug: 123704608
Test: atest on new tests ClockInfoTest and ClockOptionsProviderTest
Change-Id: I744c8dd063f6aa112e290fcf54cdc0e0b1377a0e
2019-02-04 17:33:19 -05:00
Selim Cinek
1f4459783c Merge "Render ImageWallpaper with OpenGL ES and apply visual effects." 2019-01-30 20:56:12 +00:00