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,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);
}
}
}

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

@ -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