Loading src/com/android/settings/notification/app/AppConversationListPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ public class AppConversationListPreferenceController extends NotificationPrefere ShortcutInfo si = conversation.getShortcutInfo(); pref.setTitle(si != null ? si.getShortLabel() ? si.getLabel() : conversation.getNotificationChannel().getName()); pref.setSummary(conversation.getNotificationChannel().getGroup() != null ? mContext.getString(R.string.notification_conversation_summary, Loading src/com/android/settings/notification/app/ConversationHeaderPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ public class ConversationHeaderPreferenceController extends NotificationPreferen @VisibleForTesting CharSequence getLabel() { return mConversationInfo != null ? mConversationInfo.getShortLabel() ? mConversationInfo.getLabel() : mChannel.getName(); } } src/com/android/settings/notification/app/ConversationListPreferenceController.java +3 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe CharSequence getTitle(ConversationChannelWrapper conversation) { ShortcutInfo si = conversation.getShortcutInfo(); return si != null ? si.getShortLabel() ? si.getLabel() : conversation.getNotificationChannel().getName(); } Loading Loading @@ -154,8 +154,8 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe return o1.getNotificationChannel().getId().compareTo( o2.getNotificationChannel().getId()); } return sCollator.compare(o1.getShortcutInfo().getShortLabel(), o2.getShortcutInfo().getShortLabel()); return sCollator.compare(o1.getShortcutInfo().getLabel(), o2.getShortcutInfo().getLabel()); } }; } tests/robotests/src/com/android/settings/notification/app/ConversationHeaderPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -103,10 +103,10 @@ public class ConversationHeaderPreferenceControllerTest { @Test public void testGetLabel() { ShortcutInfo si = mock(ShortcutInfo.class); when(si.getShortLabel()).thenReturn("hello"); when(si.getLabel()).thenReturn("hello"); NotificationBackend.AppRow appRow = new NotificationBackend.AppRow(); mController.onResume(appRow, null, null, null, si, null); assertEquals(si.getShortLabel(), mController.getLabel()); assertEquals(si.getLabel(), mController.getLabel()); NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE); mController.onResume(appRow, channel, null, null, null, null); Loading tests/robotests/src/com/android/settings/notification/app/ConversationListPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -169,12 +169,12 @@ public class ConversationListPreferenceControllerTest { ccw.setPkg("pkg"); ccw.setUid(1); ShortcutInfo si = mock(ShortcutInfo.class); when(si.getShortLabel()).thenReturn("conversation name"); when(si.getLabel()).thenReturn("conversation name"); ccw.setShortcutInfo(si); ccw.setGroupLabel("group"); ccw.setParentChannelLabel("parent"); assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getShortLabel()); assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getLabel()); } @Test Loading Loading
src/com/android/settings/notification/app/AppConversationListPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ public class AppConversationListPreferenceController extends NotificationPrefere ShortcutInfo si = conversation.getShortcutInfo(); pref.setTitle(si != null ? si.getShortLabel() ? si.getLabel() : conversation.getNotificationChannel().getName()); pref.setSummary(conversation.getNotificationChannel().getGroup() != null ? mContext.getString(R.string.notification_conversation_summary, Loading
src/com/android/settings/notification/app/ConversationHeaderPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ public class ConversationHeaderPreferenceController extends NotificationPreferen @VisibleForTesting CharSequence getLabel() { return mConversationInfo != null ? mConversationInfo.getShortLabel() ? mConversationInfo.getLabel() : mChannel.getName(); } }
src/com/android/settings/notification/app/ConversationListPreferenceController.java +3 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe CharSequence getTitle(ConversationChannelWrapper conversation) { ShortcutInfo si = conversation.getShortcutInfo(); return si != null ? si.getShortLabel() ? si.getLabel() : conversation.getNotificationChannel().getName(); } Loading Loading @@ -154,8 +154,8 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe return o1.getNotificationChannel().getId().compareTo( o2.getNotificationChannel().getId()); } return sCollator.compare(o1.getShortcutInfo().getShortLabel(), o2.getShortcutInfo().getShortLabel()); return sCollator.compare(o1.getShortcutInfo().getLabel(), o2.getShortcutInfo().getLabel()); } }; }
tests/robotests/src/com/android/settings/notification/app/ConversationHeaderPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -103,10 +103,10 @@ public class ConversationHeaderPreferenceControllerTest { @Test public void testGetLabel() { ShortcutInfo si = mock(ShortcutInfo.class); when(si.getShortLabel()).thenReturn("hello"); when(si.getLabel()).thenReturn("hello"); NotificationBackend.AppRow appRow = new NotificationBackend.AppRow(); mController.onResume(appRow, null, null, null, si, null); assertEquals(si.getShortLabel(), mController.getLabel()); assertEquals(si.getLabel(), mController.getLabel()); NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE); mController.onResume(appRow, channel, null, null, null, null); Loading
tests/robotests/src/com/android/settings/notification/app/ConversationListPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -169,12 +169,12 @@ public class ConversationListPreferenceControllerTest { ccw.setPkg("pkg"); ccw.setUid(1); ShortcutInfo si = mock(ShortcutInfo.class); when(si.getShortLabel()).thenReturn("conversation name"); when(si.getLabel()).thenReturn("conversation name"); ccw.setShortcutInfo(si); ccw.setGroupLabel("group"); ccw.setParentChannelLabel("parent"); assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getShortLabel()); assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getLabel()); } @Test Loading