Commit Graph

4574 Commits

Author SHA1 Message Date
Yi Jin
4518ea94fd Merge changes Icdcbeded,I6753df11
* changes:
  Extract IncidentHeaderProto to a separated file for statsd to consume
  Implement Pii Stripper Part 3
2017-09-12 21:40:31 +00:00
Jeff Sharkey
41cd681ff8 Move even more vold commands over to Binder.
This moves fstrim, obb and appfuse commands over to the new Binder
interface.  This change also separates creating/destroying and
mounting/unmounting of OBB volumes, which means they finally flow
nicely into the modern VolumeInfo/VolumeBase design.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Bug: 13758960
Change-Id: I4de45889828a9ab9858cc7c4f094a90eaff10f96
2017-09-11 18:44:34 -06:00
Jeff Sharkey
ee6523014e Merge "Move "volume" commands over to Binder." 2017-09-08 21:55:51 +00:00
Kurt Nelson
3de4796716 Don't store class in InstanceCountViolation
As InstanceCountViolation is a Throwable, it can be serialized. The
Class is only used for toString, so we just store the class name
instead.

Test: compiles
Change-Id: If3acf151e7b1fa90fbb2d3aab90a102dc0b030e8
2017-09-07 23:54:49 -07:00
Jeff Sharkey
ace874b15b Move "volume" commands over to Binder.
Keep the old socket-based commands intact for awhile so we can
rapidly disable this change using the ENABLE_BINDER feature flag.

Define constants in AIDL to keep Java and C++ in sync.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.ExternalStorageHostTest
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 13758960
Change-Id: Ie0d917c921b0b826e6bdf55a5d678b247ef352a6
2017-09-07 15:33:17 -06:00
Yi Jin
0f0471623e Implement Pii Stripper Part 3
The incident request args sets privacy spec. Strip action is optimized
to run once for each type of spec and ready for flush multiple times.
Incident command is updated to take -p option to specify privacy spec.

Bug: 64687253
Test: unit tests written, manually run incident command to test as well
Change-Id: I6753df117f76dc1a5f4d2152baa3fbbf56b490e4
2017-09-07 10:53:51 -07:00
TreeHugger Robot
10c41c2727 Merge "New Autofill API: SaveRequest.getDatasetIds()" 2017-09-07 17:31:23 +00:00
Kurt Nelson
2c883f3382 Remove redundant vmpolicy variable
This completes a TODO.

Test: still builds
Change-Id: I6298f5b8899a4e9c3a2b3f110de1a924404b9fa4
2017-09-05 16:28:26 -07:00
Felipe Leme
9852897bf6 New Autofill API: SaveRequest.getDatasetIds()
Test: modified some existing CTS tests to use it
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 64843801

Change-Id: I95fe7766f19e5a9eea9d7138636a15cc832c704c
2017-09-01 14:01:10 -07:00
Kurt Nelson
46974a2a46 AOSP format StrictMode
This class predates having a format presubmit and is a mix of formats.

Test: formatting only
Change-Id: I0978ab51e9429131852b05f23c957bb0988bdbcd
2017-08-31 18:06:39 -07:00
Michael Wright
bf5daf4565 Merge "Don't always fallback to clockTick for EFFECT_TICK." into oc-mr1-dev am: b60141b23c
am: b32153e3d2

Change-Id: If9a5a28fc0ac20e63177945800518977b7aec872
2017-08-31 23:04:20 +00:00
Michael Wright
b32153e3d2 Merge "Don't always fallback to clockTick for EFFECT_TICK." into oc-mr1-dev
am: b60141b23c

Change-Id: Ifc2015508739226259f16672f2176623397fe5ab
2017-08-31 21:51:54 +00:00
Makoto Onuki
7bd7a62336 Add VERSION_CODES.P
Bug: 64982450
Test: Build and boot
Change-Id: I0a90033239081c583b10021cbc06d032e206beb4
2017-08-31 18:06:26 +00:00
Andreas Gampe
38849ccf26 Merge changes I49057737,I68e3096d am: 50cf621704 am: f5dcc28b0c
am: 30348a8abb

Change-Id: I9755772ab8c8d4c3708ee2a65cda0b0d3f39d30e
2017-08-31 15:35:58 +00:00
Andreas Gampe
f5dcc28b0c Merge changes I49057737,I68e3096d
am: 50cf621704

Change-Id: Id66d91bc326461dc3cae4cbae03f3d060761ea7f
2017-08-31 15:15:31 +00:00
Andreas Gampe
a90534b551 Frameworks: Clean up SystemProperties
Clean up SystemProperties.java. Add annotations.

Clean up SystemProperties.cpp. Refactor for proper C++11.
Make sure C-string key construction is properly reused. Use
android::base functionality for actual reading.

Fix the test script to refer to the right location. Add some
test coverage.

(cherry picked from commit 2e6b9cb563)

Test: m
Test: frameworks/base/core/tests/systemproperties/run_core_systemproperties_test.sh --rebuild
Merged-In: I490577370da985f600fb1117e3c818d3f68bad5f
Change-Id: I490577370da985f600fb1117e3c818d3f68bad5f
2017-08-30 18:37:48 -07:00
Andreas Gampe
33aea8d40e Frameworks: Add warning to SystemProperties.get
Add a warning that calling get() is unsafe when the system property
may not contain a valid UTF-encoded string.

(cherry picked from commit 6bf1cff1dd)

Bug: 63177684
Test: m
Merged-In: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
Change-Id: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
2017-08-30 18:37:48 -07:00
TreeHugger Robot
d65901b5a0 Merge changes I49057737,I68e3096d
* changes:
  Frameworks: Clean up SystemProperties
  Frameworks: Add warning to SystemProperties.get
2017-08-31 01:34:48 +00:00
Michael Wright
dc2b3be240 Don't always fallback to clockTick for EFFECT_TICK.
Some things really need to be tuned in order to not annoy users, and
should otherwise be turned off. Let an effect state whether it should
fallback to a generic effect or should just be silent if there's no
hardware specific version of it.

Fixes: 65219268
Test: manual
Change-Id: I38fcbd6d80803cdf8f4ec04e8e1ac363b8d6361b
2017-08-30 16:36:21 -07:00
Andreas Gampe
2e6b9cb563 Frameworks: Clean up SystemProperties
Clean up SystemProperties.java. Add annotations.

Clean up SystemProperties.cpp. Refactor for proper C++11.
Make sure C-string key construction is properly reused. Use
android::base functionality for actual reading.

Fix the test script to refer to the right location. Add some
test coverage.

Test: m
Test: frameworks/base/core/tests/systemproperties/run_core_systemproperties_test.sh --rebuild
Change-Id: I490577370da985f600fb1117e3c818d3f68bad5f
2017-08-30 15:37:27 -07:00
TreeHugger Robot
9dd369e0af Merge "Add statsd." 2017-08-30 22:09:08 +00:00
Joe Onorato
5dcbc6c015 Add statsd.
It doesn't start yet by default. When you start it manually, it sets
itself up as a binder system service and starts a thread to read the
event log.

Test: Run statsd, observe output. also run stats_test
Change-Id: If435d6a80fef3c1d957aedb61699bf5e9aae7e56
2017-08-30 12:36:31 -07:00
Andreas Gampe
6bf1cff1dd Frameworks: Add warning to SystemProperties.get
Add a warning that calling get() is unsafe when the system property
may not contain a valid UTF-encoded string.

Bug: 63177684
Test: m
Change-Id: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
2017-08-30 04:23:35 -07:00
Michael Wright
1a6585fc20 Merge "O MR1 is API 27" into oc-mr1-dev am: d489d122f4
am: 800af77f9c

Change-Id: If3e76e14e60573d8f2e188abd95e3ef634eda3a2
2017-08-26 02:53:45 +00:00
Michael Wright
800af77f9c Merge "O MR1 is API 27" into oc-mr1-dev
am: d489d122f4

Change-Id: I7e4e4a710ce874502b1e749a9892e46619a988df
2017-08-26 02:41:46 +00:00
Michael Wright
eec01ac5a3 O MR1 is API 27
Bug: 64982450
Test: manual
Change-Id: I4be170f9f1021899db3ef0bce3eaeada21f8b475
2017-08-23 13:49:14 -07:00
TreeHugger Robot
4ad16025ac Merge "Update DISALLOW_CONFIG_TETHERING javadoc" 2017-08-23 17:24:19 +00:00
Rubin Xu
1faf144fdd Update DISALLOW_CONFIG_TETHERING javadoc
We now force off tethering when DISALLOW_CONFIG_TETHERING is set.
Make this clear in the doc.

Bug: 27936525
Test: make -j docs
Change-Id: Ifd6f84f295bbce7b5bd6042a7f4f4be39190f6bc
2017-08-23 16:01:08 +01:00
Wen ZHANG
61ed0dc033 Update javadoc of UserManager#DISALLOW_ADJUST_VOLUME
Profile owners are not allowed setting this restriction until the N
release.

Test: No test as it only touches javadocs

Change-Id: I793e2c3b5270ee00e451551e68567e8995f31d1c
2017-08-23 14:32:59 +01:00
Lorenzo Colitti
b9fc12d1d2 Merge changes I325b13d5,I89719fe7 am: 23868e9c09 am: 9335d2d0b1
am: 4fa0187015

Change-Id: Ib980879b0e50ffe1c8209339df22da4a50d5b74e
2017-08-19 03:38:10 +00:00
Lorenzo Colitti
4fa0187015 Merge changes I325b13d5,I89719fe7 am: 23868e9c09
am: 9335d2d0b1

Change-Id: Iac0d1a08c45816f32b0f8ab81a079883a9965e21
2017-08-19 03:25:21 +00:00
Lorenzo Colitti
9335d2d0b1 Merge changes I325b13d5,I89719fe7
am: 23868e9c09

Change-Id: Iaced543ab17ea87c8f701975764d957bc1b17fc7
2017-08-19 03:15:08 +00:00
Lorenzo Colitti
203c935d74 Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev am: 21bc3a39a4
am: 1af850fdfe

Change-Id: I2b586b84c44126e1d3b9097950a41decaa5216cc
2017-08-19 01:12:35 +00:00
Lorenzo Colitti
f1912ca49a Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

(cherry picked from commit 5356a35c3b)

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I325b13d50e88841dfb0db4c35e7e27f163ee72fe
Merged-In: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee
2017-08-19 10:12:05 +09:00
Lorenzo Colitti
1af850fdfe Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev
am: 21bc3a39a4

Change-Id: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee
2017-08-19 01:02:33 +00:00
Lorenzo Colitti
5356a35c3b Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I7a4d04ab47694d754874136179f8edad71099638
2017-08-19 00:21:56 +09:00
Lorenzo Colitti
9f0baa94ca Tell the system when tethering offload hits a limit.
Add a new tetherLimitReached method to INetworkManagementService,
and call it when the HAL notifies OffloadController because the
limit has been reached.

Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes

(cherry picked from commit d66cf56ba6)

Change-Id: I89719fe7ec8bfd3c85d6cdca9c0d449aea86ef9d
Merged-In: I026e6aa9e7b371f316c0d97c3cf5e78abc1f5263
2017-08-19 00:15:31 +09:00
Lorenzo Colitti
8a977784bb Merge "Tell the system when tethering offload hits a limit." into oc-mr1-dev am: c3e7f875b4
am: 9515b36ffa

Change-Id: I2b5027ed54d0847da00dbb749adfb446cb7d784d
2017-08-17 09:29:43 +00:00
Lorenzo Colitti
9515b36ffa Merge "Tell the system when tethering offload hits a limit." into oc-mr1-dev
am: c3e7f875b4

Change-Id: I026e6aa9e7b371f316c0d97c3cf5e78abc1f5263
2017-08-17 09:14:27 +00:00
Lorenzo Colitti
d66cf56ba6 Tell the system when tethering offload hits a limit.
Add a new tetherLimitReached method to INetworkManagementService,
and call it when the HAL notifies OffloadController because the
limit has been reached.

Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes
Change-Id: I0304e555544ee18c83244672766c767cbad650a1
2017-08-17 15:33:18 +09:00
Todd Poynor
6d5ce9e234 thermalservice: future-proofing fixup to Temperature constructor
Change the default constructor to leverage the constructor with params
specified, to avoid future code duplication if more logic is added to
constructors in the future.

Test: manual: marlin with temporary java thermal event listener
Bug: 30982366
Change-Id: I0be55fe2561f606ddf1bcebb98ae7e1120ff8d2d
2017-08-16 08:01:12 +00:00
TreeHugger Robot
4abbe93dce Merge "Fix parsing enum types in incident report tool as well as adding some additional loggings" 2017-08-14 20:07:22 +00:00
Jeff Sharkey
b2a9f55488 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev
am: c2e09129e0

Change-Id: I26089a2aef16845f2e2935e95810457e287bd0e1
2017-08-12 03:25:49 +00:00
Yi Jin
f32af48069 Fix parsing enum types in incident report tool as well as adding
some additional loggings

Test: manually flashed to device and test calling IncidentManager.java
functions
Change-Id: I69610414edde865b20ba632837f037fbe43f99db
2017-08-11 17:28:12 -07:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Sudheer Shanka
b8ad594300 Use cpu freq times to calculate power consumed by an uid.
Initially we used to approximate times spent by an uid at a particular
freq using total time spent by the uid but since now the freq times
are directly available from the proc file, we can use these to
calculate power.

Bug: 62240247
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: cts-tradefed run singleCommand cts-dev -m CtsIncidentHostTestCases -t \
      com.android.server.cts.BatteryStatsValidationTest
Test: Used some apps and verified that battery usage is attributed to
      those apps in Battery settings.
Change-Id: Ia8e2eb07fd778b8a8c83a6acec711e7b97aefdc0
2017-08-11 00:04:50 -07:00
Sudheer Shanka
76974ee41e Merge "DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs." into oc-mr1-dev
am: 3cb64c2c51

Change-Id: I80f8971b0f0f55ce91a0e1a3d574ae4a577f9257
2017-08-11 01:18:34 +00:00
Sudheer Shanka
3cb64c2c51 Merge "DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs." into oc-mr1-dev 2017-08-11 01:05:43 +00:00
Sudheer Shanka
d732136ed1 Merge "Update ConnOnActivityStartTest to be hermetic." into oc-mr1-dev
am: 06668b5f73

Change-Id: I34efad16363ca2b21374967bfabfc8fa2f36ee94
2017-08-10 23:06:43 +00:00
Sudheer Shanka
06668b5f73 Merge "Update ConnOnActivityStartTest to be hermetic." into oc-mr1-dev 2017-08-10 22:52:40 +00:00