Snap for 10043601 from 83c04b32d1 to udc-release

Change-Id: I1dbedd43a26ea9361c2f653a2c386c5dda6473cd
This commit is contained in:
Android Build Coastguard Worker
2023-05-01 23:38:45 +00:00
3 changed files with 7 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ public class MemtagHelper {
"persist.device_config.runtime_native_boot.bootloader_override";
public static boolean isForcedOff() {
return TextUtils.equals("force_on", SystemProperties.get(DEVICE_CONFIG_PROP));
return TextUtils.equals("force_off", SystemProperties.get(DEVICE_CONFIG_PROP));
}
public static boolean isForcedOn() {

View File

@@ -123,13 +123,15 @@ class AppNotificationRepository(
}
override fun getNotificationSummary(app: ApplicationInfo): String {
if (!isEnabled(app)) return context.getString(R.string.off)
if (!isEnabled(app)) return context.getString(R.string.notifications_disabled)
val channelCount = getChannelCount(app)
if (channelCount == 0) {
return calculateFrequencySummary(getSentCount(app))
}
val blockedChannelCount = getBlockedChannelCount(app)
if (channelCount == blockedChannelCount) return context.getString(R.string.off)
if (channelCount == blockedChannelCount) {
return context.getString(R.string.notifications_disabled)
}
val frequencySummary = calculateFrequencySummary(getSentCount(app))
if (blockedChannelCount == 0) return frequencySummary
return context.getString(

View File

@@ -251,7 +251,7 @@ class AppNotificationRepositoryTest {
val summary = repository.getNotificationSummary(APP)
assertThat(summary).isEqualTo(context.getString(R.string.off))
assertThat(summary).isEqualTo(context.getString(R.string.notifications_disabled))
}
@Test
@@ -273,7 +273,7 @@ class AppNotificationRepositoryTest {
val summary = repository.getNotificationSummary(APP)
assertThat(summary).isEqualTo(context.getString(R.string.off))
assertThat(summary).isEqualTo(context.getString(R.string.notifications_disabled))
}
@Test