AndroidX Webkit: demo custom interstitials
No change to production logic, only testapp.
This adds 2 new Activities to demo custom interstitials.
CustomInterstitialActivity shows the test safe browsing site, but
overrides WebView's default interstitial with a custom interstitial
(implemented as a separate Activity, PopupInterstitialActivity).
The custom interstitial also demos how to implement a reporting opt-in
checkbox, including linking to the privacy policy URL
(WebViewCompat#getSafeBrowsingPrivacyPolicyUrl).
Bug: 124773936
Test: Manual - see uploaded video recording
Change-Id: I9a95b64bda178fd36210f3cb0ded0901aad39641
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
index 740102a..c58e396 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
@@ -90,6 +90,9 @@
new MenuListView.MenuItem(
getResources().getString(R.string.unattached_activity_title),
new Intent(activityContext, UnattachedActivity.class)),
+ new MenuListView.MenuItem(
+ getResources().getString(R.string.custom_interstitial_activity_title),
+ new Intent(activityContext, CustomInterstitialActivity.class)),
};
listView.setItems(menuItems);
}