Bug 787065: Settings home button should go back home. [r=mifnkle]
authorSriram Ramasubramanian <sriram@mozilla.com>
Fri, 02 Nov 2012 12:31:02 -0700
changeset 112153 4bb16dfa29b49a26326d6946679f94daf94e592e
parent 112152 bfd2ad69935376f7cd83ea4dcb967990bbf4f260
child 112154 131ff198d8c3a316c343fe3cb6f73a21885159bc
push id17445
push usersramasubramanian@mozilla.com
push dateFri, 02 Nov 2012 19:32:25 +0000
treeherdermozilla-inbound@131ff198d8c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmifnkle
bugs787065
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 787065: Settings home button should go back home. [r=mifnkle]
mobile/android/base/GeckoPreferences.java
--- a/mobile/android/base/GeckoPreferences.java
+++ b/mobile/android/base/GeckoPreferences.java
@@ -11,16 +11,17 @@ import org.json.JSONArray;
 import org.json.JSONObject;
 
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.os.Build;
 import android.os.Bundle;
 import android.preference.CheckBoxPreference;
 import android.preference.EditTextPreference;
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceChangeListener;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceGroup;
@@ -56,16 +57,19 @@ public class GeckoPreferences
     public static String PREFS_ANNOUNCEMENTS_ENABLED = NON_PREF_PREFIX + "privacy.announcements.enabled";
     public static String PREFS_UPDATER_AUTODOWNLOAD  = "app.update.autodownload";
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         addPreferencesFromResource(R.xml.preferences);
         registerEventListener("Sanitize:Finished");
+
+        if (Build.VERSION.SDK_INT >= 14)
+            getActionBar().setHomeButtonEnabled(true);
     }
 
     @Override
     public void onWindowFocusChanged(boolean hasFocus) {
         if (!hasFocus)
             return;
 
         mPreferencesList = new ArrayList<String>();