Commit Graph

11531 Commits

Author SHA1 Message Date
Dan Sandler
c5dffc9a4a DO NOT MERGE: Allow nearby sharing to substitute name & icon in chip
meta-data bundle keys (values are resids):

    CHIP_LABEL_METADATA_KEY = "android.service.chooser.chip_label"
    CHIP_ICON_METADATA_KEY = "android.service.chooser.chip_icon"

Test: manual, confirm that correct name & icon are used
      and that custom icon is tinted in light/dark theme
      (and that the copy chip is tinted right, too!)
Bug: 144290152
Change-Id: I57157e07630fa8bec3057e6d18336c59944fcb4f
2019-12-19 01:43:51 +00:00
Alison Cichowlas
0416784c2e Merge "Do not restart activity when pinned set changes - just re-sort." into qt-qpr1-dev 2019-12-18 15:41:33 +00:00
Alison Cichowlas
2d3442466e Do not restart activity when pinned set changes - just re-sort.
Bug: 145703939
Test: Share dialog via screenshot, long press for pin, observe behavior.
Change-Id: I6e9e03b77e1486093097ea1488fa589e3c7bd482
Merged-In: I6e9e03b77e1486093097ea1488fa589e3c7bd482
2019-12-18 02:40:02 +00:00
Hui Yu
7293dfca7c [DO NOT MERGE] Reset mTrackingReportedValues in endSample()
Otherwise, when next SamplingTimer.update() is called, it will take
zero as start time.

Bug: 142466892
Test: NA.

Change-Id: I04625fadd8fd8bab3ba83b8e7cd10737ad34e60b
(cherry picked from commit c7d49e01dd)
2019-12-17 00:45:31 +00:00
Matt Pietal
7b63d6ec1b [DO NOT MERGE] Resolver/Chooser - Fix 'no apps available' inset
When zero apps match a filter, the empty view is set to visible and
shown. There is harm in making sure the inset always get applied to
the empty view so that when resolver determines it needs to be
visible, it is set to be shown.

Test: atest ResolverActivityTest, ChooserActivityTest
Bug: 146133961
Change-Id: I7412df84f8f482219635ccd73dff8e4a21355a18
2019-12-12 10:44:27 -05:00
Matt Pietal
95ede7fb53 [DO NOT MERGE] Resolver/Chooser - Window inset fixes
Resolver supports numerous layouts, with optional ViewGroups. Need to
make sure the window inset is applied to the correct view. If there is
a List present, add a footer so that the list scrolls underneath the
navbar.

Test: atest ResolverActivityTest
Bug: 145670872
Change-Id: I94652c5e0068436878a307701b5785f02060b8d6
2019-12-09 07:43:10 -05:00
Mark Tabry
529d73bd4f Add AIDL interface and puller implementation for automotive devices.
Changes:
  - Adds hidden ICarStatsService AIDL API.
  - Adds CarStatsPuller for pulling atoms from ICarStatsService.
  - Pulls VmsClientStats via CarStatsPuller.

Bug: 141697665
Test: Manual testing on hawk using statsd_testdrive
Change-Id: I44e104d430f64b1bd3dce96e9749df79ab3d2fbf
Merged-In: I44e104d430f64b1bd3dce96e9749df79ab3d2fbf
(cherry picked from commit 9dc13578f7)
2019-12-02 13:08:13 -08:00
Daniel Sandler
3b179167af Merge "Action chips in share sheet. (DO NOT MERGE)" into qt-qpr1-dev 2019-11-25 13:22:19 +00:00
Dan Sandler
0d3e358628 Action chips in share sheet. (DO NOT MERGE)
Move the Copy button to a new row of chips below the
(now larger) preview. Optionally, if a proximity-sharing
service is installed, show that chip as well.

Bug: 143229724
Fixes: 144290152
Test: atest SystemUITests frameworks/base/core/tests/coretests
Change-Id: I0d6457df85bc937f72ca97da6b4b84b634a90daf
2019-11-24 23:39:49 +00:00
TreeHugger Robot
659f477f65 Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev 2019-11-23 00:05:20 +00:00
Alison Cichowlas
a40cd3feb8 Restore app pinning.
Bug: 143229724
Test: atest AbstractResolverComparatorTest; atest ChooserActivityTest
Change-Id: I71d4334c8d3beed94495b41d5264a95cbbd132ff
Merged-In: I71d4334c8d3beed94495b41d5264a95cbbd132ff
2019-11-19 19:16:02 +00:00
Satakshi Rana
73b4e1923a Merge "Screenshot Notification Smart Action: AiAi and - Sys UI integration" into qt-qpr1-dev 2019-11-19 17:14:49 +00:00
Felipe Leme
8d4c825ce3 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803
Bug: 132111956

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
Merged-In: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
(cherry picked from commit 34a861add1)
2019-11-19 01:24:52 +00: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
James O'Leary
712eb51dc9 [DO NOT MERGE] Convert TakeScreenshot finishers Runnables to Consumer<Uri>
Test: n/a
Bug: b/131082115
Change-Id: Ia84d034d08ff4d004fc9852dc5156d46059e8b00
2019-11-15 16:41:21 +00:00
Matt Pietal
23a02f791d Resolver: Modernize layout
Visually align with the work done for sharesheet

Test: visual inspection
Bug: 139485420
Change-Id: Ie2609eefcd12552bba6c4d749ca1669c8232633c
2019-10-11 18:14:58 +00:00
TreeHugger Robot
10000738e4 Merge "Redraw legacy navigation bar paint onLayout" into qt-qpr1-dev 2019-09-17 16:19:23 +00:00
Mehdi Alizadeh
30e495d0c4 Merge changes I41e08b86,I7760f37d into qt-qpr1-dev
* changes:
  Use ShortcutInfo#rank to order Sharing Shortcuts in ShareSheet
  Adds tests for AppPrediction service availability check
2019-09-16 23:15:22 +00:00
Vinit Nayak
0aa0f133b7 Redraw legacy navigation bar paint onLayout
Navigation bar background wasn't being redrawn
when using legacy navigation bar.

Fixes: 140096278
Test: Open Sheets app, turn landscape, select
a cell, press the "Fx" button on buttom left,
turn portrait and observe no black bar.
Open Sheets app, turn landscape, open recents
and select sheets icon and go into split screen,
choose any other app, click on cell, press "Fx",
turn portrait, observe no black bar.

Change-Id: Ibfe1abdba87a0d66c68478ee206b992c933cd9ad
(cherry picked from commit 7ab1fb8f37)
2019-09-16 21:04:58 +00:00
Mehdi Alizadeh
2a873c7628 Merge "Add target type flags to set the origin of share targets" into qt-qpr1-dev 2019-09-16 18:31:09 +00:00
Mehdi Alizadeh
707c0cf361 Use ShortcutInfo#rank to order Sharing Shortcuts in ShareSheet
Sort based on rank only when directly fetching the targets from
ShortcutManager. Otherwise the target from AppPredictionService are
already ordered.

Bug: 140449186
Test: atest ChooserActivityTest
Test: Manual test to verify shortcuts have the same order in Launcher and ShareSheet when AppPredictionService is disabled

Change-Id: I41e08b86746c977c05acea8a5d0654083897741d
2019-09-16 11:28:42 -07:00
Mehdi Alizadeh
e870e97c73 Adds tests for AppPrediction service availability check
Bug: 138595943
Test: atest ChooserActivityTest
Change-Id: I7760f37d3f9fee00648cea5c70e744f1da2bdeca
2019-09-16 11:10:08 -07:00
Alison Cichowlas
aa7f79f960 Sharesheet - log copy actions.
Since we've promoted Copy to a system action, out of the general list of targets, it's no longer logged with the regular share target logging.

Bug: 140928181
Test: reviewed adb logcat -b event; correct event looks like
sysui_multi_action: [757,1749,758,4,759,1]
Change-Id: I699ffe0fb7c5631c6e8535377ada36a7ce855734
2019-09-13 15:18:24 +00:00
Mehdi Alizadeh
06955f6f7d Add target type flags to set the origin of share targets
Bug: 140898597
Test: atest ChooserActivityTest
Change-Id: Iaab20121986f6e0ac22fc2ae2150484b9df95c54
2019-09-12 13:21:18 -07: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
Anthony Hugh
6f5eadc0d3 Refactor PermissionManager.SPLIT_PERMISSIONS
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.

Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.

Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().

Merged-In: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
(cherry picked from commit f69c71e25889d8a9d66da05ee0f386d7fb626c6c)
2019-09-09 15:49:04 -07:00
James O'Leary
8a91775d3f Merge "Add completion handler for ScreenshotHelper" into qt-qpr1-dev 2019-09-07 03:42:36 +00:00
Mehdi Alizadeh
ae4ab469bf Merge "Check for component availability before all AppPrediction logic" into qt-qpr1-dev 2019-09-07 00:53:30 +00:00
Mehdi Alizadeh
5cc5f713f9 Check for component availability before all AppPrediction logic
Bug: 138595943
Test: Manual test by removing the AiAi package from device
Change-Id: I9d1e5be52e8ca5fadce2d3107279fa77d488f697
2019-09-06 12:23:44 -07:00
James O'Leary
fa5bb7af25 Add completion handler for ScreenshotHelper
The Next-Generation Assistant can call SysUI to request a screenshot.
Adding an indicator that a screenshot has completed successfully enables
the Next-Generation Assistant to show the assistant UI again once the
screenshot has completed.

Bug: 137201206
Bug: 131082115
Test: Wired up SysUIG's NGA integration's touch outside handler to call
take screenshot, confirmed it behaved as expected when a touch outside
occurred.
Change-Id: Ie83af6c9dd8e93b3e18a820d79c02125a19bd62a
2019-09-06 18:11:38 +00:00
Blake Kragten
bc75c727b7 Connection change and high tx power Q port
Changed missed Q merge back in April

Cherrypicking change into Q for better metrics.

Batterystats: "none" Data connection state should reflect only out of service

Moved only out of service to unknown type position and added other
network type.

BUG: 128629695
Test: flashed on target and tested in out of service mode. Ran
dumpsys/bugreport. adb shell dumpsys batterystats

Cellular high tx power bug

Previous implementaion was not correctly registering tx high power
sections. To fix this we can send a clear flag after we send a
+cellular_high_tx_power. We need to do this so in the volta historian
data we only see a small segment to where the tx power was at before
this.

This will generate less confusion with the cellular_high_tx_power

Bug: 127640604
Test: Compiled and flashed onto device. Tested uploading long video to
google photos. This created a high tx power use case for me to test that
the feature was reporting correctly.

Bug: 139947280
Merge-Merged-6bf8ef5
Change-Id: I6a438c9fed411a49b1f36a8085863803ff53737b
2019-08-30 15:06:03 -07:00
Mehdi Alizadeh
a1c18a81af Skip using the AppPredictionService if the component is not available
This CL adds a safeguard in ShareSheet to avoid calls to
AppPredictionService when the service is defined but is not available,
for example in the case of a wrong AiAi apk pushed from GooglePlay.

Bug: 138595943
Test: Manual test by removing the AiAi package from device

Change-Id: I4109c5122faa753d5111ee45698301cb6ccdd7b5
2019-08-16 23:57:46 +00:00
Beth Thibodeau
3ea5a1fcbe Merge "Stop timer when notification is not visible" into qt-r1-dev
am: f7ad427d8b

Change-Id: I601b736974dffc1a4f5b8ced66d1d97127a42541
2019-08-06 13:28:50 -07:00
Beth Thibodeau
f7ad427d8b Merge "Stop timer when notification is not visible" into qt-r1-dev 2019-08-06 20:11:27 +00:00
Beth Thibodeau
4e4c86e1b5 Stop timer when notification is not visible
This combines ag/8888937 and ag/9019277 into one CL, plus fixes another issue
where the timer could restart if the user had removed a notification and then
restarted the stream

Fixes: 138261464
Test: manual, atest NotificationMediaTemplateViewWrapperTest

Also checked the changes on the master branch since that had very
obvious issues when locking / unlocking the phone before

Change-Id: I6a0bbc675d33a5c7d4ce7f0884aec19606bff4fa
2019-08-06 13:21:20 -04:00
Roshan Pius
2883327fba Merge "XmlUtils: Fix hex parsing in readThisByteArrayXml" into qt-qpr1-dev 2019-08-05 23:51:37 +00:00
Adrian Roos
5f2c9a14f5 GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.

Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
2019-08-05 21:19:40 +02:00
Roshan Pius
08a61aa733 XmlUtils: Fix hex parsing in readThisByteArrayXml
hex 'a' is not correctly deserialized in readThisByteArrayXml.

Change readThisByteArrayXml & writeByteArrayXml to use HexEncoding for
hex conversions.

Bug: 138482990
Test: Was seeing parsing errors with ag/9135251.
Validated the fix with ag/9135251.

Change-Id: If9f86b5ed85a9f883130e4110f85cd2faa995439
2019-08-05 11:18:10 -07:00
Beth Thibodeau
51185d56d2 Merge "Revert "Stop timer when notification isn't visible"" into qt-dev
am: 628f975c22

Change-Id: If351a368f5a1132e61dab1e7a1b1d5e290b092f7
2019-07-31 14:14:40 -07:00
Beth Thibodeau
4c9726e041 Revert "Stop timer when notification isn't visible"
This reverts commit 3c4a8e48d4.

Reason for revert: NPE errors
Fixes: b/138697134

Change-Id: Ic89eb58cd68485dcc5e7c5a3ef48d7ed79c303ca
2019-07-31 20:26:19 +00:00
Beth Thibodeau
8594033be0 Merge "Stop timer when notification isn't visible" into qt-dev
am: 7256c379df

Change-Id: If8705c20723e5ee725399e9377f0c6e33e997429
2019-07-29 14:13:58 -07:00
Miranda Kephart
bb600247ec Merge "Add phenotype flags for transcription speed" into qt-r1-dev 2019-07-29 19:46:21 +00:00
Miranda Kephart
6369fc0379 Add phenotype flags for transcription speed
Bug: 138305857
Test: manual (tested along with changes to pick up/use the flags)
Change-Id: I9b65079c75e01829a243ffd1286e8c171438cc6f
2019-07-26 17:02:51 -04:00
Beth Thibodeau
3c4a8e48d4 Stop timer when notification isn't visible
Fixes: 138261464
Test: manual, atest com.android.systemui.statusbar.notification.row.wrapper.NotificationMediaTemplateViewWrapperTest
Change-Id: Id7b1b586f3ab258fad8670070240ef951080c969
2019-07-26 11:33:18 -04:00
Vadim Caen
605e74c930 DO NOT MERGE Do not call drawableChanged pre Q
am: 843f9dee8b

Change-Id: I813f41905386da06e6eaebd6b7f85c17a6051456
2019-07-24 16:19:39 -07:00
Jorim Jaggi
d007c7b90d Merge "DO NOT MERGE Do not call drawableChanged pre Q" into qt-dev 2019-07-24 22:49:21 +00:00
Vadim Caen
843f9dee8b DO NOT MERGE Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
2019-07-24 21:29:12 +00:00
Dave Mankoff
e38da07841 Allow BrightLineFalsingManager settings to be experimented with via Phenotype.
This is a CP of http://ag/8687829

Bug: 138308096
Test: atest SystemUITests
Change-Id: I9e2b22b157c45da1606466acdfff3c5de7f182e1
Merged-In: I9fa4d1344bb184dea00f92f8d265667f0be11466
2019-07-24 18:37:11 +00:00
Dave Mankoff
1b80884e03 Allow BrightLineFalsingManager settings to be experimented with via Phenotype.
This also ensures that the FalsingManagerProxy cleans up its internal instance
whenever a Phenotype flag changes.

Bug: 71762354
Test: atest SystemUITests
Change-Id: I9fa4d1344bb184dea00f92f8d265667f0be11466
2019-07-18 17:22:54 -04:00
TreeHugger Robot
dcba632b41 Merge "Adjust window rounded corners" into qt-r1-dev 2019-07-11 20:01:41 +00:00