Reload page on settings change
- Reload current webpage when user tweaks browser settings
CR-Fixed: 5570
Change-Id: I643b857b23e2f39e6f54c3d38eb83622e0794d96
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 2b66988..4a83f8a 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -134,6 +134,7 @@
public static final String INCOGNITO_URI = "chrome://incognito";
public static final String EXTRA_REQUEST_CODE = "_fake_request_code_";
public static final String EXTRA_RESULT_CODE = "_fake_result_code_";
+ public static final String EXTRA_UPDATED_URLS = "updated_urls";
// Remind switch to data connection if wifi is unavailable
private static final int NETWORK_SWITCH_TYPE_OK = 1;
@@ -1334,6 +1335,17 @@
String action = intent.getStringExtra(Intent.EXTRA_TEXT);
if (PreferenceKeys.PREF_PRIVACY_CLEAR_HISTORY.equals(action)) {
mTabControl.removeParentChildRelationShips();
+ } else if (action.equals(PreferenceKeys.ACTION_RELOAD_PAGE)) {
+ ArrayList<String> origins =
+ intent.getStringArrayListExtra(EXTRA_UPDATED_URLS);
+ if (origins.isEmpty()) {
+ mTabControl.reloadLiveTabs();
+ }
+ else{
+ for (String origin : origins){
+ mTabControl.findAndReload(origin);
+ }
+ }
}
}
break;