summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorAhaan Ugale <augale@google.com>2021-07-21 19:31:17 -0700
committerAhaan Ugale <augale@google.com>2021-07-23 03:24:42 +0000
commit0cfcde8d5eb606e9e6b6a3e6d63fc4f1482f54f6 (patch)
tree826e7135affa4e985a54295cf4d7de8e822a5780 /core/java/android
parent5d5661a5fd1d06e17341c02974202c457df3e91f (diff)
Copy ContentCaptureOptions into derived Contexts
When a new Context is created from the Activity Context and used to inflate views, Content Capture is disabled for those views because the new Context is missing ContentCaptureOptions. Fix: 194321297 Test: atest CtsContentCaptureServiceTestCases Test: manual - view appeared events come through Change-Id: I934d41953c7668e371d5961b66187ecd15408e3e
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/ContextImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index f52fdc562b13..4db1f71e8256 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -26,6 +26,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UiContext;
import android.compat.annotation.UnsupportedAppUsage;
+import android.content.AttributionSource;
import android.content.AutofillOptions;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -60,7 +61,6 @@ import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
-import android.content.AttributionSource;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
@@ -3120,6 +3120,7 @@ class ContextImpl extends Context {
mForceDisplayOverrideInResources = container.mForceDisplayOverrideInResources;
mIsConfigurationBasedContext = container.mIsConfigurationBasedContext;
mContextType = container.mContextType;
+ mContentCaptureOptions = container.mContentCaptureOptions;
} else {
mBasePackageName = packageInfo.mPackageName;
ApplicationInfo ainfo = packageInfo.getApplicationInfo();