From b3b0fb3d2db88085e2ef2f5ccaf2a2aa068657d0 Mon Sep 17 00:00:00 2001 From: Sarah Chin Date: Thu, 27 Oct 2022 22:05:15 -0700 Subject: [PATCH] Create WebView using Activity context Create WebView using the Activity context instead of the Application context. This ensures that the WebView is tied to the life of the Activity and not the Application. Test: manual testing Test: CTS test Bug: 256047823 Change-Id: Ib3aff49ab0fb297194394d11a16937369afcc6a0 --- .../src/com/android/carrierdefaultapp/SliceStoreActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SliceStoreActivity.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SliceStoreActivity.java index 24cb5f948474d..602e31cbd1308 100644 --- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SliceStoreActivity.java +++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SliceStoreActivity.java @@ -85,7 +85,7 @@ public class SliceStoreActivity extends Activity { SliceStoreBroadcastReceiver.updateSliceStoreActivity(mCapability, this); - mWebView = new WebView(getApplicationContext()); + mWebView = new WebView(this); setContentView(mWebView); mWebView.loadUrl(mUrl.toString()); // TODO(b/245882601): Get back response from WebView