Commit Graph

4371 Commits

Author SHA1 Message Date
Vladimir Marko
45faa6a41b Merge "Merge "Rename Binder.destroy() to Binder.destroyBinder()." am: a634b38c8e am: 1b4b326128 am: 17bb92fe14" into oc-dr1-dev-plus-aosp
am: 3ec8fd13f8

Change-Id: Ib21b4d3a88558971a51f31f16f9f57e1e54b3fb9
2017-06-23 13:06:38 +00:00
Vladimir Marko
8c120b8eb5 Merge "Rename Binder.destroy() to Binder.destroyBinder()." am: a634b38c8e am: 1b4b326128
am: 17bb92fe14

Change-Id: I08ab885e0b4373074e5eba3d36dcbb73c87458dc
2017-06-23 12:45:17 +00:00
Vladimir Marko
17bb92fe14 Merge "Rename Binder.destroy() to Binder.destroyBinder()." am: a634b38c8e
am: 1b4b326128

Change-Id: I165243924444f89ee880072c55eba012ccf1d149
2017-06-23 10:55:48 +00:00
Vladimir Marko
a634b38c8e Merge "Rename Binder.destroy() to Binder.destroyBinder()." 2017-06-23 10:36:02 +00:00
Joel Scherpelz
08dbbc24cc Merge "Use RFC 7217 stable privacy addresses" am: a88b12ce5e am: 4c4d5477d4 am: 8a4667b911
am: 7019b5aa81

Change-Id: I03ddd946247bc9d3b321be4eedf225ad4209e6d4
2017-06-22 19:55:02 +00:00
Joel Scherpelz
7019b5aa81 Merge "Use RFC 7217 stable privacy addresses" am: a88b12ce5e am: 4c4d5477d4
am: 8a4667b911

Change-Id: I60e9d4e630ffb6f6ff6870102d4620c5c4c81c47
2017-06-22 19:38:18 +00:00
Vladimir Marko
b25a532358 Rename Binder.destroy() to Binder.destroyBinder().
There are a few AIDL-generated stubs that perform "destroy"
transactions and call "this.destroy()". Previously, this
resolved to the "destroy()" method from their interface on
ART while resolving to Binder.destroy() on the RI, though
this is a subject of a bug report against the JDK,
    http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8021581 .
Resolving to the private Binder.destroy, inaccessible to
the Stub, would lead to throwing IllegalAccessErrror.

As we're changing the method lookup to be closer to RI, see
    https://android-review.googlesource.com/413119 ,
we should stay clear of the problematic cases whether we
make a decision to follow the RI precisely or not. Therefore
we rename the Binder.destroy() to Binder.destroyBinder().

Test: Nexus 6P boots.
Bug: 62855082
Change-Id: I43baf76b6f3c681d93b411cecf2bc00fccafecac
2017-06-22 14:38:23 +01:00
Joel Scherpelz
8a4667b911 Merge "Use RFC 7217 stable privacy addresses" am: a88b12ce5e
am: 4c4d5477d4

Change-Id: I7f286484a31c7209e48e93a94d2a16849af6dace
2017-06-22 06:48:09 +00:00
Joel Scherpelz
2db1074e4f Use RFC 7217 stable privacy addresses
Ask Netd to setup WiFi interfaces to use stable privacy addresses. This
should fail benignly on devices with kernels lacking RFC 7217 support.

Test: as follows
    - built
    - flashed
    - booted
    - Manually observed persistent stable secret
    - Manually observed randomized IPv6 addresses (with flags = 800)
Bug: 17613910

Change-Id: I9465de16685b1eb0fd842446a530cf98d77a0c28
2017-06-22 13:31:06 +09:00
Dianne Hackborn
6a93509080 Merge "Work on issue #62065889: Assess thresholds and criteria for killing..." 2017-06-21 21:07:05 +00:00
Mathieu Chartier
1cd93b8f75 Merge "Disable activity leak detection by default for userdebug" into oc-dev am: 956ea5f09d am: 8d189593b8
am: 0681ebd58c

Change-Id: Ic0510ef945839d99ec27857b59e25d4e1cd8a911
2017-06-20 20:25:09 +00:00
Mathieu Chartier
0681ebd58c Merge "Disable activity leak detection by default for userdebug" into oc-dev am: 956ea5f09d
am: 8d189593b8

Change-Id: I8a24342b3c444072cc4cdcd8331fc7d78c804438
2017-06-20 20:12:04 +00:00
Mathieu Chartier
8d189593b8 Merge "Disable activity leak detection by default for userdebug" into oc-dev
am: 956ea5f09d

Change-Id: Iadacd64e92c1963b2417bad96838ba2c128ec8cb
2017-06-20 20:05:29 +00:00
Mathieu Chartier
ca8c1051ed Disable activity leak detection by default for userdebug
Causes too many GCs and related slowdowns.
Verified that assistant launch from holding down home button is now
faster than N.

Test: make and flash
Bug: 62769566

Change-Id: Ib0c1f7a45831b241d3376d1e56db3c6937913b1b
2017-06-20 02:51:31 +00:00
Dianne Hackborn
ffca58bc5e Work on issue #62065889: Assess thresholds and criteria for killing...
...background processes (CPU, etc)

Add full configuration params for adjusting these settings (some were
already there).

Also...  as long as we are doing this...

- Get rid of all of the wakelock stuff.  That is completely pointless
now that we aren't even allowing cached processes to hold wake locks.

- This greatly simplifies the code, since we don't need to deal with
two different policies for how we do checks.  Instead, we just regularly
check for CPU and the CPU check interval.

- And make the CPU check more aggressive and have much more flexibility
for tuning: there are now 4 different maximum CPU use levels, depending
on how long the process has been in the cached state.  This allows us to
be more strict on CPU use the longer it is sitting in the background.

Note that CPU use tracking only happens while the device is not
plugged in to power...  I'll leave this for now, but I think in the
future we should think about applying these limits even when plugged
in, because in either case cached apps should really not be doing
much.

Test: manual
Change-Id: I68f4ab68be5f7d5fc4822005107fb60ef07a374d
2017-06-19 16:55:45 -07:00
Alessio Balsini
1d9bba2ac5 Merge "Documentation: changed tid parameter description for getThreadPriority()" am: 663b02dd28 am: 6f0adbfaea am: fd88d146b4
am: 537782f395

Change-Id: I38896f0929aabf60444882a79cda6ae8290763f3
2017-06-19 12:15:41 +00:00
Alessio Balsini
537782f395 Merge "Documentation: changed tid parameter description for getThreadPriority()" am: 663b02dd28 am: 6f0adbfaea
am: fd88d146b4

Change-Id: Iab127e59a59c959e9cd100dff68f415415b0bcce
2017-06-19 12:04:37 +00:00
Alessio Balsini
fd88d146b4 Merge "Documentation: changed tid parameter description for getThreadPriority()" am: 663b02dd28
am: 6f0adbfaea

Change-Id: I0626fb2d9de978f204ba9898a56e4225a71f03e8
2017-06-19 11:54:05 +00:00
Alessio Balsini
68ae301831 Documentation: changed tid parameter description for getThreadPriority()
Wrong description of the "tid" parameter used by getThreadPriority():
the function does not "change" the priority of the thread associated to 
"tid".
Defined also the meaning of setting tid parameter to 0.


Test: None

Change-Id: I8552f3b110eaab1aefa51477e82d3e295547be34
Signed-off-by: Alessio Balsini <alessio.balsini@gmail.com>
2017-06-19 08:48:14 +00:00
Dianne Hackborn
5462042385 Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev am: ef0554438f am: 84795f778b
am: 56617fd24f

Change-Id: I0051a01a498d77e0dea10ce31c51912b7747b551
2017-06-15 19:08:07 +00:00
Dianne Hackborn
56617fd24f Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev am: ef0554438f
am: 84795f778b

Change-Id: I90d6e150b6dcfe7665b5c1b7db84dd04a7d0d824
2017-06-15 19:01:41 +00:00
Dianne Hackborn
84795f778b Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev
am: ef0554438f

Change-Id: I39ad3ffce83c1817bdc8aa7ab9f623d1b683d983
2017-06-15 18:52:07 +00:00
Dianne Hackborn
cb01563d7e Work on issue #36891897: Need to ensure foreground services...
...can't hide themselves

Tune the policies for when we tell about apps running in the
background after their services have stopped.

- If it ran while the screen was on, the time we require for it
to be running is much shorter (a couple seconds) as well as the
time we tell about it having run (with another tunable for the
minimum time we tell about this).

- If it has only run while the screen is off and stops a sufficient
amount of time before the screen goes on (currently a second) then
we will not show anything when the screen goes on.

- If it stops when the screen turns on, we will make sure the user
sees about it for a short period of time (currently 5 seconds).

Also includes some improved debug output about handler message
queues.

Test: manual

Change-Id: Iab438410d7182b2dfe4f9c1cce7069b26b34834c
2017-06-14 17:33:41 -07:00
TreeHugger Robot
57fef233c8 Merge "BatteryStats: Cleanup external stats collection" 2017-06-13 17:29:15 +00:00
Jeff Sharkey
a915a88cfb Merge "Merge "Improve developer docs for storage APIs." into oc-dev am: 05b52d8ba5 am: f96c9a0fa2" into oc-dr1-dev-plus-aosp
am: 08b598fcfe

Change-Id: I6dd330a240f1725b59e79111fd3bfc124a3fb897
2017-06-13 00:57:38 +00:00
Jeff Sharkey
10e0b425bc Merge "Improve developer docs for storage APIs." into oc-dev am: 05b52d8ba5
am: f96c9a0fa2

Change-Id: Ifef4156412f88e1d7bc3d8bbccaca6d0177c7245
2017-06-13 00:35:13 +00:00
Jeff Sharkey
dc292b6003 Merge "Active camera apps can defy reserved cache space." into oc-dr1-dev am: f7dc56ecc9
am: de624f3fbb

Change-Id: I0a125a6c00220ba280dca4e0d8ece88202a68afe
2017-06-13 00:24:59 +00:00
Jeff Sharkey
f96c9a0fa2 Merge "Improve developer docs for storage APIs." into oc-dev
am: 05b52d8ba5

Change-Id: I36dbac981e7a11819bd120c604f491eca11018a4
2017-06-12 22:45:22 +00:00
TreeHugger Robot
9af361bb69 Merge "Deprecate screen brightness boost detection." 2017-06-12 21:34:27 +00:00
Jeff Sharkey
35e46d2972 Active camera apps can defy reserved cache space.
We normally prevent apps from allocating into the "reserved" cache
space, but this change makes an exception for an active camera app,
since the user is probably trying to capture an important memory.

This change only lets the active camera app clear up to half of the
reserved space, since we don't want to completely destroy the
experience of all other apps.

Test: manual app before/during/after active camera session
Bug: 38267830
Change-Id: Ie9e63884fb2638ca881e10b894629eea84601648
2017-06-12 14:27:23 -06:00
Jeff Sharkey
b31afd2273 Improve developer docs for storage APIs.
No code changes; only docs.

Test: builds
Bug: 38508833, 37987197, 37978296
Change-Id: Idfeb680480b2f818d18f787cbf20ceab896763a2
2017-06-12 20:19:53 +00:00
Adam Lesinski
b3a1badce5 BatteryStats: Cleanup external stats collection
Create a BatteryStatsWorker that internalizes the stats collection,
and returns a Future<?> so that uses-cases requiring synchronous
results can still wait on the async task.

Bug: 37645919
Bug: 38296815
Test: manual
Change-Id: I5b935e1877d9a17d2617f01478faa77e8a52a258
2017-06-09 15:23:04 -07:00
Lei Yu
bd499f9319 Merge changes from topic 'battery_smear_move' into oc-dev
am: 883db32859

Change-Id: I45d4eaadbc992663b3453b52c391d5d4d660e046
2017-06-09 21:42:25 +00:00
Lei Yu
308d0dd03c Merge changes from topic 'battery_smear_move' into oc-dev
am: 883db32859

Change-Id: Ibb862780286006efb4a4a117f007cc652dac4ce9
2017-06-09 21:17:14 +00:00
Lei Yu
883db32859 Merge changes from topic 'battery_smear_move' into oc-dev
* changes:
  Batterystats logs smeared power model values
  Copy smearing method to BatteryStatsHelper
2017-06-09 20:50:47 +00:00
Julius D'souza
b22da80734 Deprecate screen brightness boost detection.
Deprecated:
PowerManager#isScreenBrightnessBoosted
ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED

Bug: 62348163
Test: isScreenBrightnessBoosted should return false.
Change-Id: Ia580daeffb249110a6adf1e46052966a718226cb
2017-06-09 12:24:38 -07:00
Bookatz
17d7d9dcdf Batterystats logs smeared power model values
Fixes: 62302932
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest
Change-Id: I8942aa9bc557fada4cf0be76aee6bd0bcee9ebb6
2017-06-08 23:29:13 +00:00
Adam Bookatz
e9e89d0042 Merge "Avoid background getTotalTimeLocked misreporting" into oc-dev am: 6029bce3b4
am: 300ebee8c4

Change-Id: I0ae48f45c0debbe2e875ab123491c09bea265c3e
2017-06-08 06:00:42 +00:00
Adam Bookatz
0fcadeaeb9 Merge "Avoid background getTotalTimeLocked misreporting" into oc-dev
am: 6029bce3b4

Change-Id: Ib8292cc59afe1933bad8d48907ad47c46bb73e87
2017-06-08 05:59:56 +00:00
Adam Bookatz
300ebee8c4 Merge "Avoid background getTotalTimeLocked misreporting" into oc-dev
am: 6029bce3b4

Change-Id: I67da5b543fc839031d3d2544f3723b730edaa1a8
2017-06-08 02:48:32 +00:00
Adam Bookatz
6029bce3b4 Merge "Avoid background getTotalTimeLocked misreporting" into oc-dev 2017-06-08 02:43:20 +00:00
Bookatz
6d79993cb3 Avoid background getTotalTimeLocked misreporting
It has been discovered that for background values of
AggregatedWakelock, Sync, Job, and partial wakelocks,
the value of getTotalTimeLocked is wrong and often very
negative. getTotalDurationMsLocked, which should provide the exact same
value in all of these cases (since background data is never pooled),
does not have this problem. So while the source of the bug is sought
out, we should use getTotalDurationMsLocked instead of getTotalTimeLocked for
these data.

Bug: 62352334
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest
Change-Id: I78e84368615578483ab8e9e5f0ee1d067491be08
2017-06-07 13:29:41 -07:00
Jeff Sharkey
0996488311 Merge "Remove old FUSE bypass now that we have sdcardfs." into oc-dev am: 6746aa8c4d
am: 3471981ddc

Change-Id: I1d308a6ef5ad479c152b8db1264842caefc36295
2017-06-07 19:20:01 +00:00
Jeff Sharkey
dab10f2bb3 Merge "Remove old FUSE bypass now that we have sdcardfs." into oc-dev
am: 6746aa8c4d

Change-Id: I32f223228c45a4949ebf53c1ab73d20fa9950ed6
2017-06-07 19:13:01 +00:00
Jeff Sharkey
3471981ddc Merge "Remove old FUSE bypass now that we have sdcardfs." into oc-dev
am: 6746aa8c4d

Change-Id: I6b78fba341499617e279b38f2e1885cd58551b0d
2017-06-07 19:12:59 +00:00
Jeff Sharkey
2063e4f6ba Remove old FUSE bypass now that we have sdcardfs.
This forces everyone to go through sdcardfs, instead of letting them
around the back door.

Test: builds, boots
Bug: 38231314, 27992761
Change-Id: I97b24d25599c7f86f9b535689e2f4ecf68261dac
2017-06-06 16:03:26 -06:00
Jeff Sharkey
28f6dc9512 Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210

Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
2017-06-06 16:17:39 +00:00
Ahmed ElArabawy
dd3b200c19 Merge "Revert "Revert "power hal: Use power HAL API 1.1""" 2017-06-06 16:01:55 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
67cb5f5210 Merge "Give Doclava our manifest; more permission docs." into oc-dev
am: 65d4cbba37

Change-Id: I2ec50efb67debd15d354db69b84fb620eb74bc0e
2017-06-06 15:28:26 +00:00