Remove mVideoPaused from VideoPreference
- We destoryed the MediaPlayer when VideoPreference is onPause(). When VideoPreference is onResumed, MediaPlayer always start from pause state, we don't need a data save/restore current video state. Bug: 143270527 Test: robolectric, manual Change-Id: I544e933e4237f6d92aeff8a7eb04b52e89d74a4a
This commit is contained in:
@@ -45,7 +45,6 @@ public class VideoPreference extends Preference {
|
||||
AnimationController mAnimationController;
|
||||
@VisibleForTesting
|
||||
boolean mAnimationAvailable;
|
||||
private boolean mVideoPaused;
|
||||
private float mAspectRatio = 1.0f;
|
||||
private int mPreviewId;
|
||||
private int mAnimationId;
|
||||
@@ -130,11 +129,16 @@ public class VideoPreference extends Preference {
|
||||
super.onDetached();
|
||||
}
|
||||
|
||||
public void onViewVisible(boolean videoPaused) {
|
||||
mVideoPaused = videoPaused;
|
||||
/**
|
||||
* Called from {@link VideoPreferenceController} when the view is onResume
|
||||
*/
|
||||
public void onViewVisible() {
|
||||
initAnimationController();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from {@link VideoPreferenceController} when the view is onPause
|
||||
*/
|
||||
public void onViewInvisible() {
|
||||
releaseAnimationController();
|
||||
}
|
||||
@@ -174,10 +178,6 @@ public class VideoPreference extends Preference {
|
||||
return mAnimationAvailable;
|
||||
}
|
||||
|
||||
public boolean isVideoPaused() {
|
||||
return mVideoPaused;
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the height of the video preference
|
||||
*
|
||||
|
Reference in New Issue
Block a user