Commit Graph

10512 Commits

Author SHA1 Message Date
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
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
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
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
TreeHugger Robot
84f1cc60fd Merge "Load direct share targets using both APIs in ShareSheet" 2019-01-23 21:23:34 +00: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
Gustav Sennton
f892fe95ad Add NotificationVisibility.NotificationLocation.
To represent the UI location of a Notification we add the class enum
NotificationVisibility.NotificationLocation.

Bug: 120767764
Test: atest SystemUITests
Change-Id: I572c1cb7e585158f29675afd5255898e7f78e820
2019-01-23 16:09:38 +00:00
TreeHugger Robot
eea1710cda Merge "Add a feature flag for secure lock screen." 2019-01-23 10:55:33 +00:00
Yohei Yukawa
2988d2db5c Unimplement VrManager#setVrInputMethod()
A system API VrManager#setVrInputMethod(), which was originally
introduced in Android P [1], has hever been used actually.  To avoid
unnecessary maintenance burden in the Android Framework, this CL makes
VrManager#setVrInputMethod() no-op.

For those who want to develop VR Keyboard, they should be able to use
Android P build to see if it actually works and it's actually what
they want.  In the future, if we can have a working prototype, we can
revisit here to see if we want to restore the framework implementation
or not.

Note that with this CL IMEs that have android:isVrOnly="true" will
always be ignored.

There should be no user/developer visible behavior change because this
is about an unused system API.

 [1]: I1db7981b5198e7e203d4578cae7e5b6d20037d0d
      89a6c48a8b

Bug: 72522822
Fix: 122058241
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:InputMethodInfoTest
Test: atest FrameworksServicesTests:InputMethodManagerServiceTests
Change-Id: I5464ff74b92ff4a0d30002d643bd3c89925f0f0c
2019-01-22 21:29:09 -08:00
TreeHugger Robot
0596a5b01c Merge "Remove duplicate impl of CollectionUtils.emptyIfNull" 2019-01-23 03:54:22 +00:00
Ivan Chiang
035808eea0 Merge "Add new column into Root to get the supported query args" 2019-01-23 02:56:02 +00:00
Mehdi Alizadeh
8e248ad10f Load direct share targets using both APIs in ShareSheet
In framework's ShareSheet, load direct share targets from both
ShortcutManager(new API) and ChooserTargetService(old API).

Bug: 111698461
Test: Manual test on device
Test: atest ChooserActivityTest

Change-Id: I1113b6b1d625ad938d61db9af825a688bd5ef93c
2019-01-22 17:07:10 -08:00
Chris Wailes
cb0b37fc26 Added Java Language methods for blastula management.
This commit adds Java Language wrappers for native blastula management
functions.  No changes are made to the application lifecycle.

Topic: zygote-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
Change-Id: Ie9fd0aea2952dbd3baaca22c820e9af700f5e89d
2019-01-22 16:07:32 -08:00
Chris Wailes
2be2626aa6 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
2019-01-22 16:07:32 -08:00
Chris Wailes
143f7cc78e 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
2019-01-22 16:07:31 -08: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
Chris Wailes
aa1c962ded 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

Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
2019-01-22 16:07:27 -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
Eugene Susla
04d021ce9f Remove duplicate impl of CollectionUtils.emptyIfNull
(automated refactoring)

Test: presubmit
Change-Id: I65b88a8a11fac5bc948a7eb054eebc10b9f37f0d
2019-01-22 14:41:50 -08:00
Will Brockman
4e9df81cd3 Merge "Remove duplicate event logs from MetricsLogger to reduce event log traffic. These were needed for a transitional period, but are now irrelevant. Also improve usage documentation of MetricsLogger." 2019-01-22 20:55:31 +00:00
TreeHugger Robot
a1824a2700 Merge "Switch to new CPU UID time readers" 2019-01-22 19:53:12 +00:00
TreeHugger Robot
cc249beb0d Merge "Add notification location to onNotificationExpansionChanged." 2019-01-22 19:15:01 +00:00
Marcin Oczeretko
9450171068 CpuStats - Do not write debug entries to dump output
Test: manually verified dumpsys output
Change-Id: I4054d6f4344d07c900b15a5bb3bb634b4291eab5
2019-01-22 19:05:13 +00:00
Gustav Sennton
a8e38aa5d0 Add notification location to onNotificationExpansionChanged.
To know from what UI location a notification was expanded we here pass
the location of the notification through
onNotificationExpansionChanged().

Bug: 120767764
Test: atest SystemUITests
Test: atest NotificationManagerServiceTest
Change-Id: I20612f5a88cf987f434392ae7a004d3ee3098998
2019-01-22 17:12:22 +00:00
Lenka Trochtova
66c492a87e Add a feature flag for secure lock screen.
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.

Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)

Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
2019-01-22 17:51:56 +01:00
Remi NGUYEN VAN
b809148b9a Merge changes Ieef54d84,Ica3e88c2 am: 491f53523a am: 8e4ce11318
am: c904972acd

Change-Id: Idcc18b95951c566335431a493ed7b9d49477a4c0
2019-01-22 05:32:01 -08:00
Remi NGUYEN VAN
c904972acd Merge changes Ieef54d84,Ica3e88c2 am: 491f53523a
am: 8e4ce11318

Change-Id: I33fc6ee4cf47676dc2a4a9369dd3fc053dba34ec
2019-01-22 05:22:30 -08:00
Remi NGUYEN VAN
c1c02dcb65 Remove NetworkStack dependencies on hidden members
- DhcpClient only shares its handler with IpClient, and NetworkMonitor
   has its own handler: remove Protocol.BASE_DHCP,
   Protocol.BASE_NETWORK_MONITOR
 - Remove dependency on Network.netid in NetworkMonitor
 - Remove dependency on Sets.newArraySet in DhcpServingParams
 - Remove dependency on formatDuration() in DhcpClient
 - Replace isMetered() with hasCapability() in NetworkMonitor
 - Use WifiManager.isScanAlwaysAvailable instead of reading setting

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: Ieef54d847ddc081fb33cbad0b050b06d2e52548e
2019-01-22 18:48:12 +09:00
Yohei Yukawa
17ace29a10 Deprecate SuggestionSpan#ACTION_SUGGESTION_PICKED
This CL deprecates SuggestionSpan#ACTION_SUGGESTION_PICKED and related
constants [1].

There are multiple security concerns, open questions about
compatibility, and maintainance challanges in this protocol.

IME developers can implement their own suggestion picker UI on top of
CursorAnchorInfo API to achieve safer, should give more flexible UI
options, better security, and better compatibility.

 [1]: Ia539de0acf66053e0349daec459d75e36805f6bf
      f9f0100862

Fix: 123160396
Test: make -j checkbuild
Change-Id: I6d39e838ae47488055162cd44b5f553f68869b17
2019-01-21 09:24:26 -08:00
Yohei Yukawa
9b60ba07e4 Unify IInputMethodPrivilegedOperations as sync IPC
Since its bettining [1] notifyUserAction() has been implemented as an
async IPC method.  This wasn't changed when I recently moved it from
IInputMethodManager to IInputMethodPrivilegedOperations [2].

However, mixing sync and async methods into the same Binder object is
known to be an anti-pattern.  Although sending some signals in an
asynchronous manner would make sense, it should be done by converting
all the methods to async (with some result callbacks for operations
that need to receive responce) like we do so in IInputContext.aidl.

As for IInputMethodPrivilegedOperations, I think converting
notifyUserAction() from async to sync is acceptable because there are
already similar sync methods such as:
 * setImeWindowStatus
 * reportStartInput
 * reportFullscreenMode
 * updateStatusIcon

 [1]: I11ed9a767588f8080753cd9bce011dac7db579ad
      d7443c83ce
 [2]: Icc1f9c7f530f0144ecfd460e86114e109ae0044e
      c07fd4c284

Bug: 114159783
Test: Manually verified as follows
  1. Build and flush aosp_taimen-userdebug into Taimen
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. Open AOSP Keyboard settings
  6. Enable "English (US)", "French", and "German"
  7. Open SoftKeyboard settings
  8. Enable "English (United States)", "English (GB)"
  9. Open the Dialer app and tap the top edit field.
 10. Make sure that the IME layout rotation order when tapping the
     globe key will be updated only when you tap the keyboard to enter
     some character.
 11. Also confirm it with "adb shell dumpsys input_method" by checking
     "mSwitchingController:" section there.
Change-Id: I9d41f19e30f205acd4d257a105e285bd32288130
2019-01-21 00:06:27 -08:00
Ivan Chiang
c26d3c28c2 Add new column into Root to get the supported query args
DocumentsContract:
- Add @Public column Root#COLUMN_QUERY_ARGS
- Update java doc

DocumentsProvider:
- Update java doc

FileSystemProvider & ExternalStorageProvider
- Add supported query args into Roots

Bug: 121234248
Test: manual
Change-Id: Ia944200ee1a44d75c9ad683564218e3d0dcef885
2019-01-21 15:44:53 +08:00
Sudheer Shanka
0b6da5362d Create a new MOUNT_EXTERNAL_LEGACY storage mode.
Apps that are already installed on the device before isolated_storage
feature is enabled will be granted MOUNT_EXTERNAL_LEGACY mode. In this
mode, /mnt/runtime/write will be mounted at /storage giving them same
level of access as in P.

A new mount directory /mnt/runtime/full is also created which will be
used for mounting at /storage for apps started with MOUNT_EXTERNAL_FULL
mode. This will allow apps with WRITE_MEDIA_STORAGE permission to
read/write anywhere on the secondary devices without needing to bypass
sdcardfs.

Bug: 121277410
Test: manual
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I4ec73276d7c586ae4afc482580d1eb8ee03d5be1
2019-01-18 18:48:55 -08:00