diff options
author | Vivek Sekhar <vsekhar@codeaurora.org> | 2015-10-22 13:50:30 -0700 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-11-05 14:33:37 +0100 |
commit | b0cd8766eee8e598969cf2b408b2f4f859a592af (patch) | |
tree | 6f38578cc4d0a81b142b38df4a88670ed58c18b7 /src/com | |
parent | 68f02f78da525a717c3a7250915d1c7aab76eb2d (diff) | |
download | android_packages_apps_Gello-b0cd8766eee8e598969cf2b408b2f4f859a592af.tar.gz android_packages_apps_Gello-b0cd8766eee8e598969cf2b408b2f4f859a592af.tar.bz2 android_packages_apps_Gello-b0cd8766eee8e598969cf2b408b2f4f859a592af.zip |
Force engine initialization during onCreate
- During stress test on browser we noticed that
registerActivityLifecycleCallbacks.onActivityCreated was not
getting called. This call was required to ensure that the engine was
initialized before launching an activity.Added code to ensure engine is
initialized in onCreate of activity that use engine API's directly.
- Added null check for ComboView.hide method
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/Browser.java | 2 | ||||
-rw-r--r-- | src/com/android/browser/BrowserPreferencesPage.java | 10 | ||||
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/browser/Browser.java b/src/com/android/browser/Browser.java index 8270cfbc..d79b9577 100644 --- a/src/com/android/browser/Browser.java +++ b/src/com/android/browser/Browser.java @@ -119,6 +119,8 @@ public class Browser extends ChromiumApplication { // SWE: Avoid initializing the engine for sandboxed processes. if (!isSandboxContext) { + if (LOGV_ENABLED) + Log.v(LOGTAG, "Browser.onCreate: Main Application"); BrowserSettings.initialize((Context) this); Preloader.initialize((Context) this); } diff --git a/src/com/android/browser/BrowserPreferencesPage.java b/src/com/android/browser/BrowserPreferencesPage.java index 9bb74b5f..4840d431 100644 --- a/src/com/android/browser/BrowserPreferencesPage.java +++ b/src/com/android/browser/BrowserPreferencesPage.java @@ -19,6 +19,7 @@ package com.android.browser; import android.app.Activity; import android.app.Fragment; import android.content.Intent; +import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceActivity; @@ -65,13 +66,12 @@ 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(); + EngineInitializer.initializeSync((Context) getApplicationContext()); + } + super.onCreate(icicle); + if (icicle != null) { return; } diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index dd18c193..e629952b 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -114,7 +114,8 @@ public class PhoneUi extends BaseUi { @Override public void hideComboView() { - mComboView.hideViews(); + if (mComboView != null) + mComboView.hideViews(); } @Override |