Commit Graph

11594 Commits

Author SHA1 Message Date
Christian Wailes
013c7d23df Merge "Improved timekeeping logic for USAP Pool refill mechanism." 2019-06-12 17:12:09 +00:00
Lucas Dupin
d6dc382ba9 Fix unreadable clock am: 89233c49aa
am: 648b5d4b3b

Change-Id: I3fa8be16f2baf15e8f22251ffa6b41a147b621c3
2019-06-11 21:36:25 -07:00
Lucas Dupin
648b5d4b3b Fix unreadable clock
am: 89233c49aa

Change-Id: Ib2dff9f3dbc0359daf297d349bf8671969db9e7e
2019-06-11 21:31:22 -07:00
Lucas Dupin
89233c49aa 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
2019-06-12 04:22:24 +00:00
Chris Wailes
2f37bb1f6a Improved timekeeping logic for USAP Pool refill mechanism.
This patch makes two changes to increase the reliability of the USAP
pool refill mechanism.  The first is to change the storage type of the
result of an expression from int to long.  This will help avoid
potential overflow issues.

The second change mitigates the impact of the non-monotonic system clock
having its value changed.  If the clock goes backwards in time past when
the initial event triggered the refill delay, the delay will now be reset.

Test: Treehugger
Change-Id: Ic6f65de51757803b5ba95975bab3b9322a91c837
2019-06-11 16:40:56 -07:00
Chris Wailes
8b8d58cc94 Re-adds a trace point that was accidentally removed.
Test: Built and collected a trace to verify slice ended
Change-Id: Ic75d65fc7b2a417fc3a58c2df8ec9deb795fb418
2019-06-11 14:39:08 -07:00
Adrian Roos
b0c26c5da9 Merge "DecorView: Fix status guard" into qt-dev am: f5432f1862 am: 59ce261a24
am: ef4f533d00

Change-Id: I1c33b5db0ae1fdfe6ce63eb70747c621225c72ee
2019-06-11 10:53:59 -07:00
Adrian Roos
ef4f533d00 Merge "DecorView: Fix status guard" into qt-dev am: f5432f1862
am: 59ce261a24

Change-Id: I4667e94ab6c7ecefd0b40186081bc5bc115352fc
2019-06-11 10:48:43 -07:00
Adrian Roos
55fe653956 Merge "DecorView: Fix status guard" into qt-dev
am: f5432f1862

Change-Id: I0f455bb3e860e089dfe31b6d5e8109a74580989d
2019-06-11 10:45:09 -07:00
Adrian Roos
59ce261a24 Merge "DecorView: Fix status guard" into qt-dev
am: f5432f1862

Change-Id: I194348b7c2a90890a616f877a9470f54fcea829a
2019-06-11 10:44:09 -07:00
Adrian Roos
f5432f1862 Merge "DecorView: Fix status guard" into qt-dev 2019-06-11 17:34:32 +00:00
Christopher Ferris
8e3731924f Merge "Clean-up places that try to read wrap property." 2019-06-11 16:17:34 +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
86b3328246 Merge "Removes unused code from the SystemServer/Zygote classes." 2019-06-11 01:22:28 +00:00
Christopher Ferris
2d030bc4dd Clean-up places that try to read wrap property.
Create a global function that gets the wrap property so everyone uses
the same definition.

It also fixes a bug in ProcessList.java that always set the using wrapper
variable to true since SystemProperty.get() always returned an empty string.
When this is fixed, the function getInputDispatchingTimeout() in
ActivityTaskManagerService.java will return 5 seconds instead of 60 seconds.
Therefore, there is a chance there could be timeouts occurring that didn't
occur before.

Bug: 133515802

Test: Built on a non-USAP device and verified that the wrap property works.
Test: Built on a USAP device and verified that the wrap property works.
Test: Ran the CtsWrapWrapDebugTestCases (verifies wrap.sh still works).
Change-Id: Ia3a85b6572aca6aafaf1405f8d3d97f4bb2441f6
2019-06-10 17:12:46 -07:00
Christian Wailes
31e3b9cb80 Merge "Fixes two data races in USAP pool management." into qt-dev
am: 5e468cf4dd

Change-Id: I08c601277f24cf918000eb032e7d95f38e6c0c5c
2019-06-10 15:26:57 -07:00
Christian Wailes
5e468cf4dd Merge "Fixes two data races in USAP pool management." into qt-dev 2019-06-10 22:09:43 +00:00
Christian Wailes
7d7b584fc1 Merge "Moved some thread priority changes." 2019-06-10 21:29:32 +00:00
Eugene Susla
c9298d4882 Merge "Guard against null mFunc in PooledLambdaImpl" into qt-dev am: e64acbea8e
am: 6fef220b46

Change-Id: I770a2850c36103b1a379dbe9035d191e963ad5d6
2019-06-10 13:57:29 -07:00
Eugene Susla
3d4f87f021 Merge "Guard against null mFunc in PooledLambdaImpl" into qt-dev
am: e64acbea8e

Change-Id: Id70c4176ad600aa74bcec853d28cdf7bd1fc6e86
2019-06-10 13:45:47 -07:00
Eugene Susla
6fef220b46 Merge "Guard against null mFunc in PooledLambdaImpl" into qt-dev
am: e64acbea8e

Change-Id: I5591cb8fc6eefae6c82e8d1dc705f422484bd3ea
2019-06-10 13:39:25 -07:00
Chris Wailes
fcd68fd74b 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.

These changes are no longer needed due to a change in the graphics
driver strategy for Q.

Bug: 134524811
Test: Treehugger
Change-Id: I570037866d1ae90794c711622e6045ebbffa5b9c
2019-06-10 13:37:46 -07:00
TreeHugger Robot
e64acbea8e Merge "Guard against null mFunc in PooledLambdaImpl" into qt-dev 2019-06-10 20:28:11 +00:00
Chris Wailes
9cbcf722ec Moved some thread priority changes.
The previous place I had moved these changes resulted in runtime threads
being created at the wrong priority.  This patch moves the calls to the
correct location.

Test: atest CtsJvmtiRunTest924HostTestCases
Change-Id: Iad2e17cd137eab81c595cb6816608a36b009da8b
2019-06-10 11:15:35 -07:00
Matt Pietal
f9e1a83542 Merge "Sharesheet - Hide direct share area for low ram devices" into qt-dev am: fcc4d76a97 am: 1fd7d07ddf
am: d595ffd2fb

Change-Id: I3019421fd6f3c1fb38e4bea813206bb273ff0078
2019-06-10 10:46:05 -07:00
Matt Pietal
d595ffd2fb Merge "Sharesheet - Hide direct share area for low ram devices" into qt-dev am: fcc4d76a97
am: 1fd7d07ddf

Change-Id: I71b6c3e325b40b32cc732f909b9af87532763263
2019-06-10 10:39:07 -07:00
Matt Pietal
e1422bca65 Merge "Sharesheet - Hide direct share area for low ram devices" into qt-dev
am: fcc4d76a97

Change-Id: I1e2d8680afa856ee1f310d292eeb52ccb7826f8f
2019-06-10 10:36:14 -07:00
Matt Pietal
1fd7d07ddf Merge "Sharesheet - Hide direct share area for low ram devices" into qt-dev
am: fcc4d76a97

Change-Id: Ia4622b13fcb9befbf34932b86c247dc3057323a5
2019-06-10 10:33:44 -07: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
fa1860f609 Merge "Sharesheet - Adjust timeouts and logic for direct share" into qt-dev am: 503b489384 am: e214c2e1df
am: 6cd0e8e3f5

Change-Id: I20de8c0fbfbae7236c4efa4a44b9c156da36a9bb
2019-06-10 08:10:09 -07:00
Matt Pietal
6cd0e8e3f5 Merge "Sharesheet - Adjust timeouts and logic for direct share" into qt-dev am: 503b489384
am: e214c2e1df

Change-Id: I0978602cef7d4f452202b2c7824f879588af8469
2019-06-10 08:05:07 -07:00
Matt Pietal
e214c2e1df Merge "Sharesheet - Adjust timeouts and logic for direct share" into qt-dev
am: 503b489384

Change-Id: I909a6fab95581a4c001486aef84d70ccc5221e50
2019-06-10 08:00:11 -07:00
Matt Pietal
8b19acac90 Merge "Sharesheet - Adjust timeouts and logic for direct share" into qt-dev
am: 503b489384

Change-Id: Ibbbb8947eeaae6c2f883f725de8c6dec8b25792c
2019-06-10 08:00:10 -07: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
Christian Wailes
aa85aac5e2 Merge "Fixes two data races in USAP pool management." into qt-dev-plus-aosp
am: bc5237a4f1

Change-Id: I62f7e9636c40fe38bc7d860a572024a8dccd3fb3
2019-06-07 17:40:03 -07:00
Chris Wailes
f68c4e2ffa 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 16:51:48 -07: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
Chris Wailes
45264b7423 Resets the refill action/timing info after a pool fill event.
Bug: 132794985
Test: m & flash & launch more apps than USAPs in the pool
Change-Id: I9ee74d76692fa8aeba9c70765b3e8f98ea9105bc
2019-06-07 13:25:53 -07:00
Chris Wailes
3deb2b5b7a Make the USAP Pool refill delay configurable.
This patch fetches the USAP pool refill delay value from device_config
instead of hardcoding it.

Bug: 131362095
Test: Build and launch 10+ apps successfully
Change-Id: Idfeb30fa62fa296492da211b2b44902ff4f99b18
2019-06-07 13:25:53 -07:00
Chris Wailes
ca49f49053 Adjust Java Language thread priority in new processes.
Previously init started the Zygote with -20 nice value and then
immediately switched it to 0 in ZygoteInit.main so that new applications
forked from the Zygote have the correct Java Language thread priority.
This patch delays this priority change so that it only affects the new
processes and not the priority of the Zygote.

Test: m & flash & check ps
Change-Id: Id00d0cfd642f02640c40b6e7b2aa8933a320b60c
2019-06-07 13:25:53 -07:00
Chris Wailes
3d7482189f Adjusts the USAP pool refill mechanism.
This patch adjusts the USAP pool refill mechanism so that it is less
disruptive to launching applications.  Refill events are now delayed
by several (3) seconds if delaying wouldn't cause the pool to be below
the minimum population size.

This patch also adjusts the process priorities for the USAPs and other
processes spawned from the Zygote so that they behave better in the
context they are spawned in.

Bug: 131362095
Test: booted & launched apps & checked logs
Change-Id: I7328f304c9b744cfdbfbdbe522a5f9aeea5233bb
2019-06-07 13:25:50 -07:00
Christian Wailes
c51f68f6da Merge "Fixes two data races in USAP pool management." 2019-06-07 17:59:45 +00:00
Benedict Wong
f31b3fdcaa Revert "Take all VPN underlying networks into account when migrating traffic for" am: ac06c1022d am: f0904ebfc0
am: 27e91edd6b

Change-Id: I5306f76761ce4ae3c8a0ec89b6bdea3e004a1d73
2019-06-07 02:48:37 -07:00
Benedict Wong
27e91edd6b Revert "Take all VPN underlying networks into account when migrating traffic for" am: ac06c1022d
am: f0904ebfc0

Change-Id: I2695c296398aeb6e5378bba0c89c8ae0b3cd55c6
2019-06-07 02:43:33 -07:00
Benedict Wong
f0904ebfc0 Revert "Take all VPN underlying networks into account when migrating traffic for"
am: ac06c1022d

Change-Id: Ie9e830962e702c5e66faa7239e6c5037ed3d791d
2019-06-07 02:33:33 -07:00
Benedict Wong
3e9726c69c Revert "Take all VPN underlying networks into account when migrating traffic for"
am: ac06c1022d

Change-Id: Iec81a5823e476a52c41a9853fb40aa1804d1a826
2019-06-07 02:33:30 -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
Chris Wailes
fb329ba7c8 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
2019-06-06 17:04:56 -07:00