Commit Graph

5366 Commits

Author SHA1 Message Date
Jeff Sharkey
c50d08a807 Merge "Extend adoptable override to force on or off." into pi-dev am: 130a2503d8
am: 64a615eefe

Change-Id: Ic80dd00d179adac426daed862236b03936b60bd7
2018-04-20 17:39:45 -07:00
Jeff Sharkey
64a615eefe Merge "Extend adoptable override to force on or off." into pi-dev
am: 130a2503d8

Change-Id: Ic5bb21ec16f4603d87b5b659f041ee0a08b8d039
2018-04-20 17:20:16 -07:00
Jeff Sharkey
901c04270f Extend adoptable override to force on or off.
Virtual disks are adoptable by default, but for debugging purposes
we want to treat them as unadoptable in some cases.  Add the ability
for the "sm" shell command to force on/off, or return to default.

Bug: 77849654, 74132243
Test: manual
Change-Id: Ieda317396624ca081e5dd9568795483f684f9297
2018-04-20 13:11:23 -06:00
Mathew Inwood
427d1cbb24 Merge "StrictMode: fix non-SDK API usage detection." into pi-dev am: c72ee1a4f2
am: 9e2b236462

Change-Id: I2def7ae679f683c22093349ffdab33d9009f20da
2018-04-20 01:30:42 -07:00
Mathew Inwood
9e2b236462 Merge "StrictMode: fix non-SDK API usage detection." into pi-dev
am: c72ee1a4f2

Change-Id: If0db894c3cb9660eb187280cda21423866387799
2018-04-20 01:20:19 -07:00
Mathew Inwood
c72ee1a4f2 Merge "StrictMode: fix non-SDK API usage detection." into pi-dev 2018-04-20 08:04:07 +00:00
Mike Ma
604706d12d Merge "Fix screen on count text dump" into pi-dev am: dd61c7e8e7
am: 7351e73b96

Change-Id: Ia2c306193de81a311950e1770a9b0d0e865ac8f7
2018-04-19 13:40:02 -07:00
Mike Ma
7351e73b96 Merge "Fix screen on count text dump" into pi-dev
am: dd61c7e8e7

Change-Id: Ia2072936a3c02516a4f3add73895ee8e291cdc04
2018-04-19 13:29:13 -07:00
TreeHugger Robot
dd61c7e8e7 Merge "Fix screen on count text dump" into pi-dev 2018-04-19 20:16:28 +00:00
Chong Zhang
5d5eba17c9 Merge "Adjust media.codec process group upon request from mediaserver" into pi-dev am: 3f8884829f
am: cadb0d5ec8

Change-Id: Ic9139ac30319d0dd2afb88a44b3fea81dd4b263d
2018-04-19 11:33:32 -07:00
Chong Zhang
cadb0d5ec8 Merge "Adjust media.codec process group upon request from mediaserver" into pi-dev
am: 3f8884829f

Change-Id: Ib1cc2013127f59af33482c4924faa869b3cb7fb9
2018-04-19 11:22:34 -07:00
TreeHugger Robot
3f8884829f Merge "Adjust media.codec process group upon request from mediaserver" into pi-dev 2018-04-19 17:40:39 +00:00
Mathew Inwood
f7cdcb98c2 Merge "Fail gracefully if we get a bad API whitelist." into pi-dev am: 611443e984
am: 96b2f3ce8b

Change-Id: I2e4fc91b53606f701682e4fad0bb17616cb58d7e
2018-04-19 10:12:17 -07:00
Mathew Inwood
96b2f3ce8b Merge "Fail gracefully if we get a bad API whitelist." into pi-dev
am: 611443e984

Change-Id: I2ead19c8fda255d010aded3884aef0016e1cc74d
2018-04-19 09:43:15 -07:00
Mathew Inwood
d82a743002 StrictMode: fix non-SDK API usage detection.
The warning dedupe logic in the runtime meant that only the first usage of
each API was detected. Disable this logic when DETECT_VM_NON_SDK_API_USAGE
is enabled.

Test: m
Test: $ atest android.os.cts.StrictModeTest#testNonSdkApiUsage
Bug: 78268765
Change-Id: Iba1127b84180b9a5e5eb68abc4691ccad082b80e
2018-04-19 16:18:51 +01:00
Mathew Inwood
9f6bb5b761 Fail gracefully if we get a bad API whitelist.
If we send a bad API whitelist to the Zygote, it causes it to close the
socket. If we take no further action in AMS, it results in the same list
of exceptions being sent when we re-open the socket, resulting in it again
being closed. This results in no longer fork/start any new processes.
Since the list is persisted, this would result in the device entering a
boot loop upon reboot. Since no apps could be started, we cannot recover.

So in the case that the exemptions list causes problems, clear out the
list so we don't try to send it again next time. This means we will see
a single failure, but future attempts will succeed (obviously without
any whitelist). The device should not enter a boot loop.

Note, the test below relies on the fact that we can send at most 1024
arguments in a command to the Zygote (MAX_ZYGOTE_ARGC), and that each
item on the list is a separate argument.

Test: adb shell settings put global hidden_api_blacklist_exemptions \
Test:    $(for i in {1..1025}; do echo -n $i,; done)
Bug: 64382372
Change-Id: Ie47095d516c247ff6a8d667a2ac9b7be45f1acda
2018-04-19 10:12:28 +01:00
Tim Murray
75389eb0f4 Merge "ActivityManagerService: add restricted cpuset" into pi-dev am: a5843ebb59
am: 42cac7be22

Change-Id: I44a3ea55552ef41cbc6b3b367881f6e7d76268c0
2018-04-18 17:12:09 -07:00
Tim Murray
42cac7be22 Merge "ActivityManagerService: add restricted cpuset" into pi-dev
am: a5843ebb59

Change-Id: I1ad95b4e5e4d89efeb0a2836950d7d05cd8cd8d5
2018-04-18 16:59:26 -07:00
Tim Murray
a5843ebb59 Merge "ActivityManagerService: add restricted cpuset" into pi-dev 2018-04-18 23:43:53 +00:00
Chenjie Yu
b62e20c7f9 Merge "add dump report reason to reports" into pi-dev am: a194a6bee3
am: e0f7fc0a47

Change-Id: I4b97af127a219ded41891d90d44dd5940b7dd0af
2018-04-18 14:35:25 -07:00
Chenjie Yu
e0f7fc0a47 Merge "add dump report reason to reports" into pi-dev
am: a194a6bee3

Change-Id: I07a2d92ae166e86afa5bd6600d1217180818b9c3
2018-04-18 13:45:45 -07:00
Chong Zhang
37520f0e06 Adjust media.codec process group upon request from mediaserver
Add method to allow dynamic adjustment of cpuset of media.codec
process. Only accept requests coming from mediaserver.

Bug: 72841545

Change-Id: Idb09d9a5162691503ecf6d811a528d9160326358
2018-04-18 13:23:24 -07:00
Chenjie Yu
e36018b272 add dump report reason to reports
+ also change uidmapping version numbers to int64_t

Bug: 78132855
Change-Id: Iac7ea93e4bf651bd65bd03383e7ab4971af4fc29
Fix: 78132855
Test: gts test
2018-04-18 20:19:21 +00:00
Tim Murray
fef10a47a8 ActivityManagerService: add restricted cpuset
Test: CTS
bug 78197570

Change-Id: I9dd8daba6426b42b7e7e9388dbdac7bd8110b6ca
2018-04-18 09:51:33 -07:00
Mike Ma
90902651b1 Fix screen on count text dump
dischargeScreenOffCount already includes dischargeScreenDozeCount.
Original code deducted dischargeScreenDozeCount twice. This only affects
text dump in bugreport. Proto and checkin dump are not affected.
Test: manual
Fixes: 78187276

Change-Id: Id93465ca75a4a1078e8f280a38b74b696ec62dd2
2018-04-17 21:12:56 +00:00
Dan Gittik
e654ca92f4 Merge "Fixed power manager CTS test." into pi-dev am: 15d35c1274
am: 17ad53b40b

Change-Id: Ib805670acfae2c9b17afb07e6484906fae71f5ce
2018-04-17 04:02:45 -07:00
Dan Gittik
17ad53b40b Merge "Fixed power manager CTS test." into pi-dev
am: 15d35c1274

Change-Id: I375d0d77520a707cc76064a93def15faa5f8ddb1
2018-04-17 03:50:58 -07:00
TreeHugger Robot
15d35c1274 Merge "Fixed power manager CTS test." into pi-dev 2018-04-17 10:39:30 +00:00
Jeff Sharkey
00f8ad0a11 Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev am: 936c0868f8
am: 7b913d70b9

Change-Id: Ifd131fb60996e416f44f7acc68257e4663ef4ba7
2018-04-16 18:43:09 -07:00
Jeff Sharkey
7b913d70b9 Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev
am: 936c0868f8

Change-Id: I3c84c646b3a79f09dc1210e18f48d1f87d38abd4
2018-04-16 17:44:58 -07:00
Jeff Sharkey
936c0868f8 Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev 2018-04-17 00:04:53 +00:00
David Chen
3718e716e6 Merge "Adds a code when statsd sends intent to getData." into pi-dev am: 17d2de09cb
am: 5cc0e05e03

Change-Id: I54b0067c7aa127e5fedbb60d98bb7035bef62ae5
2018-04-16 16:45:59 -07:00
David Chen
5cc0e05e03 Merge "Adds a code when statsd sends intent to getData." into pi-dev
am: 17d2de09cb

Change-Id: I4f429329603d7dfe512de6802d4f083d230fc4d1
2018-04-16 16:21:23 -07:00
Jeff Sharkey
6b64925737 Protect usage data with OP_GET_USAGE_STATS.
APIs that return package usage data (such as the new StatsManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Add noteOp() method that can be called from native code.

Also add missing security checks on command interface.

Bug: 77662908, 78121728
Test: builds, boots
Change-Id: Ie0d51e4baaacd9d7d36ba0c587ec91a870b9df17
2018-04-16 12:44:32 -06:00
Dan Gittik
26b030d829 Fixed power manager CTS test.
Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
      out/host/linux-x86/cts/android-cts/testcases/CtsOsTestCases.apk
      adb shell am instrument -e class android.os.cts.PowerManagerTest \
      -w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ida939f074654bef351e2b8fd563c8463431ce9c6
Fixes: 77907164
2018-04-16 18:50:10 +01:00
Wale Ogunwale
605007578e Finalizing P SDK am: 3da5f3b2dd
am: fc89e7f17a

Change-Id: I85aaa6fb6de6cc76a2ac004c7e575737537401fc
2018-04-14 16:04:49 -07:00
David Chen
d37bc23f50 Adds a code when statsd sends intent to getData.
If the data receiver is experiencing delays, there may be a queue of
multiple intents to collect the same data. This timestamp makes it
easy in the receiver to de-dupe these requests to call getData.

Also, we update how StatsCompanionService gets the snapshot by
requesting data for all known apps. I notice that Keep seems to have
a uid active even when it appears uninstalled.

Bug: 77981668
Test: Flashed marlin-eng and manually verified.
Change-Id: I509e19383ec4a5da8746dd0c76ac71a948c6877d
2018-04-13 17:01:13 -07:00
Wale Ogunwale
fc89e7f17a Finalizing P SDK
am: 3da5f3b2dd

Change-Id: Id5002a3fc4d35352a4ace67e794c1a52e21c496c
2018-04-13 14:18:27 -07:00
Michael Wright
4cf175b4ed Merge "Revert "Fixed power manager CTS test."" into pi-dev am: ca1dcfb23e
am: ad93f44a3e

Change-Id: I84dc34980d768ee8807c4d9b045a1971dfdbff03
2018-04-13 11:11:05 -07:00
Michael Wright
ad93f44a3e Merge "Revert "Fixed power manager CTS test."" into pi-dev
am: ca1dcfb23e

Change-Id: Ie748557c6940961635cdd929238f1bd2070e8804
2018-04-13 10:59:47 -07:00
Dan Gittik
b5abef7867 Merge "Fixed power manager CTS test." into pi-dev am: 62444d4950
am: 33ca88a1fc

Change-Id: I3ed21dbc86c56ab1a9182607bb7bba7bbc73229e
2018-04-13 10:36:35 -07:00
Michael Wright
4d6b454b45 Revert "Fixed power manager CTS test."
This reverts commit 48fed61da3.

Reason for revert: m checkbuild failing
Bug: 77907164

Change-Id: I7f75dafc049581a7a5393c3cf0108c488eecaf48
2018-04-13 17:32:11 +00:00
Dan Gittik
33ca88a1fc Merge "Fixed power manager CTS test." into pi-dev
am: 62444d4950

Change-Id: I96d0acccf64a86a241178241dc6fc9b069f29ac8
2018-04-13 10:21:15 -07:00
Dan Gittik
48fed61da3 Fixed power manager CTS test.
Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
      out/host/linux-x86/cts/android-cts/testcases/CtsOsTestCases.apk
      adb shell am instrument -e class android.os.cts.PowerManagerTest \
      -w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I91e591be608f5040bc035a203d7e94c83d50bf15
Fixes: 77907164
2018-04-13 15:43:20 +01:00
Wale Ogunwale
3da5f3b2dd Finalizing P SDK
Bug: 77588754
Test: builds
Change-Id: Ic06cad790a3dc53d012a7c43dfac911fc6dc61e7
2018-04-12 15:26:31 -07:00
Makoto Onuki
a31a1c67f4 Merge "Add stats logging to ServiceManager and NPMS" into pi-dev am: a26e755900
am: fa3a2acfbc

Change-Id: I30bea4b59318ac1871293739c6c5f2d9b7551fb1
2018-04-11 19:01:30 -07:00
Makoto Onuki
fa3a2acfbc Merge "Add stats logging to ServiceManager and NPMS" into pi-dev
am: a26e755900

Change-Id: Ib0bd9ecc183b1b2c9a6785554e6f717744820da3
2018-04-11 18:39:53 -07:00
TreeHugger Robot
a26e755900 Merge "Add stats logging to ServiceManager and NPMS" into pi-dev 2018-04-12 01:13:07 +00:00
Michael Wright
afc4b2d969 Merge "Add API to compute charge time remaining." into pi-dev am: ba6f173cb1
am: ec69f61cc4

Change-Id: Ic383fb123232f0a69221bda7fa489922dd6a5218
2018-04-11 18:10:38 -07:00
Michael Wright
ec69f61cc4 Merge "Add API to compute charge time remaining." into pi-dev
am: ba6f173cb1

Change-Id: Ic2c23a0b22282a2bbea31ec004c58e2d686d2868
2018-04-11 17:56:45 -07:00