diff options
| author | Michael Kolb <kolby@google.com> | 2011-10-11 10:49:05 -0700 |
|---|---|---|
| committer | Michael Kolb <kolby@google.com> | 2011-10-11 10:49:05 -0700 |
| commit | 938db80ec52fc02fd54027628772d528db0fe3c7 (patch) | |
| tree | 0d6dd5794d5baf680d1fa27b7777a9aef0420eed /src/com | |
| parent | 7d209c5d7af3609eed22b864293c61600df08961 (diff) | |
| download | packages_apps_Browser-938db80ec52fc02fd54027628772d528db0fe3c7.tar.gz packages_apps_Browser-938db80ec52fc02fd54027628772d528db0fe3c7.tar.bz2 packages_apps_Browser-938db80ec52fc02fd54027628772d528db0fe3c7.zip | |
Fix intent handling from other apps in recovery case
Bug: 5433940
When browser had a crash recovery state, the view intent from
the other app was dropped.
Change-Id: I8eaafa7ad792fa2048ad33886b7394c31ca97e21
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/browser/Controller.java | 11 | ||||
| -rw-r--r-- | src/com/android/browser/CrashRecoveryHandler.java | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 81ba94116..686cfcda0 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -262,13 +262,13 @@ public class Controller void start(final Bundle icicle, final Intent intent) { boolean noCrashRecovery = intent.getBooleanExtra(NO_CRASH_RECOVERY, false); if (icicle != null || noCrashRecovery) { - doStart(icicle, intent); + doStart(icicle, intent, false); } else { mCrashRecoveryHandler.startRecovery(intent); } } - void doStart(final Bundle icicle, final Intent intent) { + void doStart(final Bundle icicle, final Intent intent, final boolean fromCrash) { // Unless the last browser usage was within 24 hours, destroy any // remaining incognito tabs. @@ -296,13 +296,14 @@ public class Controller GoogleAccountLogin.startLoginIfNeeded(mActivity, new Runnable() { @Override public void run() { - onPreloginFinished(icicle, intent, currentTabId, restoreIncognitoTabs); + onPreloginFinished(icicle, intent, currentTabId, restoreIncognitoTabs, + fromCrash); } }); } private void onPreloginFinished(Bundle icicle, Intent intent, long currentTabId, - boolean restoreIncognitoTabs) { + boolean restoreIncognitoTabs, boolean fromCrash) { if (currentTabId == -1) { BackgroundHandler.execute(new PruneThumbnails(mActivity, null)); final Bundle extra = intent.getExtras(); @@ -346,7 +347,7 @@ public class Controller setActiveTab(mTabControl.getCurrentTab()); // Handle the intent if needed. If icicle != null, we are restoring // and the intent will be stale - ignore it. - if (icicle == null) { + if (icicle == null || fromCrash) { mIntentHandler.onNewIntent(intent); } } diff --git a/src/com/android/browser/CrashRecoveryHandler.java b/src/com/android/browser/CrashRecoveryHandler.java index c2fbbd2f4..396985ab5 100644 --- a/src/com/android/browser/CrashRecoveryHandler.java +++ b/src/com/android/browser/CrashRecoveryHandler.java @@ -233,7 +233,7 @@ public class CrashRecoveryHandler { } updateLastRecovered(mRecoveryState != null ? System.currentTimeMillis() : 0); - mController.doStart(mRecoveryState, intent); + mController.doStart(mRecoveryState, intent, true); mRecoveryState = null; } |
