Commit Graph

9955 Commits

Author SHA1 Message Date
Svet Ganov
398780aee6 Merge "Don't access keyguard from instant apps." into pi-dev am: e7bd4e7e8f
am: cbd47f7937

Change-Id: Ia58918ec4c66f9263ad7d0e27e74ae1b87402ba4
2018-06-07 23:19:40 -07:00
Svet Ganov
cbd47f7937 Merge "Don't access keyguard from instant apps." into pi-dev
am: e7bd4e7e8f

Change-Id: I5d5d8ea0c7b5756143b5140e4cf16ae584147345
2018-06-07 22:12:45 -07:00
TreeHugger Robot
7231e7b6ce Merge "More conservative dark text calculation" 2018-06-08 04:33:50 +00:00
Svet Ganov
3ea66c319c Don't access keyguard from instant apps.
Test: cts-instant-tradefed run cts-instant -m CtsViewTestCases

bug:109652548

Change-Id: I6f8bb714bd98fd53068b2662633a9155d64b274c
2018-06-07 20:20:38 -07:00
Lucas Dupin
a291d19e47 More conservative dark text calculation
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
2018-06-07 16:33:09 -07:00
TreeHugger Robot
300a14eb98 Merge "PointerLocationView: Add top padding to header if there is a cutout" 2018-06-07 10:06:17 +00:00
TreeHugger Robot
346b70df9f Merge "Wean Statsd off BatteryStats: WakeupAlarm" 2018-06-06 18:33:45 +00:00
Adrian Roos
de5c3dac25 PointerLocationView: Add top padding to header if there is a cutout
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.
2018-06-06 18:58:58 +02:00
Dan Sandler
76c76d5b7e Merge "Delay pruning direct share targets." into pi-dev am: 22385d9d4e
am: 396330a584

Change-Id: I9fe64d0896db76b06c2dbeca706795f280b058f3
2018-06-05 17:35:49 -07:00
Dan Sandler
396330a584 Merge "Delay pruning direct share targets." into pi-dev
am: 22385d9d4e

Change-Id: Ic94163018248073c54416a2196591af98e22e944
2018-06-05 16:55:06 -07:00
TreeHugger Robot
22385d9d4e Merge "Delay pruning direct share targets." into pi-dev 2018-06-05 22:55:44 +00:00
Svet Ganov
aa5d9beecc Don't access keyguard from instant apps. am: e5a3125c1c
am: 54f78810cc

Change-Id: I916c50f5e0c27a17b1e7dc284b5544b920fc20e8
2018-06-05 14:41:20 -07:00
Svet Ganov
54f78810cc Don't access keyguard from instant apps.
am: e5a3125c1c

Change-Id: I1a6574d771f3e94727d85d24eb5f1abe1a0f388d
2018-06-05 14:34:22 -07:00
Svet Ganov
e5a3125c1c Don't access keyguard from instant apps.
Test: manual

bug:109652548

Change-Id: Ife1302e39e4f71f66d032619068a7e0214856b32
2018-06-05 20:29:40 +00:00
TreeHugger Robot
6976b764ad Merge "Wean Statsd off BatteryStats: Network Power" 2018-06-05 19:57:10 +00:00
Dan Sandler
f5e17699e3 Delay pruning direct share targets.
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
2018-06-05 15:31:46 -04:00
Lucas Dupin
2d1ef0bf60 Clear all fade-out timeouts
Change-Id: Id549d70836ca73ff7a079c41ac9793b64281bc84
Fixes: 80554360
Test: visual
2018-06-04 17:51:37 -07:00
TreeHugger Robot
bc9a02b998 Merge "Wean statsd off batterystats: workchain, longPW" 2018-06-04 17:22:28 +00:00
Bookatz
9b2199bdac Wean Statsd off BatteryStats: WakeupAlarm
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
2018-06-01 23:46:05 +00:00
Olivier Gaillard
58b56e3720 Collect a few more binder stats when detailed tracking is enabled.
Test: unit tested

Change-Id: Ibdbbd2b9b60dbc6fa375d60c76f04d42392d6bd3
2018-06-01 21:25:53 +01:00
Bookatz
d888df2ba9 Wean statsd off batterystats: workchain, longPW
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
2018-06-01 11:12:41 -07:00
Bookatz
0b028b1dc0 Wean Statsd off BatteryStats: Network Power
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
2018-06-01 10:52:36 -07:00
Fyodor Kupolov
01f9711dd0 Merge "Use sampling for faster measuring of CPU time" 2018-06-01 01:06:23 +00:00
TreeHugger Robot
3795062f23 Merge "Protect usage data with OP_GET_USAGE_STATS." 2018-05-31 19:21:14 +00:00
Fyodor Kupolov
cf0fe2d456 Use sampling for faster measuring of CPU time
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
2018-05-31 11:16:37 -07:00
Evan Rosky
ee4376a290 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev am: 7ba4c2b254
am: 9bf11ede69

Change-Id: I3e1eb6884cedb86ec144e5ada09b4252ee266c96
2018-05-30 15:10:41 -07:00
Evan Rosky
9bf11ede69 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev
am: 7ba4c2b254

Change-Id: Ia7fab42d36c8b58b05656cc2e5d1253449becf96
2018-05-30 15:02:51 -07:00
Evan Rosky
7ba4c2b254 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev 2018-05-30 21:47:25 +00:00
TreeHugger Robot
bab6908c1f Merge "Statsd: ISOLATED_UID_CHANGED out of batterystats" 2018-05-30 11:36:27 +00:00
Selim Cinek
8b5c67b2ab Merge "Fixed the animations of Messaging Layout, leading to overlaps" into pi-dev am: d982210d89
am: 0fc5e52023

Change-Id: I601fde5804a921a9e634e342993402d4feb8031a
2018-05-29 19:05:58 -07:00
Selim Cinek
0fc5e52023 Merge "Fixed the animations of Messaging Layout, leading to overlaps" into pi-dev
am: d982210d89

Change-Id: I4b29f82656e3b3402f89cb5d66e71955287ac0b8
2018-05-29 18:59:25 -07:00
TreeHugger Robot
d982210d89 Merge "Fixed the animations of Messaging Layout, leading to overlaps" into pi-dev 2018-05-30 00:52:32 +00:00
Selim Cinek
f68af9b171 Fixed the animations of Messaging Layout, leading to overlaps
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
2018-05-29 15:29:48 -07:00
Daniel Sandler
ec4dab7c06 Merge "Remove direct-share target row animations and limit to one row." into pi-dev am: d8f3889b28
am: 3d7510c338

Change-Id: Ib249a9ed211757943238715cfd08c7d3e3feebbe
2018-05-29 10:13:27 -07:00
Daniel Sandler
3d7510c338 Merge "Remove direct-share target row animations and limit to one row." into pi-dev
am: d8f3889b28

Change-Id: I02947ea217d0ae98f792a63fd24542aed1567afb
2018-05-29 10:01:02 -07:00
Daniel Sandler
d8f3889b28 Merge "Remove direct-share target row animations and limit to one row." into pi-dev 2018-05-29 16:46:57 +00:00
Steven Wu
8f133c751f Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev am: d0545395df
am: 8d103afa4e

Change-Id: I147ea24394239b1161199801085680febc3daa84
2018-05-29 08:40:00 -07:00
Steven Wu
8d103afa4e Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev
am: d0545395df

Change-Id: I5411ba9cacf0fa4f9308f83d00677a23a95155da
2018-05-29 08:28:13 -07:00
TreeHugger Robot
d0545395df Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev 2018-05-29 15:18:04 +00:00
Dan Sandler
62aad00c6c Remove direct-share target row animations and limit to one row.
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
2018-05-29 13:58:10 +00:00
Evan Rosky
cd80e611ca Fixed a bug where sometimes unhandled handler would consume all keys
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
2018-05-25 16:18:57 -07:00
Bookatz
3c64886a46 Statsd: ISOLATED_UID_CHANGED out of batterystats
Moves the calls to StatsLog.write for ISOLATED_UID_CHANGED to the
calling functions, rather than batterystatsimpl.

Bug: 80308558
Test: none?
Change-Id: I6fe389c536b2a456907c8a87fae61e9c3434004d
2018-05-25 14:24:52 -07:00
Selim Cinek
e59e48e9c1 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev am: c4e19963f4
am: 7712d46760

Change-Id: Ib07dc6354fb3a5fa5ff6171d1c656634465b29fa
2018-05-25 13:30:42 -07:00
Selim Cinek
7712d46760 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev
am: c4e19963f4

Change-Id: I7e5feadc253816852528e06719e136a7cba51c49
2018-05-25 13:21:38 -07:00
Selim Cinek
c4e19963f4 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev 2018-05-25 20:06:52 +00:00
Steven Wu
3aa2cf7541 Fixes a NPE in search manager in slice CTS tests.
Test: atest CtsSliceTestCases
Change-Id: I8d25dd5c216a4e2fa99b2a32bce689bee767dcfa
Fixes: 76211625
2018-05-25 15:20:10 -04:00
Selim Cinek
ce8794fbbc Fixed the behavior of group conversations when targeting P
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
2018-05-25 09:16:38 -07:00
Andreas Gampe
97def7a097 Merge "Framework: Add API to get zygote PID" am: 1109e2333f am: 07578c786a
am: 4f11d5381e

Change-Id: I827a7df417597f17f78276052c5b17e064ebec7d
2018-05-24 17:47:57 -07:00
Hui Yu
8695c90def Merge "Calculate cellular radio value from modem.controller values." into pi-dev am: b82d3d7e74
am: 1fa3b11dfe

Change-Id: I53bfc386637e2cf8358703e1844160ad470b24cd
2018-05-24 17:23:11 -07:00
Hui Yu
1b04800f05 Merge "Merge "Fix per app GPS power usage." into pi-dev am: da4c54e9da" into pi-dev-plus-aosp
am: df34735c50

Change-Id: I7ca08692d661c56cedf3548c5d557472e7b16caf
2018-05-24 15:55:54 -07:00