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:
Allen Su
2023-12-26 08:58:11 +00:00
parent 3b300cbf9f
commit d8695cbf9b
7 changed files with 66 additions and 18 deletions

View File

@@ -71,6 +71,19 @@ public class NotificationControllerTest {
assertThat(result.getNotificationId()).isEqualTo(id);
}
@Test
public void testRemoveNotificationInfo_removed() throws Exception {
String enUS = "en-US";
Set<Integer> uidSet = Set.of(100, 101);
long lastNotificationTime = Calendar.getInstance().getTimeInMillis();
int id = (int) SystemClock.uptimeMillis();
initSharedPreference(enUS, uidSet, 0, 1, lastNotificationTime, id);
mNotificationController.removeNotificationInfo(enUS);
assertThat(mDataManager.getNotificationInfo(enUS)).isNull();
}
@Test
public void testShouldTriggerNotification_inSystemLocale_returnFalse() throws Exception {
int uid = 102;