Fixed crash when restoring settings to default
As part of restoring settings, the browser activity is restarted.
The pre-created sandbox process was causing a crash during the restart,
so we now make sure to release the pre-created process before restarting
the browser activity.
Change-Id: I580c1e828f801f443e2a9f51010deb2ff00249fd
diff --git a/src/com/android/browser/EngineInitializer.java b/src/com/android/browser/EngineInitializer.java
index 19b553d..6556abb 100644
--- a/src/com/android/browser/EngineInitializer.java
+++ b/src/com/android/browser/EngineInitializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -330,6 +330,9 @@
}
public void onNewIntent(Intent intent) {
+ if (BrowserActivity.ACTION_RESTART.equals(intent.getAction())) {
+ Engine.releaseSpareChildProcess();
+ }
if (mActivityReady) {
mActivity.handleOnNewIntent(intent);
return;