bug 1030738 - NullPointerException when getting action bar r=rnewman

This commit is contained in:
Brad Lassey 2014-06-26 09:41:42 -04:00
parent 02952ad167
commit 079242066b
2 changed files with 9 additions and 3 deletions

View File

@ -122,7 +122,9 @@ public class GeckoPreferenceFragment extends PreferenceFragment {
if (Build.VERSION.SDK_INT >= 14) {
final ActionBar actionBar = activity.getActionBar();
actionBar.setTitle(newTitle);
if (actionBar != null) {
actionBar.setTitle(newTitle);
}
}
}

View File

@ -140,7 +140,9 @@ OnSharedPreferenceChangeListener
Log.v(LOGTAG, "Setting action bar title to " + newTitle);
final ActionBar actionBar = getActionBar();
actionBar.setTitle(newTitle);
if (actionBar != null) {
actionBar.setTitle(newTitle);
}
}
}
}
@ -360,7 +362,9 @@ OnSharedPreferenceChangeListener
if (Build.VERSION.SDK_INT >= 14) {
final ActionBar actionBar = getActionBar();
actionBar.setHomeButtonEnabled(true);
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
}
}
// N.B., if we ever need to redisplay the locale selection UI without