summaryrefslogtreecommitdiff
path: root/core/java/android/content/ContextWrapper.java
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2018-02-15 13:16:20 -0800
committerSvet Ganov <svetoslavganov@google.com>2018-02-15 20:36:34 -0800
commit59b4babaa033fc168cec5714a56b727cc1d6c8f5 (patch)
treea5e6c079e3142d6b99fdf6d5c32d770dc303f277 /core/java/android/content/ContextWrapper.java
parent7d5beeb25530ec016557f37bb900b201ba4d498c (diff)
ContextWrapper should check before calling wrapped instance for autofill compat
Test: manual bug:73339515 Change-Id: I22cb219d6efb581d63c86de961772d948a7546da
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
-rw-r--r--core/java/android/content/ContextWrapper.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index a788989a7578..b072ee622ad9 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -1000,7 +1000,7 @@ public class ContextWrapper extends Context {
*/
@Override
public boolean isAutofillCompatibilityEnabled() {
- return mBase.isAutofillCompatibilityEnabled();
+ return mBase != null && mBase.isAutofillCompatibilityEnabled();
}
/**
@@ -1008,6 +1008,8 @@ public class ContextWrapper extends Context {
*/
@Override
public void setAutofillCompatibilityEnabled(boolean autofillCompatEnabled) {
- mBase.setAutofillCompatibilityEnabled(autofillCompatEnabled);
+ if (mBase != null) {
+ mBase.setAutofillCompatibilityEnabled(autofillCompatEnabled);
+ }
}
}