summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSagar Dhawan <sdhawan@codeaurora.org>2015-10-15 20:00:21 -0700
committerjrizzoli <joey@cyanogenmoditalia.it>2015-11-05 14:33:36 +0100
commit35db4fa3881cf9bf7c5057a065a79a8451216ce0 (patch)
treeafe4e92e0f0264bfe53034e760a05668280938ef /src/com
parentb8531611214c9f694f5e9f459e4a63794a5c5d74 (diff)
downloadandroid_packages_apps_Gello-35db4fa3881cf9bf7c5057a065a79a8451216ce0.tar.gz
android_packages_apps_Gello-35db4fa3881cf9bf7c5057a065a79a8451216ce0.tar.bz2
android_packages_apps_Gello-35db4fa3881cf9bf7c5057a065a79a8451216ce0.zip
Fix Fragments calling into uninitialized Engine
Change-Id: I244e722c39efedda91c21b0fa86bddd5ef6dec19
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserPreferencesPage.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserPreferencesPage.java b/src/com/android/browser/BrowserPreferencesPage.java
index e0e7095b..9bb74b5f 100644
--- a/src/com/android/browser/BrowserPreferencesPage.java
+++ b/src/com/android/browser/BrowserPreferencesPage.java
@@ -23,17 +23,20 @@ import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.text.TextUtils;
+import android.util.Log;
import android.view.MenuItem;
import com.android.browser.preferences.AboutPreferencesFragment;
import com.android.browser.preferences.GeneralPreferencesFragment;
+
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
public class BrowserPreferencesPage extends Activity {
public static String sResultExtra;
+ public static String LOGTAG = "BrowserPreferencesPage";
private static ArrayList<String> sUpdatedUrls =
new ArrayList<String>(); //List of URLS for whom settings were updated
@@ -63,10 +66,14 @@ public class BrowserPreferencesPage extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
-
if (icicle != null) {
return;
}
+ if (!EngineInitializer.isInitialized()) {
+ Log.e(LOGTAG, "Engine not Initialized");
+ finish();
+ return;
+ }
sResultExtra = "";
sUpdatedUrls.clear();