Our CL [1] used to copy the original surrounding text
in case the text is updated unexpectedly before the
surrounding text retrieval.
Refine the copy logic by:
-. Move copy action to the InitialSurroundingText constructor
-. Apply a deep copy with parcelable, it also avoid the text
span is updated later
[1] I6082a4cae2fcdc4c529dc14e2e5e7a45ab1aae4d
Bug: 160390184
Fixes: 163176179
Test: atest FrameworksCoreTests:EditorInfoTest
Test: atest CtsInputMethodTestCases:EditorInfoTest
Change-Id: I75edcf6046467f2776d62bb38137f9d15dbfab52
Add plumbing to get shared timeline data from Surface Flinger to HWUI
and back.
Bug: 162890382
Bug: 162888881
Bug: 162890407
Test: manual using ALOG messages in SF
Change-Id: I85c5eb56d2fa933889518854e7b79b1e65e29af3
This change introduces a new call for clients to request focus on their
embedded views. In order to accomplish this, the owner of the
SurfacePackage sends an input token that can identify the input channel
of the embedded window. This token is forwarded as part of the focus
request.
WindowManager will authenticate the calling window and the relationship
between the host and the embedded window. Once authenticated, the
request will be forwarded to InputDispatcher. InputDispatcher will grant
the focus to the SurfaceControlViewHost if the host window is currently
focused or transfer focus back to the host window if the
SurfaceControlViewHost is focused. Otherwise the request is dropped.
In addition, SurfaceView, the host in this scenario, now overrides the
onFocused function to transfer focus to and from the embedded view.
Test: atest SurfaceControlViewHostTests
Bug: 151179149
Change-Id: Ia95545a60d73db4c03679bce9747d2e275806838
From static analysis, as ViewRootImpl#mWindowAttribute is now a final
object from CL[1] and the object is created when ViewRootImpl initialized
so the object reference should not be changed, it won't be necessary to do
the null check again for some code points.
[1]: I0d749c1abb38520fe8fc477d22d6523f470e9abc
Fix: 168335781
Fix: 168319140
Test: build and check launching app without any exception.
Change-Id: I30e1efb8e52704fbd8c97dc375e7ac253c6a90a8
We send callback when the animation is canceled/reversed due to
the new quest while animating.
Bug: 161669184
Test: atest com.android.systemui.accessibility
atest com.android.server.accessibility.magnification
Change-Id: Iecd5e1bcf0ac097d4271ff0d277872b1dab0c63d
Allow for asynchronous screenshot by sending a ScreenCaptureListener to
handle screenshot callbacks. All existing calls are still synchronous
since the SurfaceControl method will block the caller until the results
from SurfaceFlinger are ready.
Test: power + volume down
Test: adb shell screencap
Bug: 162367424
Change-Id: I6cb5641dc19f32f262e3120949fc30ea104cff89
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.
And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.
Also refine the resize handling in ViewRootImpl to make it easier
to read.
There should be no behavior change by this modification.
Bug: 161781274
Test: WmTests, DialogFrameTests
Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
- Set directly from the system when we enter/leave pip so there's
no chance this gets out of sync
Bug: 167682726
Test: adb shell input keyevent 171 (ensures this still triggers the menu)
Change-Id: I73b4c5b6faebd505bf8e17b4c817b4d600025894
Part of the chain of moving surface size ownership to the client
and making relayout asynchronous. We were already sending Surface
size to the client so it's easy to just use that and avoid
sending an extra result flag.
Bug: 161937501
Test: Existing tests pass
Change-Id: I18a96616d2cf082197fbbd434a737ed77ba40e9c
To handle the transition issue, we would like to add this callbck
both in full-screen and window magnification.
Bug: 161669184
Test: atest FullScreenMagnificationControllerTest
Change-Id: I590871386f885827126a1f21937780d3e6e918d0
- Use the batched receiver when handling back only after the
gesture is recognized (fewer updates)
- Remove some unused code
Bug: 167732711
Test: Back gesture still works
Change-Id: I2b12574a4d6c7f997a8cdc70825ef1bd03669fd8
Allow for asynchronous screenshot by sending a ScreenCaptureListener to
handle screenshot callbacks. All existing calls are still synchronous
since the SurfaceControl method will block the caller until the results
from SurfaceFlinger are ready.
Test: power + volume down
Test: adb shell screencap
Bug: 162367424
Change-Id: I54c34003c0786b585dd20530a06dbd4b266e178c
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.
Fix: 161134197
Test: atest InsetsControllerTest
Merged-In: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
(cherry picked from commit 23c75281ef)
Bug: 165267251
Test: manual -- ensured that the time needed to hold is 0ms if the
screenshot_keychord_delay debug value is not set, and that the
delay can still be changed using
adb shell device_config put systemui screenshot_keychord_delay <ms>
Change-Id: Iab989ecf14ef379658130adbced241e084554e63
This makes view root dispatch the up-to-date WindowInsets to the app.
Fix: 166619182
Test: Steps in the bug (comment#12)
Change-Id: I8c47e3be84357f65084a7d9994f7d7b68f15611e
This change introduces two new SurfaceControl apis, one to request focus
to a particular window and the other to transfer focus to an embedded
window if the host window is currently focused.
WindowHandleInfo is updated to specify focusability instead of the
currently focused window. This will provide more information to
InputDipatcher on what all the focusable windows are on screen and
in the future allow it to determine a new focus target.
Lastly, after updating all the WindowHandles in InputMonitor, we switch
over to calling setFocusedWindow to specify the desired focused window.
There should be no functional changes with this cl.
Test: atest inputflinger_tests
Test: atest CtsWindowManagerDeviceTestCases
Test: atest FlickerTests
Bug: 151179149
Change-Id: Iefda51ce73247b208115e64f9f8159a182d93ded