Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 075cf4e4 authored by David Liu's avatar David Liu
Browse files

Fix crash in SettingsSpinnerAdapter

getItem(position) will return T but not String. It'll always crash if T is not String.

Bug: 406736217
Test: manual
Flag: EXEMPT bugfix
Change-Id: Ic85341cd66770792ad986fa34a461d9eed95dc18
parent c85088a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -76,8 +76,8 @@ public class SettingsSpinnerAdapter<T> extends ArrayAdapter<T> {
        if (iconView != null) {
            iconView.setVisibility((position == mSelectedPosition) ? View.VISIBLE : View.GONE);
        }
        String item = (String) getItem(position);
        textView.setText(item);
        T item = getItem(position);
        textView.setText(item == null ? "" : item.toString());
        return view;
    }