Commit Graph

4356 Commits

Author SHA1 Message Date
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
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00
Jeff Sharkey
7a2e4a8486 Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
2017-06-05 22:28:21 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
TreeHugger Robot
0ea89f0f40 Merge "Add support for vibrator 1.1 HAL and TICK effect." 2017-06-05 16:40:57 +00:00
Michael Wright
57d94d9fb1 Add support for vibrator 1.1 HAL and TICK effect.
New HAL support is a bit hacky but gets us unblocked.

Bug: 38417655
Bug: 38417570
Test: Manual (hacked up 1.1 HAL implementation that just logs)
Change-Id: I207cce97c81734bac1ca00a5de18e160d13e2bbe
2017-06-02 15:48:49 +01:00
Narayan Kamath
f013daa3ac ActivityManagerService: Add support for new stack dumping scheme.
Tombstoned now fully supports java traces and intercepts, and the
debuggerd dump API has been extended to support dumps of java traces.

This change switches ANR dumping over to using this API when the
right system property is set. The new flow is as follows :

- The system_server creates a new file using File.createTempFile for
  each ANR detected by the activity manager. All dumps associated
  with that ANR go into that file.

- All dumps are initiated using debuggerd client API (debuggerd_trigger_dump)
  which handles all the timeout measurement for us. It can also
  guarantee that no writes are made to the file after the method
  returns, so we have no need of inotify watches and other fiddly
  mechanisms to monitor progress. Also, this would give us the ability
  to add meta-information about timeouts etc. to the dump file itself,
  thougt that hasn't been implemented just yet.

Test: Manual
Bug: 32064548

Change-Id: I37e72c467e6dc29da4347c2a2829eeeeb1ad3490
2017-06-02 13:55:10 +01:00
Jesse Hall
6e1ac796d5 Merge changes I101e5578,I157b6233
* changes:
  Init EGL only for HW-accelerated Activities
  Refactor graphics environment initialization
2017-06-01 21:17:53 +00:00
Joe Onorato
619f506c47 Merge "Track Partial wakelock time in background" into oc-dev am: 1dfd194f7d
am: b5ba4b1fd2

Change-Id: I72c27aeae5061102d725ba52fb72a0489117649d
2017-05-31 20:05:37 +00:00
Joe Onorato
6c74b2421b Merge "Batterystats track background bad ble scan time" into oc-dev am: fe06de1fc2
am: 41e3f1479c

Change-Id: I3e9425e32d72b7415e776076cb977716073eb921
2017-05-31 20:01:34 +00:00
Joe Onorato
b5ba4b1fd2 Merge "Track Partial wakelock time in background" into oc-dev
am: 1dfd194f7d

Change-Id: I06af34e0cf444fd7f26add4e6b54bcb0d7f4d617
2017-05-31 19:49:49 +00:00
Joe Onorato
41e3f1479c Merge "Batterystats track background bad ble scan time" into oc-dev
am: fe06de1fc2

Change-Id: Ibca369ace041435ce1f9a9997658b86fd4b5f087
2017-05-31 19:46:11 +00:00
Joe Onorato
1dfd194f7d Merge "Track Partial wakelock time in background" into oc-dev 2017-05-31 19:26:59 +00:00
Joe Onorato
fe06de1fc2 Merge "Batterystats track background bad ble scan time" into oc-dev 2017-05-31 19:26:59 +00:00
Ahmed ElArabawy
d8b441150e Revert "Revert "power hal: Use power HAL API 1.1""
This reverts commit 48b908bd77.
and brings back commit 0a4e11480b

This commit directs framework to use Power HAL 1.1
The commit has been tested not to cause application startup time
regression which was the reason of reverting the original commit

Bug: 62040325
Test: Performance Tests along with other tests

Change-Id: I84fdff3136c85e62223e2ae2f66b5bcad4e491b8
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-05-31 09:51:12 -07:00
Jeff Sharkey
b562e53950 Merge commit '06951ac74d9e74b29037b0a5d8e3b9ad85983b5b' into mergeit
am: 3c3d9d8158

Change-Id: Ia4c7f1792c9b6e8e72b4ffe742249b02b82d0817
2017-05-31 14:54:24 +00:00