| Index: content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
|
| diff --git a/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java b/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
|
| index bddb70f316753ae564bb10700aea9dad876fadb3..6ab887e98770aae1d5619c17dd7fc4d95f5e6b47 100644
|
| --- a/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
|
| +++ b/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
|
| @@ -18,6 +18,7 @@ import org.chromium.content.browser.ContentVideoView;
|
| import org.chromium.content.browser.ContentView;
|
| import org.chromium.content.browser.DeviceUtils;
|
| import org.chromium.content.common.CommandLine;
|
| +import org.chromium.content.common.ProcessInitException;
|
| import org.chromium.ui.gfx.ActivityNativeWindow;
|
|
|
| /**
|
| @@ -50,29 +51,32 @@ public class ContentShellActivity extends ChromiumActivity {
|
| waitForDebuggerIfNeeded();
|
|
|
| DeviceUtils.addDeviceSpecificUserAgentSwitch(this);
|
| -
|
| - LibraryLoader.ensureInitialized();
|
| -
|
| - setContentView(R.layout.content_shell_activity);
|
| - mShellManager = (ShellManager) findViewById(R.id.shell_container);
|
| - mActivityNativeWindow = new ActivityNativeWindow(this);
|
| - mActivityNativeWindow.restoreInstanceState(savedInstanceState);
|
| - mShellManager.setWindow(mActivityNativeWindow);
|
| - ContentVideoView.registerContentVideoViewContextDelegate(
|
| - new ActivityContentVideoViewDelegate(this));
|
| -
|
| - String startupUrl = getUrlFromIntent(getIntent());
|
| - if (!TextUtils.isEmpty(startupUrl)) {
|
| - mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl));
|
| - }
|
| -
|
| - if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTOMATIC)) {
|
| - String shellUrl = DEFAULT_SHELL_URL;
|
| - if (savedInstanceState != null
|
| + try {
|
| + LibraryLoader.ensureInitialized();
|
| +
|
| + setContentView(R.layout.content_shell_activity);
|
| + mShellManager = (ShellManager) findViewById(R.id.shell_container);
|
| + mActivityNativeWindow = new ActivityNativeWindow(this);
|
| + mActivityNativeWindow.restoreInstanceState(savedInstanceState);
|
| + mShellManager.setWindow(mActivityNativeWindow);
|
| + ContentVideoView.registerContentVideoViewContextDelegate(
|
| + new ActivityContentVideoViewDelegate(this));
|
| +
|
| + String startupUrl = getUrlFromIntent(getIntent());
|
| + if (!TextUtils.isEmpty(startupUrl)) {
|
| + mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl));
|
| + }
|
| + if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTOMATIC)) {
|
| + String shellUrl = DEFAULT_SHELL_URL;
|
| + if (savedInstanceState != null
|
| && savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) {
|
| - shellUrl = savedInstanceState.getString(ACTIVE_SHELL_URL_KEY);
|
| + shellUrl = savedInstanceState.getString(ACTIVE_SHELL_URL_KEY);
|
| + }
|
| + mShellManager.launchShell(shellUrl);
|
| }
|
| - mShellManager.launchShell(shellUrl);
|
| + } catch (ProcessInitException e) {
|
| + Log.e(TAG, "ContentView initialization failed.", e);
|
| + finish();
|
| }
|
| }
|
|
|
|
|