Commit Graph

4593 Commits

Author SHA1 Message Date
Jeff Sharkey
76ffccc044 Merge "Move long-running calls to async with listeners." 2017-09-15 22:46:00 +00:00
Jeff Sharkey
b302c54f11 Move long-running calls to async with listeners.
Now that we're using Binder, we can have callers provide explicit
listeners for every request instead of trying to squeeze them all
into unsolicited socket events.

Move benchmarking to be async to avoid blocking other commands for
up to several minutes.  Remove post-trim benchmarking flag, since
benchmarking now requires a separate callback.  Will bring back in
a future CL.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Test: adb shell sm fstrim
Bug: 62201209, 13758960
Change-Id: I26f76c66734ac2fd0f64713b8ab9828430499019
2017-09-15 14:19:46 -06:00
Adam Bookatz
c69e138213 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev am: e332629667
am: 065f4b7ea7

Change-Id: I27a13ed75f663e1d1478667cf02aa8f754201326
2017-09-15 07:09:27 +00:00
Andreas Gampe
14e3e529f8 Merge "resolve merge conflicts of eb8a4ef5d3 to oc-mr1-dev-plus-aosp" into oc-mr1-dev-plus-aosp
am: b840785100

Change-Id: I5547c135edda0ba51869c7131d83dd221aa7d740
2017-09-14 22:46:53 +00:00
Jeff Sharkey
90e7d66c52 Merge "Move unsolicited vold events to Binder." 2017-09-14 20:57:36 +00:00
Kurt Nelson
d25bd9f4f3 resolve merge conflicts of 1933e5c645 to master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iabfe52a42f4a5ced3dba225cb137b844f9050a0a
2017-09-14 11:36:34 -07:00
Adam Bookatz
065f4b7ea7 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev
am: e332629667

Change-Id: Ib522e060c7a77b0e0ae0ecf3c9d84c331890d3e9
2017-09-14 18:33:47 +00:00
Adam Bookatz
e332629667 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev
* changes:
  Disable screen-off RPM timing in BatteryStats
  Added resource power manager stats to batterystats
2017-09-14 18:22:34 +00:00
TreeHugger Robot
b840785100 Merge "resolve merge conflicts of eb8a4ef5d3 to oc-mr1-dev-plus-aosp" into oc-mr1-dev-plus-aosp 2017-09-14 09:59:39 +00:00
Andreas Gampe
8f4eab2fcc resolve merge conflicts of eb8a4ef5d3 to oc-mr1-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia29e31d704982985264b40a78578a4c93d11bf3a
2017-09-13 19:20:34 -07:00
Kurt Nelson
1933e5c645 Fix javadoc typo
am: 27616138bc

Change-Id: I5e55f645b757fd60b52cc50a223aa42ca65d0beb
2017-09-14 01:49:08 +00:00
Bookatz
82b34117ee Disable screen-off RPM timing in BatteryStats
RPM = resource power manager.
Fetching the rpm stats (specifically, the subsystem low power stats) is
slow... too slow to reasonably do each time the screen state changes.
Therefore, it is disabled until fetching this information can be done
more quickly. Consequently, the screen-off RPM values will be incorrect
until it is re-enabled; they are therefore not printed.

Bug: 65164435
Bug: 62549421
Test: manual
Change-Id: I54d54f244c69ee372f22ecd99f32570db4aeb222
2017-09-13 22:24:25 +00:00
Jeff Sharkey
113f659b08 Merge "Move all crypto commands over to Binder." 2017-09-13 18:40:55 +00:00
Jeff Sharkey
8058fe691c Move unsolicited vold events to Binder.
Create IVoldListener and move most unsolicited vold events over to
this new interface.  The remaining events will be routed through
method-specific listeners instead of a global one.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.DirectBootHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Bug: 13758960
Change-Id: I492dacfaf98eeb66868b2cf7dfa27d84f6710948
2017-09-13 12:23:41 -06:00
Bookatz
50df711a51 Added resource power manager stats to batterystats
Currently Resource Power Management (e.g. VMIN time) is reported in the
batterystats history each time the battery level changes. We need this
information in the batterystats checkin, and need to be able to
differentiate time spent in each power state/voter, total as well as
when the screen is off.
The RPM information is obtained via a JNI call to the appropriate HALs.

Batterystats report version is increased to 26.

Bug: 62549421
Test: manual
Change-Id: I0c384eb3950714d8a0aa1353a4bf965330ebc8c1
2017-09-13 10:54:54 -07:00
Kurt Nelson
27616138bc Fix javadoc typo
Change-Id: Id851e1752eba2f57ce7360619fee3b14417b053f
Docs: Fix typo in public StrictMode javadoc
Bug: 62204662
Test: make ds-docs
2017-09-13 10:41:50 -07:00
Nicolas Geoffray
8dbb5e51c8 resolve merge conflicts of e017dae587 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7008986501028ec9bee0505d41aae3ff27872b50
2017-09-13 11:08:36 +01:00
Jeff Sharkey
43e12114d4 Move all crypto commands over to Binder.
Prefix FDE related commands with "fde" to make it clear which devices
they apply to.  This will also make it easier to remove once FDE
is fully deprecated in a future release.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.DirectBootHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Bug: 13758960
Change-Id: I6a9f7a47267d2464257d8066aa37353ec5741974
2017-09-12 16:36:36 -06:00
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
Nicolas Geoffray
81edac4037 Rename debugFlags to runtimeFlags.
Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.

bug: 30972906
bug: 63920015

Test: builds

Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a
2017-09-12 15:54:23 +01: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