Commit Graph

5795 Commits

Author SHA1 Message Date
TreeHugger Robot
0f94603082 Merge "Rename ANGLE package name" 2018-11-27 17:46:02 +00:00
Jeff Sharkey
a789183401 Merge "Iterate on storage permissions model." 2018-11-27 15:51:14 +00:00
Jeff Sharkey
9787a9459d Iterate on storage permissions model.
This change updates the permissions design to use app-ops for
controlling write access, which is only extended to the default app
for a particular collection type.

Bug: 119713234
Test: atest android.appsecurity.cts.PermissionsHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I40811ff175b3b8410b58ed901948a23a56f8a8c2
2018-11-26 12:00:35 -07:00
Martijn Coenen
66213de907 Restrict dumping of binder proxy info in bugreports.
This dumping is done with the ActivityManagerService lock held, and
can take a while. Therefore, do the dumping without the lock, and
only dump proxy interface counts if the number of proxies looks
unreasonable to start with.

Bug: 119616995
Test: boots, bugreport doesn't dump proxy interfaces with normal count
Change-Id: If7ca8fbe08362db2ef57bf2e210160f37859fd79
2018-11-26 13:18:28 +01:00
Abodunrinwa Toki
d531f70d30 Merge "ConversationActions Config installer." 2018-11-22 16:02:54 +00:00
Wei Wang
2ca566b525 Merge "Add thermal status API for app and unit test" 2018-11-21 18:34:49 +00:00
Courtney Goeltzenleuchter
8b9ffcb075 Rename ANGLE package name
Test: manual: verify package name loads

Change-Id: I9202674011d9b1bf6c67cfc9c3b4318ded3a3656
2018-11-21 10:39:01 -07:00
Abodunrinwa Toki
f438e14dfd ConversationActions Config installer.
This installs model updates for smart reply/actions
aka conversation actions.

Test: none
Bug: 111437455
Bug: 111406942
Change-Id: I9cb04e7b20b565ac5d128475a90bd065c805e95e
2018-11-21 17:33:53 +00:00
Wei Wang
37b175448a Add thermal status API for app and unit test
Test: Manually on Thermal HAL 2.0 device
Test: Manually on Thermal HAL 1.1 device
Test: Manually on no Thermal HAL emulator
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java
Bug: 111086696
Bug: 119413961
Change-Id: I6723406123d12339e82e9e87eec14b7f9a301897
2018-11-20 11:56:30 -08:00
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