From bf01eeafa0fb71c81e9721bd0f15afcf18cdd623 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Mon, 26 Nov 2018 15:53:21 -0800 Subject: [PATCH] Set WebView as important for Content Capture. Test: echo 'In TreeHugger we trust!' Bug: 111276913 Change-Id: I28c4691c9b4adb8163eaff15f7e498f637a162ad --- core/java/android/webkit/WebView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 4f1417ed23bbc..414cb8f30fc75 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -410,6 +410,9 @@ public class WebView extends AbsoluteLayout if (getImportantForAutofill() == IMPORTANT_FOR_AUTOFILL_AUTO) { setImportantForAutofill(IMPORTANT_FOR_AUTOFILL_YES); } + if (getImportantForContentCapture() == IMPORTANT_FOR_CONTENT_CAPTURE_AUTO) { + setImportantForContentCapture(IMPORTANT_FOR_CONTENT_CAPTURE_YES); + } if (context == null) { throw new IllegalArgumentException("Invalid context argument");