add an intent parameter to skip crash recovery

This is useful for testing, where crash recovery is handled by the
tests and also dialog interaction in undesirabls and also dialog
interaction in undesirable. Also included a minor unrelated change
to test app to handle/disable pop windows.

Change-Id: Iab337b31c803d50b74ba24ca80cc614fa752a846
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 {