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

Commit ce4e40ac authored by Mark Renouf's avatar Mark Renouf Committed by Android (Google) Code Review
Browse files

Merge "Splits up internal binder api for scroll capture" into sc-dev

parents 70f86696 400a505d
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -26,13 +26,6 @@ import android.view.Surface;
 * {@hide}
 */
interface IScrollCaptureCallbacks {
    /**
     * Provides the result of WindowManagerService#requestScrollCapture
     *
     * @param response the response which describes the result
     */
    oneway void onScrollCaptureResponse(in ScrollCaptureResponse response);

    /**
     * Called in reply to IScrollCaptureConnection#startCapture, when the remote end has confirmed
     * the request and is ready to begin capturing images.
+5 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.view;

import android.graphics.Rect;
import android.os.ICancellationSignal;
import android.view.IScrollCaptureCallbacks;
import android.view.Surface;


@@ -31,11 +32,12 @@ interface IScrollCaptureConnection {
    /**
     * Informs the target that it has been selected for scroll capture.
     *
     * @param surface a return channel for image buffers
     * @param surface used to shuttle image buffers between processes
     * @param callbacks a return channel for requests
     *
     * @return a cancallation signal which is used cancel the request
     * @return a cancallation signal which is used cancel the start request
     */
    ICancellationSignal startCapture(in Surface surface);
    ICancellationSignal startCapture(in Surface surface, IScrollCaptureCallbacks callbacks);

    /**
     * Request the target capture an image within the provided rectangle.
+17 −15
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -14,20 +14,22 @@
 * limitations under the License.
 */

package com.android.systemui.screenshot;
package android.view;

import java.util.function.Consumer;
import android.graphics.Rect;
import android.view.ScrollCaptureResponse;
import android.view.Surface;

/** Accepts and retains the most recent value for verification */
class TestableConsumer<T> implements Consumer<T> {
    T mValue;

    @Override
    public void accept(T t) {
        mValue = t;
    }

    public T getValue() {
        return mValue;
    }
/**
 * Asynchronous callback channel for the initial response to a scroll capture request.
 *
 * {@hide}
 */
interface IScrollCaptureResponseListener {
    /**
     * Provides the initial response to a scroll capture request.
     *
     * @param response the response which describes the result
     */
    oneway void onScrollCaptureResponse(in ScrollCaptureResponse response);
}
+2 −2
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.IScrollCaptureCallbacks;
import android.view.IScrollCaptureResponseListener;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.window.ClientWindowFrames;
@@ -134,5 +134,5 @@ oneway interface IWindow {
     *
     * @param callbacks to receive responses
     */
    void requestScrollCapture(in IScrollCaptureCallbacks callbacks);
    void requestScrollCapture(in IScrollCaptureResponseListener callbacks);
}
+3 −3
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.IPinnedTaskListener;
import android.view.IScrollCaptureCallbacks;
import android.view.IScrollCaptureResponseListener;
import android.view.RemoteAnimationAdapter;
import android.view.IRotationWatcher;
import android.view.ISystemGestureExclusionListener;
@@ -744,10 +744,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 callbacks the object to receive replies
     * @param listener the object to receive the response
     */
    void requestScrollCapture(int displayId, IBinder behindClient, int taskId,
            IScrollCaptureCallbacks callbacks);
            IScrollCaptureResponseListener listener);

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