Fill in the home page in the preferences when browser is launched first time.
Issue:2554240
Change-Id: Ia63bf9ec7463db4548f88985925ef0759234753d
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 81701dc..5de345f 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -252,7 +252,10 @@
// 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