Utilities.trim never returns null.

This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.

Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
(cherry picked from commit 56be73be80)
This commit is contained in:
Andy Wickham
2022-01-18 09:13:43 -08:00
parent fea22ae7e9
commit 5f0a5eb877
3 changed files with 5 additions and 4 deletions
@@ -202,8 +202,7 @@ public class LoaderCursor extends CursorWrapper {
* Returns the title or empty string
*/
private String getTitle() {
String title = getString(titleIndex);
return TextUtils.isEmpty(title) ? "" : Utilities.trim(title);
return Utilities.trim(getString(titleIndex));
}
/**