OSDN Git Service

Prevent a null pointer exception.
authorLeon Scroggins III <scroggo@google.com>
Mon, 27 Sep 2010 16:45:34 +0000 (12:45 -0400)
committerLeon Scroggins III <scroggo@google.com>
Mon, 27 Sep 2010 16:58:47 +0000 (12:58 -0400)
Bug: 3035805
Change-Id: Id6c7d2105087e3ad4b250da6d4944409d01e55a9

src/com/android/browser/BrowserActivity.java

index 098e3b2..72ed2ec 100644 (file)
@@ -191,6 +191,9 @@ public class BrowserActivity extends Activity
 
         mResolver = getContentResolver();
 
+        // Keep a settings instance handy.
+        mSettings = BrowserSettings.getInstance();
+
         // If this was a web search request, pass it on to the default web
         // search provider and finish this activity.
         if (handleWebSearchIntent(getIntent())) {
@@ -225,8 +228,6 @@ public class BrowserActivity extends Activity
         // Open the icon database and retain all the bookmark urls for favicons
         retainIconsOnStartup();
 
-        // Keep a settings instance handy.
-        mSettings = BrowserSettings.getInstance();
         mSettings.setTabControl(mTabControl);
 
         PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);