Merge "Fix Activity leak from ContentCapture Context-Updated event." into sc-v2-dev

This commit is contained in:
Ahaan Ugale
2022-02-01 02:24:21 +00:00
committed by Android (Google) Code Review

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