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

Commit 943f573c authored by Zoey Chen's avatar Zoey Chen
Browse files

[Settings] User changes the ordering, should \updtae the list eventhough the dialog not pop up

Bug: 410742839
Test: manual
Test: atest
SettingsRoboTests: com.android.settings.localepicker.LocaleListEditorTest
Flag: EXEMPT bugfix
Change-Id: I4928e1fb14f09d575856355de607cd012f089aa5
parent fdfc5344
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ class LocaleDragAndDropAdapter
        });
    }

    public void notifyListChanged(LocaleStore.LocaleInfo localeInfo) {
    public void notifyListChanged() {
        if (listChanged()) {
            mFeedItemList = new ArrayList<>(mCacheItemList);
            notifyDataSetChanged();
+3 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
                    showUnavailableDialog(localeInfo);
                }
            } else {
                mAdapter.notifyListChanged(localeInfo);
                mAdapter.notifyListChanged();
            }
            mAdapter.setCacheItemList();
        } else if (requestCode == DIALOG_ADD_SYSTEM_LOCALE) {
@@ -550,6 +550,8 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
        if (oldLocale != null && !newLocale.getLocale().equals(
                oldLocale.getLocale())) {
            displaySystemDialogFragment(newLocale, false);
        } else {
            mAdapter.doTheUpdate();
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ public class LocaleListEditorTest {
        mLocaleListEditor.onActivityResult(REQUEST_CONFIRM_SYSTEM_DEFAULT, Activity.RESULT_CANCELED,
                mIntent);

        verify(mAdapter).notifyListChanged(mLocaleInfo);
        verify(mAdapter).notifyListChanged();
    }

    @Test