Set a persistent default home page for the browser.

Fix for buganizer issue 1793708: 'Set home page' is empty after resetting to default.  Keep track of the base for the default home page in a final variable.  In loadFromDb, add the client to that (instead of to homeUrl, which could result in the client showing up twice in homeUrl) to get the homeUrl.  Then, in resetDefaultPreferences, call setHomePage, with that same construction, so if the user clears their settings, they will return to having the default home page.
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 8bbdbd6..e47ed60 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -53,7 +53,9 @@
  */
 class BrowserSettings extends Observable {
 
-    // Public variables for settings
+    private static final String DEFAULT_HOME_URL =
+            "http://www.google.com/m?client=ms-";
+    // Private variables for settings
     // NOTE: these defaults need to be kept in sync with the XML
     // until the performance of PreferenceManager.setDefaultValues()
     // is improved.
@@ -67,7 +69,7 @@
     private boolean saveFormData = true;
     private boolean openInBackground = false;
     private String defaultTextEncodingName;
-    private String homeUrl = "http://www.google.com/m?client=ms-";
+    private String homeUrl;
     private boolean loginInitialized = false;
     private boolean autoFitPage = true;
     private boolean landscapeOnly = false;
@@ -208,7 +210,8 @@
         // Set the default value for the Application Caches path.
         appCachePath = ctx.getDir("appcache", 0).getPath();
 
-        homeUrl += Partner.getString(ctx.getContentResolver(), Partner.CLIENT_ID);
+        homeUrl = DEFAULT_HOME_URL +
+                Partner.getString(ctx.getContentResolver(), Partner.CLIENT_ID);
 
         // Load the defaults from the xml
         // This call is TOO SLOW, need to manually keep the defaults
@@ -453,12 +456,14 @@
         db.clearHttpAuthUsernamePassword();
     }
 
-    /*package*/ void resetDefaultPreferences(Context context) {
+    /*package*/ void resetDefaultPreferences(Context ctx) {
         SharedPreferences p =
-            PreferenceManager.getDefaultSharedPreferences(context);
+            PreferenceManager.getDefaultSharedPreferences(ctx);
         p.edit().clear().commit();
-        PreferenceManager.setDefaultValues(context, R.xml.browser_preferences,
+        PreferenceManager.setDefaultValues(ctx, R.xml.browser_preferences,
                 true);
+        setHomePage(ctx, DEFAULT_HOME_URL +
+                Partner.getString(ctx.getContentResolver(), Partner.CLIENT_ID));
     }
 
     // Private constructor that does nothing.