Commit Graph

6072 Commits

Author SHA1 Message Date
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
Nandana Dutt
2ef1ad5216 Merge "Remove DumpstateOptions" am: 706b2d0e16 am: bc960e3905
am: 454d6e56f3

Change-Id: I765b9e390a709ced07f9173d05d95df5243764ab
2019-01-28 21:25:13 -08:00
Nandana Dutt
454d6e56f3 Merge "Remove DumpstateOptions" am: 706b2d0e16
am: bc960e3905

Change-Id: Ieb16f21c95a1fd332530e1630101b56e8c4efdb7
2019-01-28 21:00:13 -08:00
Nandana Dutt
d38769402a Merge "Expose bugreporting API as system API." am: 6ac57c669a
am: f1c0ec00a3

Change-Id: I6d0dd760b964d2e4ccfc271f001023a066c350ea
2019-01-28 20:42:08 -08:00
Sudheer Shanka
ca923a9aab Merge "Update DownloadStorageProvider to include MediaStore.Downloads." 2019-01-29 02:57:44 +00:00
Nandana Dutt
706b2d0e16 Merge "Remove DumpstateOptions" 2019-01-28 17:20:45 +00:00
David Brazdil
f7ad5af4a8 Merge "Add @UnsupportedAppUsage to methods known to be used by apps" am: faedae5981 am: fe642a81d9
am: 47b4ad2c13

Change-Id: I6a85a7960825a6f2471338b17f8b9cf8497b8e10
2019-01-28 08:33:18 -08:00
Nandana Dutt
6ac57c669a Merge "Expose bugreporting API as system API." 2019-01-28 16:27:07 +00:00
David Brazdil
47b4ad2c13 Merge "Add @UnsupportedAppUsage to methods known to be used by apps" am: faedae5981
am: fe642a81d9

Change-Id: I927ed3371a0f6df6182999fb188d040af28289e6
2019-01-28 08:24:04 -08:00
Sudheer Shanka
e93db5123b Update DownloadStorageProvider to include MediaStore.Downloads.
Bug: 120879205
Test: manual
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: I44be836899437d87fc1a00e5fe316c6b68488643
2019-01-28 08:20:47 -08:00
Sudheer Shanka
31f977a443 Merge "Update FileObserver to be able to watch multiple files." 2019-01-28 16:01:50 +00:00
David Brazdil
faedae5981 Merge "Add @UnsupportedAppUsage to methods known to be used by apps" 2019-01-28 14:23:43 +00:00
Nandana Dutt
b8a51a3169 Merge "Expose bugreporting API as system API." 2019-01-28 14:21:57 +00:00
Martijn Coenen
82dc85af64 Speed up Zygote connection retry.
For the app zygote, the time to connect to the Zygote is in the critical
path for the (first) isolated service start. Speed up the retry.

Bug: 111434506
Test: atest CtsApptestCases:ServiceTest
Change-Id: I634a7b45e3065744e3d15287453327eca763660f
2019-01-28 13:52:33 +01:00
David Brazdil
576da0582f Add @UnsupportedAppUsage to methods known to be used by apps
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 123308819
Bug: 122291025
Test: m appcompat
Change-Id: Iafd62b8ece0d19268fad65086134a1e7369bc0bb
2019-01-28 12:46:33 +00:00
Nandana Dutt
9abc452d0e Remove DumpstateOptions
This is not used anymore, instead bugreport mode is used to encapulsate
a number of options.

BUG: 111441001
Test: builds

Change-Id: I04f17b2605d242a33909cfaecbc647e9eee8d1fc
2019-01-28 10:56:48 +00:00
Nandana Dutt
2083e8c8b8 Expose bugreporting API as system API.
BUG: 111441001
Test: Builds
Change-Id: I1530f92971807b7e43c763a58dd1e18e793255da
Merged-In: I1530f92971807b7e43c763a58dd1e18e793255da
2019-01-28 09:33:55 +00:00
Yiwei Zhang
2b3be86334 Game Driver: rename GUP to Game Driver
Bug: 119221883
Test: Build, flash, boot and make RunSettingsRoboTests
Change-Id: I39724917b516b4871c6b1b1f0d30aa0f793942a4
2019-01-28 00:24:30 -08:00
Sudheer Shanka
f7c79b4f06 Update FileObserver to be able to watch multiple files.
Bug: 120879205
Test: atest cts/tests/tests/os/src/android/os/cts/FileObserverTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/os/FileObserverTest.java
Change-Id: Ie1067c81dc502f2ad971e1f5d02be8baa319c3ad
2019-01-27 20:45:27 -08:00
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
Nandana Dutt
0a18820a49 Expose bugreporting API as system API.
BUG: 111441001
Test: Builds
Change-Id: I1530f92971807b7e43c763a58dd1e18e793255da
(cherry picked from commit b3857c4f7301b0b9c80e6db3f27c8ebada82a60f)
2019-01-26 22:36:08 +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