Merge "change navscreen in landscape"
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 0f33380..5498d6d 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -133,6 +133,9 @@
// "source" parameter for Google search through simplily type
final static String GOOGLE_SEARCH_SOURCE_TYPE = "browser-type";
+ // "no-crash-recovery" parameter in intetnt to suppress crash recovery
+ final static String NO_CRASH_RECOVERY = "no-crash-recovery";
+
private Activity mActivity;
private UI mUi;
private TabControl mTabControl;
@@ -254,7 +257,8 @@
}
void start(final Bundle icicle, final Intent intent) {
- if (icicle != null) {
+ boolean noCrashRecovery = intent.getBooleanExtra(NO_CRASH_RECOVERY, false);
+ if (icicle != null || noCrashRecovery) {
mCrashRecoveryHandler.clearState();
doStart(icicle, intent);
} else {
diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java
index 3e7515f..a635f0b 100644
--- a/tests/src/com/android/browser/PopularUrlsTest.java
+++ b/tests/src/com/android/browser/PopularUrlsTest.java
@@ -77,6 +77,7 @@
super.setUp();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("about:blank"));
+ i.putExtra(Controller.NO_CRASH_RECOVERY, true);
setActivityIntent(i);
mActivity = getActivity();
mController = mActivity.getController();
diff --git a/tests/src/com/android/browser/TestWebChromeClient.java b/tests/src/com/android/browser/TestWebChromeClient.java
index 53f8db3..dd84b3a 100644
--- a/tests/src/com/android/browser/TestWebChromeClient.java
+++ b/tests/src/com/android/browser/TestWebChromeClient.java
@@ -84,7 +84,9 @@
@Override
public boolean onCreateWindow(WebView view, boolean dialog,
boolean userGesture, Message resultMsg) {
- return mWrappedClient.onCreateWindow(view, dialog, userGesture, resultMsg);
+ // do not open any new pop-ups
+ resultMsg.sendToTarget();
+ return true;
}
/** {@inheritDoc} */
diff --git a/tools/get_search_engines.py b/tools/get_search_engines.py
index bd6e5f8..86393f1 100755
--- a/tools/get_search_engines.py
+++ b/tools/get_search_engines.py
@@ -86,7 +86,7 @@
str = str.strip('"')
str = str.replace('&', '&').replace('<', '<').replace('>', '>')
str = str.replace('"', '"').replace('\'', ''')
- str = re.sub(r'\\x([a-fA-F0-9]+)', r'&#x\1;', str)
+ str = re.sub(r'\\x([a-fA-F0-9]{1,4})', r'&#x\1;', str)
return str