From 9e78f51d14b9a16d645b754e073f549a5891db26 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Wed, 4 May 2011 11:45:11 -0700 Subject: 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 --- src/com/android/browser/Controller.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/com/android') 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 @@ public class Controller // "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 @@ public class Controller } 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 { -- cgit v1.1