Merge "Hide the icon if didn't have media session or album art"
This commit is contained in:
committed by
Android (Google) Code Review
commit
34937eb21e
@@ -318,4 +318,20 @@ public class MediaOutputPanelTest {
|
||||
public void getViewType_checkType() {
|
||||
assertThat(mPanel.getViewType()).isEqualTo(PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getIcon_mediaControllerIsNull_returnNull() {
|
||||
mMediaControllers.clear();
|
||||
mPanel.onStart();
|
||||
|
||||
assertThat(mPanel.getIcon()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getIcon_mediaMetadataIsNull_returnNull() {
|
||||
mPanel.onStart();
|
||||
when(mMediaController.getMetadata()).thenReturn(null);
|
||||
|
||||
assertThat(mPanel.getIcon()).isNull();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user