Loading core/java/android/view/contentcapture/ChildContentCaptureSession.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -74,8 +74,8 @@ final class ChildContentCaptureSession extends ContentCaptureSession { } } @Override @Override void internalFlush(@FlushReason int reason) { void flush(@FlushReason int reason) { mParent.internalFlush(reason); mParent.flush(reason); } } @Override @Override Loading core/java/android/view/contentcapture/ContentCaptureManager.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -663,7 +663,7 @@ public final class ContentCaptureManager { @UiThread @UiThread public void flush(@FlushReason int reason) { public void flush(@FlushReason int reason) { if (mOptions.lite) return; if (mOptions.lite) return; getMainContentCaptureSession().internalFlush(reason); getMainContentCaptureSession().flush(reason); } } /** /** Loading core/java/android/view/contentcapture/ContentCaptureSession.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -342,7 +342,7 @@ public abstract class ContentCaptureSession implements AutoCloseable { /** /** * Flushes the buffered events to the service. * 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. * Sets the {@link ContentCaptureContext} associated with the session. Loading core/java/android/view/contentcapture/MainContentCaptureSession.java +7 −10 Original line number Original line Diff line number Diff line Loading @@ -375,7 +375,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession { void onDestroy() { void onDestroy() { clearAndRunOnContentCaptureThread(() -> { clearAndRunOnContentCaptureThread(() -> { try { try { internalFlush(FLUSH_REASON_SESSION_FINISHED); flush(FLUSH_REASON_SESSION_FINISHED); } finally { } finally { destroySession(); destroySession(); } } Loading Loading @@ -623,7 +623,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession { flushReason = forceFlush ? FLUSH_REASON_FORCE_FLUSH : FLUSH_REASON_FULL; flushReason = forceFlush ? FLUSH_REASON_FORCE_FLUSH : FLUSH_REASON_FULL; } } internalFlush(flushReason); flush(flushReason); } } private boolean hasStarted() { private boolean hasStarted() { Loading Loading @@ -687,18 +687,15 @@ public final class MainContentCaptureSession extends ContentCaptureSession { if (sVerbose) Log.v(TAG, "Nothing to flush"); if (sVerbose) Log.v(TAG, "Nothing to flush"); return; return; } } internalFlush(reason); flush(reason); } } /** /** @hide */ * Internal API to flush the buffered events to the service. * * Do not confuse this with the public API {@link #flush()}. * * @hide */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) @Override @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)); runOnContentCaptureThread(() -> flushImpl(reason)); } } Loading core/tests/coretests/src/android/view/contentcapture/ContentCaptureSessionTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class ContentCaptureSessionTest { } } @Override @Override void internalFlush(int reason) { void flush(int reason) { throw new UnsupportedOperationException("should not have been called"); throw new UnsupportedOperationException("should not have been called"); } } Loading Loading
core/java/android/view/contentcapture/ChildContentCaptureSession.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -74,8 +74,8 @@ final class ChildContentCaptureSession extends ContentCaptureSession { } } @Override @Override void internalFlush(@FlushReason int reason) { void flush(@FlushReason int reason) { mParent.internalFlush(reason); mParent.flush(reason); } } @Override @Override Loading
core/java/android/view/contentcapture/ContentCaptureManager.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -663,7 +663,7 @@ public final class ContentCaptureManager { @UiThread @UiThread public void flush(@FlushReason int reason) { public void flush(@FlushReason int reason) { if (mOptions.lite) return; if (mOptions.lite) return; getMainContentCaptureSession().internalFlush(reason); getMainContentCaptureSession().flush(reason); } } /** /** Loading
core/java/android/view/contentcapture/ContentCaptureSession.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -342,7 +342,7 @@ public abstract class ContentCaptureSession implements AutoCloseable { /** /** * Flushes the buffered events to the service. * 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. * Sets the {@link ContentCaptureContext} associated with the session. Loading
core/java/android/view/contentcapture/MainContentCaptureSession.java +7 −10 Original line number Original line Diff line number Diff line Loading @@ -375,7 +375,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession { void onDestroy() { void onDestroy() { clearAndRunOnContentCaptureThread(() -> { clearAndRunOnContentCaptureThread(() -> { try { try { internalFlush(FLUSH_REASON_SESSION_FINISHED); flush(FLUSH_REASON_SESSION_FINISHED); } finally { } finally { destroySession(); destroySession(); } } Loading Loading @@ -623,7 +623,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession { flushReason = forceFlush ? FLUSH_REASON_FORCE_FLUSH : FLUSH_REASON_FULL; flushReason = forceFlush ? FLUSH_REASON_FORCE_FLUSH : FLUSH_REASON_FULL; } } internalFlush(flushReason); flush(flushReason); } } private boolean hasStarted() { private boolean hasStarted() { Loading Loading @@ -687,18 +687,15 @@ public final class MainContentCaptureSession extends ContentCaptureSession { if (sVerbose) Log.v(TAG, "Nothing to flush"); if (sVerbose) Log.v(TAG, "Nothing to flush"); return; return; } } internalFlush(reason); flush(reason); } } /** /** @hide */ * Internal API to flush the buffered events to the service. * * Do not confuse this with the public API {@link #flush()}. * * @hide */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) @Override @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)); runOnContentCaptureThread(() -> flushImpl(reason)); } } Loading
core/tests/coretests/src/android/view/contentcapture/ContentCaptureSessionTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class ContentCaptureSessionTest { } } @Override @Override void internalFlush(int reason) { void flush(int reason) { throw new UnsupportedOperationException("should not have been called"); throw new UnsupportedOperationException("should not have been called"); } } Loading