Commit Graph

13181 Commits

Author SHA1 Message Date
TreeHugger Robot
cf695aabfd Merge "Move InputMethodSytemProperty to server from client." 2019-08-01 00:41:25 +00:00
Adam He
2eaec69928 Merge "Implement AssistStructure.ViewNode.getHintIdEntry()." 2019-07-30 21:32:27 +00:00
TreeHugger Robot
2b551ea603 Merge "Add cursor position to synthesized events." 2019-07-30 16:38:09 +00:00
Garfield Tan
1da8628ae3 Add cursor position to synthesized events.
Synthesized events consist of injected, split and clamped events.
Instead of letting caller specify it, we fill cursor position fields by
deriving from pointers. Thus we can maintain the property between
pointer coodinates and cursor position. If there is need we can add a
new obtain method later as well anyway.

I decided to update the value for split events because it would be
unnatural to have a out of bound cursor position when a gesture crosses
view boundaries, but ultimately we probably shouldn't split mouse
events. Nevertheless that's out of the scope of this CL and I chose to
be on the safe side at this moment.

Bug: 134788085
Bug: 136607870
Test: atest TooltipTest#testMouseHoverTooltipWithHoverListener
Test: atest MotionEventTest (and select running all candidates)
Test: atest DragDropTest
Change-Id: I4f3dec0f3c4c1ab2ff5cb986b94b0e007d9fe41b
2019-07-30 09:22:27 -07:00
John Reck
aa712c5d4b Merge "Fix ReliableSurface to be more reliable" 2019-07-29 19:40:55 +00:00
John Reck
59dd2ea974 Fix ReliableSurface to be more reliable
Handle TIMED_OUT better by rescheduling (TODO: give up after N
attempts?)

Fix SYNC_SURFACE_LOST_REWARD_IF_FOUND path to actually go fetch
a new surface.

Bug: 137509524
Test: Injected errors randomly, verified nothing got permanently dead.
Change-Id: Id30f8ad1dd7196041ee84c16c8cf5c814002a6ce
2019-07-26 16:58:37 -07:00
Vadim Caen
ef4e1cea9b Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
2019-07-25 15:25:19 +02:00
Winson Chung
df69ae467a Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev am: 48e3cfc06a am: 932a656359
am: 71626be681

Change-Id: Ie5636139863163d42788314c0e8ca0c946a80ae1
2019-07-24 00:33:54 -07:00
Winson Chung
932a656359 Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev
am: 48e3cfc06a

Change-Id: Id491b61fc851779bd398c5113a306ce1c89181dc
2019-07-23 22:24:38 -07:00
Winson Chung
7a545ae9cc Modify deferred recents animation cancel to work without screenshot
- Allow the recents animation runner to request deferring a cancel from
  stack order change until the next app transition start without using
  a screenshot. This allows launcher to set this state, then start an
  activity without a flash due to the animation not finishing immediately
- Always prepare a transition when using the deferred cancel to ensure
  an app transition callback
- Handle app transition canceled as well (if canceled, we continue to
  cancel recents the animation with/without the screenshot as requested)
- Remove internal lock and use the global WM lock when setting the defer
  cancel state
- Renamed a few methods to clarify the deferred cancel flow

Bug: 137196872
Test: atest FrameworksServicesTests:RecentsAnimationControllerTest
Test: atest WmTests:RecentsAnimationTest
Change-Id: Ie8f6f60b6bf6777e36f24749b30f90c8c26ee848
2019-07-23 15:50:33 -07:00
Vishnu Nair
3b037f7250 Consolidate ViewRootImpl callbacks for SurfaceView
Use ViewRootImpl surface created and destroyed callbacks to set window stopped state
and update the SurfaceView visibility accordingly.

Bug: 132205507
Test: go/wm-smoke
Change-Id: Ie43e3cc81729a153e36fffbefe242d78d8e38222
2019-07-22 12:56:54 -07:00
Vishnu Nair
49230c4277 Add surface changed callbacks to ViewRootImpl
Allow SurfaceView to be notified when the ViewRootImpl surface changes, is created or
destroyed. The callbacks include a SurfaceControl Transaction object which can be used to
synchronize SurfaceControl changes by the system.

In particular, the transaction will be used to update the relative z order of the SurfaceView
surface when the ViewRootImpl surface changes. WMS is responsible for providing ViewRootImpl a
new surface as well as reparenting its children (SurfaceViews). The transaction will be applied by
the service when it is ready to show the new surface, synchronizing the reparenting with the
relative z update.

Bug: 132205507
Test: go/wm-smoke
Change-Id: Ie5aed430d09cc6d3a0a99f618094b3a50dbaa5cc
2019-07-22 12:56:54 -07:00
TreeHugger Robot
faaa4e62b9 Merge "IWindowSession.Default is not available" 2019-07-22 12:10:25 +00:00
Adam He
d55b16e73e Implement AssistStructure.ViewNode.getHintIdEntry().
Bug: 135134274
Test: atest CtsAutoFillServiceTestCases
Test: atest android.contentcaptureservice.cts.unit.ViewNodeTest
Change-Id: I7154cf97a5236ad975bd774c29b30e055cfca8bd
2019-07-19 15:33:51 -07:00
Tarandeep Singh
07b318bdfc Move InputMethodSytemProperty to server from client.
Moving InputMethodSystemProperty from android.view.inputmethod to
com.android.server.inputmethod so that it can be accessed only from
the system_server.

Change-Id: I41707a4e5dfe824cbe9e873ec598762d36c64c09
Fix: 137203823
Test: Build and flash
2019-07-18 11:30:17 -07:00
Jackal Guo
73715ca6c3 Merge "Add new APIs to support RegionInScreen in A11yWindowInfo" 2019-07-17 06:43:45 +00:00
Jackal Guo
f382371d77 Add new APIs to support RegionInScreen in A11yWindowInfo
To support non-rectangular visible area for windows, add new APIs
about RegionInScreen in A11yWindowInfo to represent the actual
interact-able area of a window.

Bug: 132146558
Test: a11y CTS & unit tests
Change-Id: I86bb6bc8c567e09f01a3f853a3cffd896ce934c8
2019-07-17 10:57:09 +08:00
Adrian Roos
66e52c79cd Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev am: d4a50e6e72
am: 7c77af6371

Change-Id: I3de6ae14483976dc659fb5aadbedae2f2f8dc00c
2019-07-16 15:09:17 -07:00
Adrian Roos
7c77af6371 Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev
am: d4a50e6e72

Change-Id: I9f837989727c263517aa0d2f3dfd47a830f6170c
2019-07-16 15:00:35 -07:00
Adrian Roos
e6911497de GestureNav: make reportSystemGestureExclusionChanged oneway
When the WindowManager lock is contended, reportSystemGestureExclusionChanged can cause
jank. Making it oneway avoids this.

Fixes: 137650591
Test: make droid
Change-Id: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
Merged-In: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
2019-07-16 20:29:03 +00:00
Adrian Roos
2dccd145d3 GestureNav: make reportSystemGestureExclusionChanged oneway
When the WindowManager lock is contended, reportSystemGestureExclusionChanged can cause
jank. Making it oneway avoids this.

Fixes: 137650591
Test: make droid
Change-Id: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
2019-07-16 17:58:15 +00:00
Tarandeep Singh
eafd4dae94 Merge "Make MULTI_CLIEN_IME_ENABLED non-testable." 2019-07-16 17:48:51 +00:00
Issei Suzuki
6b5f5e97e8 Refined the logic to detect the location of DisplayCutout.
Bug: 117199965
Test: atest DisplayCutoutTest
Change-Id: I943922ff6e2866c783b88ce3b2c9bca494d688d7
2019-07-15 15:44:01 +02:00
Jiyong Park
624b393ef3 IWindowSession.Default is not available
<Iface>.Default class was automatically generated, but a change in the
AIDL compiler is scheduled to generate the class only when the AIDL file
is compiled with '-version' option, because the default class is only
useful for the versioned AIDL case.

Stop using IWindowSession.Default since it will be removed. Instead
implement IWindowSession directly.

Test: build
Change-Id: I4551ddcbd794d0d99dc0952bbd6414a2112a5ea2
2019-07-11 20:06:34 +09:00
Rhed Jao
882145e7e0 Improve A11yNodeInfo visibility for magnification
Returns visible if device enables magnification and node is visible
but outside of magnified area.

Bug: 79162853
Bug: 79531479
Test: atest AccessibilityMagnificationTest
Change-Id: I481bd5c3d73d01c0cd8b3e0ebd7a1584c9ae7064
2019-07-11 16:51:39 +08:00
Tarandeep Singh
db6c7815b7 Make MULTI_CLIEN_IME_ENABLED non-testable.
This mechanically reverts making MULTI_CLIEN_IME_ENABLED
testable originally introduced in [1].
CTS tests can check for FEATURE_INPUT_METHODS instead.
FEATURE_INPUT_METHODS is false for Android auto and true for
devices that support installable IMEs.

[1] Id7b4dceb2dbfaf3d7ed1084957dd14b04cad0cdf

Bug: 137203665
Test: Manually built and verified that it builds.
Change-Id: I6e430458dd05dec363f67b62416d424c395f2d5a
2019-07-10 13:28:38 -07:00
Tarandeep Singh
ff0d28905f Merge "Remove PER_PROFILE_IME_ENABLED property" 2019-07-10 18:06:39 +00:00
Tarandeep Singh
cf5ff82fca Remove PER_PROFILE_IME_ENABLED property
PER_PROFILE_IME_ENABLED is default enabled in Q. We no longer need this
property.

Bug: 135775619
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ia957118fabc2dd794cb4f5018692b8548b85233a
2019-07-09 14:53:48 -07:00
TreeHugger Robot
dc8c71b1df Merge "TextClassifier cross-user vulnerability in direct-reply" 2019-07-09 17:55:04 +00:00
TreeHugger Robot
6a727cafa6 Merge "Fix missing version number in logs from webview" 2019-07-09 15:19:41 +00:00
Abodunrinwa Toki
e8492693c2 TextClassifier cross-user vulnerability in direct-reply
Sys UI runs on user 0. This can lead to the TextClassifier (TC)
running for the wrong user. Consequencies are user A can launch apps
in user B via the TC's predicted actions and selected text being
unintentionally shared from user A to an app running in user B.

This fix ensures that the correct user id is passed and verified for
every TC request going across process boundaries (i.e. via SystemTC).
- Sys UI sets the appropriate user id in the TextView
- TextClassificationManager (TCM) system service is constructed using
  a context generated from this user id
- SystemTC sets this user id before querying the TCMService
- TCMService validates the user id before forwarding the request to
  the TCService belonging to that user id.

Bug: 136483597
Test: atest android.view.textclassifier
      atest android.widget.TextViewActivityTest
      (manual) Verified according to steps in bug 123232892
Change-Id: I2fdffd8eb4221782cb1f34d2ddbe41dd3d36595c
2019-07-08 15:16:19 +01:00
Tony Mak
b393eeabde Fix missing version number in logs from webview
fromIndex is inclusive, so it should be startIndex +1.

This bug is fixed in our new logging APIs, but to those who
is still using the old pipeline, e.g: webview, will hit the issue.

Fixes: 136805228
Test: Enable verbose logging, try to select something in webview,
observe that the version number is logged.
Test: atest SmartSelectionEventTrackerTest

Change-Id: I7e8212d9be9684b9988634cf30043765dd8afe38
2019-07-05 17:06:14 +01:00
Issei Suzuki
4dd6a45d3c Merge "Support alpha value in SurfaceView." 2019-07-04 12:25:53 +00:00
TreeHugger Robot
693884a663 Merge "Add trackingBug to APIs used by chromium vebview." 2019-07-04 09:58:45 +00:00
Issei Suzuki
006b71f401 Support alpha value in SurfaceView.
For backward compatibility, SurfaceView ignores alpha value by
default. In order to reflect alpha value set on the SurfaceView
to its underlying surface, setUseAlpha() needs to be called.

Translucent alpha only works when the surface is placed z-above.
Otherwise only fully opaque and transparent status are supported.

Bug: 130442248
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
2019-07-04 09:49:23 +02:00
Qasid Sadiq
aabd50e0a4 Merge "Populate scrollX and scrollY on AccessibilityEvents." 2019-07-03 23:17:52 +00:00
Issei Suzuki
60557b5bf5 Clean up SurfaceView.
Bug: 136538998
Test: no-op refactoring CL. Existing unit tests still pass.
Change-Id: Idd6c5871ed34880a053f3a43ab4f7aa3a466b548
2019-07-03 20:04:48 +02:00
TreeHugger Robot
08c51ea668 Merge "Removed unused variable from ThreadedRenderer" 2019-07-03 16:56:03 +00:00
Mathew Inwood
5ca23f6a5a Add trackingBug to APIs used by chromium vebview.
Bug: 136637107
Test: m
Change-Id: I5b7612325d8b7e2578e71a75f60790039bc28eea
2019-07-03 12:20:45 +01:00
TreeHugger Robot
4b235cb04a Merge "Clean up SurfaceView" 2019-07-03 09:21:41 +00:00
Issei Suzuki
f78b5e2e44 Removed unused variable from ThreadedRenderer
Bug: 136616503
Test: refactoring, check if existing tests pass
Change-Id: I627832b2e8f964dbabbf95788279e437c4347adf
2019-07-03 10:23:37 +02:00
Issei Suzuki
f0412592db Clean up SurfaceView
Bug: 136538998
Test: no-op refactoring CL. Existing unit tests still pass.
Change-Id: Ibd0310a87ed38aa48215be9cba54f1c7a2a8a9fa
2019-07-02 12:33:13 +02:00
John Reck
5e56d3f12b Merge "Switch to import for CtsUiRenderingTestCases" 2019-07-01 15:59:33 +00:00
Issei Suzuki
9e6679b040 Merge "Extend ViewRootImpl to support multiple FrameDrawingCallback" 2019-07-01 12:47:06 +00:00
Peiyong Lin
472eac2a3c Merge "Attach color space information when attach and queue buffer." into qt-r1-dev am: 964fcdbebd
am: 7537aeeb9f

Change-Id: I245e704a1d794ddb56892a97c74bf11effe0c3a1
2019-06-28 15:41:25 -07:00
Peiyong Lin
7537aeeb9f Merge "Attach color space information when attach and queue buffer." into qt-r1-dev
am: 964fcdbebd

Change-Id: I37376be3cdf0a8c72111c6de257eda4274f406c2
2019-06-28 14:35:34 -07:00
Mathew Inwood
b2f6f30c19 Merge "Restore some greylist entries." into qt-dev am: f4535c8d51 am: cd82f9adff
am: 7a4d871174

Change-Id: If3c3de3ec24226ec6ea10603ca246487ac40bfb4
2019-06-28 13:42:26 -07:00
Mathew Inwood
7a4d871174 Merge "Restore some greylist entries." into qt-dev am: f4535c8d51
am: cd82f9adff

Change-Id: Iff29bca8243e0c5e0e7ec30cd8b4a3f95c43ac82
2019-06-28 13:30:26 -07:00
Mathew Inwood
cd82f9adff Merge "Restore some greylist entries." into qt-dev
am: f4535c8d51

Change-Id: I3851fed60bedab9748f2d6d53f342f2605ecf78b
2019-06-28 13:18:30 -07:00
Mathew Inwood
f405e83cdc Merge "Restore some greylist entries." into qt-dev
am: f4535c8d51

Change-Id: I9349026a5f99cb2ebac1d9fadd3c716e8a06aaa3
2019-06-28 13:18:28 -07:00