/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
H A D | ImportancePreferenceControllerTest.java | 128 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_ifChannelBlocked() 137 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_notForDefaultChannel() 147 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable() 156 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredIn() 166 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredOut() 174 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_disabledByAdmin() 189 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_notConfigurable() 204 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_systemButConfigurable() 219 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_defaultApp() 257 assertEquals(IMPORTANCE_HIGH, channel.getImportance()); in testImportanceLowToHigh() [all …]
|
H A D | NotificationPreferenceControllerTest.java | 114 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in isAvailable_notIfChannelBlocked() 124 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in isAvailable_notIfChannelGroupBlocked() 136 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in isAvailable_notIfFailsFilterCheck() 150 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in isAvailable() 187 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testCanBeVisible_sameImportance() 197 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testCanBeVisible_greaterImportance() 207 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testCanBeVisible_lesserImportance() 229 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsBlockable_oemAllowlist() 243 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsBlockable_defaultApp() 267 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsChannelBlockable_mostSystemAppsNotBlockable() [all …]
|
H A D | HighImportancePreferenceControllerTest.java | 111 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_notIfChannelBlocked() 120 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_notForDefaultChannel() 130 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in testIsAvailable() 139 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in testIsAvailable_filteredIn() 149 when(channel.getImportance()).thenReturn(IMPORTANCE_DEFAULT); in testIsAvailable_filteredOut() 157 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_disabledByAdmin() 172 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_notConfigurable() 187 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_systemButConfigurable() 202 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_defaultApp() 249 assertEquals(IMPORTANCE_DEFAULT, channel.getImportance()); in onPreferenceChange()
|
H A D | MinImportancePreferenceControllerTest.java | 111 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_notIfChannelBlocked() 120 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_notForDefaultChannel() 130 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable() 139 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredIn() 149 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredOut() 157 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_disabledByAdmin() 172 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_notConfigurable() 187 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_systemButConfigurable() 202 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_defaultApp() 249 assertEquals(IMPORTANCE_MIN, channel.getImportance()); in onPreferenceChange()
|
H A D | BlockPreferenceControllerTest.java | 116 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_channelNotBlockable() 126 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_channelNonDefault() 135 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_ifChannelDefault() 163 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_systemApp() 173 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_nonSystemApp_noFilter() 183 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_filteredOut() 195 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_filteredIn() 371 assertEquals(IMPORTANCE_LOW, channel.getImportance()); in testUpdateState_doesNotResetImportance() 385 assertEquals(IMPORTANCE_NONE, channel.getImportance()); in testOnSwitchChanged_channel_default() 407 assertEquals(IMPORTANCE_NONE, channel.getImportance()); in testOnSwitchChanged_channel_nonDefault() [all …]
|
H A D | ConversationPriorityPreferenceControllerTest.java | 137 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_disabledByAdmin() 152 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_notConfigurable() 167 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_systemButConfigurable() 182 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_defaultApp() 222 assertEquals(IMPORTANCE_HIGH, channel.getImportance()); in testImportanceLowToImportant() 241 assertEquals(IMPORTANCE_HIGH, channel.getImportance()); in testImportanceLowToDefault() 261 assertEquals(IMPORTANCE_LOW, channel.getImportance()); in testImportanceDefaultToLow() 281 assertEquals(IMPORTANCE_DEFAULT, channel.getImportance()); in testImportanceLowToDefault_bubblesMaintained() 302 assertEquals(IMPORTANCE_HIGH, channel.getImportance()); in testImportancePriorityToDefault()
|
H A D | AllowSoundPreferenceControllerTest.java | 128 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable() 138 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredIn() 149 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_filteredOut() 198 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testUpdateState_checkedForHighImportanceChannel() 210 when(channel.getImportance()).thenReturn(IMPORTANCE_UNSPECIFIED); in testUpdateState_checkedForUnspecifiedImportanceChannel() 222 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_notCheckedForLowImportanceChannel() 245 assertEquals(IMPORTANCE_UNSPECIFIED, mController.mChannel.getImportance()); in testOnPreferenceChange_on() 265 assertEquals(IMPORTANCE_LOW, mController.mChannel.getImportance()); in testOnPreferenceChange_off()
|
H A D | BadgePreferenceControllerTest.java | 109 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_notIfChannelBlocked() 119 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_channel_notIfAppOff() 129 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_notIfOffGlobally() 150 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_defaultChannel() 163 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_channel() 175 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_channelAppOff() 187 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_filteredOut() 199 when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); in testIsAvailable_filteredIn()
|
H A D | DescriptionPreferenceControllerTest.java | 93 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_notIfChannelBlocked() 102 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_notIfNoChannelDesc() 119 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_channel() 144 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testUpdateState_channel()
|
H A D | NotificationsOffPreferenceControllerTest.java | 96 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_yesIfChannelBlocked() 105 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_filteredIn() 115 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_filteredOut() 124 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testUpdateState_channel()
|
H A D | AppLinkPreferenceControllerTest.java | 94 when(channel.getImportance()).thenReturn(IMPORTANCE_NONE); in testIsAvailable_notIfChannelBlocked() 103 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable_notNoIntent() 114 when(channel.getImportance()).thenReturn(IMPORTANCE_LOW); in testIsAvailable()
|
/aosp12/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
H A D | ImportanceExtractorTest.java | 85 when(mConfig.getImportance(anyString(), anyInt())).thenReturn( in testAppPreferenceChannelNone() 91 int notificationImportance = r.getImportance(); in testAppPreferenceChannelNone() 95 assertEquals(NotificationManager.IMPORTANCE_UNSPECIFIED, r.getImportance()); in testAppPreferenceChannelNone() 96 assertEquals(notificationImportance, r.getImportance()); in testAppPreferenceChannelNone() 104 when(mConfig.getImportance(anyString(), anyInt())).thenReturn( in testAppPreferenceChannelPreference() 113 assertEquals(r.getImportance(), NotificationManager.IMPORTANCE_HIGH); in testAppPreferenceChannelPreference()
|
H A D | NotificationRecordTest.java | 393 assertEquals(IMPORTANCE_LOW, record.getImportance()); in testImportance_locked_preUpgrade() 503 assertEquals(channel.getImportance(), in testLogMaker() 533 assertEquals(channel.getImportance(), in testLogMakerImportanceApp() 561 assertEquals(channel.getImportance(), in testLogMakerImportanceAsst() 587 assertEquals(channel.getImportance(), in testLogMakerImportanceSystem() 608 assertEquals(channel.getImportance(), in testLogMakerImportanceUser() 639 assertEquals(channel.getImportance(), in testLogMakerImportanceMulti() 893 assertEquals(channel.getImportance(), record.getImportance()); in testUpdateNotificationChannel() 898 assertEquals(channel.getImportance() - 1, record.getImportance()); in testUpdateNotificationChannel() 910 assertEquals(IMPORTANCE_LOW, record.getImportance()); in testCalculateImportance_systemImportance() [all …]
|
H A D | NotificationListenerServiceTest.java | 109 assertEquals(getImportance(i), ranking.getImportance()); in testRanking() 178 tweak.getImportance(), in testRankingUpdate_equals() 259 getImportance(i), in generateUpdate() 301 private int getImportance(int index) { in getImportance() method in NotificationListenerServiceTest 310 return new NotificationChannel(key, key, getImportance(index)); in getChannel() 429 assertEquals(comment, a.getImportance(), b.getImportance()); in detailedAssertEquals()
|
/aosp12/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | NotificationComparator.java | 52 final int leftImportance = left.getImportance(); in compare() 53 final int rightImportance = right.getImportance(); in compare() 143 if (record.getImportance() < NotificationManager.IMPORTANCE_LOW) { in isImportantColorized() 150 if (record.getImportance() < NotificationManager.IMPORTANCE_LOW) { in isImportantOngoing() 163 if (record.getImportance() < NotificationManager.IMPORTANCE_LOW) { in isImportantPeople() 173 return mMessagingUtil.isImportantMessaging(record.getSbn(), record.getImportance()); in isImportantMessaging()
|
H A D | NotificationChannelLogger.java | 236 return getLoggingImportance(channel, channel.getImportance()); in getLoggingImportance() 255 static int getImportance(@NonNull NotificationChannelGroup channelGroup) { in getImportance() method 256 return getImportance(channelGroup.isBlocked()); in getImportance() 262 static int getImportance(boolean isBlocked) { in getImportance() method
|
H A D | NotificationChannelLoggerImpl.java | 60 /* int old_importance*/ NotificationChannelLogger.getImportance(wasBlocked), in logNotificationChannelGroup() 61 /* int importance*/ NotificationChannelLogger.getImportance(channelGroup), in logNotificationChannelGroup()
|
H A D | PreferencesHelper.java | 662 public int getImportance(String packageName, int uid) { in getImportance() method in PreferencesHelper 888 channel.getImportance() < existing.getImportance()) { in createNotificationChannel() 889 existing.setImportance(channel.getImportance()); in createNotificationChannel() 927 if (channel.getImportance() < IMPORTANCE_NONE in createNotificationChannel() 957 channel.setOriginalImportance(channel.getImportance()); in createNotificationChannel() 1025 updatedChannel.setImportance(channel.getImportance()); in updateNotificationChannel() 1039 r.importance = updatedChannel.getImportance(); in updateNotificationChannel() 1055 || channel.getImportance() != updatedChannel.getImportance()) { in updateNotificationChannel() 1869 if (original.getImportance() != update.getImportance()) { in lockFieldsForUpdateLocked() 2044 event.writeInt(channel.getImportance()); in pullPackageChannelPreferencesStats() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
H A D | ForegroundServiceNotificationListener.java | 63 addNotification(entry, entry.getImportance()); in ForegroundServiceNotificationListener() 68 updateNotification(entry, entry.getImportance()); in ForegroundServiceNotificationListener() 84 addNotification(entry, entry.getImportance()); in ForegroundServiceNotificationListener() 89 updateNotification(entry, entry.getImportance()); in ForegroundServiceNotificationListener()
|
/aosp12/packages/apps/Settings/src/com/android/settings/notification/app/ |
H A D | NotificationPreferenceController.java | 95 return mChannel.getImportance() != IMPORTANCE_NONE; in isAvailable() 123 int importance = mChannel.getImportance(); in checkCanBeVisible() 144 return channel.getImportance() == IMPORTANCE_NONE; in isChannelBlockable() 148 || channel.getImportance() == IMPORTANCE_NONE; in isChannelBlockable()
|
H A D | HighImportancePreferenceController.java | 60 return mChannel.getImportance() >= IMPORTANCE_DEFAULT; in isAvailable() 74 pref.setChecked(mChannel.getImportance() >= IMPORTANCE_HIGH); in updateState()
|
H A D | MinImportancePreferenceController.java | 60 return mChannel.getImportance() <= IMPORTANCE_LOW; in isAvailable() 74 pref.setChecked(mChannel.getImportance() == IMPORTANCE_MIN); in updateState()
|
H A D | AllowSoundPreferenceController.java | 72 pref.setChecked(mChannel.getImportance() >= IMPORTANCE_DEFAULT in updateState() 73 || mChannel.getImportance() == IMPORTANCE_UNSPECIFIED); in updateState()
|
H A D | ImportancePreferenceController.java | 72 pref.setImportance(mChannel.getImportance()); in updateState() 88 if (mChannel.getImportance() < IMPORTANCE_DEFAULT in onPreferenceChange()
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
H A D | NotificationInfoTest.java | 901 int originalImportance = mNotificationChannel.getImportance(); in testHandleCloseControls_DoesNotUpdateNotificationChannelIfUnchanged() 923 assertEquals(originalImportance, mNotificationChannel.getImportance()); in testHandleCloseControls_DoesNotUpdateNotificationChannelIfUnchanged() 959 assertEquals(IMPORTANCE_UNSPECIFIED, mNotificationChannel.getImportance()); in testHandleCloseControls_DoesNotUpdateNotificationChannelIfUnspecified() 993 assertEquals(IMPORTANCE_LOW, updated.getValue().getImportance()); in testSilenceCallsUpdateNotificationChannel() 1033 assertEquals(IMPORTANCE_DEFAULT, updated.getValue().getImportance()); in testUnSilenceCallsUpdateNotificationChannel() 1065 assertEquals(IMPORTANCE_DEFAULT, mNotificationChannel.getImportance()); in testAutomaticUnlocksUserImportance() 1100 assertEquals(IMPORTANCE_LOW, updated.getValue().getImportance()); in testSilenceCallsUpdateNotificationChannel_channelImportanceUnspecified() 1138 assertEquals(IMPORTANCE_MIN, updated.getValue().getImportance()); in testSilenceCallsUpdateNotificationChannel_channelImportanceMin() 1176 assertEquals(IMPORTANCE_DEFAULT, updated.getValue().getImportance()); in testAlertCallsUpdateNotificationChannel_channelImportanceMin() 1269 assertEquals(IMPORTANCE_DEFAULT, updated.getValue().getImportance()); in testUnSilenceCallsUpdateNotificationChannel_channelImportanceUnspecified()
|