[automerge] Fix Activity leak from ContentCapture Context-Updated event. 2p: 93debeaead

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16764050

Bug: 204891006
Change-Id: I3fa393e9f8e78b1e237ceed70e004949a7defe8c
This commit is contained in:
Ahaan Ugale
2022-01-31 20:58:57 +00:00
committed by Presubmit Automerger Backend

View File

@@ -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);
}