Fix bug #13883976 Settings crash on long-tapping and swiping in Language & Input screen
- fix potential NPE Change-Id: I12045f420d5b2a4f349e59a04141153cd2e46378
This commit is contained in:
@@ -740,8 +740,11 @@ public class SettingsActivity extends Activity
|
|||||||
String title;
|
String title;
|
||||||
if (titleRes > 0) {
|
if (titleRes > 0) {
|
||||||
title = getString(titleRes);
|
title = getString(titleRes);
|
||||||
} else {
|
} else if (titleText != null) {
|
||||||
title = titleText.toString();
|
title = titleText.toString();
|
||||||
|
} else {
|
||||||
|
// There not much we can do in that case
|
||||||
|
title = "";
|
||||||
}
|
}
|
||||||
startWithFragment(fragmentClass, args, resultTo, resultRequestCode, title);
|
startWithFragment(fragmentClass, args, resultTo, resultRequestCode, title);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user