Commit Graph

103664 Commits

Author SHA1 Message Date
Taran Singh
9641cfc0fa Support WIC.show(IME) from Activity#onCreate
In Q, app developer would've to wait for InputConnection on Editor before
showSoftInput() could be called. This made API very un-intuitive. While
WIC.show(ime) took care of some of the scenarios, it didn't handle
showing IME from onCreate() i.e. when control is not yet available.
This CL introduces a pending IME show request that waits until IME
control is available.

Test: atest WindowInsetsControllerTests#testShowImeOnCreate
Bug: 153014086

Change-Id: I93dd5790e1fb3d7841ad1323a45cd3bae2d6e9b8
2020-04-17 10:41:30 -07:00
Joshua Duong
9a419cda53 Merge "Fix PendingIntent hijacking for adb notifications." into rvc-dev 2020-04-17 16:08:57 +00:00
Joshua Duong
ec1980f86b Fix PendingIntent hijacking for adb notifications.
Use an explicit intent and set PendingIntent.FLAG_IMMUTABLE to prevent
someone from modifying the intent from PendingIntent.send(...).

Bug: 153356209

Test: atest AdbNotificationsTest
Test: In bug, install and launch the PoC apk and give it notification
permissions. Then, with USB/Wifi debugging enabled, disconnect and connect
the device to create the adb notification. the PoC apk should not have
permission to display information from
content://com.android.settings.files/my_cache/NOTICE.html.

Change-Id: Ie49aa3cf9b33168cf1435fc2427e95aac7f4609b
(cherry picked from commit 2c03881459)
Exempt-From-Owner-Approval: approved in master
2020-04-17 16:08:39 +00:00
Jerry Chang
e63ae2f84f Mark more directory getter APIs @TestApi
To have a way to verify behavior of more directories, mark more
directory getter APIs @TestApi.

Bug: 148664742
Test: atest SysConfigTest#testStageWhitelist
Change-Id: I2d22412935b24ec4c33d8d1b3a7fbb7df4a08841
2020-04-17 14:50:48 +08:00
Ming-Shin Lu
49ccdb557f Merge "Add test APIs for makeCustomAnimation" into rvc-dev 2020-04-17 03:33:51 +00:00
TreeHugger Robot
7929732000 Merge "RESTRICT AUTOMERGE: Add a "cork" mechanism to prevent cache invalidation flooding" into rvc-dev 2020-04-17 01:52:53 +00:00
Nader Jawad
2e40bb8b1e Merge "Updated TextView#setCompoundDrawableTintList documentation to refer to BlendMode.SRC_IN instead of PorterDuff.Mode.SRC_IN" into rvc-dev 2020-04-17 01:11:59 +00:00
Daniel Colascione
264abafff0 RESTRICT AUTOMERGE: Add a "cork" mechanism to prevent cache invalidation flooding
Bug: 140788621
Test: subsequent CL
Change-Id: Idfc42110e655571578bae208b98ee61a6eb1b2c3
2020-04-17 00:16:35 +00:00
Andrii Kulian
1a261f2f65 Merge "8/n Allow targeting task containers for activity launch" into rvc-dev 2020-04-16 23:15:42 +00:00
TreeHugger Robot
48d830ebd9 Merge "Revert "Fix the logics in ImeFocusController#onPostWindowFocus"" into rvc-dev 2020-04-16 20:58:47 +00:00
Yohei Yukawa
067d71bc31 Revert "Fix the logics in ImeFocusController#onPostWindowFocus"
This reverts commit a56779d1ab [1].

Reason for revert:
Caused multiple test failures in CtsInputMethodTestCases

 [1]: I68bb95fc3cbfe1f5992ccf87694b34c3e52bb31f

Bug: 153612876
Fix: 154250671
Test: atest CtsInputMethodTestCases
Change-Id: Ibf6143f46ae18e41e8ecfa50f523216e7340adda
2020-04-16 20:35:27 +00:00
Lee Shombert
6e17bc7fae Merge "Fix exception handling in getState() binder cache" into rvc-dev 2020-04-16 15:49:12 +00:00
Shu Chen
9b6af1dcc5 Merge "Prevents multi touch among TextView and handle reviews." into rvc-dev 2020-04-16 15:32:32 +00:00
TreeHugger Robot
526dba462f Merge "Remove click listeners from app op icons" into rvc-dev 2020-04-16 15:06:49 +00:00
TreeHugger Robot
4220cf74ca Merge "Fix the logics in ImeFocusController#onPostWindowFocus" into rvc-dev 2020-04-16 14:46:04 +00:00
Beverly
717deadfdb Remove click listeners from app op icons
Instead, the click listener is set on the app opp container since
clicking on the app opp container results in the same action as clickng on the
individual app icons. As per a11y guidance, only set the click listener
on the container.

Test: manual
Fixes: 153281363
Change-Id: Ic1c2bdb2f77fc459a3a3e997ed494b4bab36a273
2020-04-16 09:34:29 -04:00
Ming-Shin Lu
a56779d1ab Fix the logics in ImeFocusController#onPostWindowFocus
In ImeFocusController#onPostWindowFocus -> onViewFocusChanged,
it implies that the view has focus after onPostWindowFocus, this logics
we keep leveraged from IMM#onPostWindowFocus -> focusInLocked() long
ago, which may not always be true as SearchView layout may call
View#clearFocus when size changed after IME switcher shown.

When IME switched and back to app activity, in the above call path,
even activity window focused, and set the fallback focus view as
activity's root view, but the root view is not actually focused,
if we set this view as the next served view, then calling
View#onCreateInputConnection will return null, because it's not an editor.

Use correct view focus state when calling onViewFocusChanged.

Fix: 153612876
Test: manual as below:
     1) Launch Files app, taps SearchView EditText
     2) switch IMEs with IME switcher dialog
     3) see if Password keyboard shown.
     4) keeps 2) and 3) several time.
     Expected: There is no password keyboard and
     the keyboard input is still workable.
Change-Id: I68bb95fc3cbfe1f5992ccf87694b34c3e52bb31f
2020-04-16 20:39:54 +08:00
Oli Lan
46a0a5abb5 Merge "Add min extension versions to AndroidPackage." into rvc-dev 2020-04-16 08:21:33 +00:00
TreeHugger Robot
27e6f4ebf7 Merge "Camera: Hook up zoom ratio in legacy camera2 shim" into rvc-dev 2020-04-16 06:00:14 +00:00
Shu Chen
eb8b1ba3df Prevents multi touch among TextView and handle reviews.
- First touch on TextView blocks secondary touches on handles.
 - First touch on handles blocks later touches on TextView but doesn't block secondary touches on other handles.

Bug: 150995597
Test: manually tested & automation tests:
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I7717fc061fc81514fc1dad0d3acbc73e683516cf
2020-04-16 13:58:10 +08:00
TreeHugger Robot
9f11dd4b64 Merge "Remove android.view.inline deprecated API." into rvc-dev 2020-04-16 01:23:19 +00:00
Shuzhen Wang
f807a41008 Camera: Hook up zoom ratio in legacy camera2 shim
Map the camera2 CONTROL_ZOOM_RATIO to legacy zoomRatio in Camera.Parameters.

Test: Force Pixel 2 HAL to HAL1, and run testZoomRatioTest
Bug: 149052011
Change-Id: I888c919ae10d3e2882f3df797524a06e2b3be259
2020-04-15 18:01:29 -07:00
TreeHugger Robot
74548402d1 Merge "Hide augmented inline suggestion if field value is changed to not empty" into rvc-dev 2020-04-16 00:30:46 +00:00
Adam He
3f8cdb51b4 Remove android.view.inline deprecated API.
Bug: 152912563
Test: atest android.autofillservice.cts.inline
Change-Id: I95f3b1281e48c9319e96eabc53e81d524bf720ff
2020-04-15 16:31:21 -07:00
Lee Shombert
6d1fa6f65a Fix exception handling in getState() binder cache
Bug: 153103051

A binder cache recompute() function cannot compute a result based on any
data that is not known to the binder server.  If the code depends on
local data that can change, then invalidation will not work properly.

The original getState() method returned OFF if the bluetooth service was
unavailable.  This computation now occurs in the getStateInternal()
method, outside of the binder cache query() method.

The recompute() method converts RemoteExceptions to RuntimeExceptions.
Then, the conversion is reversed in getStateInternal().  This double
conversion is needed because the cache recompute() method has no throw
spec.

Test: Create a debug image that enables binder cache VERIFY.  Run the
following tests:
 * atest BluetoothInstrumentationTests
 * atest PtsChreTestCases
 * atest UserLifecycleTests
 * manual testing connecting to bluetooth devices and toggling airplane
   mode.
No cache inconsistencies found.  No test failures seen.

Change-Id: I93b9742587c4eb695d9a11fc6ab145f6a40a0ece
2020-04-15 13:58:55 -07:00
Andrew Solovay
1643bc3995 Merge "docs: Note behavior of PREFER_OFFLINE" into rvc-dev 2020-04-15 20:53:50 +00:00
Galia Peycheva
652a8a65f3 Merge "Remove usage of low profile in DreamService" into rvc-dev 2020-04-15 20:35:00 +00:00
Nader Jawad
af5ff36051 Updated TextView#setCompoundDrawableTintList
documentation to refer to BlendMode.SRC_IN
instead of PorterDuff.Mode.SRC_IN

Fixes: 151952140
Test: N/A
Change-Id: Ie4b9a585c2dae49e633f6741180b6749493d069a
2020-04-15 20:21:52 +00:00
TreeHugger Robot
a93686c403 Merge "bypass anti-malware verification" into rvc-dev 2020-04-15 20:13:43 +00:00
Tiger Huang
461f380988 Merge "Add logs that indicate why a surface is invalid" into rvc-dev 2020-04-15 20:02:48 +00:00
Andrii Kulian
1cfcae8108 8/n Allow targeting task containers for activity launch
- Allow targeting task display area in ActivityOptions.
- Change LaunchParamsController to select preferred task display
  area instead of display.

Bug: 152116619
Test: WM CTS and unit tests
Change-Id: I16ab96008e1ce03422f89a0609d3121051261fda
2020-04-15 12:21:24 -07:00
Galia Peycheva
4d3aaf6980 Remove usage of low profile in DreamService
The low profile in DreamService was used to hide the status bar and
navigation bar. Now this is done by
WindowInsetController.hide(systemBars()) in DreamActivity.

Bug: 151749301

Test: m && flash && verify that system bars don't show up
Change-Id: I8fc9ca67262e92422afb472ccd76ec561c90f66d
2020-04-15 20:01:28 +02:00
Todd Kennedy
75dd0e649a bypass anti-malware verification
For incremental installations only, we skip the verification
request broadcast and instead always send a verified broadcast
with the root hash.

Bug: 151240337
Test: Manual. Install APK normally and see the verifier request broadcast is sent
Test: Manual. Install APK incrementally and see verifier request broadcast is not sent, and verified broadcast is sent with root hash
Change-Id: I2599472818b63ea172d2d412741e5540c8a52176
2020-04-15 10:33:19 -07:00
TreeHugger Robot
64fb27fcdc Merge "The notification archive should follow history setting" into rvc-dev 2020-04-15 17:32:47 +00:00
Tiger Huang
0fd6748bf6 Add logs that indicate why a surface is invalid
This helps us to debug.

Bug: 154056280
Test: Locally make leashes invalid and check the log format.
Change-Id: Idcde497ffee1f10a4289520e154aa8b39eed1f78
2020-04-16 01:26:12 +08:00
Soonil Nagarkar
e89cef4edb Merge "DO NOT MERGE Add utilities for creating AppOps listenerIds" into rvc-dev 2020-04-15 15:44:22 +00:00
Julia Reynolds
b5535c6faa The notification archive should follow history setting
Test: atest
Fixes: 153677280
Change-Id: I9b2ae1ecd1cc8b42ab715ee033879f295949a9ba
2020-04-15 15:29:32 +00:00
Oli Lan
72ae4476d4 Add min extension versions to AndroidPackage.
The <extension-sdk> manifest tag was added in ag/1004614 to
allow apps to specify the minimum versions they need of
extension SDKs.

This adds the min extension versions to ParsingPackage.

This will be needed to allow us to perform checks that rollbacks do
not violate the min extension versions of installed apps (see
go/sdk-extensions-and-rollback).

Bug: 152737927
Test: atest PackageParserLegacyCoreTest#testUsesSdk
Change-Id: I2e080e46aaea6de489766dac0d323d7d2c7302ca
2020-04-15 15:59:23 +01:00
Jeff Sharkey
672582e4e1 Merge "Fix logic inversion bug from Android 1.0." into rvc-dev 2020-04-15 13:54:37 +00:00
Rubin Xu
a042c8afd3 Merge "Improve work profile unification flow" into rvc-dev 2020-04-15 11:18:06 +00:00
Stanislav Zholnin
962b13c5ee Merge "add AppOpsTest to related frameworks TEST_MAPPINGS" into rvc-dev 2020-04-15 10:10:55 +00:00
TreeHugger Robot
58df220212 Merge "Add new atoms to track user journeys, such as user switches." into rvc-dev 2020-04-15 03:31:00 +00:00
Soonil Nagarkar
4523f96ff1 DO NOT MERGE Add utilities for creating AppOps listenerIds
Use utilities to support location listenerIds.

Bug: 153687899
Test: presubmits
Change-Id: Ie138c98a5f864490c6560166b652ea9509fa8728
2020-04-14 19:04:41 -07:00
Adrian Roos
a576c805ab Merge "WindowInsetsAnimationController: Clarify finish javadoc" into rvc-dev 2020-04-14 19:15:29 +00:00
Varun Shah
acb5634dc4 Add new atoms to track user journeys, such as user switches.
Define new atoms to better log and understand various user journeys,
such as user switches, user starts, and user creation.

The UserLifecycleJourneyReported atom defines a user's journey and
holds a user's information such as their user id, user type, and flags
associated with the user. This atom includes a session-id which is used
to link to the UserLifecycleEventOccurred atom which keeps track of
lifycycle events that occur throughout a user's journey. As more user
journeys are defined, there could be more Events added in the future.

Note: the JourneyReported atom can currently be logged more than once
per user journey since there is no record of the user's ongoing journey.
This will be updated in a future CL.

Bug: 146505521
Bug: 150788910
Test: statsd_testdrive 264 265
Change-Id: Iff3847be64d718fb2ec17e58c33d47f7fa4b627a
2020-04-14 11:25:07 -07:00
Charles Chen
5c984b9a09 Merge "Fix WindowContextTests" into rvc-dev 2020-04-14 17:44:47 +00:00
Galia Peycheva
e7eee891b4 Merge "Fix DreamService not finishing correctly" into rvc-dev 2020-04-14 17:11:45 +00:00
TreeHugger Robot
c74baf480d Merge "[RESTRICT AUTOMERGE] Add relative address to DeviceProductInfo." into rvc-dev 2020-04-14 16:30:28 +00:00
Marin Shalamanov
443c4d047a [RESTRICT AUTOMERGE] Add relative address to DeviceProductInfo.
This CL adds a field relativeAddress to DeviceProductInfo which
contains the device address in the display network. For example,
for HDMI connections the field is populated with the physical address.

Bug: 147994746
Test: adb shell dumpsys display
Change-Id: I87d9fd00bd16abc7594dc3f6b6d4e00c8968af07
2020-04-14 16:52:11 +02:00
Galia Peycheva
95b12348eb Fix DreamService not finishing correctly
CL assigns null to DreamService.mActivity when the DecorView of the
main window is detached (in onViewDetachedFromWindow()). This is also
when the Window is detached, so at that point the DreamService doesn't
care about the DreamActivity.

Fix: 152994058

Test: atest DreamManagerServiceTests

Change-Id: I716f443b2876a2db57df999a551eee31e98ab4f1
2020-04-14 16:42:10 +02:00