Commit Graph

5079 Commits

Author SHA1 Message Date
TreeHugger Robot
8dddeb98f5 Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-02-12 19:47:35 +00:00
Tao Bao
cbc4d36dcc Merge "Expose an update_engine API that verifies the given payload metadata." 2018-02-12 18:36:47 +00:00
Ian Pedowitz
0b4add68db Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit a9da85fde4.

Reason for revert: b/73224471

Bug: 73224471
Bug: 72116995
Change-Id: I1485305f40d47fdb138cb1e484c329cf20892a6b
2018-02-12 16:12:33 +00:00
TreeHugger Robot
df19e5a5c4 Merge "Refactor ZygoteProcess to deal in LocalSocketAddress." 2018-02-09 19:44:55 +00:00
Tao Bao
d27be3444f Expose an update_engine API that verifies the given payload metadata.
android.os.UpdateEngine.verifyPayloadMetadata() allows a system updater
to verify a payload can be safely applied, by using its payload metadata
(usually a few hundred KiB only or even less). This would be useful in
improving update UX, since the updater can be smarter to avoid
installing an update that would fail to apply, or to fall back from an
incremental to full payload.

Bug: 65283633
Test: Build and flash walleye on device. Trigger a call to this API.
Change-Id: I82546f6b2a8f27cfd956cc1677556e7221cce5fd
2018-02-09 11:12:56 -08:00
TreeHugger Robot
4f07fa4e74 Merge "Add support for vibrator HAL 1.2 effects." 2018-02-09 16:36:13 +00:00
TreeHugger Robot
27b3cad257 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" 2018-02-09 07:31:46 +00:00
Yifan Hong
1c9e8b2bfa Merge "VintfObject: add getTargetFcmVersion" am: 5a748e5ee2 am: b901a37a85
am: 600ee19e3d

Change-Id: I93fcdab5d1dd81392f20a947f2c7bbe91ddaa525
2018-02-09 00:56:05 +00:00
Yifan Hong
600ee19e3d Merge "VintfObject: add getTargetFcmVersion" am: 5a748e5ee2
am: b901a37a85

Change-Id: Ide89fa9bc6c3dfb0bbeff6a3a8afdee4c31504e2
2018-02-09 00:44:01 +00:00
TreeHugger Robot
efd14bf5a5 Merge "Wireless charging on aod and lockscreen" 2018-02-08 23:46:15 +00:00
Michael Wright
f268bf573f Add support for vibrator HAL 1.2 effects.
Test: atest android.os.VibrationEffectTest
Bug: 64184692
Bug: 64185677
Change-Id: I0b3f9caa04b3e7bdadba5c44188120ac14943f82
2018-02-08 21:24:02 +00:00
Treehugger Robot
5a748e5ee2 Merge "VintfObject: add getTargetFcmVersion" 2018-02-08 20:12:02 +00:00
Robert Sesek
335e9c56a2 Refactor ZygoteProcess to deal in LocalSocketAddress.
Currently ZygoteProcess only uses String names in the RESERVED socket
namespace. This CL reworks the class to use LocalSocketAddress, so that
other socket namespaces can be used to communicate with zygotes.

Bug: 63749735
Test: m (no functional change)
Change-Id: I4146f684bfcd78b16500829d02ff54590a8b48f5
2018-02-08 14:55:33 -05:00
TreeHugger Robot
9ea3c99a95 Merge "Statsd notifies listener with pendingintent." 2018-02-08 18:50:00 +00:00
Beverly
ac32c9acc3 Wireless charging on aod and lockscreen
- wireless charging animation plays on aod + lockscreen
- timing changes on animation based on design spec
- charging feedback only given if phone is not just booted

Test: manual
Bug: 67598445
Change-Id: I009ff6016141bcdfe9f0392bb9a1c220ea88dfe5
2018-02-08 09:38:59 -05:00
David Chen
661f791a25 Statsd notifies listener with pendingintent.
Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.

Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
2018-02-07 16:16:23 -08:00
Yifan Hong
0e5e472b4b VintfObject: add getTargetFcmVersion
Add getTargetFrameworkCompatibilityMatrixVersion that returns
target FCM version in device manifest.

Test: VintfDeviceInfo
Bug: 70993015
Change-Id: Ia6354f85e7fae898444067977fb594febb0112fa
2018-02-07 14:30:43 -08:00
Dianne Hackborn
a9da85fde4 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I95afb7185742b82c525e775ca20bb36015510b43
2018-02-07 14:02:02 -08:00
Siddharth Ray
f5e796a070 Cellular Tx power added to Volta historian
A flag in historian is added to identify time periods where the
cellular radio is transmitting at the highest power level.

BUG:38354995
Change-Id: Ib89a505636c1d5aa66f8c19690742dde9d40fe61
2018-02-07 12:29:26 -08:00
Steven Moreland
3a5419befa Remove unused flags from IHwBinder.
transaction start: this is interface dependent
flags: part of kernel ABI, unused here

Bug: 72877008
Test: N/A
Change-Id: Ic0f268cd0483edaf3cea7de90b5743e84292f427
2018-02-06 10:26:22 -08:00
Vladislav Kuzkokov
999ea9fb7e Merge "Make printing policy a restriction." 2018-02-06 17:11:07 +00:00
Hans Boehm
a2a39f2c00 Increase CRASH_AT_SIZE to 20000
Bug: 71353150
Test: Build and boot master
Change-Id: I2c9a8a93b01ae3eff0db657cb515a48502eaacbc
2018-02-05 14:30:00 -08:00
Vladislav Kuzkokov
622b9f9212 Make printing policy a restriction.
Use existing API instead of creating new method.

Bug: 64140119
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPrintingPolicy

Change-Id: I9ff94f4d73824e7bf9aedbb64811ad60fccf9779
2018-02-05 22:30:05 +01:00
Vishnu Nair
df6c6e7c55 Add DEFAULT dump priority for services
- Adds a new DEFAULT priority for services which is treated the same as NORMAL priority but dumpsys does not send "--dump-priority" arguments to the service.

Bug: 27429130
Test: Manually generate bugrepot (default version) and check for any issues
Test: Load bugreport on ABT
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
      adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test && \
      printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: Ia90ae16d56d0144e679cf39ebfbf4473dd21f167
2018-02-05 13:04:55 -08:00
Jeff Sharkey
ad357d1839 Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.

This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.

Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
2018-02-03 02:11:45 +00:00
yuemingw
7810b8b5a1 Rename DISALLOW_CONFIG_LOCATION_MODE to DISALLOW_CONFIG_LOCATION.
Bug: 72732481
Test: CtsVerifier test already in
Change-Id: I6932d08b250546879a77bc11022987a0d44c3135
2018-02-02 16:47:47 +00:00
Jeff Sharkey
45c97df89d Move more folks to FileUtils.copy().
Also extend API to accept a "count" argument of exactly how many
bytes to copy, and return the actual number of copied bytes.

Improve docs.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: I8d255e4f97462838c02a8ecb6d2d221188c4eff0
2018-02-01 16:01:55 -07:00
Jeff Sharkey
274ad55021 Enable sendfile() and splice() optimizations.
This can easily be reverted if we uncover any trouble.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: Iac97c342948074c4f373e5f2ae70e563b308a11e
2018-01-31 21:52:00 -07:00
Jeff Sharkey
b18f899241 Use sendfile() and splice() to speed up copying.
There are several places across the OS where Java code is simply
copying data between two points, which requires bringing that data
out into userspace before going back into the kernel.  (That's pretty
lame.)  The patches for the recent Meltdown/Spectre security issues
have made this overhead even worse, so it's finally time to move this
copying directly into the kernel.

This change adds a couple new FileUtils.copy() methods which inspect
the given streams/FDs, and attempt to do as much optimization as
possible before falling back to a slower userspace-based copy.

Benchmarks are showing typical improvements of 44% for 32KB files,
50% for 32MB files, and 35% for 32MB pipes.

Plenty of tests are included, and there's a simple kill-switch that
can be used to enable/disable the feature if it starts causing any
trouble.  (A future CL will enable the optimizations.)

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: I52518d529da5d961610998b9f61399064d8025cd
2018-01-31 21:47:22 -07:00
TreeHugger Robot
8028c8cd5d Merge "Dump per uid Binder Proxy Count before ProxyMap assert" 2018-01-31 04:31:32 +00:00
Michael Wachenschwanz
58ac218a52 Dump per uid Binder Proxy Count before ProxyMap assert
To help identify which apps may be leaking binder proxies

Bug: 71353150
Test: manual
Change-Id: Ib377056e3cef7088c6b05a03921d0b7a4f89d422
2018-01-30 15:44:52 -08:00
TreeHugger Robot
827aa57f16 Merge "Update HIDL-related documentation." 2018-01-30 22:15:36 +00:00
Steven Moreland
739811a5c5 Update HIDL-related documentation.
This is a followup CL to previous @SystemApi CLs.

Bug: N/A
Test: N/A
Change-Id: I9c7dcc776dcfb89fd90afa4fc5d74e40ff0a5f94
2018-01-30 10:11:40 -08:00
Yi Jin
3ec5cc792e Modify SystemApi so it can be used by CTS to trigger incident report
Bug: 72502621
Test: Cts/Gts tests covered, see the cls from the same topic
Change-Id: Id0c1cc0fc0054e620de1349dab66513e554b1caa
2018-01-29 21:01:09 -08:00
Makoto Onuki
076218bfc0 Keep track of battery drain rate in various states...
... and print in dumpsys power.

Bug: 72229630
Test: manual test with dumpsys power, etc
Test:  atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java

Change-Id: I43949129ff03c1e0b0fa3aa603e0678b728538ee
2018-01-29 11:09:14 -08:00
TreeHugger Robot
6fa646ab95 Merge "Reduce pss collection amount, improve logging." 2018-01-29 16:52:08 +00:00
Narayan Kamath
add7bec836 Merge "WorkSource: Mark methods required by GMS as @SystemApi." 2018-01-29 13:27:05 +00:00
Ricardo Loo Foronda
7075daa278 Merge "Docs: Fixed broken link to Traceview docs" into oc-mr1-dev am: 16a77c54ef
am: 223ba4c536

Change-Id: I431ffb4177174cba7258a3a6ad30cfbab130f269
2018-01-29 04:18:38 +00:00
Ricardo Loo Foronda
223ba4c536 Merge "Docs: Fixed broken link to Traceview docs" into oc-mr1-dev
am: 16a77c54ef

Change-Id: Ifb88d7364a377092509bb9a93def65ccca7dcf41
2018-01-29 04:11:43 +00:00
Ruchi Kandoi
2b894394a5 Merge "Add UID and Service for Secure Element Application" am: b8b7589531
am: 8ee3204c58

Change-Id: I7c74f21e014fb7eb772e2d86cc278fd774ffb8c9
2018-01-27 01:59:46 +00:00
TreeHugger Robot
ce01bd906e Merge "Proto enums for DeviceIdleMode" 2018-01-27 01:18:20 +00:00
Ruchi Kandoi
6149b0fa49 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
2018-01-27 00:45:49 +00:00
Dianne Hackborn
e17b445b6c Reduce pss collection amount, improve logging.
Tuned rates that we collect PSS, to reduce how much we do
that heavy operation.  Added a new way to determine
whether a process has changed to a state for the
"first" time -- now this is when it has gone to that
state for the first time since it was in a lower state.
This will reduce the amount of time we consider a
process to be first to only when it has previously
gone into a higher state than it had before.

Keep track of more fine-grained information about why we
collect a PSS sample (not just internal, but for a single
process, all processes because of a mem state change, all
processes because of a poll).

Started collecting RSS in various places, so we can start
looking at that w.r.t. PSS and see about transitioning to
it is a new primary metric.

Added logging for many of the places where the system
writes its configuration files, so we can more easily
see any bad behavior going on in those areas.

Added some currently disabled code to read smaps directly
instead of using fgets().  Probably won't help, but want
tot test.

Bug: 70859548
Test: atest CtsAppTestCases
Change-Id: I400dba0f3ae9c024df51c946cfa592561028b598
2018-01-26 15:15:04 -08:00
Steven Moreland
d4b40969d4 Merge changes from topic "hidl-system-api"
* changes:
  Add remaining missing HIDL SystemApi methods.
  HIDL: reportSyspropMethod -> enableInstrumentation
2018-01-26 23:09:15 +00:00
Ruchi Kandoi
dcf4c6dc26 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Merged-In: I2f48ff204acd29b1a9f6819910aba5f8f3762977
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
(cherry picked from commit dfaf4bdd1e7e12caf9bb69c8facc38e879861baf)
2018-01-26 11:11:52 -08:00
Ricardo Loo Foronda
ac750a8a60 Docs: Fixed broken link to Traceview docs
Status: Ready for review.
Note: This is a Javadoc only change.

Changes:
* Replaced "guide/developing/tools/traceview.html/ with
  "studio/profile/traceview.html"

Test: * Build with "make ds-docs -j16"
      * Staged content at go/dac-stage/reference/android/os/Debug.html
      * Ran linkchecker against staged content

Bug: 37640935
Change-Id: I0446c44a78ae7d1d9193e2fe08e059cdc90cac7a
2018-01-26 18:16:23 +00:00
Bookatz
8bdae8d682 Proto enums for DeviceIdleMode
Created an enums.proto that contains the device idle modes,
which is referenced by batterystats.

Note that, currently, batterystats is the origin of these
constants in the java code, and I have kept that as is.
Thus, batterystats references the enum.
Nevertheless, because the actual control of device idle
mode is DeviceIdleController.java, where these constants
will likely one day be moved, I have put the constants
in server/enums.proto (since DeviceIdleController is
in server, not os like BatteryStats).

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.HostAtomTests#testDeviceIdleModeStateChangedAtom
Change-Id: I6e66801ae8256aab423067f9a4b852a194564a8d
2018-01-26 17:26:20 +00:00
Narayan Kamath
dfcdcc9a2b WorkSource: Mark methods required by GMS as @SystemApi.
Bug: 71710975
Bug: 62390666
Test: make checkapi
Change-Id: Iec0714394dda40835ab3f2f444ca696850df9cdf
2018-01-26 17:00:10 +00:00
TreeHugger Robot
a5014f298c Merge "Remove @removed trySetQuietModeEnabled" 2018-01-26 16:14:04 +00:00
Tony Mak
7699a19d2b Remove @removed trySetQuietModeEnabled
Context:
Updated the API according to API council feedback. Marked it as
@Removed and keep it for a while for Launcher. But now Launcher
prebuilt is updated, we are safe to remove it.

Test: Build

BUG: 71818127

Change-Id: I33fec12addf7031bfbcd86bce9e636c31d0ea4d3
2018-01-26 16:13:44 +00:00