summaryrefslogtreecommitdiff
path: root/core/java/android/content/ContextWrapper.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2017-10-04 09:56:21 -0700
committerFelipe Leme <felipeal@google.com>2017-10-04 12:23:23 -0700
commitbb567ae6c0374e5fe8d62273234cf470577133de (patch)
treef3204f3cfcda1cc576b66826beddf89a36665cf5 /core/java/android/content/ContextWrapper.java
parent0f6e9b5a79ffd82c3276b5e3e7723280884ddb5d (diff)
Sets AutofillClient on attachBaseContext()
When an activity overrides attachBaseContext(), the attached context must share the same AutofillCient, otherwise it will break autofill in the activity. Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.AttachedContextActivityTest Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases Fixes: 67350639 Change-Id: I6b0c4c2fab5fa68eb6ee0714e107ca0816efb2cb
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
-rw-r--r--core/java/android/content/ContextWrapper.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index a9fd58bc950c..85acdc6b8101 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -37,6 +37,7 @@ import android.os.Looper;
import android.os.UserHandle;
import android.view.Display;
import android.view.DisplayAdjustments;
+import android.view.autofill.AutofillManager.AutofillClient;
import java.io.File;
import java.io.FileInputStream;
@@ -967,7 +968,24 @@ public class ContextWrapper extends Context {
/**
* @hide
*/
+ @Override
public int getNextAutofillId() {
return mBase.getNextAutofillId();
}
+
+ /**
+ * @hide
+ */
+ @Override
+ public AutofillClient getAutofillClient() {
+ return mBase.getAutofillClient();
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public void setAutofillClient(AutofillClient client) {
+ mBase.setAutofillClient(client);
+ }
}