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

Commit 6d6c3d1a authored by Jared Duke's avatar Jared Duke Committed by Android (Google) Code Review
Browse files

Revert "Rename `flush()` internal API to `internalFlush()`"

This reverts commit 3c75f1c4.

Reason for revert: Need for preceding change's revert. See b/392644058.

Change-Id: Ia1ce090dc6ec54a05b74afea2c7acfbe99ce0871
parent 3c75f1c4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -74,8 +74,8 @@ final class ChildContentCaptureSession extends ContentCaptureSession {
    }

    @Override
    void internalFlush(@FlushReason int reason) {
        mParent.internalFlush(reason);
    void flush(@FlushReason int reason) {
        mParent.flush(reason);
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -663,7 +663,7 @@ public final class ContentCaptureManager {
    @UiThread
    public void flush(@FlushReason int reason) {
        if (mOptions.lite) return;
        getMainContentCaptureSession().internalFlush(reason);
        getMainContentCaptureSession().flush(reason);
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ public abstract class ContentCaptureSession implements AutoCloseable {
    /**
     * Flushes the buffered events to the service.
     */
    abstract void internalFlush(@FlushReason int reason);
    abstract void flush(@FlushReason int reason);

    /**
     * Sets the {@link ContentCaptureContext} associated with the session.
+7 −10
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
    void onDestroy() {
        clearAndRunOnContentCaptureThread(() -> {
            try {
                internalFlush(FLUSH_REASON_SESSION_FINISHED);
                flush(FLUSH_REASON_SESSION_FINISHED);
            } finally {
                destroySession();
            }
@@ -623,7 +623,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
                flushReason = forceFlush ? FLUSH_REASON_FORCE_FLUSH : FLUSH_REASON_FULL;
        }

        internalFlush(flushReason);
        flush(flushReason);
    }

    private boolean hasStarted() {
@@ -687,18 +687,15 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
            if (sVerbose) Log.v(TAG, "Nothing to flush");
            return;
        }
        internalFlush(reason);
        flush(reason);
    }

    /**
     * Internal API to flush the buffered events to the service.
     *
     * Do not confuse this with the public API {@link #flush()}.
     *
     * @hide */
    /** @hide */
    @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
    @Override
    public void internalFlush(@FlushReason int reason) {
    public void flush(@FlushReason int reason) {
        // TODO: b/380381249 renaming the internal APIs to prevent confusions between this and the
        // public API.
        runOnContentCaptureThread(() -> flushImpl(reason));
    }

+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ public class ContentCaptureSessionTest {
        }

        @Override
        void internalFlush(int reason) {
        void flush(int reason) {
            throw new UnsupportedOperationException("should not have been called");
        }

Loading