diff options
8 files changed, 13 insertions, 16 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 38c265bd50b3..156d81e7ba2a 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -12705,9 +12705,6 @@ package android.view.contentcapture { public final class ContentCaptureManager { method public boolean isContentCaptureFeatureEnabled(); - } - - public abstract class ContentCaptureSession implements java.lang.AutoCloseable { field public static final int NO_SESSION_ID = 0; // 0x0 } diff --git a/core/java/android/service/contentcapture/ContentCaptureService.java b/core/java/android/service/contentcapture/ContentCaptureService.java index cecfe24613a4..61744e423b5b 100644 --- a/core/java/android/service/contentcapture/ContentCaptureService.java +++ b/core/java/android/service/contentcapture/ContentCaptureService.java @@ -18,7 +18,7 @@ package android.service.contentcapture; import static android.view.contentcapture.ContentCaptureHelper.sDebug; import static android.view.contentcapture.ContentCaptureHelper.sVerbose; import static android.view.contentcapture.ContentCaptureHelper.toList; -import static android.view.contentcapture.ContentCaptureSession.NO_SESSION_ID; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage; diff --git a/core/java/android/view/contentcapture/ContentCaptureContext.java b/core/java/android/view/contentcapture/ContentCaptureContext.java index 1692051924f4..b84cb88ccd84 100644 --- a/core/java/android/view/contentcapture/ContentCaptureContext.java +++ b/core/java/android/view/contentcapture/ContentCaptureContext.java @@ -15,7 +15,7 @@ */ package android.view.contentcapture; -import static android.view.contentcapture.ContentCaptureSession.NO_SESSION_ID; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import android.annotation.IntDef; import android.annotation.NonNull; diff --git a/core/java/android/view/contentcapture/ContentCaptureEvent.java b/core/java/android/view/contentcapture/ContentCaptureEvent.java index ea34d948c91a..f49b1beee8ad 100644 --- a/core/java/android/view/contentcapture/ContentCaptureEvent.java +++ b/core/java/android/view/contentcapture/ContentCaptureEvent.java @@ -16,7 +16,7 @@ package android.view.contentcapture; import static android.view.contentcapture.ContentCaptureHelper.getSanitizedString; -import static android.view.contentcapture.ContentCaptureSession.NO_SESSION_ID; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import android.annotation.IntDef; import android.annotation.NonNull; diff --git a/core/java/android/view/contentcapture/ContentCaptureManager.java b/core/java/android/view/contentcapture/ContentCaptureManager.java index b9889276ae0b..954b83b6f9ee 100644 --- a/core/java/android/view/contentcapture/ContentCaptureManager.java +++ b/core/java/android/view/contentcapture/ContentCaptureManager.java @@ -235,6 +235,13 @@ public final class ContentCaptureManager { public static final int RESULT_CODE_SECURITY_EXCEPTION = -1; /** + * ID used to indicate that a session does not exist + * @hide + */ + @SystemApi + public static final int NO_SESSION_ID = 0; + + /** * Timeout for calls to system_server. */ private static final int SYNC_CALLS_TIMEOUT_MS = 5000; diff --git a/core/java/android/view/contentcapture/ContentCaptureSession.java b/core/java/android/view/contentcapture/ContentCaptureSession.java index 012f5e6d3507..39c7210d8dac 100644 --- a/core/java/android/view/contentcapture/ContentCaptureSession.java +++ b/core/java/android/view/contentcapture/ContentCaptureSession.java @@ -17,12 +17,12 @@ package android.view.contentcapture; import static android.view.contentcapture.ContentCaptureHelper.sDebug; import static android.view.contentcapture.ContentCaptureHelper.sVerbose; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import android.annotation.CallSuper; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SystemApi; import android.graphics.Insets; import android.util.DebugUtils; import android.util.Log; @@ -53,13 +53,6 @@ public abstract class ContentCaptureSession implements AutoCloseable { private static final Random sIdGenerator = new Random(); /** - * ID used to indicate that a session does not exist - * @hide - */ - @SystemApi - public static final int NO_SESSION_ID = 0; - - /** * Initial state, when there is no session. * * @hide diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java index 32bca35009a8..9486b0d39bc2 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java @@ -17,7 +17,7 @@ package com.android.server.contentcapture; import static android.service.contentcapture.ContentCaptureService.setClientState; -import static android.view.contentcapture.ContentCaptureSession.NO_SESSION_ID; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import static android.view.contentcapture.ContentCaptureSession.STATE_DISABLED; import static android.view.contentcapture.ContentCaptureSession.STATE_DUPLICATED_ID; import static android.view.contentcapture.ContentCaptureSession.STATE_INTERNAL_ERROR; diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java index aa63e40747ee..06ab426c6698 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java @@ -16,9 +16,9 @@ package com.android.server.contentcapture; import static android.service.contentcapture.ContentCaptureService.setClientState; +import static android.view.contentcapture.ContentCaptureManager.NO_SESSION_ID; import static android.view.contentcapture.ContentCaptureManager.RESULT_CODE_FALSE; import static android.view.contentcapture.ContentCaptureManager.RESULT_CODE_TRUE; -import static android.view.contentcapture.ContentCaptureSession.NO_SESSION_ID; import static android.view.contentcapture.ContentCaptureSession.STATE_ACTIVE; import static android.view.contentcapture.ContentCaptureSession.STATE_DISABLED; import static android.view.contentcapture.ContentCaptureSession.STATE_SERVICE_RESURRECTED; |