diff options
| author | 2022-02-01 02:24:21 +0000 | |
|---|---|---|
| committer | 2022-02-01 02:24:21 +0000 | |
| commit | 7a2c5b7d9f5281deda6cd6eabdf354311e2dfc90 (patch) | |
| tree | ca57bcd3c6556cfa7ed8fcf3fe9524cec8702dc7 | |
| parent | b73f1acdab311607e5af27da4bfd9770771b36d8 (diff) | |
| parent | 93debeaead56e276a6b8d041de644e3c7dad72ff (diff) | |
Merge "Fix Activity leak from ContentCapture Context-Updated event." into sc-v2-dev
| -rw-r--r-- | core/java/android/view/contentcapture/ContentCaptureSession.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/contentcapture/ContentCaptureSession.java b/core/java/android/view/contentcapture/ContentCaptureSession.java index cc47f09d4e8d..a4db84055142 100644 --- a/core/java/android/view/contentcapture/ContentCaptureSession.java +++ b/core/java/android/view/contentcapture/ContentCaptureSession.java @@ -290,6 +290,8 @@ public abstract class ContentCaptureSession implements AutoCloseable { * <p>Typically used to change the context associated with the default session from an activity. */ public final void setContentCaptureContext(@Nullable ContentCaptureContext context) { + if (!isContentCaptureEnabled()) return; + mClientContext = context; updateContentCaptureContext(context); } |