bug 1030738 - NullPointerException when getting action bar r=rnewman

This commit is contained in:
Brad Lassey 2014-06-26 09:41:42 -04:00
Родитель 2c21aad5fc
Коммит ccfc9b8b72
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

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

Просмотреть файл

@ -140,10 +140,12 @@ OnSharedPreferenceChangeListener
Log.v(LOGTAG, "Setting action bar title to " + newTitle);
final ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setTitle(newTitle);
}
}
}
}
private void updateTitle(String newTitle) {
if (newTitle != null) {
@ -360,8 +362,10 @@ OnSharedPreferenceChangeListener
if (Build.VERSION.SDK_INT >= 14) {
final ActionBar actionBar = getActionBar();
if (actionBar != null) {
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