Commit Graph

6119 Commits

Author SHA1 Message Date
Tej Singh
a0c89dd5b6 Statsd Puller Callback Registration
Creates a hidden api to register puller callbacks for vendor atoms.

Test: manual local test
Test: statsd unit tests
Bug: 119898637
Change-Id: Id28817b8fc718e128adc4e1c6b2e997db84517f9
2019-02-11 14:24:03 -08:00
Jeff Sharkey
8805033e7a Allow update() to move files on disk.
There are a set of columns available through insert() and query()
which influence placement of files on disk, so it makes sense to
expand update() to allow movement of underlying files, as long as
the changes respect any rules that would have been applied to a
brand new insert().

When a caller updates any placement columns, blend them together
with any current values, and generate the path that would have
been used for an insert.

Bug: 123967243
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I440a3edc5faaebac30e5bfa4c992157be39c8ee1
2019-02-11 11:39:14 -07:00
Sudheer Shanka
82c999d7f9 Merge "Remove sandbox specific bind mounts from root namespace." 2019-02-08 00:36:00 +00:00
Yiwei Zhang
b9218244e6 Merge "Game Driver: plumb package name and version for GpuStats" 2019-02-07 20:46:56 +00:00
Sudheer Shanka
03fd40b36e Remove sandbox specific bind mounts from root namespace.
Update vold to only create package sandboxes and not do any bind mounts.
After zygote forks, all the necessary bind mounts will be setup for
the process.

Bug: 124009234
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: Ibd4af79b385e20228a0e9ce4446f14ead87e228e
2019-02-06 16:41:05 -08:00
TreeHugger Robot
598a0ebac1 Merge "Bubbling up setNightMode and setLocationMode." 2019-02-07 00:23:45 +00:00
Michael Wright
ebc78db8e1 Merge "Instrument wake up reasons." 2019-02-06 23:37:05 +00:00
Yiwei Zhang
33097bf1d9 Game Driver: plumb package name and version for GpuStats
This change also optimized the usage of PackageManager.

Bug: 123529932
Test: Build, flash and boot.
Change-Id: I665d6f1e1da374e790c98a5cb589a860ccc8937e
2019-02-06 15:35:48 -08:00
Kweku Adams
4132384b1a Bubbling up setNightMode and setLocationMode.
"LocationMode" is a better name for the setting than gpsMode and it's
been renamed internally in a separate CL.

NightMode has been transferred over to a BatterySaver flag in another
CL, so this adds the setting here.

Bug: 119261320
Test: Android builds
Change-Id: I9fe157c9bb8d032f8ae60391c1f09ff6886c8e41
2019-02-06 11:31:29 -08:00
Benjamin Miller
8cc730d57d docs: recommend that DISALLOW_CROSS_PROFILE_COPY_PASTE is accompanied by setScreenCaptureDisabled().
Clarified the scope of the restriction (export-only).

Bug: 77204173
Test: javadoc UserManager.java and inspect generated HTML
Change-Id: Iec4cf141741dfec6942decf6ef3f237d5eaa48f2
2019-02-06 16:11:10 +00:00
Anton Hansson
d136a7a224 Merge "Remove empty default constructor" 2019-02-06 15:20:19 +00:00
Michael Wright
e3001042b6 Instrument wake up reasons.
This lets us run experiments that need to know the reason for the wake
up in addition to the time and latency.

Bug: 122949636
Test: manually turning the device on and off, looking at the logs
Change-Id: I38429c3387a289010e1a2696ad351ffbe568413b
2019-02-06 12:54:00 +00:00
Anton Hansson
2579d1a48f Remove empty default constructor
Unused. Initially added to ease mocking/inheritance for testing
purposes, but apparently not necessary because a package-private
default constructor is auto-generated.

Also make fields final.

Bug: 123600502
Test: atest cts/tests/tests/os/src/android/os/cts/BuildVersionTest.java
Change-Id: I123a19fd0760259db67344bb827c0cf2de3b85c3
2019-02-06 12:26:30 +00:00
TreeHugger Robot
55593a983f Merge "Adding enableNightMode flag to BatterySaverPolicy." 2019-02-05 23:18:38 +00:00
TreeHugger Robot
319830dce9 Merge "Renaming gpsMode to locationMode." 2019-02-05 20:16:59 +00:00
Kweku Adams
4db6a3ca60 Adding enableNightMode flag to BatterySaverPolicy.
Also migrating UiModeManagerService to register a LowPowerModeListener
so it uses the more standard interface for Battery Saver.

Bug: 119261320
Bug: 122968431
Test: atest com.android.server.power.batterysaver.BatterySaverPolicyTest
Change-Id: I669737d5985d0b2835740a53695526a2119cdf49
2019-02-05 11:45:22 -08:00
TreeHugger Robot
7e968348cf Merge "Make ContentCapture calls directly from the UI thread." 2019-02-05 17:12:22 +00:00
Nandana Dutt
7c9863e4be Merge "Add error handling and other improvements to Bugreporting API" am: cefdee8540 am: 98e6b6bb58
am: d77536e116

Change-Id: I8fc19c7c7c1f08e93b48b4456ec5041f41045f5f
2019-02-05 06:26:30 -08:00
Nandana Dutt
d77536e116 Merge "Add error handling and other improvements to Bugreporting API" am: cefdee8540
am: 98e6b6bb58

Change-Id: Id84876ed95cd327ef09d5053b784e0842a06cce1
2019-02-05 06:15:14 -08:00
Nandana Dutt
cefdee8540 Merge "Add error handling and other improvements to Bugreporting API" 2019-02-05 13:48:13 +00:00
Nandana Dutt
551906c296 Add error handling and other improvements to Bugreporting API
* Validate input arguments
* Ensure primary user
* Handle remote exceptions
* Pass error conditions to listener
* Ensure only one bugreport is in progress, at least via the API.

BUG: 123584708
BUG: 123571915
Test: Builds
Test: Manual; unit tests coming up

Change-Id: I4d1e0000fe815a02b82ce625864759fd818e6a24
2019-02-05 10:37:37 +00:00
Hans Boehm
39c00b22f4 Merge "Improve AsyncTask API documentation" am: 1cbb20b2df am: 8f39deb490
am: 6ff6c4de73

Change-Id: Ib34c98b1ca5bd4c3e17b29c465344f3418cc3376
2019-02-04 21:42:51 -08:00
Hans Boehm
6ff6c4de73 Merge "Improve AsyncTask API documentation" am: 1cbb20b2df
am: 8f39deb490

Change-Id: Idd279158405207d9afac604b8acc6bf49232cb2f
2019-02-04 21:16:57 -08:00
TreeHugger Robot
4e2a95c4d2 Merge "Game Driver: clean up GraphicsEnvironment" 2019-02-05 04:20:36 +00:00
Felipe Leme
3fe6e92440 Make ContentCapture calls directly from the UI thread.
Most calls are bufffered anyways, so by not using a handler we save time spent
on getting a pooled lambda and posting to the the handler.

The only "expensive" operation is flushing, but it makes a oneway binder call
so it might be fine (and if necessary, we can optimize it later).

Bug: 123307965
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I7182c8e193f58fa000396fdb3003e771214bf79b
2019-02-04 18:30:12 -08:00
Yiwei Zhang
a0ee1f847d Game Driver: clean up GraphicsEnvironment
Bug: 123529932
Test: Build, flash and boot. Verify by installing game driver apk
Change-Id: Id73605125410a2b4054d9179227022e177d20af2
2019-02-04 18:02:21 -08:00
Kweku Adams
731a103afe Renaming gpsMode to locationMode.
The constant represented location mode settings, so it makes sense to
rename it to locationMode. I left the BatterySaverPolicy key as gps_mode
since that's been there for several releases.

Bug: 79580230
Bug: 119261320
Test: atest com.android.server.power.batterysaver.BatterySaverPolicyTest
Test: atest com.android.server.power.batterysaver.BatterySavingStatsTest
Test: atest CtsBatterySavingTestCases
Change-Id: Ib550a961aaa10d683a9b4302b3dc3c0f04841fc0
2019-02-04 14:05:41 -08:00
Olivier Gaillard
bab444a731 Fix a bug with worksource propagation.
It is properly added to the parcel when Binder.setCallingWorkSource is
called manually, however it does not work when we call
Binder.setCallingWorkSource in Binder#ProxyTransactListener. The problem
is that we are adding the worksource to the parcel too early. It is
called before we add the work source to the thread local
(ThreadLocalWorkSource.setUid)...

What currently happens
- Client code calls an AIDL method
- AIDL generated code calls writeInterfaceToken which add the headers to the parcel (including the worksource)
- AIDL generated code calls Binder#transact
- Binder#transact calls ProxyTransactListener#onTransactStarted --> this code is calling Binder.setCallingWorkSource too late. After writeInterfaceToken is called which is where the code calls Binder.getCallingWorkSource and add it to the parcel.

To fix it, we udpate the parcel request headers if the work source has
been fixed when the listener is called.

Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest android.os.ParcelTest BinderProxyTest
Bug: 123744028
Change-Id: Id1a4565c1f096d38bf1e423bea897da77ff84005
2019-02-01 13:43:43 +00:00
Hans Boehm
13060ffbd8 Improve AsyncTask API documentation
Bug: 34278255
Test: TreeHugger
Change-Id: I0347072112254f98d257a72ef1fc7c21b086df39
2019-01-31 17:36:36 -08:00
Howard Chen
1906271db6 Merge "Add the DynamicAndroid Service" am: 0b2057db02
am: 683251a1e2

Change-Id: Ia23e042273c8ab1a9d6de5e393b126794822cb5f
2019-01-31 07:11:33 -08:00
Howard Chen
0b2057db02 Merge "Add the DynamicAndroid Service" 2019-01-31 14:35:49 +00:00
TreeHugger Robot
d47fcfdc72 Merge "Adding support for adaptive battery saver." 2019-01-31 08:37:32 +00:00
Howard Chen
f17f42b0df Add the DynamicAndroid Service
Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Merged-In: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
2019-01-31 15:10:21 +08:00
Remi NGUYEN VAN
5de539172f Merge "Add UserHandle.getAppId to SystemApi" am: b334bbefd4 am: dac257d27c
am: ac358e2951

Change-Id: I64f2353311978ac585e6a2555adedbe967e23588
2019-01-30 22:41:52 -08:00
Remi NGUYEN VAN
ac358e2951 Merge "Add UserHandle.getAppId to SystemApi" am: b334bbefd4
am: dac257d27c

Change-Id: If35e251dbbbca2839529bbb999c6813fb601d1c0
2019-01-30 22:29:31 -08:00
Howard Chen
0a94764738 Add the DynamicAndroid Service
Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
2019-01-31 14:19:34 +08:00
Remi NGUYEN VAN
b334bbefd4 Merge "Add UserHandle.getAppId to SystemApi" 2019-01-31 06:04:11 +00:00
Remi NGUYEN VAN
9e70a42252 Add UserHandle.getAppId to SystemApi
This is consistent with other methods in this class, and unbundled
system apps such as the network stack need this API to verify their
callers regardless of the userid. The method is already marked as
TestApi.

Test: m
Bug: 123655057
Change-Id: I0ecef4abcd850dc641cd70681a56cb038778c04c
2019-01-31 12:52:03 +09:00
Christian Wailes
a6fd7351cd Merge "Added OWNERS entries for some Zygote related files." am: 3ad8923842 am: 2f0392e6f7
am: c5de65d8f0

Change-Id: I4bae89b7d2996042f3a8e72ec1dcc78ba4fa4a27
2019-01-30 17:44:07 -08:00
Christian Wailes
c5de65d8f0 Merge "Added OWNERS entries for some Zygote related files." am: 3ad8923842
am: 2f0392e6f7

Change-Id: If5c42163657b9704bcd4e257a0869e4ee8345793
2019-01-30 17:29:36 -08:00
Christian Wailes
3ad8923842 Merge "Added OWNERS entries for some Zygote related files." 2019-01-31 01:04:28 +00:00
Kweku Adams
9f488e2eae Adding support for adaptive battery saver.
Adaptive battery saver is a state that can be entered into dynamically
without the user turning on full EBS. With this, some features of
battery saver can be enabled to save power before the user needs to have
EBS turned on.

Bug: 119261320
Bug: 32423528
Test: atest android.provider.SettingsBackupTest
Test: atest com.android.server.power.PowerManagerServiceTest
Test: atest com.android.server.power.batterysaver.BatterySaverPolicyTest
Test: atest com.android.server.power.batterysaver.BatterySaverStateMachineTest
Test: atest com.android.server.power.batterysaver.BatterySavingStatsTest
Test: atest CtsBatterySavingTestCases
Change-Id: Ib11ea069828275d788e20cd2e858375eaaea888e
2019-01-30 15:38:25 -08:00
TreeHugger Robot
78ae2b5bb6 Merge "Skeleton API for IncidentManager to retrieve incident reports." 2019-01-30 03:30:40 +00:00
TreeHugger Robot
52c0db9ccb Merge "[GPU Service] Implement GPU service." 2019-01-30 02:50:00 +00:00
Joe Onorato
8daca75889 Skeleton API for IncidentManager to retrieve incident reports.
Bug: 123543706
Test: make
Change-Id: I0a41d476703cb0c1c728c6de1bf290162129e699
2019-01-29 16:10:44 -08:00
Peiyong Lin
fd71c20c68 [GPU Service] Implement GPU service.
GPU Service is used to monitor all GPU and graphics driver related features.
This patch implements GPU service into System Server, and implements
functionality to extract the whitelist out of game driver package when the
package is upgraded or removed. This will move the whitelist processing off
critical path when app launches.

BUG: 123290424
Test: Build, flash and boot. Verify by upgrading game driver apk.
Change-Id: I563a138bfe0c4c1bb17ed28dab5d6a8df244021d
2019-01-29 13:41:44 -08:00
Amith Yamasani
173af94d25 Merge "Introduce a new process state for location fg service" 2019-01-29 20:07:13 +00:00
Joe Onorato
e21ab7eab4 Add IncidentCompanionService
It is a helper in the system process that helps dumpstate and incidentd get
user confirmation to share reports

Bug: 123543706
Test: bit GooglePermissionControllerTest:*
Change-Id: Ia3fe4bd5257044ed89fe56ce683876fa03ba6c36
2019-01-29 09:59:28 -08:00
TreeHugger Robot
1ea5775448 Merge "Game Driver: rename GUP to Game Driver" 2019-01-29 10:51:26 +00:00
Martijn Coenen
d5b1afc8ae Merge "Speed up Zygote connection retry." 2019-01-29 08:34:05 +00:00