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

Commit 2e50da42 authored by Calvin Pan's avatar Calvin Pan Committed by Android (Google) Code Review
Browse files

Merge "Fix fetching incorrect items after filtering"

parents 17675424 d3df5bdf
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -264,10 +264,9 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
    }

    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {
        SuggestedLocaleAdapter adapter = (SuggestedLocaleAdapter) getListAdapter();
    public void onListItemClick(ListView parent, View v, int position, long id) {
        final LocaleStore.LocaleInfo locale =
                (LocaleStore.LocaleInfo) adapter.getItem(position);
                (LocaleStore.LocaleInfo) parent.getAdapter().getItem(position);
        // Special case for resetting the app locale to equal the system locale.
        boolean isSystemLocale = locale.isSystemLocale();
        boolean isRegionLocale = locale.getParent() != null;
@@ -280,7 +279,7 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
        } else {
            LocalePickerWithRegion selector = LocalePickerWithRegion.createCountryPicker(
                    getContext(), mListener, locale, mTranslatedOnly /* translate only */,
                    adapter.getAppPackageName());
                    mAppPackageName);
            if (selector != null) {
                getFragmentManager().beginTransaction()
                        .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
+0 −4
Original line number Diff line number Diff line
@@ -348,8 +348,4 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
    public Filter getFilter() {
        return new FilterByNativeAndUiNames();
    }

    public String getAppPackageName() {
        return mAppPackageName;
    }
}