Refactored WallpaperColors to use constrast ratio instead of luminance
for detecting dark pixels. Also using a contrast more conservative than
what GAR requires while decreasing the dark area threshold.
Change-Id: I67b799be4b7ccd50bb3e63c6179d513b9b76446b
Fixes: 76435920
Test: manually set various wallpapers
Test: use new debug flag to verify which pixel is actually dark
Prevents the header of the pointer location view from overlapping with the display
cutout by padding it at the top.
Change-Id: I3ec574ba24a832044260218d96018c5e08024425
Fixes: 109759319
Test: enable display cutout, enable pointer location view, verify cutout does not overlap with the pointer location header.
Pruning was intended to remove targets corresponding to
now-missing packages, but in practice causes the list to
briefly disappear any time packages change:
PACKAGE_CHANGED ->
ResolverActivity.rebuildList() ->
ChooserActivity.onListRebuilt() with an empty
ResolverActivity.mDisplayList
In practice package changes happen all the time, so this
jank happens fairly often. (It contributed to b/67622422 as
well, since all this list rebuilding started animations that
locked out user input.)
This CL removes the old pruning process (comparing targets
against mDisplayList). Instead, we note that mDisplayList
got emptied, and lazily empty our own mServiceTargets once
we start getting responses back from all the services we
just re-queried.
The long-term fix here is to just rebuild all of this stuff.
Test: (1) share from Chrome
(2) toggle the enable state of some random package
to trigger PACKAGE_CHANGED, e.g.
adb shell pm (enable|disable) com.android.egg
(3) watch for jank
Bug: 109676071
Change-Id: Ie9d59b8f4b8cc8343beb40cbad6b8d52e5639082
Statsd calls were sometimes made from BatteryStats, instead of directly
from the source, as a way of getting it running quickly in P. These must
now be done properly and separately.
Note that Statsd needs to be independent of BatteryStats, in preparation
for deprecating large parts of BatteryStats.
Bug: 80308558
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Change-Id: I9e10672dd701adfbdd5a296c909e44fb17824cd1
The tool that generates StatsLogInternal.java now includes the following
type of code, to accomodate WorkSources automatically.
public static void write(int code, WorkSource ws, int arg2) {
for (int i = 0; i < ws.size(); ++i) {
write_non_chained(code, ws.get(i), ws.getName(i), arg2);
}
ArrayList<WorkSource.WorkChain> workChains = ws.getWorkChains();
if (workChains != null) {
for (WorkSource.WorkChain wc : workChains) {
write(code, wc.getUids(), wc.getTags(), arg2);
}
}
}
This will reduce a lot of code repitition for the StatsLog.write calls
in BatteryStats. Consequently, doing so will make it easier to remove
these StatsLog.write calls out of BatteryStats. We start in this cl with
LongPartialWakelock (as proof of principle).
Bug: 80308558
Bug: 80314737
Test: manual verification
Test: com.android.internal.os.BatteryStatsTests
Change-Id: Ibd28297345f4ab926dec01a89de0f1bfff9f8871
Statsd calls were sometimes made from BatteryStats, instead of directly
from the source, as a way of getting it running quickly in P. These must
now be done properly and separately.
Note that Statsd needs to be independent of BatteryStats, in preparation
for deprecating large parts of BatteryStats.
Bug: 80308558
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Change-Id: I54fa54a2dc59dfa68f0e063d7063fac423bf0bf4
Calling SystemClock.currentThreadTimeMicro() is expensive (order of
1 microsecond).
To mitigate that, we use sampling by measuring every 10th call for the
given class/transaction combination and extrapolate results.
Sampling is not used when --enable-detailed-tracking option is set,
For more compact output, only 90th percentile is printed, unless -a
option is set. Example output:
Per-UID Summary (cpu_time, % of total cpu_time, call_count, exception_count, package/uid):
13095032 43% 44663 0 com.package1/u0a35
8872156 29% 5831 0 com.package2/u0a75
2379684 8% 1549 0 com.package3/u0a23
Test: manual dumpsys binder_calls_stats
Test: BinderCallsStatsTest + BinderCallsStatsPerfTest
Bug: 75318418
Change-Id: I535e796c17e75d70970e227411cdf0e1a4afd81c
The animations could go wild at times, leading to overlapping
messages and ugly renderings. This improves the animations
overall and fixes those cases.
Test: add messages, observe animations
Fixes: 78114531
Fixes: 80409521
Change-Id: I6f21b87706ccc2e85f1edbd9489e4bf7e686d7d8
The animation---which was responsible for causing relayouts
that would in turn bind views, which involved package
manager roundtrips---would lock out interaction with the rest of
the share sheet for at least 400ms while the animation ran
(often much longer if services were slow to start or respond).
Now the main UI is never blocked, and direct share targets
can take as long as they like (up to 2sec) before appearing.
It's really fast now, basically.
Bug: 67622422
Bug: 63521992
Test: atest com.android.internal.app.ChooserActivityTest
Change-Id: I21826e282226f2b2ce6d3d1b5862dbfc449f5918
In a situation where a focused view consumed only the UP of a key
and the unhandled key manager would focus a listener, it wouldn't
drop focus unless the original key was pressed/released again.
This updates the record of captured keys before it can be consumed
in the view hierarchy.
Bug: 79993136
Test: Added a test for this to cts ViewTest#testUnhandledKeys
Change-Id: I5dfdcf16c5c41e9ad51cb62b385580c5493e8520
Moves the calls to StatsLog.write for ISOLATED_UID_CHANGED to the
calling functions, rather than batterystatsimpl.
Bug: 80308558
Test: none?
Change-Id: I6fe389c536b2a456907c8a87fae61e9c3434004d
Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.
Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display