Commit Graph

10539 Commits

Author SHA1 Message Date
TreeHugger Robot
4e78dec0d8 Merge "Add api to change charging state update delay" 2019-01-25 22:42:06 +00:00
George Hodulik
3bbd43a9a2 Merge "Use App Prediction Service to get share suggestions." 2019-01-25 20:56:34 +00:00
George Hodulik
69d4a08308 Use App Prediction Service to get share suggestions.
Bug: 111701043
Test: Manual test with an AppPredictionService that just queries ShortcutManager.

Change-Id: I7faa904d0446e9045017d2dd893dd6b4dbee85a1
2019-01-25 10:19:39 -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
Tarandeep Singh
ed3e728055 Merge "Pre-render input method (IME transitions 1/n)" 2019-01-25 02:36:52 +00:00
Mehdi Alizadeh
c8dfe98014 Merge "Use old API only if no share targets are published" 2019-01-25 00:37:26 +00:00
Tarandeep Singh
eadb1392f8 Pre-render input method (IME transitions 1/n)
Pre-render input method views and window when EditText receives focus.
This is a pre-requisite for implementing better IME transitions.

Strategy:
Once EditText receives focus, startInput is called. If optimization is
available, IME views and window (SoftInputWindow) are created and
rendered. Until user taps on EditText or showSoftInput() is called, IME
window remains invisible. This pre-rendered window is kept around until
EditorInfo changes or new connection is started (onStartInput).
IME window's visibility will be set using new Insets controller API
rather than conventional client-side dialog.show().

Behavior:
- This is just IME side preparation CL. No performance improvements yet.
- There should be no user perceptible behavior change.
- As long as IME developers were following official lifecycle, they
  shouldn't perceive any behavior change.

Availability:
This optimization, once fully implemented, will be available when:
 - Device is not "Low memory"
 - AND Master flag DebugFlags.FLAG_PRE_RENDER_IME_VIEWS is set.
 - ViewRootImpl.USE_NEW_INSETS_API is enabled

Bug: 118599175
Bug: 111084606
Test: atest CtsInputMethodTestCases
Test: atest CtsInputMethodServiceHostTestCases
Test: atest ActivityManagerMultiDisplayTests
Test: Tested with 4 IMEs and didn't preceive any behavior change.
Scenarios tested:
  1. With and without hardware keyboard
  2. Screen rotation w/ fullscreen mode.
  3. split-screen

Change-Id: I1a6300fe167eb205ee2b4214a6e270a52ebae062
2019-01-25 00:47:21 +01:00
Christine Franks
69aab0df31 Merge "Move color modes to ColorDisplayService" 2019-01-24 22:54:09 +00:00
Mehdi Alizadeh
85fd3d5c8b Use old API only if no share targets are published
In ShareSheet, when querying Direct Share Targets using both old and new
APIs, only query via old API if the app is not publishing any share
targets in its resources (publishing via ShrotcutManager)

Bug: 111698461
Test: Manual test using test app
Change-Id: I4be46110ac4ae6de64a9675a19df5994c4fa65c8
2019-01-24 13:49:31 -08:00
Philip P. Moltmann
a0f377fbe8 Merge "Set assistant as a role" 2019-01-24 20:51:41 +00:00
Chenbo Feng
66b3687364 Merge "Use delta reads for per uid traffic stats" am: 48f46ac83c am: d5cc53302f
am: 8d027dd829

Change-Id: Ia2d3aad715dc1a2ff65ea9ec1a5badeda47c47a6
2019-01-24 11:57:26 -08:00
Chenbo Feng
8d027dd829 Merge "Use delta reads for per uid traffic stats" am: 48f46ac83c
am: d5cc53302f

Change-Id: Ibc1e7d1b6be2915d4000cda2b7a9141ac387f7f0
2019-01-24 11:12:54 -08:00
Christine Franks
d154fe5dbf Move color modes to ColorDisplayService
Bug: 123352608
Test: atest FrameworksServicesTests:ColorDisplayServiceTest
Change-Id: Iee9034721366723a7b2faba0ea2adc9479c6fec5
2019-01-24 10:58:00 -08:00
Irina Dumitrescu
b866a5b6e6 Merge "Add API for proxy configuration over VPN." am: 8b5917965d
am: ac77629a1e

Change-Id: I51930e4ed99cc3df10db2c8bbef27989f0a06a46
2019-01-24 10:20:32 -08:00
Chenbo Feng
48f46ac83c Merge "Use delta reads for per uid traffic stats" 2019-01-24 18:16:25 +00:00
Treehugger Robot
8b5917965d Merge "Add API for proxy configuration over VPN." 2019-01-24 17:52:22 +00:00
Christine Franks
79ea8c34a1 Merge "Move Night Display methods to ColorDisplayManager" 2019-01-24 17:05:39 +00:00
TreeHugger Robot
97b0ca1ea9 Merge "Use new app preload path for WebView zygote." 2019-01-24 16:35:51 +00:00
Jeff Sharkey
578da0fc8d Merge "Parse missing mount option." 2019-01-24 16:24:45 +00:00
Irina Dumitrescu
044a436ac9 Add API for proxy configuration over VPN.
Test: runtest -x
frameworks/base/tests/net/java/com/android/server/ConnectivityServiceTest.java
&& atest HostsideVpnTests
Bug: 76001058
Change-Id: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
Merged-In: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
2019-01-24 16:07:20 +00:00
Olivier Gaillard
058d3ab8d5 Merge "Enable binder calls stats." 2019-01-24 15:52:53 +00:00
TreeHugger Robot
06928f4422 Merge "Add API for proxy configuration over VPN." 2019-01-24 15:09:18 +00:00
Irina Dumitrescu
18622d3d35 Add API for proxy configuration over VPN.
Test: runtest -x
frameworks/base/tests/net/java/com/android/server/ConnectivityServiceTest.java
&& atest HostsideVpnTests
Bug: 76001058
Change-Id: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
2019-01-24 12:54:19 +00:00
TreeHugger Robot
6136239d9d Merge "Voice state + transcription in VoiceInteractionSvc" 2019-01-24 10:04:18 +00:00
Christian Wailes
84635a4d74 Merge "Enables the use of the blastula pool." 2019-01-24 07:17:34 +00: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
Jeff Sharkey
5bf9d72d12 Parse missing mount option.
Unrecognized mount option was causing early finish, leaving seinfo
and many other arguments undefined.

Bug: 123319678
Test: manual
Change-Id: If69f4d18e57ffd826075c33c47ec9bdd31e3badf
2019-01-23 23:52:14 -07:00
Soonil Nagarkar
397ad580d3 Add whitelist for location settings piercing
Use a whitelist to control which packages may use location piercing
settings on LocationRequest.

Test: Manually
Bug: 118883513
Change-Id: I16e8496c49b6bef016cb7f090969ed97a39e38c2
2019-01-23 22:47:57 -08:00
Christian Wailes
80db7b7783 Merge "Refactored ZygoteConnection.Arguments to ZygoteArguments." am: 3a46c1b4ce
am: 3926f08109

Change-Id: I173c9cd671a9683793eee0c5053e3e8855ec0cf8
2019-01-23 18:34:18 -08:00
Christian Wailes
a13898896c Merge "Code cleanup in ZygoteInit." am: 889648df40
am: 6b7e35d216

Change-Id: I654fcdb478dfae98d78b0353e068122d115dd2c5
2019-01-23 18:28:46 -08: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
Badhri Jagan Sridharan
7e60f8efe0 Merge changes from topic "117330206"
* changes:
  UsbContaminant dialog
  Add test commands to spoof presence of contaminants
  Contaminant detection notification
  Support USB V1.2 HAL
2019-01-24 02:03:20 +00:00
Christian Wailes
3f076da22b Merge "Implemented native functions and types for blastula management." am: 5222bf368b
am: c5cc5e525c

Change-Id: I4eb03e2d0592aefa196be7f96687aa4f155c0022
2019-01-23 17:56:00 -08:00
Christine Franks
83cc5410a8 Move Night Display methods to ColorDisplayManager
Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: Idb16af8dfa1c65bb638b2537e4a162b624069430
2019-01-23 13:43:27 -08:00
Chris Wailes
682b479a88 Refactored ZygoteConnection.Arguments to ZygoteArguments.
This commit moves the ZygoteConnection.Arguments class into its own file
and re-names it to ZygoteArgumens.  Doing this also required small
changes to files that used ZygoteConnection.Arguments.  In turn, this
required some changes to make the files conform to the Frameworks style
guide.

Highlights include:
* Moving ZygoteConnection.Arguments to ZygoteArguments
* Moving helper functions from ZygoteConnection to Zygote
* Re-named member variables in the ZygoteArguments class
* Removed unused imports.

Topic: zygote-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
Change-Id: Ideb414c87a92020128a644147949ef4f4133ae33
Merged-In: Ideb414c87a92020128a644147949ef4f4133ae33
2019-01-23 13:35:16 -08:00
Chris Wailes
cd92db2545 Code cleanup in ZygoteInit.
This commit mostly re-flows the code in ZygoteInit.java to conform to
the Frameworks style guide.

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I0d348caa1d9ca2a4c1e32430e0eebdd91672e473
Merged-In: I0d348caa1d9ca2a4c1e32430e0eebdd91672e473
2019-01-23 13:35:06 -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
Chris Wailes
8b35ba25a9 Implemented native functions and types for blastula management.
This patch adds native support for spawning and managing blastula pools,
as well as several code cleanups and modernizations.

Changes includes:
* A function to fork blastulas
* A table for managing blastula-related data
* Functions for adding and removing blastula data from the
aforementioned table
* Switching from NULL to nullptr
* Replacing string-passing error handling with a curried failure
function
* Utility functions for handling managed objects
* JNI functions for blastula pool management

Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Merged-In: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
2019-01-23 13:34:40 -08:00
TreeHugger Robot
84f1cc60fd Merge "Load direct share targets using both APIs in ShareSheet" 2019-01-23 21:23:34 +00:00
Philip P. Moltmann
5d894505f7 Set assistant as a role
- Register a role observer in VoiceInteractionManagerService. Once the
role is changes map the new role setting onto the old settings.
- As the assistant role is now always set, there is no need to have code
in AssistUtil for the case the assistant setting is not set
- Remove old config option for the default assistant. The default
assistant is not configured via the roles config

Bug: 110557011
Test: - Set, unset and swtiched assistant via the settings UI
        - for voice interaction service
	- for assist activity
      - Booted from freshly wiped device and saw assitant to be set to
        default
Change-Id: I8596f49c6f6496e8b70cf3236aaa7d7557443a93
2019-01-23 13:05:32 -08:00
TreeHugger Robot
5f80ac0c9b Merge "Add NotificationVisibility.NotificationLocation." 2019-01-23 20:24:42 +00:00
Matt Casey
4cff16fda9 Voice state + transcription in VoiceInteractionSvc
Voice state as well as voice transcription can be provided by the
VoiceInteractionService. These get proxied to the AssistManager which
can update the system UI to reflect the state & transcription.

Test: TBD
Bug: 122740752
Bug: 123080754
Change-Id: I79cac1d89fe0123bf25a05d551cb4ef40ae1368e
2019-01-23 20:03:05 +00:00
Torne (Richard Coles)
e032061ddb Use new app preload path for WebView zygote.
In the "common" case where the WebView stub is not being used, have the
WebView zygote use the new APK preload path added for the app zygote,
which avoids duplicating logic from the framework to construct the
classpath. This allows the WebView implementation to use a static shared
library, which was not previously possible.

The old codepath is retained for now to keep the WebView stub working
when it's in use, as it requires the special mechanism to override the
classloader cache key, but this can be removed when we no longer require
the stub.

Bug: 110790153
Test: Manual verification of classloader cache state
Change-Id: Ie49e5810d570bae7bec0341753e6c50d081189b5
2019-01-23 14:25:44 -05:00
Christian Wailes
b16a1d13bb Merge "Added Java Language methods for blastula management." 2019-01-23 19:06:25 +00:00
Christian Wailes
73b3000066 Merge "Refactored ZygoteConnection.Arguments to ZygoteArguments." 2019-01-23 19:05:51 +00:00
Christian Wailes
b825c350a6 Merge "Code cleanup in ZygoteInit." 2019-01-23 19:05:11 +00:00
TreeHugger Robot
17e2907285 Merge "Code cleanup to conform to style guide / linter." 2019-01-23 19:04:15 +00:00
Badhri Jagan Sridharan
e966a38b67 Support USB V1.2 HAL
USB V1.2 HAL supports contaminant detection interface.

Bug: 119642987
Bug: 117330206
Bug: 77606903

Test: Manually tested for notification pop-up
Change-Id: I304fb4933ba8b8eaa08c32c9e8c116cba7aa6380
2019-01-23 10:41:02 -08:00
Olivier Gaillard
703420c331 Enable binder calls stats.
Test: atest BinderCallsStatsTest
Change-Id: Ia82107a44b504a54034993c3f1c7bdea8ac3f64f
2019-01-23 17:54:35 +00:00
Yohei Yukawa
fd8f72188c Client-side reimplementation of IMM#setCurrentInputMethodSubtype()
This is a preparation to mark
InputMethodManager#setCurrentInputMethodSubtype() deprecated.

InputMethodManager#setCurrentInputMethodSubtype(), which was
introduced in Android 4.0 ICS [1], was probably mistakenly exposed as
a public API, because it has required WRITE_SECURE_SETTINGS that
typical applications cannot have.

Keeping maintaining InputMethodManager#setCurrentInputMethodSubtype()
is not that simple because now we are about to enable per-profile IME
mode, where this method needs to have a more clear spec about what
"Current" means.

An ideal solution is just removing this method, because if the caller
already has WRITE_SECURE_SETTINGS permission, they can just directly
update Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE to achieve the
same goal.  However, given that this has been a public API, it would
probably make sense to provide a fallback implementation like I did
for null IME token in InputMethodManager#setInputMethod() [2].

Either way, InputMethodManager#setCurrentInputMethodSubtype() will be
marked as deprecated in a subsequent CL.

 [1]: I55daa19ba924999def544bf841f00bf54852f3e1
      b66d287e30
 [2]: I42dd0325b01c527009bf85566ca8ba0766b2294e
      0c1ebffdb3

Bug: 123249820
Test: manually done with a test app that has WRITE_SECURE_SETTINGS
Change-Id: I76da83c57cffc6b73defccfd4a1b5734c958a97e
2019-01-23 09:00:24 -08:00