diff options
| author | Daniel Hsieh <pengjuhsieh@google.com> | 2022-02-15 15:14:02 +0000 |
|---|---|---|
| committer | Daniel Hsieh <pengjuhsieh@google.com> | 2022-03-01 08:05:14 +0000 |
| commit | 0dae9e4f47422a0ced0eb018be65ed566ae5b978 (patch) | |
| tree | 2b35bcaaf3c4c91be04eaeaaab933e419687440a /core/java | |
| parent | 0153cbf9c4ce09b596809f5cbb557449ba85a85f (diff) | |
Adds moveWindowMagnifierToPosition method
For following typing focus feature, we add a
moveWindowMagnifierToPosition method for a window magnifier to move it
to the center of onRectangleOnScreenRequested.
Apart from calling this method to fulfill movement functionality, we can
separate the movement from calling enableWindowMagnification which is a
temporary replacement for movement functionality. Therefore, we can
distinguish whether the it is enabled by the first time or the further
movement behavior. It would help us differentiate the condition whether
we should reset the following typing focus to on/off state. (b/216394179)
Bug: 219654280
Test: atest IWindowMagnificationConnectionTest
atest WindowMagnificationTest
atest WindowMagnificationAnimationControllerTest
atest WindowMagnificationControllerTest
atest WindowMagnificationConnectionWrapperTest
atest WindowMagnificationManagerTest
Change-Id: Iaac3ca6868d948571c1aee54a5f122c9697059d8
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/accessibility/IWindowMagnificationConnection.aidl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/core/java/android/view/accessibility/IWindowMagnificationConnection.aidl b/core/java/android/view/accessibility/IWindowMagnificationConnection.aidl index 67d96678f420..62d029bd1be6 100644 --- a/core/java/android/view/accessibility/IWindowMagnificationConnection.aidl +++ b/core/java/android/view/accessibility/IWindowMagnificationConnection.aidl @@ -32,7 +32,7 @@ oneway interface IWindowMagnificationConnection { /** * Enables window magnification on specified display with given center and scale and animation. * - * @param displayId The logical display id. + * @param displayId the logical display id. * @param scale magnification scale. * @param centerX the screen-relative X coordinate around which to center, * or {@link Float#NaN} to leave unchanged. @@ -51,7 +51,7 @@ oneway interface IWindowMagnificationConnection { /** * Sets the scale of the window magnifier on specified display. * - * @param displayId The logical display id. + * @param displayId the logical display id. * @param scale magnification scale. */ void setScale(int displayId, float scale); @@ -59,7 +59,7 @@ oneway interface IWindowMagnificationConnection { /** * Disables window magnification on specified display with animation. * - * @param displayId The logical display id. + * @param displayId the logical display id. * @param callback The callback called when the animation is completed or interrupted. */ void disableWindowMagnification(int displayId, @@ -68,6 +68,7 @@ oneway interface IWindowMagnificationConnection { /** * Moves the window magnifier on the specified display. It has no effect while animating. * + * @param displayId the logical display id. * @param offsetX the amount in pixels to offset the window magnifier in the X direction, in * current screen pixels. * @param offsetY the amount in pixels to offset the window magnifier in the Y direction, in @@ -76,9 +77,20 @@ oneway interface IWindowMagnificationConnection { void moveWindowMagnifier(int displayId, float offsetX, float offsetY); /** + * Moves the window magnifier on the given display. + * + * @param displayId the logical display id. + * @param positionX the x-axis position of the center of the magnified source bounds. + * @param positionY the y-axis position of the center of the magnified source bounds. + * @param callback the callback called when the animation is completed or interrupted. + */ + void moveWindowMagnifierToPosition(int displayId, float positionX, float positionY, + in IRemoteMagnificationAnimationCallback callback); + + /** * Requests System UI show magnification mode button UI on the specified display. * - * @param displayId The logical display id. + * @param displayId the logical display id. * @param magnificationMode the current magnification mode. */ void showMagnificationButton(int displayId, int magnificationMode); @@ -86,7 +98,7 @@ oneway interface IWindowMagnificationConnection { /** * Requests System UI remove magnification mode button UI on the specified display. * - * @param displayId The logical display id. + * @param displayId the logical display id. */ void removeMagnificationButton(int displayId); |
