Commit Graph

5786 Commits

Author SHA1 Message Date
Olivier Gaillard
b4bbd2c8a8 Merge "Update documentation for ThreadLocalWorkSource." 2018-11-19 17:42:05 +00:00
Olivier Gaillard
a50fdae610 Update documentation for ThreadLocalWorkSource.
Test: unit test
Change-Id: I446af267dafd069b1bf5f64a84347b69fc6fec60
2018-11-19 15:28:49 +00:00
Olivier Gaillard
e7ce49d152 Merge "Rename WorkSource methods on Binder and IPCThreadState." 2018-11-19 11:01:23 +00:00
Oleg Kibirev
2d281dfe63 Merge "Add a PowerManager @SystemApi to start a dream" 2018-11-16 21:38:34 +00:00
Oleg Kibirev
2385b5ef7e Add a PowerManager @SystemApi to start a dream
go/startdream

This is a simplier alternative to ag/5460565

Bug: 119130690
Test: Use of API from launcherX
Change-Id: I9b8e1dc04095045077c37014290120efec9dc331
2018-11-15 12:54:02 -08:00
Adam Bookatz
0dee99a7c7 Merge "Statsd atom: Power Use" 2018-11-15 20:20:08 +00:00
Hirono Shiyama
0f7882988f Merge "[BatteryStats] Correct formatter for pkginst in battery stats." am: 2c250e322b am: b6aa42807c
am: a3e91325a6

Change-Id: I16884ec77b77c0a24665b7e58374670e850ebd6d
2018-11-15 06:27:20 -08:00
Steven Moreland
188a74f8ba Merge "ParcelFileDescriptor: warn about comm int coupling." am: 22350fbefb am: 74090dbefa
am: 19e666a4fc

Change-Id: I9dbe8ea16bdddad89fcc8084195949654c57ae86
2018-11-15 05:38:54 -08:00
Ben Murdoch
0b81b12892 Merge changes from topics "appfuse-revert", "appfuse"
* changes:
  Revert "cheets: Delegate openAppFuseFile operation to vold"
  resolve merge conflicts of 6c9537dc7f to master
2018-11-15 13:19:16 +00:00
Olivier Gaillard
d542b1c3c6 Rename WorkSource methods on Binder and IPCThreadState.
This change only renames methods, there is no behavior changes except
using the new restore methods instead of clear.

Test: unit tests
Change-Id: I35ae966461657e2e2a67e916d752b9ee53381c83
2018-11-15 09:56:37 +00:00
TreeHugger Robot
b1c6ba026d Merge "Statsd uidmap includes vers string and installer" 2018-11-15 08:56:28 +00:00
Bookatz
75ee604244 Statsd atom: Power Use
BatteryStats calculates power usage of the device and various components
(such as apps). This information is used, e.g., in the battery panel of
Settings. We now log it to statsd. It can be used for validating how
good the information displayed in Settings is. In the long-term, it is
likely not ideal for off-device calculations, since that can be
hopefully estimated using statsd's raw data.

Three atoms: one for the total power use, one for the power use of each
uid, and one for each non-uid component. Since they will all likely be
pulled together, StatsCompanionService will provide stale data for
BatteryStats pulls called within a second of a previous BatteryStats
pull.

Also in this cl:
Remove StatsLogEventWrapper.writeDouble. Statsd doesn't support actually
writing doubles into its proto reports, so having this function is
misleading (the data will get to statsd and then be completely ignored).
It's less confusing if we don't pretend it does something.

Change-Id: If80bab8ea938afa4632535bb88ff59879fbe8099
Fixes: 119111972
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid
Test: BatteryStatsHelperTest#testDrainTypesSyncedWithProto
2018-11-14 18:13:58 -08:00
Hirono Shiyama
a3e91325a6 Merge "[BatteryStats] Correct formatter for pkginst in battery stats." am: 2c250e322b
am: b6aa42807c

Change-Id: I53c8883ef14106d5bda42f1361af3e7153dd9ad1
2018-11-14 16:31:19 -08:00
Treehugger Robot
2c250e322b Merge "[BatteryStats] Correct formatter for pkginst in battery stats." 2018-11-14 23:53:42 +00:00
Steven Moreland
19e666a4fc Merge "ParcelFileDescriptor: warn about comm int coupling." am: 22350fbefb
am: 74090dbefa

Change-Id: I916b81bcf0388316adb3dc8a79a4e03168eca661
2018-11-14 13:29:12 -08:00
Steven Moreland
22350fbefb Merge "ParcelFileDescriptor: warn about comm int coupling." 2018-11-14 17:41:49 +00:00
Risan
e45aae6934 resolve merge conflicts of 6c9537dc7f to master
Bug: None
Test: I solemnly swear I tested this conflict resolution (presubmit).
Change-Id: Ic8bf52c913caa7ed6bd91aa7dfb95a4cc2032249
2018-11-14 14:08:27 +00:00
Ryo Hashimoto
6c9537dc7f Merge changes from topic "appfuse-upstr" am: a2786c1f53
am: af57e83d44

Change-Id: I1287540b7265c96344cb91eb2119fc59919dc2c9
2018-11-14 00:10:11 -08:00
Sudheer Shanka
d68bd60ccd Update shared sandbox prefix to "shared-".
":" is not allowed in filenames by vfat.

Bug: 119525489
Test: sm set-virtual-disk true
Test: atest core/tests/packagemanagertests/src/android/content/pm/KernelPackageMappingTests.java
Test: atest services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java

Change-Id: I95ef58486abe8f2a9760e0229192448e0bd9ef42
2018-11-13 18:16:36 -08:00
Steven Moreland
3de571e1fc ParcelFileDescriptor: warn about comm int coupling.
If these values are ever changed (or their parceling), we'll also need
to update libbinder.

Bug: 115607973
Test: N/A
Change-Id: Id9c594ea039687855047c005a0c3a9bfe0002732
2018-11-14 01:00:01 +00:00
Risan
2c0da88382 Add FileUtils.translateModePfdToPosix
Bug: 72017414, 110379912
Test: manual with appfuse
Change-Id: I92b2f8995c1e011ff3fbc5c5a55d8c5793e2b5cf
Merged-In: I94373055468d279e6553d4a038267732b9b53745
2018-11-13 22:44:36 +00:00
Andreas Gampe
a1974bbe6d Merge changes Idbacb6ad,I4e06b3f9,Iffcbbb82 am: 0f9a09d8ba
am: e15b2d5896

Change-Id: I50b0c5785656ba5561083aec8901267baee99c2a
2018-11-13 14:29:39 -08:00
Treehugger Robot
0f9a09d8ba Merge changes Idbacb6ad,I4e06b3f9,Iffcbbb82
* changes:
  BinderProxy: Fix up differences
  Move proxy debug info dumping back to Java.
  Dump top binder proxy interface names in dumpsys.
2018-11-13 22:01:56 +00:00
Salvador Martinez
5980543478 Merge changes from topic "dynamic_power_saver"
* changes:
  Create APIs to interact with DynamicPowerSaver
  Create new battery saver mode
2018-11-13 20:23:03 +00:00
Risan
f8771d362c Merge "Introducing StubVolume in StorageManager" am: b499af866c am: eb871cc916
am: ee32e0d473

Change-Id: I4098132df9833b7cbac0db9bdadac297d324a822
2018-11-13 12:12:23 -08:00
Risan
ee32e0d473 Merge "Introducing StubVolume in StorageManager" am: b499af866c
am: eb871cc916

Change-Id: I69240d32659b511aec0e1e029fb6c6f1ab455c9c
2018-11-13 11:57:12 -08:00
Treehugger Robot
b499af866c Merge "Introducing StubVolume in StorageManager" 2018-11-13 19:20:38 +00:00
Salvador Martinez
812ea7554b Create APIs to interact with DynamicPowerSaver
This creates the PowerManager APIs that allow apps with the
appropriate permissions to interact with Dynamic Power Saver.

Bug: 111450127
Test: WIP
Change-Id: I5b9483fa0fba81a4ade622b1f3dbaec580b68a67
2018-11-13 09:33:50 -08:00
Anton Hansson
4a08723c5f Merge "Make Environment.getProductDirectory() @TestApi" 2018-11-13 12:53:07 +00:00
Sudheer Shanka
52b976d8be Merge "Update storage sandbox path translation methods." 2018-11-13 03:51:48 +00:00
TreeHugger Robot
3ab40f1866 Merge "Add sm set-isolated-storage [true|false]" 2018-11-13 01:19:24 +00:00
Andreas Gampe
460ff1416b BinderProxy: Fix up differences
Fix up resolves to minimize differences to internal code.

Test: m
Change-Id: Idbacb6ad14c43aff8030d70b5e17427b86e92d6e
Merged-In: I4e06b3f93e30ed1c7868ec9e018709a7e796e441
2018-11-12 16:15:31 -08:00
Martijn Coenen
c1493b283b Move proxy debug info dumping back to Java.
This had to be called from native because serialization
was done from native, but now that serialization is in Java
we can move this back to a more logical place.

Also, this allows us to dump the per-UID proxy counts in
this situation again.

Bug: 109888955
Test: sailfish builds, proxy debug info shown on hitting limits
Merged-In: I4e06b3f93e30ed1c7868ec9e018709a7e796e441
Change-Id: I4e06b3f93e30ed1c7868ec9e018709a7e796e441
2018-11-12 16:08:45 -08:00
Sudheer Shanka
87915d66c3 Update storage sandbox path translation methods.
Update these methods to consider if the app is sandboxed or not.
Earlier, only apps with WRITE_MEDIA_STORAGE have access to full
external storage. So, clients had to check this before calling
these translate methods. Now, apps under instrumention might also
have full storage access and DownloadProvider will also start
using these translate methods. So, instead of having the clients
deal with it, move the logic of checking if an app is sandboxed or
not into these translate methods.

Bug: 117229024
Bug: 119265456
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java

Change-Id: If679e71a906bb2106752721409b4410557fb3e28
2018-11-12 14:56:58 -08:00
Martijn Coenen
345d4c16bb Dump top binder proxy interface names in dumpsys.
To facilitate real-time debugging.

Bug: 109888955
Test: builds, adb shell dumpsys activity binder-proxies shows output
Merged-In: Iffcbbb824f4050b6fb8f556c8b4d09115e53da18
Change-Id: Iffcbbb824f4050b6fb8f556c8b4d09115e53da18
2018-11-12 14:47:12 -08:00
Josh Gao
bd1db80249 Merge "Close PFD.AutoClose{In,Out}putStream before the PFD itself." am: 8fe23dfeff am: dcf129f380
am: a355924be3

Change-Id: I9db1facad1b464715a1d8d64d9caa1ebd5d3ba43
2018-11-12 13:28:18 -08:00
Josh Gao
a355924be3 Merge "Close PFD.AutoClose{In,Out}putStream before the PFD itself." am: 8fe23dfeff
am: dcf129f380

Change-Id: I6926ff23f7360ba2acf2b87dff1b20c548d7d0d4
2018-11-12 13:12:13 -08:00
Josh Gao
401fb2485a Close PFD.AutoClose{In,Out}putStream before the PFD itself.
Bug: http://b/118316956
Test: atest ParcelFileDescriptorTest
Test: atest ParcelFileDescriptor_AutoCloseOutputStreamTest
Change-Id: I39c5b15ea8ac5915e4f5e4e42328cd08f65ec9a0
2018-11-09 14:10:33 -08:00
Peiyong Lin
2d5a2bb0ad Add global property to store opt-in application package name.
We provide a way in developer option to opt-in an application to use updated
graphics driver. To make sure we set up the graphics environment correctly, we
need to access the package name of the selected application. This patch
introduces a global property to store the package name.

BUG: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I49dfcccf387169c072fb9345f7a50c00fcdb0737
2018-11-09 11:53:00 -08:00
Risan
05c41e6a0a Introducing StubVolume in StorageManager
Bug: 110380403
Test: Tested in ARC++ (with Settings and vold changes in separate CLS)
- able to see the external storage under StorageSettings. Also tested
the sm command to print stubvolumes.

Change-Id: I7517260a40399bd9800424bb394512601f6af617
2018-11-08 21:48:35 +00:00
Sudheer Shanka
be0febe40a Add sm set-isolated-storage [true|false]
Bug: 119038726
Test: manual
Change-Id: I29eeec7872584f1173e9b6d31434b36487515d9e
2018-11-08 11:36:04 -08:00
Cody Northrop
5431cccea9 Merge changes from topic "rules_fd_from_disk"
* changes:
  Add temp ANGLE rules support
  Remove app preference from ANGLE logic
2018-11-08 15:01:51 +00:00
Anton Hansson
09e47be13b Make Environment.getProductDirectory() @TestApi
Tests should be allowed to know where the product directory is mounted.

Bug: 119049497
Test: atest SysConfigTest
Change-Id: I3f196a862ad10d21646d4d5f8e46f6eec0a3bf6c
2018-11-08 13:08:42 +00:00
TreeHugger Robot
157edce8a7 Merge "Deprecated scoped directory access." 2018-11-08 02:14:24 +00:00
Cody Northrop
8d72a6b06f Add temp ANGLE rules support
If root is available or the app is debuggable,
check for the following property and use it to load
a rules file instead of the one that comes with ANGLE:

  debug.angle.rules

For example:

  adb shell setprop debug.angle.rules /data/local/tmp/a4a_rules.json

Bug: 80239516
Test: Manual build, ensure rules behave as expected
Test: cts-tradefed run singleCommand cts -m CtsAngleIntegrationHostTestCases
Change-Id: Ie43c67c078ad962ba12f1046a878f79216660755
2018-11-07 14:38:58 -07:00
Wei Wang
bad7c20606 Add thermal service into system_server
This system service will listen to ThermalHAL for throttling events and
take actions accordingly, e.g. shutdown device and/or sending
notification to registered listeners to IThermalSerivce.

Bug: 79443945
Bug: 118510237
Bug: 111086696
Bug: 116541003
Test: Boot and test callback on ThermalHAL 1.1
Test: Boot and test callback on ThermalHAL 2.0
Test: Kill ThermalHAL process
Test: Change device threshold to trigger shutdown
Change-Id: I1f4066c9f1cf9ab46c1738a0a4435802512e4339
2018-11-07 13:38:57 -08:00
Cody Northrop
6d8d96801e Remove app preference from ANGLE logic
* The use of meta-data to specify app preference for ANGLE was
  temporary, so remove it.
* Since we no longer plan to allow apps to specify a preference
  at all, remove the JNI plumbing.

Bug: 80239516
Test: Manual build, ensure rules are followed
Test: cts-tradefed run singleCommand cts -m CtsAngleIntegrationHostTestCases
Change-Id: If8eb6087ae85bb82eae6625778e1c3a926fe038a
2018-11-07 14:00:58 -07:00
Felipe Leme
05083b019f Merge "Initial APIs for Intelligence Service." 2018-11-05 21:48:54 +00:00
Felipe Leme
1dfa9a0195 Initial APIs for Intelligence Service.
A.K.A: "The thing's hollow — it goes on forever — and — oh my God! —
        it's full of TODOs!"

Bug: 117944706
Test: m update-api && m

Change-Id: I0774a0df4f4ea0810a8c5f72a1fbcd4eef5cd09b
2018-11-05 09:22:18 -08:00
Cody Northrop
e4ae7ea03e Merge "Add GLES specific setting for layers" 2018-11-04 17:00:46 +00:00