summaryrefslogtreecommitdiff
path: root/core/java/android/app/ContextImpl.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2019-02-19 15:08:59 -0800
committerFelipe Leme <felipeal@google.com>2019-02-21 10:44:39 -0800
commita4f39cd150c11f48ddf8d7f2376909702fe501f7 (patch)
tree86bd30bbd76a2791f377faadc630a4cc81c40b46 /core/java/android/app/ContextImpl.java
parenta48e54edd8ea3600c2a3a75907f8f408583395f1 (diff)
Refactored Autofill properties that are optimized on application level.
Prior to this CL we were just caching whether the service supported compatibility mode for the app, but now we're also caching the logging level and whether the app is whitelisted for augmented autofill - although right now the augmented autofill info is not used, it will allow us to trigger it in the scenarios where autofill is disabled for the app. Bug: 123099842 Bug: 123100824 Test: atest CtsAutoFillServiceTestCases:AugmentedLoginActivityTest \ CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest atest CtsAutoFillServiceTestCases # sanity check, although still flaky Change-Id: Iaf8ea6634ca94e5e61131890ec17c96c2fbb329a
Diffstat (limited to 'core/java/android/app/ContextImpl.java')
-rw-r--r--core/java/android/app/ContextImpl.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 3a1e80dc1c3f..b792ad2a745c 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -19,8 +19,8 @@ package android.app;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
+import android.content.AutofillOptions;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentCaptureOptions;
@@ -215,8 +215,8 @@ class ContextImpl extends Context {
// The name of the split this Context is representing. May be null.
private @Nullable String mSplitName = null;
- private AutofillClient mAutofillClient = null;
- private boolean mIsAutofillCompatEnabled;
+ private @Nullable AutofillClient mAutofillClient = null;
+ private @Nullable AutofillOptions mAutofillOptions;
private ContentCaptureOptions mContentCaptureOptions = null;
@@ -2376,15 +2376,14 @@ class ContextImpl extends Context {
/** @hide */
@Override
- public boolean isAutofillCompatibilityEnabled() {
- return mIsAutofillCompatEnabled;
+ public AutofillOptions getAutofillOptions() {
+ return mAutofillOptions;
}
/** @hide */
- @TestApi
@Override
- public void setAutofillCompatibilityEnabled(boolean autofillCompatEnabled) {
- mIsAutofillCompatEnabled = autofillCompatEnabled;
+ public void setAutofillOptions(AutofillOptions options) {
+ mAutofillOptions = options;
}
/** @hide */