Make pre-upgrade footer appear more consistently

It's useful info regardless of whether the NLS is enabled

Test: PreUpgradePreferenceControllerTest
Fixes: 233963916

Change-Id: Idc6b2cebe18b119052233775bd4dcd561fd8b4fa
This commit is contained in:
Julia Reynolds
2023-01-27 16:38:34 -05:00
parent e0da6513dc
commit 3bab3c429c
2 changed files with 7 additions and 22 deletions

View File

@@ -62,17 +62,8 @@ public class PreUpgradePreferenceControllerTest {
mController.setUserId(0);
}
@Test
public void testAvailable_notGranted() {
when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(false);
mController.setTargetSdk(Build.VERSION_CODES.S);
assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
}
@Test
public void testAvailable_lowTargetSdk_noCustomizations() {
when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true);
mController.setTargetSdk(Build.VERSION_CODES.S);
when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter());
@@ -81,7 +72,6 @@ public class PreUpgradePreferenceControllerTest {
@Test
public void testAvailable_lowTargetSdk_customizations() {
when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true);
mController.setTargetSdk(Build.VERSION_CODES.S);
NotificationListenerFilter nlf = new NotificationListenerFilter();
nlf.setTypes(FLAG_FILTER_TYPE_CONVERSATIONS);
@@ -92,7 +82,6 @@ public class PreUpgradePreferenceControllerTest {
@Test
public void testAvailable_highTargetSdk_noCustomizations() {
when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true);
mController.setTargetSdk(Build.VERSION_CODES.CUR_DEVELOPMENT + 1);
when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter());