Commit Graph

11519 Commits

Author SHA1 Message Date
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
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
Daniel Sandler
59fdc5ca76 Merge "Q card." into qt-dev
am: 13de667fa6

Change-Id: Ia30df6e52c78381860782b282125d9deef9511b5
2019-07-10 21:21:30 -07:00
Beverly
72dbd11ccd Adjust window rounded corners
Test: manual
Fixes: 136652290
Change-Id: I969b00528e269da16021387cb8298e05aeeb63ab
2019-07-10 14:00:17 -04:00
Dan Sandler
8c7b8cbd39 Q card.
(Goodbye, hypno-P and your '90s tech magazine color palette.)

Bug: 123903304
Test: adb shell am start -n android/com.android.internal.app.PlatLogoActivity
Test: adb shell am start -c com.android.internal.category.PLATLOGO -a android.intent.action.MAIN
Test: adb shell am start -n com.android.egg/.paint.PaintActivity # still works
Change-Id: I4865024a14b6a78e7a043c56d2330b5f9dd214c6
Merged-In: I4865024a14b6a78e7a043c56d2330b5f9dd214c6
2019-07-10 17:21:30 +00:00
Matt Pietal
ef430bb118 Merge "Resolver - 'Always' button broken for non VIEW cases" into qt-dev
am: 914de104b3

Change-Id: I5583dde27c46f7130a540fce1476400767e7ec98
2019-07-03 16:55:05 -07:00
Ray Essick
790f8912a3 Merge "Revert "Preload sfplugin_ccodec for performance"" into qt-dev
am: fb4fab4fa3

Change-Id: I7be69015e447bd251edfe8595d6774327b491570
2019-07-03 16:51:28 -07:00
Matt Pietal
914de104b3 Merge "Resolver - 'Always' button broken for non VIEW cases" into qt-dev 2019-07-03 20:11:59 +00:00
TreeHugger Robot
fb4fab4fa3 Merge "Revert "Preload sfplugin_ccodec for performance"" into qt-dev 2019-07-03 19:08:42 +00:00
Ray Essick
4a0199a899 Revert "Preload sfplugin_ccodec for performance"
This reverts commit 30da74bda4.

Reason for revert: occasional audio race, losing volume control for device

Bug: 133186424
Bug: 135763139
Change-Id: I3aca2780dfcf80cfe0095af2a40496f3af0733cd
2019-07-03 18:48:16 +00:00
Matt Pietal
a310c1fa3a Resolver - 'Always' button broken for non VIEW cases
Users are incorrectly being directed to the settings app when
selecting 'Always', making them unable to actually open an app through
the resolver.

Bug: 132071949
Test: Steps are reported in b/136451610
Change-Id: I11775d7b0b780195f08273ad2b90b8ecd2ee1db4
2019-07-03 09:12:56 -04:00
Winson Chung
a5c11b4ae4 Merge "Check that alpha is zero instead of transparent color to decide scrim" into qt-dev
am: 1abc45038b

Change-Id: I0c9ef5ebce04c7a477b55570c4b39f71e8bba14d
2019-07-02 11:17:22 -07:00
Ray Essick
0ef82ad076 Merge "Preload sfplugin_ccodec for performance" into qt-dev
am: 878a6b2015

Change-Id: Idae0ffb08ba0027b94bb0ff55f70af6dca7e2bd3
2019-07-02 10:59:30 -07:00
Matt Pietal
1861a11b43 Merge "Sharesheet - Fix regression in direct share sorting" into qt-dev
am: ac1c8ddcc3

Change-Id: I7abc46fe03e5476ce129e4fb9712ed0200cd978b
2019-07-02 10:45:43 -07:00