Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 749b6360 authored by Mark Renouf's avatar Mark Renouf
Browse files

Refactor names of internal scrollcapture interfaces

Renames to better align with use and existing naming patterns.
Using 'connection' to avoid confusion as to control flow or
roles. (A connection is direct from SystemUI --> App process)

IScrollCaptureClient -> IScrollCaptureConnection
IScrollCaptureController -> IScrollCaptureCallbacks

Test: atest FrameworksCoreTests:ScrollCaptureConnectionTest \
          FrameworksCoreTests:ScrollCaptureTargetResolverTest \
          ScrollCaptureTest

Change-Id: I9afd33109f6718b61d172ce3e4b3bb5d71a2897e
parent c1a295c6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47131,8 +47131,8 @@ Landroid/view/IRemoteAnimationRunner;
Landroid/view/IRotationWatcher$Stub$Proxy;
Landroid/view/IRotationWatcher$Stub;
Landroid/view/IRotationWatcher;
Landroid/view/IScrollCaptureController$Stub;
Landroid/view/IScrollCaptureController;
Landroid/view/IScrollCaptureCallbacks$Stub;
Landroid/view/IScrollCaptureCallbacks;
Landroid/view/ISystemGestureExclusionListener$Stub$Proxy;
Landroid/view/ISystemGestureExclusionListener$Stub;
Landroid/view/ISystemGestureExclusionListener;
+10 −11
Original line number Diff line number Diff line
@@ -20,32 +20,31 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.view.Surface;

import android.view.IScrollCaptureClient;
import android.view.IScrollCaptureConnection;

/**
 * Interface to a controller passed to the {@link IScrollCaptureClient} which provides the client an
 * asynchronous callback channel for responses.
 * Asynchronous callback channel for responses to scroll capture requests.
 *
 * {@hide}
 */
interface IScrollCaptureController {
interface IScrollCaptureCallbacks {
    /**
     * Scroll capture is available, and a client connect has been returned.
     * Scroll capture is available, and a connection has been provided.
     *
     * @param client interface to a ScrollCaptureCallback in the window process
     * @param connection a connection to a window process and scrollable content
     * @param scrollAreaInWindow the location of scrolling in global (window) coordinate space
     */
    oneway void onClientConnected(in IScrollCaptureClient client, in Rect scrollBounds,
    oneway void onConnected(in IScrollCaptureConnection connection, in Rect scrollBounds,
            in Point positionInWindow);

    /**
     * Nothing in the window can be scrolled, scroll capture not offered.
     * The window does not support scroll capture.
     */
    oneway void onClientUnavailable();
    oneway void onUnavailable();

    /**
     * Notifies the system that the client has confirmed the request and is ready to begin providing
     * image requests.
     * Called when the remote end has confirmed the request and is ready to begin providing image
     * requests.
     */
    oneway void onCaptureStarted();

+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import android.view.Surface;
   *
   * {@hide}
   */
interface IScrollCaptureClient {
interface IScrollCaptureConnection {

    /**
     * Informs the client that it has been selected for scroll capture and should prepare to
+3 −3
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import android.view.DisplayCutout;
import android.view.DragEvent;
import android.view.InsetsSourceControl;
import android.view.InsetsState;
import android.view.IScrollCaptureController;
import android.view.IScrollCaptureCallbacks;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.window.ClientWindowFrames;
@@ -137,7 +137,7 @@ oneway interface IWindow {
    /**
     * Called when Scroll Capture support is requested for a window.
     *
     * @param controller the controller to receive responses
     * @param callbacks to receive responses
     */
    void requestScrollCapture(in IScrollCaptureController controller);
    void requestScrollCapture(in IScrollCaptureCallbacks callbacks);
}
+3 −5
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ import android.view.IDisplayFoldListener;
import android.view.IDisplayWindowRotationController;
import android.view.IOnKeyguardExitResult;
import android.view.IPinnedStackListener;
import android.view.IScrollCaptureController;
import android.view.IScrollCaptureCallbacks;
import android.view.RemoteAnimationAdapter;
import android.view.IRotationWatcher;
import android.view.ISystemGestureExclusionListener;
@@ -751,12 +751,10 @@ interface IWindowManager
     * @param behindClient token for a window, used to filter the search to windows behind it, or
     *                     {@code null} to accept a window at any zOrder
     * @param taskId specifies the id of a task the result must belong to, or -1 to ignore task ids
     * @param controller the controller to receive results, a call to either
     *      {@link IScrollCaptureController#onClientConnected} or
     *      {@link IScrollCaptureController#onClientUnavailable}.
     * @param callbacks the object to receive replies
     */
    void requestScrollCapture(int displayId, IBinder behindClient, int taskId,
            IScrollCaptureController controller);
            IScrollCaptureCallbacks callbacks);

    /**
     * Holds the WM lock for the specified amount of milliseconds.
Loading