Backed out changeset a9f445169eca (bug 1030738)
authorEd Morley <emorley@mozilla.com>
Fri, 27 Jun 2014 15:39:56 +0100
changeset 191185 cf633fa6f40ba64adf4937d7eb97e55604c00f75
parent 191184 18afe25e9df9170fe813b9babd9e412eae78f029
child 191186 a033a0b332eb8437357277973490e79796c24e7f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1030738
milestone33.0a1
backs outa9f445169eca47c05c51f7d3a7c31a0982e948e2
Backed out changeset a9f445169eca (bug 1030738)
mobile/android/base/preferences/GeckoPreferenceFragment.java
mobile/android/base/preferences/GeckoPreferences.java
--- a/mobile/android/base/preferences/GeckoPreferenceFragment.java
+++ b/mobile/android/base/preferences/GeckoPreferenceFragment.java
@@ -117,19 +117,17 @@ public class GeckoPreferenceFragment ext
             return;
         }
 
         Log.v(LOGTAG, "Setting activity title to " + newTitle);
         activity.setTitle(newTitle);
 
         if (Build.VERSION.SDK_INT >= 14) {
             final ActionBar actionBar = activity.getActionBar();
-            if (actionBar != null) {
-                actionBar.setTitle(newTitle);
-            }
+            actionBar.setTitle(newTitle);
         }
     }
 
     @Override
     public void onResume() {
         // This is a little delicate. Ensure that you do nothing prior to
         // super.onResume that you wouldn't do in onCreate.
         applyLocale(Locale.getDefault());
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -135,19 +135,17 @@ OnSharedPreferenceChangeListener
 
     private void updateActionBarTitle(int title) {
         if (Build.VERSION.SDK_INT >= 14) {
             final String newTitle = getString(title);
             if (newTitle != null) {
                 Log.v(LOGTAG, "Setting action bar title to " + newTitle);
 
                 final ActionBar actionBar = getActionBar();
-                if (actionBar != null) {
-                    actionBar.setTitle(newTitle);
-                }
+                actionBar.setTitle(newTitle);
             }
         }
     }
 
     private void updateTitle(String newTitle) {
         if (newTitle != null) {
             Log.v(LOGTAG, "Setting activity title to " + newTitle);
             setTitle(newTitle);
@@ -357,19 +355,17 @@ OnSharedPreferenceChangeListener
                     return longClickListener.onLongClick(view);
                 }
                 return false;
             }
         });
 
         if (Build.VERSION.SDK_INT >= 14) {
             final ActionBar actionBar = getActionBar();
-            if (actionBar != null) {
-                actionBar.setHomeButtonEnabled(true);
-            }
+            actionBar.setHomeButtonEnabled(true);
         }
 
         // N.B., if we ever need to redisplay the locale selection UI without
         // just finishing and recreating the activity, right here we'll need to
         // capture EXTRA_SHOW_FRAGMENT_TITLE from the intent and store the title ID.
 
         // If launched from notification, explicitly cancel the notification.
         if (intentExtras != null && intentExtras.containsKey(DataReportingNotification.ALERT_NAME_DATAREPORTING_NOTIFICATION)) {