Commit Graph

6048 Commits

Author SHA1 Message Date
Michael Wright
a6a4f9c0a9 Merge "Add new ExternalVibratorService." 2019-01-27 23:44:13 +00:00
Jeff Sharkey
8bcdea7182 Merge "Get CtsProviderTestCases building against API." 2019-01-27 03:03:48 +00:00
Jeff Sharkey
cb269aac7e Get CtsProviderTestCases building against API.
To help confirm that we're actually testing developer-visible
behaviors, we need to build against public APIs, since there have
been plenty of examples in this suite of "testing" hidden API
behaviors, which are then misleading to developers.

Bug: 120429729
Test: atest cts/tests/tests/provider/
Exempt-From-Owner-Approval: Trivial API annotations
Change-Id: I07fe33e54f611a6060217f0706fb99b809961f4d
2019-01-27 03:03:39 +00:00
Tej Singh
bd37b5f8b3 Merge "APIs for registering config activation broadcasts" 2019-01-27 02:32:37 +00:00
Michael Wright
c390fbe928 Add new ExternalVibratorService.
This lets services outside of the vibrator service (and outside of
system_server) take control of the vibrator hardware. We still apply
policy in vibrator service, however, and can ask them to mute their
operations so we can give more critical haptic feedback when necessary.

Bug: 111457573
Test: manual
Change-Id: Ib7d06aa5940790cac627499acb23e4f0bda1b035
2019-01-26 16:40:54 +00:00
Tej Singh
2c9ef2a92e APIs for registering config activation broadcasts
Creates a StatsManager API to register a pending intent that is invoked
whenever the active status of any of any config sent by that uid
changes.

ag/6112554 and further cls are needed to properly send back the pending
intent.

Bug: 123372077
Test: build success on blueline-eng. More thorough testing should be
done once ag/6112554 is submitted.

Change-Id: I36985c9820d4e7ac178064924190af88ea822254
2019-01-25 17:58:02 -08:00
TreeHugger Robot
4e78dec0d8 Merge "Add api to change charging state update delay" 2019-01-25 22:42:06 +00:00
Lucas Dupin
cea31af085 Merge "Do not sleep if someone is paying attention" 2019-01-25 21:55:51 +00:00
Nandana Dutt
9669b21417 Merge "Follow API guidelines in BugreportManager" am: 37aee80c76 am: 0dcbf78430
am: 99d137b32a

Change-Id: Ibb61ae2f4f633744229b4b619205f396d2c3f8a8
2019-01-25 13:41:18 -08:00
Nandana Dutt
99d137b32a Merge "Follow API guidelines in BugreportManager" am: 37aee80c76
am: 0dcbf78430

Change-Id: I2664d2de3d1ad770faa9681275c030f976c90a21
2019-01-25 13:29:23 -08:00
Lucas Dupin
0a5d79707d Do not sleep if someone is paying attention
Test: atest AttentionDetectorTest
Test: manual; let device sleep because of timeout (without attention)
Test: manual; let device sleep after maximum attention timeout
Test: manual; touch screen multiple times to avoid timeout
Bug: 111939367
Change-Id: Iafeea7569f84fce08888bc5b6d74ba02fb13fd04
2019-01-25 10:28:01 -08:00
Ng Zhi An
0941120f79 Add api to change charging state update delay
This adds a field Settings.Global.BATTERY_CHARGING_STATE_UPDATE_DELAY
that overrides the value of battery_charged_delay_ms in
Settings.GLOBAL.BATTERY_STATS_CONSTANTS.

This new field can then be set for experimentation, and easily reset to
default by deleting, or setting it to a negative value.

Expose a method in BatteryManager to set a value for this new setting.

Bug: 111360323
Test: adb shell settings put global battery_charging_state_update_delay 999
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=999
adb shell settings put global battery_charging_state_update_delay -1
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=90000
Change-Id: Ic308af938836a1f9c235cec341808b6c6c28d22d
2019-01-25 09:14:44 -08:00
Nandana Dutt
28d8dd7890 Follow API guidelines in BugreportManager
* Add an executor for callback
* Rename *listener to *callback
* Accept ParcelFileDescriptor.

Not changing the binder interface to accept ParcelFileDescriptor because
there seem to a bug in generated java code for "out"
ParcelFileDescriptors causing compilation errors.

BUG: 111441001
Test: Builds
Change-Id: I9caf91b504eacc3ab6ff23620f1d6ded51caee1a
2019-01-25 15:31:45 +00:00
Christian Wailes
a6fc60e47c Merge "Enables the use of the blastula pool." am: 33a09948e5
am: b649fda0ef

Change-Id: I489ce1f3a9aa072d9627376448bb6bf25b026d5e
2019-01-24 18:31:37 -08:00
Christian Wailes
33a09948e5 Merge "Enables the use of the blastula pool." 2019-01-25 02:06:47 +00:00
Chris Wailes
cffbf1c9b4 Enables the use of the blastula pool.
This commit adds the code necessar to initialize and use the blastula
pool during application launching.  Highlights include:
* Modifying ZygoteState to allow the creation of blastula session
sockets
* Modified application startup to track if a web view process is being
created.
* Initialization of the blastula pool during Zygote initialization.
* Blastula lifecycle management via reporting pipes and event FDs.
* Launching of applications via the blastula pool.

The creation, maintenance, and use of the blastula pool can be disabled
by setting Zygote.BLASTULA_POOL_ENABLED to false.  When this feature is
disabled applications will launch as they did before this patch.

Topic: zygote-prefork
Test: make & flash & launch app & check log message
Bug: 68253328
Change-Id: I46c32ad09400591e866b6c6121d5a9b0332092f3
Merged-In: I46c32ad09400591e866b6c6121d5a9b0332092f3
2019-01-24 16:50:05 -08:00
Nandana Dutt
9de1f4e9e8 Merge "Add a new bugreport error code" am: 1bed967833 am: 9bf1411e38
am: c5cba98282

Change-Id: Idcc8acd35a5c93c48998ff709a483dc649a09d72
2019-01-24 15:23:29 -08:00
Nandana Dutt
c5cba98282 Merge "Add a new bugreport error code" am: 1bed967833
am: 9bf1411e38

Change-Id: Ie153b43c6bc698d8daaf93f3bda1ce589307c6b3
2019-01-24 14:46:28 -08:00
Treehugger Robot
1bed967833 Merge "Add a new bugreport error code" 2019-01-24 22:21:16 +00:00
Josh Gao
c27fc4d077 Merge "ParcelFileDescriptor: fix various ownership mistakes." am: 8d7976a37e am: d152e75a7c
am: 55c8e5f019

Change-Id: I3070c16b609bce6489de8ab6a1da2fdc18c54851
2019-01-24 12:20:22 -08:00
Josh Gao
55c8e5f019 Merge "ParcelFileDescriptor: fix various ownership mistakes." am: 8d7976a37e
am: d152e75a7c

Change-Id: I3e20c989ed4ea141c14163421ce02b7d2c4c1470
2019-01-24 11:23:02 -08:00
Josh Gao
8d7976a37e Merge "ParcelFileDescriptor: fix various ownership mistakes." 2019-01-24 18:49:03 +00:00
TreeHugger Robot
1fcbf83856 Merge changes from topic "angle_rules_fast_path"
* changes:
  Guard ANGLE rules checking with a whitelist
  Revert "Revert "Enable ANGLE-for-Android rule processing again""
2019-01-24 18:22:01 +00:00
TreeHugger Robot
8ac0a656a8 Merge "Surface HAL constants" 2019-01-24 14:59:57 +00:00
Cody Northrop
5ebb0db104 Guard ANGLE rules checking with a whitelist
In order to reduce the startup impact to near zero, we are
creating a whitelist to be checked before parsing rules.

The whitelist will be generated by the APK based on apps
mentioned in the rules files. At app launch, only those in
the whitelist will do full rules checking.

The whitelist will be checked via Global Settings, which will
be populated by the ANGLE APK when intents are received. The
APK will listen for intents at boot (LOCKED_BOOT_COMPLETED)
and when ANGLE itself is updated (MY_PACKAGE_REPLACED).

The whitelist can also be populated by hand:

  adb shell settings put global angle_whitelist app1,app2,appN

We plan to further mitigate the ANGLE-enabled app impact
by parsing the full rules when creating the whitelist, off of
the critical path.

Note: Developer Options will continue to work, regardless of
whitelist. But temp rules will not be loaded if the app is
not whitelisted.

Test: atest CtsAngleIntegrationHostTestCases
Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-test -v
Bug: 80239516
Bug: 122528316
Change-Id: I96e5b4d5b4774f59aadbd1e52295437a395cab6b
2019-01-24 07:06:37 -07:00
Cody Northrop
b959de1a94 Revert "Revert "Enable ANGLE-for-Android rule processing again""
This reverts commit c3174593a2.

Bug: 80239516
Bug: 122528316
Test: atest CtsAngleIntegrationHostTestCases
Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-test -v
Change-Id: I4fe650a9dd6c5c1b3c01cb089b6d19c5013fc156
2019-01-24 07:03:21 -07:00
Chris Wailes
ba4c2eb189 Enables the use of the blastula pool.
This commit adds the code necessar to initialize and use the blastula
pool during application launching.  Highlights include:
* Modifying ZygoteState to allow the creation of blastula session
sockets
* Modified application startup to track if a web view process is being
created.
* Initialization of the blastula pool during Zygote initialization.
* Blastula lifecycle management via reporting pipes and event FDs.
* Launching of applications via the blastula pool.

The creation, maintenance, and use of the blastula pool can be disabled
by setting Zygote.BLASTULA_POOL_ENABLED to false.  When this feature is
disabled applications will launch as they did before this patch.

Topic: zygote-prefork
Test: make & flash & launch app & check log message
Bug: 68253328
Exempt-From-Owner-Approval: No changes to files with owners between revisions
Change-Id: I46c32ad09400591e866b6c6121d5a9b0332092f3
2019-01-24 07:17:14 +00:00
Christian Wailes
a1f14e0912 Merge "Code cleanup to conform to style guide / linter." am: f5ff8f0661
am: 420eec4f52

Change-Id: If4634a4d8026c1df1c581b120527926fbee68a0e
2019-01-23 18:23:25 -08:00
Chris Wailes
6e3c7ced5e Code cleanup to conform to style guide / linter.
This commit made the following changes to make the code conform to the
Frameworks style guide:
* Re-named variables
* Re-flowed code
* Organized includes

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
Merged-In: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
2019-01-23 13:34:52 -08:00
Nandana Dutt
bba7e82696 Add a new bugreport error code
Add an error code for consent request timing out.
BUG: 111441001
Test: builds

Change-Id: I91b947545c3adcb2104759e4d277dd1686de41ee
2019-01-23 19:11:01 +00:00
TreeHugger Robot
17e2907285 Merge "Code cleanup to conform to style guide / linter." 2019-01-23 19:04:15 +00:00
Peiyong Lin
ea5b721943 Merge "[Game Driver] Add blacklist mechanism." 2019-01-23 18:04:03 +00:00
Nandana Dutt
9de4d6a3f5 Merge "Improvements to Bugreporting API." am: 212353c896 am: 42df2e1602
am: 73226aa0f8

Change-Id: I947ffa533288c91b169863a045d71e735486773e
2019-01-23 09:47:56 -08:00
Nandana Dutt
73226aa0f8 Merge "Improvements to Bugreporting API." am: 212353c896
am: 42df2e1602

Change-Id: I7ea14750afc2c8b6f2b387ad23a054acf1ec6384
2019-01-23 09:36:20 -08:00
Alexey Kuzmin
3a8a39f378 Surface HAL constants
Bug: 111461941
Test: manual
Change-Id: I732c71a9896fa54a1125a2e5b0d3287771c43961
2019-01-23 17:24:12 +00:00
Treehugger Robot
212353c896 Merge "Improvements to Bugreporting API." 2019-01-23 17:00:48 +00:00
Nandana Dutt
b2da22a0de Improvements to Bugreporting API.
* Add cancelBugreport method.
* Remove unused arguments to onFinished listener call.
* Publish the system service now that sepolicy for it
  is submitted.
* Use the new bugreportd service.

Test: boots
BUG:111441001
Change-Id: I12d72e0e1f4ca72d285fd02a3fc1a44f5c179885
2019-01-23 10:21:45 +00:00
Denny cy Lee
c5a7c29581 DeviceIdle: Support aggressive/unaggressive doze mode
Test: atest com.android.server.DeviceIdleControllerTest
Bug: 121167278
Change-Id: I3bc645a23a6a93e120f12a9a3fa5cf038fa6ca8f
2019-01-23 09:51:37 +00:00
Remi NGUYEN VAN
c56ce9735a Merge "Add UserHandle constants to SystemApi" am: 0a9054639d
am: 7b0f06d7d9

Change-Id: I4ab95e6114546f01648a949b5712b7a609319684
2019-01-22 23:39:57 -08:00
Jeff Sharkey
8a83ae1069 Merge "Sanity check raw paths against requested volume." 2019-01-23 05:47:17 +00:00
Remi NGUYEN VAN
6c7877b7bb Add UserHandle constants to SystemApi
The affected constants are already SystemApi in internal.

Bug: 112869080
Test: m
Change-Id: Iacefdefa59346eaebd8b92743fe8710845edcc29
Merged-In: I261dfcc5cfdfc76bda5d70181785e11c2715a558
2019-01-23 11:06:18 +09:00
Chris Wailes
efce929711 Code cleanup to conform to style guide / linter.
This commit made the following changes to make the code conform to the
Frameworks style guide:
* Re-named variables
* Re-flowed code
* Organized includes

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
2019-01-22 16:07:31 -08:00
TreeHugger Robot
e54b7b5498 Merge changes I4054d6f4,Ib14e9a93,Iafbe6d51
* changes:
  CpuStats - Do not write debug entries to dump output
  Set ThreadLocalWorkSource when delivering Alarms
  Add WorkSource.getAttributionUid()
2019-01-22 23:14:25 +00:00
Peiyong Lin
9ca1dd8dab [Game Driver] Add blacklist mechanism.
When a blacklist is set, we must not use driver package for those applications
on the blacklist.

BUG: 120869311
Test: Build, flash, boot. Verify with command line.
Change-Id: I1c9f10a3086007038c328a20346ffadeff1861ae
2019-01-22 14:16:41 -08:00
TreeHugger Robot
c797867220 Merge "Update HandlerThread's javadoc" 2019-01-22 21:10:37 +00:00
Jeff Sharkey
3f64ec57dd Sanity check raw paths against requested volume.
When callers are inserting or updating raw "_data" paths, we need to
sanity check them to make sure they're not "crossing the streams"
between storage devices.  For example, it would be really broken to
insert a file on the SD card into the "internal" storage volume.

This also enforces that callers don't "cross the streams" between
multiple storage volumes on devices that support them, since
otherwise they'd end up with very confusing behavior, such as
the same underlying file being inserted into multiple databases.

Also, the "internal" storage volume should really only be used for
common media (such as ringtones), and it shouldn't be allowed to
point into private app data directories, since MODE_WORLD_READABLE
has been deprecated for many years now.

Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I267eacd45bbd270b8ce9b28de9d6e209f780f31a
2019-01-22 13:55:25 -07:00
Eugene Susla
6f210eeede Update HandlerThread's javadoc
Addresses concerns in b/63382879

Fixes: 63382879
Test: proofread
Change-Id: I4aaf543df86123d46b708f35c80c04df0f737989
2019-01-22 10:40:46 -08:00
Marcin Oczeretko
5329540c39 Add WorkSource.getAttributionUid()
Bug: 119802232
Test: atest WorkSourceTest
Change-Id: Iafbe6d516b93315f58466385c2dc2031073d8573
2019-01-22 18:26:42 +00:00
Remi NGUYEN VAN
7aa9b885c3 Merge "Expose UIDs for NetworkStack permission checks" am: 3b887bdf4a am: 29515d751b
am: f10038e9ca

Change-Id: I4156471eec78511fd86a1c381d53df57b1f4ea98
2019-01-22 06:13:46 -08:00
Remi NGUYEN VAN
f10038e9ca Merge "Expose UIDs for NetworkStack permission checks" am: 3b887bdf4a
am: 29515d751b

Change-Id: Ia9bc41cebf048d536efa8aeea992fed3f583ba1b
2019-01-22 06:04:32 -08:00