// `orbotStatus` is public static so it can be accessed from `OrbotProxyHelper`. It is also used in `onCreate()`.
public static String orbotStatus;
+ // `webViewTitle` is public static so it can be accessed from `CreateHomeScreenShorcutDialog`. It is also used in `onCreate()`.
+ public static String webViewTitle;
+
// `navigatingHistory` is used in `onCreate()` and `onNavigationItemSelected()`.
private boolean navigatingHistory;
// Set the favorite icon when it changes.
@Override
public void onReceivedIcon(WebView view, Bitmap icon) {
- // Save a copy of the favorite icon for use if a shortcut is added to the home screen.
+ // Save a copy of the favorite icon.
favoriteIcon = icon;
// Place the favorite icon in the appBar.
imageViewFavoriteIcon.setImageBitmap(Bitmap.createScaledBitmap(icon, 64, 64, true));
}
+ // Save a copy of the title when it changes.
+ @Override
+ public void onReceivedTitle(WebView view, String title) {
+ // Save a copy of the title.
+ webViewTitle = title;
+ }
+
// Enter full screen video
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {