Commit Graph

5065 Commits

Author SHA1 Message Date
TreeHugger Robot
efd14bf5a5 Merge "Wireless charging on aod and lockscreen" 2018-02-08 23:46:15 +00: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
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
TreeHugger Robot
b0db811fe9 Merge "Statsd and frameworks reference proto enums" 2018-01-26 05:02:35 +00:00
TreeHugger Robot
9add1b8c1b Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-01-26 04:05:31 +00:00
Steven Moreland
adcb896fd6 Add remaining missing HIDL SystemApi methods.
A couple methods of Java classes which became SystemApis
but were used are still @hide.

Bug: 72480743
Test: hidl_test_java
Change-Id: I0cb82384932ab1758fa7576b2125825c48a4a6c9
2018-01-26 02:03:13 +00:00
TreeHugger Robot
ce6b2d6bb9 Merge changes from topic "product_partition"
* changes:
  Read media files from /product/media/audio
  Support /product partition
2018-01-26 01:10:16 +00:00
TreeHugger Robot
0193e5651f Merge "Add setting to control vibration intensity." 2018-01-26 00:09:09 +00:00
Bookatz
1a1b0464cb Statsd and frameworks reference proto enums
For frameworks constants that don't have intrinsic meaning (i.e. their actual
value and order don't matter), so that it is unlikely that their values
will be changed:
This cl introduces proto enums representing some constants found in
the Android codebase, and connects the two.

By using the Proto enum as the source-of-truth, it means that Java and
proto can be kept in sync. Otherwise, when the Java frameworks code
changes, it silently breaks the protos from working properly, since the enums
are wrong. By having the Java code reference the proto enums, it ensures
that everything is in sync. The values of the constants are unchanged.
But future changes to these constants will need to be done in the proto
file, which the Java file merely references.

The protos are necessary for incidentd and statsd and, in the future,
possibly dumpsys. In this way, the logging mechanism is much less likely
to get broken when new constants are added, and we can be ensured that
the logging accurately reflects the underlying codebase.

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases
Change-Id: If79032c34b2799db1e3e70cb47b1312fd72092b9
2018-01-25 15:47:57 -08:00
Steven Moreland
36be191dfd HIDL: reportSyspropMethod -> enableInstrumentation
Renaming this method with a semantic meaning which
better explains its purpose without caring about
its implementation details.

Bug: 72480743
Test: hidl_test_java
Change-Id: I4b0577b3f61180ecfd66ae146973fa5cc2a3b244
2018-01-25 15:42:02 -08:00
Calin Juravle
2b6e24c7e5 Merge "[framework] Extend profile operations to take the profile name" 2018-01-25 18:58:09 +00:00
Dianne Hackborn
c2cbc0727a Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit 994b5ad737.

Waiting for Chrome prebuilt.

Test: NA
Bug: 72116995
Change-Id: Ifcfea94ddefda27267640283038c9d0f933ea1d8
2018-01-25 10:43:28 -08:00
TreeHugger Robot
3bcddc94ac Merge "Chained attribution for GnssLocationProvider." 2018-01-25 17:14:11 +00:00
Narayan Kamath
8d82825c75 Support logging chained WorkSources from JobScheduler.
Controller by a feature flag, which this change also introduces.

Bug: 62390666
Bug: 70892390
Test: manual, via JobSchedulerTestApp
Test: CtsJobSchedulerTestCases

Change-Id: Ic7dfb7861f7987a1b6eeb4cf3851193e9ad7da84
2018-01-25 09:41:04 +00:00
TreeHugger Robot
73a331f524 Merge "Statsd broadcast subscriber" 2018-01-25 06:23:36 +00:00
Jaekyun Seok
1713d9e97a Support /product partition
This CL will support the followings.
- installing a RRO package for framework from /product/overlay
- installing apps from /product/app
- installing priv-apps from /product/priv-app
- installing permissions from
  /product/etc/[default-permissions|permissions|sysconfig]

Bug: 64195575
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
  => confirmed com.android.test.libs.product library
adb shell cmd package dump \
  com.android.framework.permission.privapp.tests.product
  => confirmed that the package is a priv-app

And I moved vendor/overlay/framework-res__auto_generated_rro.apk into
system/product/overlay/ on sailfish, and I confirmed that the RRO was
installed properly.

Change-Id: I16175933cebd9ec665d190cc5d564b5414a91827
2018-01-25 12:44:45 +09:00
Michael Wright
35a0c676ee Add setting to control vibration intensity.
This patch adds two distinct vibration control settings: one for
notifications and ringtones, and one for haptic feedback. Since we don't
always have the exact intent of a given vibration, VibratorService will
do its best to classify each VibrationEffect into one of these two
categories and then scale the vibration accordingly based on the
intensity setting.

Bug: 64185329
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
Change-Id: If16237f4782281aaab33e4a0f55c29f1a30ac493
2018-01-24 23:39:57 +00:00