OSDN Git Service

Fill in the home page in the preferences when browser is launched first time.
authorShimeng (Simon) Wang <swang@google.com>
Mon, 29 Mar 2010 23:13:09 +0000 (16:13 -0700)
committerShimeng (Simon) Wang <swang@google.com>
Tue, 30 Mar 2010 00:24:01 +0000 (17:24 -0700)
Issue:2554240
Change-Id: Ia63bf9ec7463db4548f88985925ef0759234753d

src/com/android/browser/BrowserSettings.java

index 81701dc..5de345f 100644 (file)
@@ -252,7 +252,10 @@ class BrowserSettings extends Observable {
         // Set the default value for the Geolocation database path.
         geolocationDatabasePath = ctx.getDir("geolocation", 0).getPath();
 
-        homeUrl = getFactoryResetHomeUrl(ctx);
+        if (p.getString(PREF_HOMEPAGE, "") == "") {
+            // No home page preferences is set, set it to default.
+            setHomePage(ctx, getFactoryResetHomeUrl(ctx));
+        }
 
         // the cost of one cached page is ~3M (measured using nytimes.com). For
         // low end devices, we only cache one page. For high end devices, we try