Commit Graph

6209 Commits

Author SHA1 Message Date
TreeHugger Robot
55805af719 Merge "Add receiver info to IncidentdDetails in statsd_config" 2019-03-05 09:15:31 +00:00
Yao Chen
a8e78b9b88 Add receiver info to IncidentdDetails in statsd_config
This can be used for sending a broadcast to an app which incidentd
would share the incident report with.

Test: added unit test in statsd_test

Change-Id: Ieaf5b3b4d67168e2a99ff54e6392c77d8372ed4e
2019-03-04 23:47:27 -08:00
Christian Wailes
adb444f742 Merge "Renamed blastula to unspecialized app process (usap)" 2019-03-02 01:38:11 +00:00
Kweku Adams
f6410681b9 Merge "Adding new Battery Saver location mode." 2019-03-01 22:17:29 +00:00
Chris Wailes
7e797b6f26 Renamed blastula to unspecialized app process (usap)
Bug: 123017829
Test: make & boot & launch apps
Change-Id: Icfb9f8f4ebabacece817735d60d232cf3afb4e08
2019-03-01 13:18:48 -08:00
Jeff Sharkey
a09312df67 Merge "All Parcelable CREATOR fields are @NonNull." 2019-03-01 14:58:28 +00:00
Andrei-Valentin Onea
b9fadbfc94 Merge "Add statslog logging for hidden api usage" 2019-03-01 11:47:15 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Jeff Sharkey
a30e5c389f To be @Nullable or @NonNull, that is the question.
Bug: 126699288, 126699496, 126700389
Bug: 126700085, 126701638, 126702005, 126700497
Test: manual
Change-Id: Idcbc2722ddcf014a9e5cef14321b4e2ce30adf9c
2019-03-01 06:26:39 +00:00
TreeHugger Robot
36f9c79bf5 Merge "Add missing ServiceType values to IntDef." 2019-03-01 03:53:29 +00:00
Kweku Adams
27c65cca30 Add missing ServiceType values to IntDef.
FORCE_BACKGROUND_CHECK and NIGHT_MODE were accidentally excluded from
the ServiceType @IntDef definition.

Bug: N/A
Test: N/A
Change-Id: Ib66bb2ce004a6577515ac185d0aef2dd5f1ed49b
2019-02-28 15:32:31 -08:00
Kweku Adams
4fb074e7f4 Adding new Battery Saver location mode.
When this new mode (LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF) is
enabled, LocationManagerService will avoid sending almost all
LocationRequests to providers. The only requests that will continue to
be sent will be providers are the requests that ignore location
settings.

Bug: 121256487
Bug: 122849003
Bug: 119261320
Test: atest android.os.cts.batterysaving.BatterySaverLocationTest
Change-Id: Iee95a6fb5ca11d4db7a0f0661bf3cb1051a5d710
2019-02-28 14:55:39 -08:00
TreeHugger Robot
7452b628e1 Merge "Rename createPrebaked to createPredefined" 2019-02-28 14:50:09 +00:00
Jeff Sharkey
36274999fe Developer option to disable legacy greylist.
The app developers on the legacy greylist need an option to disable
the greylist so they can debug.

Bug: 124818022
Test: manual
Change-Id: I84785a235830761794dee5c603c1ea43f8ace73e
2019-02-27 12:09:59 -07:00
Andrei Onea
e8e150dbff Add statslog logging for hidden api usage
Statslog logging is done alongside the old logging, with different
sampling rates.

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t \
        android.cts.statsd.atom.UidAtomTests#testHiddenApiUsed
Bug: 119217680
Change-Id: If7c38eaee3a3c08434c2e4f2dac45c659ea9cb12
2019-02-27 16:16:44 +00:00
Sudheer Shanka
4068df3262 Merge "Add an @IntDef to indicate notify event types." 2019-02-27 01:48:17 +00:00
Sudheer Shanka
c27b15197a Add an @IntDef to indicate notify event types.
Fixes: 126354778
Test: n/a
Change-Id: I965b8b75b6b1e25483bf83b1aea6ec192d055c8d
2019-02-26 11:17:42 -08:00
Christian Wailes
bda1b8f60f Merge changes Ib8f3b5b0,I66b01930,I560cdf9c
* changes:
  Teaches the System Server to enable the Zygote's blastula pool.
  Added pool management code around zygote state changes.
  Improved file descriptor cleanup in Zygote.
2019-02-26 18:21:49 +00:00
Sudheer Shanka
47d759f2c4 Merge "Look for visible vols for a user under /mnt/user/<userId>/package/." 2019-02-26 16:18:15 +00:00
Arthur Hung
00657b8946 Rename createPrebaked to createPredefined
Bug: 126179814
Test: manual
Change-Id: I5536ed6c43b6f6b2e6891200af2043280a1c55bc
2019-02-26 11:56:40 +08:00
TreeHugger Robot
52480bee82 Merge "Fix Battery Saver location bugs." 2019-02-25 21:33:36 +00:00
Nandana Dutt
3267e6513a Merge "Add a new error code for disallowing concurrent bugreports" am: 2badc1e434 am: 1ae35be3e3
am: a973019596

Change-Id: Ie9a4bdc744a103b10a30df415524c94e46957ee5
2019-02-25 11:52:59 -08:00
Nandana Dutt
a973019596 Merge "Add a new error code for disallowing concurrent bugreports" am: 2badc1e434
am: 1ae35be3e3

Change-Id: I7440be8e4605466958d072dd977e0019f13b2193
2019-02-25 10:20:50 -08:00
Sudheer Shanka
e51005da04 Look for visible vols for a user under /mnt/user/<userId>/package/.
Currently, we pass down visisble volumes for a user to zygote so that
it can set up appropriate bind mounts after forking. This method has
atleast a couple of race conditions, so instead make zygote just
look under /mnt/user/<userId>/package for volumes that need to be
handled for a particular user.

Bug: 126069494
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Iab47eb34d38a25dfda4a686db9b7203ad4885a93
2019-02-24 10:24:09 -08:00
Chris Wailes
db132a3e1f Teaches the System Server to enable the Zygote's blastula pool.
This patch adds the code necessary to communicate changes to the
blastula_pool_enabled system property from the  System Server to the
zygote process.  Checking this property asynchronously from both the
system server and the zygote can lead to a deadlock, so instead the
system server checks the property and notifies the zygote.

By default the blastula pool is disabled.

Test: adb shell device_config put runtime_native blastula_pool_enabled true
Test: adb shell device_config put runtime_native blastula_pool_enabled false
Change-Id: Ib8f3b5b0eb78349255b9b316d683a69747616ef7
2019-02-22 18:54:28 -08:00
Chris Wailes
ae93714d05 Improved file descriptor cleanup in Zygote.
Enabling the blastula pool exercised a previously unused codepath that
wrote to the log.  This caused a socket to be opened when it wasn't
expected to be.  This patch re-closes the logging socket before applying
the SELinux policy for the new application.

This patch also adds code to clean up blastula table entries in
processes spawned from the Zygote and disables the blastula pool code
for child zygotes.

Bug: 123409530
Test: make & flash & boot & check logs for SELinux denials
Change-Id: I560cdf9c42502574d25ab25a0f8afa3eb6de307f
2019-02-22 18:50:56 -08:00
Kweku Adams
5e0052b1eb Fix Battery Saver location bugs.
1) Actively disabling LOCATION_MODE instead of LOCATION_PROVIDERS_ALLOWED
since the latter is deprecated and not supported.

2) The LOCATION_MODE_FOREGROUND_ONLY flag wasn't used anywhere. As
such, it was essentially no different from LOCATION_MODE_NO_CHANGE. I've
implemented the behavior in LocationManagerService so it works properly.

3) GnssLocationProvider only turned off GPS when the location mode was
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF, but not the mode was
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF. I've fixed it so GPS is
turned off in both modes.

4) PowerManager looked at the global battery saver state to determine if
the location mode should be used. This was fine for full Battery Saver,
but would be a problem with adaptive Battery Saver. The proper thing to
do is to just look at the local 'batterySaverEnabled' flag.

Bug: 121256487
Bug: 122849003
Bug: 119261320
Test: atest CtsBatterySavingTestCases
Change-Id: I8973d27fb050d9892bb97021712d9cf9743e8939
2019-02-22 17:07:08 -08:00
Yiwei Zhang
5ccf21b382 Merge "Game Driver: process sphal libraries in GPU service" 2019-02-22 21:45:56 +00:00
Wale Ogunwale
691af68a3c Added some TestApi that are already used by CTS
Allows us to remove the use of private platform API from CTS.

Bug: 124134247
Test: builds
Change-Id: Iceb81ff7c9385e877d2612fbb7b506245d116928
2019-02-21 20:15:56 -08:00
Leo Hsu
ab28fff9f9 Add UserManager APIs to SystemApi.
Bug: 124940146
Test: make
Change-Id: I1cac9a6106b3da099e08f10f2c08d90e9f515e42
2019-02-22 01:08:14 +00:00
Nandana Dutt
cfb3d4856e Add a new error code for disallowing concurrent bugreports
BUG:123571915
Test: manual
Change-Id: I8787137c3cfeb33aacfa439f6eab1a668977e572
2019-02-21 16:17:54 +00:00
Yiwei Zhang
1c51f05ab4 Game Driver: process sphal libraries in GPU service
This change adds the sphal libraries text file parsing to the GPU
service. As the result, when the Game Driver apk is updated, the sphal
library list will be read out to the GAME_DRIVER_SPHAL_LIBRARIES
settings global property to be used in the graphics environment to
extend the current linker namespace.

Bug: 124448366
Test: Build, flash and boot. Install the apk to verify settings global.

Change-Id: Ifb4007a1fe7269e0a2857fe7badc8642342b1449
2019-02-21 00:26:17 -08:00
Yiwei Zhang
786386074b Merge "Game Driver: update the format of driver build date" 2019-02-21 07:35:11 +00:00
Christian Wailes
a2f67c96cc Merge "Updated Zygote IPC related comments." am: f8881b6821 am: c850654edc
am: 49574608ae

Change-Id: Ie14f3a5377599f3542dedc0a42a87ca3a41ca9ba
2019-02-20 16:56:15 -08:00
Christian Wailes
49574608ae Merge "Updated Zygote IPC related comments." am: f8881b6821
am: c850654edc

Change-Id: I15a33cdf792727f58b3d89d86ccf454536737868
2019-02-20 16:12:40 -08:00
Makoto Onuki
3d44f6379c Merge "Fix boost charging, also expose test API" 2019-02-20 22:06:05 +00:00
Chris Wailes
b13bfc5682 Updated Zygote IPC related comments.
Bug: 124637285
Test: None; comment only changes
Change-Id: Ie567715a1ee08cdf65e3135aa75e3bd95ef5ab0d
2019-02-20 11:19:54 -08:00
Yiwei Zhang
f7b0a5f404 Game Driver: update the format of driver build date
The string based driver build date has been updated to Unix epoch
timestamp based driver build time. This change updates the corresponding
apis and throw exceptions when the meta-data timestamp in the game
driver apk is not set properly.

Bug: 123156461
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: Id4fb3ade31fa5944dcb32fedf5ca926b497e82dc
2019-02-20 18:08:40 +00:00
TreeHugger Robot
a835f26315 Merge "Start RenderThread earlier to preload Vulkan/EGL drivers" 2019-02-20 08:07:39 +00:00
Jeff Sharkey
3f2385b97f Merge "Respond to various API council feedback." 2019-02-20 07:07:33 +00:00
Stan Iliev
898123b6a3 Start RenderThread earlier to preload Vulkan/EGL drivers
This CL should fix application startup regression for Vulkan
detected by "Hermetic Startup: EmptyActivity" test.
EGL drivers are loaded in a temp thread to leave more time
in RenderThread for other work. Loading EGL drivers
on the RenderThread may cause a perf regression.

Test: Ran cold-dropcache-test test.
Bug: 122659224
Bug: 123361175
Change-Id: I8ca818e98fac196a41d079be15594caca5cb1bab
2019-02-20 02:10:52 +00:00
Makoto Onuki
897f63664a Fix boost charging, also expose test API
Bug: 124437856
Bug: 111360323
Test: atest CtsBatterySavingTestCases
Change-Id: I7cf25e9dca669ae1bb5d9bb62ada35a59ca26f6f
2019-02-19 13:12:09 -08:00
Jeff Sharkey
924f620c9f Merge "Map MediaStore items to StorageVolume." 2019-02-19 20:23:05 +00:00
Christian Wailes
18f7673fcd Merge "Add blastula pool system properties" 2019-02-19 18:15:48 +00:00
Jeff Sharkey
b91eaa54a8 Respond to various API council feedback.
Handle many simple, smaller changes in a single CL.  Hide
CPC.closeQuietly(), now that it implements AutoCloseable.  Add more
details to CR.set/getCache() docs.  Add many @Nullable/@NonNull
annotations.

Bug: 124507578, 124447751, 124302519, 123697622
Bug: 123661322, 122887179, 122528742, 122527812, 116224797
Test: manual
Change-Id: Icee556a6ed76bbdf4c8e42b59d69d5580d461b95
2019-02-19 11:09:22 -07:00
Jeff Sharkey
f8fa940405 Map MediaStore items to StorageVolume.
Add missing getStorageVolume() method to provide mapping from Uri
to underlying StorageVolume.

Bug: 124013019
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I91e246d29629eec84956ff113ef976e153fc69f7
2019-02-18 20:38:07 +00:00
Gavin Corkery
5ae3856c9e Rename data/staging to data/pkg_staging
Test: Build, flash, atest apex_e2e_tests
Change-Id: Ie66b0baaeb1845fdedbd6fa4bd5b33e63035627b
Fixes: 122999313
2019-02-18 14:45:48 +00:00
Santos Cordon
c34d735f43 Merge "Add force suspend API to PowerManager." 2019-02-18 10:23:04 +00:00
Ben Murdoch
f706696969 Merge "Update AppCompacted WW atom to include device ZRAM usage." 2019-02-18 09:13:23 +00:00
Mathieu Chartier
0bccbf7984 Add blastula pool system properties
This patch adds the following properties to DeviceConfig:
* BLASTULA_POOL_ENABLED
* BLASTULA_POOL_SIZE_MAX
* BLASTULA_POOL_SIZE_MIN
* BLASTULA_POOL_REFILL_THERSHOLD

The BLASTULA_POOL_ENABLED property is checked by ZygoteProcess but not
currently used due to an existing bug (b/123409530).  This will be
enabled by go/ag/6162164.  Until then the code path is tested via log
inspection.

The remaining properties are checked by ZygoteServer.  Values are
clamped to ensure that they cannot be set to values that are harmful to
the device.

Since device_config is not available in the Zygote the system properties
interface is used instead.

Bug: 123524494
Bug: 68253328

Test: adb shell device_config put runtime_native blastula_pool_enabled true
Test: manually verify the property change is observed

Change-Id: I2b675afd9fbc1cbb0e8bc1c491cfdbbb612d0d3b
2019-02-15 17:07:37 -08:00