[Language] Should show confirm dialog when deleting the system language
and making the second language automatically become the system language Bug: 286508825 Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest Change-Id: I556eecc9eec1ddcdb8947d5ba69d0db2c016e33c
This commit is contained in:
@@ -395,10 +395,13 @@ class LocaleDragAndDropAdapter
|
||||
// drag locale's original position to the top.
|
||||
mDragLocale = (LocaleStore.LocaleInfo) savedInstanceState.getSerializable(
|
||||
CFGKEY_DRAG_LOCALE);
|
||||
mFeedItemList.removeIf(
|
||||
localeInfo -> TextUtils.equals(localeInfo.getId(), mDragLocale.getId()));
|
||||
mFeedItemList.add(0, mDragLocale);
|
||||
notifyItemRangeChanged(0, mFeedItemList.size());
|
||||
if (mDragLocale != null) {
|
||||
mFeedItemList.removeIf(
|
||||
localeInfo -> TextUtils.equals(localeInfo.getId(),
|
||||
mDragLocale.getId()));
|
||||
mFeedItemList.add(0, mDragLocale);
|
||||
notifyItemRangeChanged(0, mFeedItemList.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user