Fix gesture preview image visibility not set correctly.

- update for the preview image is done only in onStart()/Stop().
Move the handling to onPause()/onResume() instead so that visibility
updates will also be done when switching between pages.
- remove the obsolete GesturePreference class.

Change-Id: I743a9d41f17aab3303201e11e5bba708ca5810ae
Fix: 63783217
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2017-07-20 13:25:51 -07:00
parent b49578e485
commit c84001528c
5 changed files with 34 additions and 215 deletions

View File

@@ -134,8 +134,10 @@ public class VideoPreference extends Preference {
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
if (mVideoReady && imageView.getVisibility() == View.VISIBLE) {
imageView.setVisibility(View.GONE);
if (mVideoReady) {
if (imageView.getVisibility() == View.VISIBLE) {
imageView.setVisibility(View.GONE);
}
if (!mVideoPaused && mMediaPlayer != null && !mMediaPlayer.isPlaying()) {
mMediaPlayer.start();
playButton.setVisibility(View.GONE);