Remove the xml entry when the system language is removed
Bug: 301395074 Test: atest SettingsRoboTests:com.android.settings.localepicker Change-Id: Ic771cd5146ab954c3da65748bf87cd14d30770b4
This commit is contained in:
@@ -62,6 +62,17 @@ public class LocaleNotificationDataManager {
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes one entry with the corresponding locale from the {@link SharedPreferences}.
|
||||
*
|
||||
* @param locale A locale which the application sets to
|
||||
*/
|
||||
public void removeNotificationInfo(String locale) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(mContext).edit();
|
||||
editor.remove(locale);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link NotificationInfo} with the associated locale from the
|
||||
* {@link SharedPreferences}.
|
||||
|
||||
Reference in New Issue
Block a user