Commit Graph

104347 Commits

Author SHA1 Message Date
Amy Zhang
e151e60843 Expose necessary SystemApi as test API for CEC CTS
This CL annotates multiple APIs in the HdmiControlManager as Test APIs.
Also creates a Test api wrapper for aidl interface IHdmiControlService.
HdmiPortInfo is the param under test that is also annotated as Test API.

Test: atest android.hardware.hdmi.cts
Bug: 155113872
Change-Id: I58b483eaaa5fe08f90415a7e044c30a28dc7d7c2
2020-06-04 13:47:37 -07:00
Felipe Leme
3bf4ec139b Merge "Removed Settings.Global.LAST_ACTIVE_USER_ID." into rvc-dev 2020-06-04 19:13:20 +00:00
Nick Chalko
75ef06daa5 Merge "CEC: Add listener for HDMI CEC volume control feature" into rvc-dev 2020-06-04 19:03:05 +00:00
TreeHugger Robot
9f15ba2e1a Merge "Fix up discrepancies between v1 and v2 package parsing" into rvc-dev 2020-06-04 18:12:56 +00:00
TreeHugger Robot
5c53f0af8b Merge "VirtualDisplayTaskEmbedder: Post background color change callback" into rvc-dev 2020-06-04 15:28:56 +00:00
Riddle Hsu
1421b3dace Merge "Override application display adjustments while launching activity" into rvc-dev 2020-06-04 06:20:45 +00:00
Vinit Nayak
38dbc97939 Merge "Add new callback for when activity rotates" into rvc-dev 2020-06-04 04:21:10 +00:00
Eugene Susla
c43f49dfc4 Merge "Deprecate docs for auto revoke manifest and Intent APIs" into rvc-dev 2020-06-04 01:08:10 +00:00
Jack Yu
dc9e545bd1 Merge "Store ETWS primary information in the database" into rvc-dev 2020-06-04 00:46:07 +00:00
Peiyong Lin
1371b76afd Merge "Allow to load implicit layer from /vendor/app." into rvc-dev 2020-06-04 00:40:15 +00:00
Robert Carr
e52f809126 VirtualDisplayTaskEmbedder: Post background color change callback
Otherwise we will end up calling SurfaceView#setResizeBackgroundColor
from a Binder thread and potentially cause a crash. This mirrors the
behavior of TaskOrganizerTaskEmbedder.

Bug: 157605189
Test: Existing tests pass
Change-Id: Iafe9e4c3eb4d32a52a6a1479aa9a2b295cd4ad6f
2020-06-03 15:41:34 -07:00
Peiyong Lin
eb1c5a4c28 Allow to load implicit layer from /vendor/app.
Currently when loading implicit layers from apks, NativeLoaderNamespace
doesn't allow to dlopen the binaries if they come from apks from
/vendor/app. Implicit layers ship within /vendor/app should work like
other implicit layers. This patch extracts the construction of library
paths of the implicit layers and includes those paths when
NativeLoaderNamespace is created as the part of the permitted library
paths.

Bug: b/157832445
Test: atest android.gputools.cts.CtsRootlessGpuDebugHostTest
Test: setup debug layer and use adb logcat to check vulkan loader output
Change-Id: Ie2ca989bcab890578b5aa540d07f2aee2a0182bd
2020-06-03 21:30:08 +00:00
Jack Yu
059be24240 Store ETWS primary information in the database
ETWS primary/secondary flag needs to be saved in the
database in order to perform duplicate check later. Used the
hardcoded database column name because Android R API freezes.
Will remove the hardcode in the next Android release.

Fix: 157699377
Test: CtsTelephonyTestCases & CellBroadcastServiceTests
Change-Id: Iedec92a1f435f60ceb9f36637a1718adbbd7e2ae
2020-06-03 21:18:54 +00:00
Eugene Susla
c7cae60a64 Deprecate docs for auto revoke manifest and Intent APIs
Test: presubmit
Bug: 153607914
Change-Id: I9c8d0aa1432ca00b729f19749e751cb117374b0a
2020-06-03 13:46:00 -07:00
Robert Snoeberger
b1d2c79448 Merge "Revert "Exception if receive move withouth down"" into rvc-dev 2020-06-03 20:17:09 +00:00
Robert Snoeberger
0ef6f01bd1 Revert "Exception if receive move withouth down"
This reverts commit a0a20dc23b.

Reason for revert: This is causing a number of fatal crashes in SystemUI. See b/158081578, b/158057055, b/158060735, and b/158061923.

Fixes: 158081578
Fixes: 158057055
Fixes: 158060735
Fixes: 158061923
Change-Id: If7e6cd4ade3df540ba7d97d9265564132a235292
2020-06-03 20:15:44 +00:00
Felipe Leme
4bf9bc6ab0 Removed Settings.Global.LAST_ACTIVE_USER_ID.
This property was only used by Automotive and was added on frameworks/base
because it used be accessed by a class on frameworks/opt/services/car, but
it's now only accessed under packages/services/car (so it was moved to
CarSettings).

Test: atest SettingsBackupTest
Bug: 156567994

Change-Id: Idaff4a249600517c5250cd3821d75ce85fc9eeee
2020-06-03 12:34:07 -07:00
Vinit Nayak
66bf45ffa8 Add new callback for when activity rotates
Launcher needs to distinguish display changes
that result naturally vs apps that launch
in a fixed portrait/landscape rotation during
the quickstep gesture.This callback helps anticipate
if a subseqent onDisplayChanged() will
have resulted from a natural rotation or not.

Bug: 154580671
Change-Id: I59ee7985a9f367e8fc5826c08476c1a25d1426b0
2020-06-03 10:55:42 -07:00
TreeHugger Robot
931c0ce463 Merge "Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured" into rvc-dev 2020-06-03 17:37:21 +00:00
TreeHugger Robot
f7484457cd Merge "webkit: add a note regarding FLAG_SECURE for default dialogs" into rvc-dev 2020-06-03 17:23:26 +00:00
Zhen Zhang
2260f7102f Merge "Allow low ram device to have multiple users and managed profies" into rvc-dev 2020-06-03 17:19:30 +00:00
TreeHugger Robot
a817a0515e Merge "Add PackageInstaller SessionParams restrictions" into rvc-dev 2020-06-03 16:37:24 +00:00
Riddle Hsu
a474039bdc Override application display adjustments while launching activity
A launching activity with fixed rotation may get information from
a Display object which is associated with application resources.
In order to let the display size and rotation are consistent with
the activity configuration, the override configuration of activity
will update to the display adjustments of application resources.

Fixes: 157558894
Test: AppConfigurationTests#testRotatedInfoWithFixedRotationTransform

Change-Id: I7f72d838170a5f588bb8dd279ae081d1a3ddba95
2020-06-03 22:34:01 +08:00
Julia Reynolds
ff182768f7 Merge "Update conversation priority onboarding" into rvc-dev 2020-06-03 11:17:42 +00:00
Feng Cao
2db11209c6 Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured
* if the user taps quickly such that there is only ACTION_DOWN and
  ACTION_UP, without ACTION_MOVE, it'd be possible that the
  isSecure check is not  respected. This patch fixes that case.

Test: atest android.autofillservice.cts.inline
Bug: 157772682
Bug: 158038231

Change-Id: Icd21bf2f88259673bb9b20e46e63672648495eac
2020-06-02 22:08:11 -07:00
Sally Yuen
310bf3094a Merge "Add GLOBAL_ACTION_ACCESSIBILITY_ALL_APPS" into rvc-dev 2020-06-03 03:33:29 +00:00
TreeHugger Robot
a3aac62786 Merge "Update tier names in biometric constants documentation" into rvc-dev 2020-06-03 01:25:11 +00:00
Curtis Belmonte
43825ac301 Update tier names in biometric constants documentation
Adds references to the new security tier names (Tier 1/2/3) in the
documentation for the corresponding biometric authenticator constants:
- Strong -> Tier 3
- Weak -> Tier 2
- Convenience -> Tier 1

Test: Builds
Fixes: 157266312
Change-Id: I80965e8e5c53f049d91f18f0e114d89f18593400
2020-06-02 16:58:08 -07:00
TreeHugger Robot
cc4f13e0ab Merge "Fix AugmentedAutofillService onFillRequest() wrong focused AutofillId for WebView" into rvc-dev 2020-06-02 20:54:18 +00:00
Julia Reynolds
e03aa8f751 Update conversation priority onboarding
And fix a bug with toggling priority I noticed while testing

Test: atest
Fixes: 157988478
Bug: 155490513
Change-Id: I8f5a6076ed2aa6c862a187bac15f3ad9af3cd141
2020-06-02 16:49:39 -04:00
Winson
10d51880e2 Add PackageInstaller SessionParams restrictions
To mitigate a boot loop with reading a massive
install_sessions.xml file, this restricts the amount of
data that can be written by limiting the size of
unbounded parameters like package name and app label.

This introduces a lowered max session count. 50 for general
applications without the INSTALL_PACKAGES permission, and
the same 1024 for those with the permission.

Also truncates labels read from PackageItemInfo to 1000
characters, which is probably enough.

These changes restrict a malicious third party app to ~0.15 MB
written to disk, and a valid installer to ~3.6 MB, as opposed to
the >1000 MB previously allowed.

These numbers assume no install granted runtime permissions.
Those were not restricted since there's no good way to do so,
but it's assumed that any installer with that permission is
highly privleged and doesn't need to be limited.

Along the same lines, DataLoaderParams are also not restricted.
This will have to be added if that API is ever made public.

However, installer package was restricted, even though the API is
hidden. It was an easy add and may have some effect since the value
is derived from other data and passed through by other system
components.

It's still possible to inflate the file size if a lot of
different apps attempt to install a large number of packages,
but that would require thousands of malicious apps to be installed.

Bug: 157224146

Test: atest android.content.pm.PackageSessionTests

Change-Id: Iec42bee08d19d4ac53b361a92be6bc1401d9efc8
2020-06-02 12:58:53 -07:00
Rob Carr
28fdf609dc Merge "SurfaceView: Lock mDeferredDestroySurfaceControl" into rvc-dev 2020-06-02 19:27:08 +00:00
Steve Elliott
cc1937581a Merge "Always use Shortcut Icon in conversation if available" into rvc-dev 2020-06-02 18:46:38 +00:00
Evan Severson
1fe28b24c0 Merge "Remove stopship for permissioncontroller pkg name" into rvc-dev 2020-06-02 18:39:00 +00:00
Robert Carr
6ce9ffb2cd SurfaceView: Lock mDeferredDestroySurfaceControl
Since mDeferredDestroySurfaceControl is the same underlying
object as mSurfaceControl we also need to hold the mSurfaceControlLock
when writing to it.

Bug: 157657896
Test: Existing tests pass
Change-Id: Ie0da3ed5d94c7aae2593423fa2767dbc902da4c8
2020-06-02 18:11:51 +00:00
TreeHugger Robot
46c51b716d Merge "Exception if receive move withouth down" into rvc-dev 2020-06-02 17:40:24 +00:00
Joanne Chung
fbc89efee3 Fix AugmentedAutofillService onFillRequest() wrong focused AutofillId for WebView
When AutofillManagerService try to trigger AugmentedAutofill, it uses
AutofillId.withoutSession() to get the AutollId without session. It
will return invalid "parentId:NO_ID" if the virtual AutofillId is
created with FLAG_IS_VIRTUAL_INT. The virtual AutofillId flag should
be FLAG_IS_VIRTUAL_INT or FLAG_IS_VIRTUAL_LONG, we should get
mVirtualIntId for FLAG_IS_VIRTUAL_INT or mVirtualLongId for
FLAG_IS_VIRTUAL_LONG.

Bug: 156408900
Test: atest android.autofillservice.cts.augmented
Test: atest android.view.autofill.AutofillIdTest#\
testVirtual_Long_withoutSession
Test: atest android.view.autofill.AutofillIdTest#\
testVirtual_Int_withoutSession
Test: Manual. Write a simple cts test for webview and check the
focused AutofillId is correct while switching between the field.

Change-Id: I7ebb4d7cfb6d6f383724b798dae69269ae3a27be
2020-06-03 01:06:24 +08:00
Zimuzo Ezeozue
efbc3f2d5e Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev 2020-06-02 10:45:33 +00:00
Martijn Coenen
0a8ef2b45f Merge "Use killProcessGroup when killing app zygote." into rvc-dev 2020-06-02 06:54:46 +00:00
sallyyuen
ab76090f4b Add GLOBAL_ACTION_ACCESSIBILITY_ALL_APPS
This will allow a11y services to identify the all apps system actions by
id.

Bug: 157078174
Test: manual with all apps and talkback
Change-Id: Ice0969753d6ed789dca762f49859b17ea1de85e9
2020-06-01 20:15:15 -07:00
arthurhung
a0a20dc23b Exception if receive move withouth down
Throw an IllegalStateException if recevie touch move without down,
that could give an explicit feedback about GestureDetector may not
receive the full touch stream.

Bug: 149578486
Test: manual
Change-Id: I644ec1bebbca66dd0f0c219b63a6478b1290d1e1
2020-06-02 10:27:11 +08:00
Remi NGUYEN VAN
fcd1fd8f26 Merge "Allow TRANSPORT_TEST ethernet networks" into rvc-dev 2020-06-02 00:06:21 +00:00
TreeHugger Robot
1b2dfb04c8 Merge "Remove additional sf transaction when constructing a leash" into rvc-dev 2020-06-01 23:41:12 +00:00
Evan Rosky
82352f9db8 Merge "Use boundsChangeTransaction to improve split-screen enter/exit" into rvc-dev 2020-06-01 22:55:20 +00:00
TreeHugger Robot
247144d4a2 Merge "[wm] Introduce meta-data tag (android.supports_size_changes)" into rvc-dev 2020-06-01 21:37:21 +00:00
Changwan Ryu
a9e2ed7bbd webkit: add a note regarding FLAG_SECURE for default dialogs
Child windows do not inherit FLAG_SECURE from parent windows, and
therefore, the default dialogs for JS callbacks do not have this flag
even when the app window has it.

This CL adds a note warning about this behavior to mitigate the
potential vulnerability.

Bug: 120086187
Test: m -j offline-sdk-docs seems not broken
Change-Id: I12f12befd1f303d26ebc866f4817f5184279caeb
2020-06-01 13:56:47 -07:00
Steven Thomas
061dec3e8d Merge "Clarify FRAME_RATE_COMPATIBILITY_* params" into rvc-dev 2020-06-01 20:44:30 +00:00
Marvin Ramin
7ddbb62ccd CEC: Add listener for HDMI CEC volume control feature
Adds a listener to receive updates to the state of the HDMI CEC volume
control features.

Interested parties can register and unregister to get notified about
state updates which are sent on every change to the value.

Test: atest HdmiControlServiceTest
Bug: 152018314
Change-Id: I342d748114bae99b3c3f236502d73bfeac9e9ac5
Merged-In: I342d748114bae99b3c3f236502d73bfeac9e9ac5
2020-06-01 20:13:54 +00:00
Zim
c7496a3a62 Support apps sharing file:// URIs with the camera API
The camera API, MediaStore.ACTION_IMAGE_CAPTURE requires apps to pass
a content:// URI with write permissions to the camera. Unfortunately,
apps haven't been doing this and we only started hitting problems in R
for two reasons:
1. The FileUriExposedException that should crash apps when they try to
share file:// URIs acroos binder is skipped. This is because, the
image_capture intent is passed across binder as a field in a
ChooserActivity Intent and the child intents are not checked for
file URI exposed
2. Prior to R, when camera gets a file:// URI, camera issues a file
open(2) in its process. This open(2) succeeds because the camera had
write_external_storage permission which gave it write access to all
files on external storage

Now, camera targets R and (2) fails because camera does not have write
access to files owned by other apps. To workaround, we do the
following in the apps process when it targets < R:
a. When we detect a file:// URI for the camera in an Intent, we create
the file on disk if it is not already created.
b. Scan the file to insert it in the database and retrieve a
content:// URI
c. Replace the file:// URI with the content URI in the image_capture
intent

This works because, the system will ensure the camera is granted write
access to the content URI.

Test: Manual
Bug: 156336269
Change-Id: I4849ff5e806a8207650ff7534846c36ecdc6d3c0
2020-06-01 20:33:52 +01:00
Evan Severson
eb1e329207 Remove stopship for permissioncontroller pkg name
The change to use the overridden package name in the resources table
won't be included in the current release.

Test: Compile
Bug: 147434671
Change-Id: I9acbf921814088dfaba485d9acc845da650caf87
2020-06-01 12:19:31 -07:00