Merge "Release the media player when the video preference is not visible."
This commit is contained in:
committed by
Android (Google) Code Review
commit
1b1c2c2209
@@ -92,4 +92,13 @@ public class VideoPreferenceTest {
|
||||
|
||||
verify(mMediaPlayer, never()).start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onViewInvisible_shouldReleaseMediaplayer() {
|
||||
mVideoPreference.onViewVisible(false);
|
||||
|
||||
mVideoPreference.onViewInvisible();
|
||||
|
||||
verify(mMediaPlayer).release();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user