Commit Graph

11276 Commits

Author SHA1 Message Date
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
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
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
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
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
1abc45038b Merge "Check that alpha is zero instead of transparent color to decide scrim" into qt-dev 2019-07-02 17:37:34 +00:00
Ray Essick
878a6b2015 Merge "Preload sfplugin_ccodec for performance" into qt-dev 2019-07-02 17:10:33 +00:00
Winson Chung
ffc70a68c0 Check that alpha is zero instead of transparent color to decide scrim
Bug: 136370711
Test: atest EnsureBarContrastTest
Change-Id: I45c4a81d5e7fe6f99615efca528a623f3830f16a
2019-07-01 22:46:07 +00:00
Matt Pietal
bdbeea28d2 Sharesheet - Fix regression in direct share sorting
When mutiple apps share shortcuts and are given to the UI to display,
the ranked order from both the App Prediction Service and the legacy
ranker is inadvertently being discarded. This means that targets the
user almost never uses will now be shown as high priority, causing
confusion and pretty horrible user experience.

Address the issue by adding in a score for shortcuts, based on the
index in the ordered list.

Bug: 136201796
Test: atest ChooserActivityTest and manually compare results from
      AppPredictionService to verify order is consistent
Change-Id: I1fe2c2d2e13195f6f6c3a5818fade4844c15488e
2019-07-01 16:52:52 -04:00
TreeHugger Robot
f76bdce6e0 Merge "Restore some greylist entries." into qt-dev 2019-06-28 12:02:43 +00:00
Matt Pietal
d73543b588 Merge "Resolver - Improve flow for Intent URL handling" into qt-dev 2019-06-28 12:02:04 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
Matt Pietal
0d6834adfe Resolver - Improve flow for Intent URL handling
When a URL is detected and all resolved targets are browsers, allow
the user to set a default browser from the Resolver. If one of the
options is an App and not a browser (as defined by
ResolveInfo.handleAllWebDataURI) then direct the user to the settings
page where they can make changes to set the default app for particular
URLs.

On the settings page, highlight the correct setting to change so it's
clear to the user.

Bug: 132071949
Test: Manually resolve URLs with multiple browsers and apps like Reddit/Twitter
Change-Id: Ib8f867a020ecfbb73fa5f1d7db84890c72e4842d
2019-06-27 13:35:11 -04:00
Jorim Jaggi
6482df5602 Request invalidate root when legacy nav bar bg changes
...because only invalidating the root window node will ensure that
onPostDraw() will be called again.

Test: Open com.planeth.rhythm
Fixes: 135207159
Change-Id: I03f814eb7435d91287968f3dcb72f579ab4a35ed
2019-06-27 11:15:14 +00:00
TreeHugger Robot
667d2c91bc Merge "Don't throw from PooledLambda#toString" into qt-dev 2019-06-27 00:51:27 +00:00
Eugene Susla
9891f0986c Don't throw from PooledLambda#toString
Turns out there was one more place b/134594642#comment23

Fixes: 134594642
Test: presubmit
Change-Id: I602569c6dd0632641215a7482def2987e10701b2
2019-06-26 15:15:23 -07:00
TreeHugger Robot
079d81a479 Merge "Add handle suppression to learned state" into qt-dev 2019-06-26 17:08:37 +00:00
TreeHugger Robot
2f54cf120e Merge "Fixed autofill compat mode regression caused by DecorContext" into qt-dev 2019-06-25 21:32:01 +00:00
Eugene Susla
224b4c761d Merge "[DO NOT MERGE] Don't throw from PooledLambdaImpl#toString" into qt-dev 2019-06-25 19:52:48 +00:00
Adam He
14c5b94058 Fixed autofill compat mode regression caused by DecorContext
Fixes: 135038324
Test: manual verification
Test: atest CtsAutoFillServiceTestCases
Change-Id: Iab32c24fdd9ad02308e79652422d1c4965be8e7c
2019-06-25 11:40:57 -07:00
Govinda Wasserman
3aa4f362c1 Add handle suppression to learned state
Also adds a phenotype flag to enable handles in the learned state once
per day.

Test: Tested locally
BUG:132983599
Change-Id: I21e422382e62ee098cd6ff76d6b764db98be0cb7
Merged-In: I21e422382e62ee098cd6ff76d6b764db98be0cb7
2019-06-25 18:29:39 +00:00
Eugene Susla
75632d616d [DO NOT MERGE] Don't throw from PooledLambdaImpl#toString
Bug: 134594642
Test: presubmit
Change-Id: Ia0834a76e7ae9a222ec2698dcd989317bb20f2a0
(cherry picked from commit 7f000e1dd9)
2019-06-25 18:03:50 +00:00
Matt Pietal
3ed20a7555 Sharesheet: Make max shortcut targets configurable
Allow different values for different devices

Bug: 135617408
Test: Manual
Change-Id: I01c27834d6218b9f5502976ee2a561eb73c364fc
2019-06-24 12:39:17 -04:00
Dave Mankoff
e0321d5809 DO NOT MERGE Allow the new BrightLineFalsingManager to be enabled via PhenoType.
Test: atest SystemUITests
Bug: 111394067
Change-Id: I0ab9a72d66bf56a56df2de2ad2d247f299d1b748
Merged-In: I0ab9a72d66bf56a56df2de2ad2d247f299d1b748
2019-06-22 14:19:01 +00:00
Eugene Susla
45fcf147c1 [DO NOT MERGE] Fix race in AbstractSinglePendingRequestRemoteService
Fixes: 135355306
Test: presubmit
Change-Id: I78d9840a9d7e04cd373c967b259a614990153841
2019-06-20 01:50:48 +00:00
Winson Chung
ffde2ea8e5 Add config to control full task snapshot scale
- Also save the scale with the snapshot data instead of trying to infer it
  from the state
- Also recycle the reduced resolution snapshot copy after writing it

Bug: 135150767
Test: atest TaskSnapshotPersisterLoaderTest
Change-Id: I64a9ccf16f3966ad5c6d07ff0b6ce8e9dd710e40
2019-06-18 14:12:25 -07:00
TreeHugger Robot
eb5532eac8 Merge "Fix the missing longwake finish event problem." into qt-dev 2019-06-14 01:03:34 +00:00
Hui Yu
5b4edd6038 Fix the missing longwake finish event problem.
When starting a new batteystats history file, before inserting a new
CMD_CURRENT_TIME HistoryItem at beginning of the history
buffer, make a copy of the current HistoryItem. Otherwise the current
HistoryItem could be overriden by the CMD_CURRENT_TIME and we lose
a HistoryItem.

In b/130083227, the longwake start event happends before opening the new
history file, after CMD_CURRENT_TIME event, the longwake finish event
is missing. The fix is to make a copy of current HistoryItem before
adding CMD_CURRENT_TIME event.

Change-Id: I5048f98b6b47f54336fb01e354fb5a6284c84b43
Fix: 130083227
Test: b/130083227 can be reproduced by createFakeHistoryEvents() call,
missing longwake finish event can be seen after "TIME:" record. With the
fix, no more missing longwake finish event after "TIME:" record.
“adb shell dumpsys  batterystats --history-create-events 50000” to
create enough events to start new history files,
“adb shell dumpsys batterystats --history” to observe all history records.
2019-06-13 10:42:48 -07:00
TreeHugger Robot
3d0fbc98f8 Merge "Create String before bundling AsyncTask" into qt-dev 2019-06-12 23:35:30 +00:00
Christian Wailes
7983bfb3e6 Merge "Removes unused code from the SystemServer/Zygote classes." into qt-dev 2019-06-12 19:45:41 +00:00
Jorim Jaggi
86d30ff8e3 Draw legacy nav bar background directly
If we only use a view for it, it may not be visible depending on
what the app will do with the DecorView, i.e. set a weird clip
region. To fix that, we also draw the legacy navigation bar
background separately in a post-draw callback.

Test: TikTok
Test: Material app is still able to set bar color
Fixes: 131211797
Change-Id: Id744b98780f8f7f6dcd3482803a680a8f93be4c5
2019-06-12 18:19:41 +02:00
Lucas Dupin
c442c8e5f5 Merge "Fix unreadable clock" into qt-dev 2019-06-12 06:24:52 +00:00
Lucas Dupin
a476c79c3a Fix unreadable clock
- Always use white text with shadows on media
- Use lock screen colors for shade theme
- Remove legacy wallpaper visibility listener
- Remove shadow from black title

Test: set white wallpaper
Test: set dark wallpaper
Test: set dark wallpaper on home, light on ls
Test: set dark wallpaper on ls, light on home
Test: atest SysuiColorExtractorTests
Fixes: 134119878
Change-Id: I64ee2dee14322b2c02891c3ffe5fc0b25d1f100b
Merged-In: I64ee2dee14322b2c02891c3ffe5fc0b25d1f100b
2019-06-12 02:10:43 +00:00
Chris Wailes
bed1976f85 Removes unused code from the SystemServer/Zygote classes.
This patch partially reversts ag/6991475 and ag/7161709.  These changes
are no longer needed due to a change in the graphics driver strategy for
Q.

In addition, the preloading of the graphics driver in the USAPs need to
be removed to avoid causing a memory regression on devices with graphics
driver preloading in the Zygote disabled.

Bug: 134526352
Test: Treehugger
Change-Id: I570037866d1ae90794c711622e6045ebbffa5b9c
Merged-In: I570037866d1ae90794c711622e6045ebbffa5b9c
(cherry picked from commit fcd68fd74b)
2019-06-11 16:34:40 -07:00
Adrian Roos
f5432f1862 Merge "DecorView: Fix status guard" into qt-dev 2019-06-11 17:34:32 +00:00
Adrian Roos
27db0caaca DecorView: Fix status guard
Fixes several issues with the status guard:
- poor background color for light status bar background
- guard & action mode need insets for the navigation bar in landscape
- status guard was not properly dismissed after completion of the action mode
- uses the proper non-zero root inset when LAYOUT_HIDE_NAVIGATION is unset & in landscape

Bug: 132924796
Test: make ApiDemos, use SystemUiModes activity to trigger action mode
Change-Id: Ie9ba2b6fb2c87a1825df85f756ffb062a45d4f55
2019-06-11 17:09:12 +02:00
Christian Wailes
5e468cf4dd Merge "Fixes two data races in USAP pool management." into qt-dev 2019-06-10 22:09:43 +00:00
TreeHugger Robot
e64acbea8e Merge "Guard against null mFunc in PooledLambdaImpl" into qt-dev 2019-06-10 20:28:11 +00:00
TreeHugger Robot
fcc4d76a97 Merge "Sharesheet - Hide direct share area for low ram devices" into qt-dev 2019-06-10 17:29:52 +00:00
Matt Pietal
6e88b51026 Sharesheet - Hide direct share area for low ram devices
Make sure to force the item count to 0 to make sure the direct share
area stays hidden.

Bug: 134776740
Test: Low ram device, manual
Change-Id: I598752db5747b1c845495af7ae2f591488799352
2019-06-10 10:20:15 -04:00
Matt Pietal
ab73a887ef Sharesheet - Adjust timeouts and logic for direct share
Improve direct share loading by:
1. Do not issue redundant service calls within the watchdog timeout
period
2. Set a min and max watchdog timeout period, and if all services
return early, then informt the user we are done to so that they don't
have to wait until the max timeout period.
3. Be more specific on package changes. Resolver requires any change
to trigger a refresh, but chooser only needs to know about top level
package changes.

Bug: 134416594
Test: Manual
Change-Id: I075fd5b6f64c25637fd7ba7aa6b163dca81371a8
2019-06-10 07:24:51 -04:00
Eugene Susla
f8fc474c8f Guard against null mFunc in PooledLambdaImpl
Fixes: 134594642
Test: presubmit
Change-Id: I7b65d18df1625a276986a844569a1275c09df4e4
(cherry picked from commit 1cff0828e3)
2019-06-07 21:22:33 +00:00
Chris Wailes
f59ea2cc39 Fixes two data races in USAP pool management.
The USAP pool management code contained two data races.  One could cause
a double decrement if a runtime thread executed the SIGCHLD handler
while the server was responding to a pool exit message from a USAP.  The
other data race could occur when the SIGCHLD handler executed in the
middle of a USAP pool flush.

The solution to the first race is to change the return value from a
helper function to ensure that the decrement only occurs when the entry
is invalidated through that specific invocation of the helper.

The second data race was fixed by using SIGTERM instead of SIGKILL when
flushing the USAP pool.  This allows the Zygote to clear the table
entries outside of the SIGCHLD handler, and the handler to avoid
duplicate bookkeeping cleanup when this occurs.  SIGTERM is used so that
it can be differentiated from other process termination events and so
that it can be blocked while the USAP is specializing, but hasn't yet
informed the Zygote of it's removal from the pool.  This issue and this
fix will no longer be necessary once the Zygote signal handler has been
replaced with a signalfd.

Bug: 132794985
Test: atest SignedConfigHostTest
Change-Id: Ie01637a10b356b80b5aa62291a97f2c167242827
Merged-In: Ie01637a10b356b80b5aa62291a97f2c167242827
(cherry picked from commit fb329ba7c8)
2019-06-07 13:32:38 -07:00
Benedict Wong
ac06c1022d Revert "Take all VPN underlying networks into account when migrating traffic for"
This reverts commit 917327b193.

Reason for revert: This change has been implicated in 4-way deadlocks as seen in b/134244752.

Bug: 134244752
Change-Id: Ibdaad3a4cbf0d8ef1ed53cfab1e454b9b878bae9
2019-06-07 09:18:01 +00:00
Ray Essick
30da74bda4 Preload sfplugin_ccodec for performance
preload libsfplugin_ccodec to avoid latency during camera startup (and
other media consuming apps).

Bug: 133186424
Test: boot, debug logging of times
Change-Id: Ifa283d13f4564ff323b98e7cf815a477f1c7d169
2019-06-06 21:12:30 -07:00