OSDN Git Service

Make SystemUI always consists with the contrller overlay.
authorOwen Lin <owenlin@google.com>
Tue, 19 Jun 2012 06:35:06 +0000 (14:35 +0800)
committerOwen Lin <owenlin@google.com>
Tue, 19 Jun 2012 06:35:06 +0000 (14:35 +0800)
Change-Id: I81f2a71fd38fc2588a9acb97b9d333978ffb5e48
fix: 6679875

src/com/android/gallery3d/app/MoviePlayer.java
src/com/android/gallery3d/app/TimeBar.java

index 13a77f4..11b40bd 100644 (file)
@@ -86,9 +86,6 @@ public class MoviePlayer implements
     // If the time bar is visible.
     private boolean mShowing;
 
-    // Control when system UI can be shown
-    private boolean mAllowShowingSystemUI;
-
     private final Runnable mPlayingChecker = new Runnable() {
         @Override
         public void run() {
@@ -162,7 +159,6 @@ public class MoviePlayer implements
                 mLastSystemUiVis = visibility;
                 if ((diff & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
                         && (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
-                    mAllowShowingSystemUI = true;
                     mController.show();
 
                     // We need to set the background to clear ghosting images
@@ -371,12 +367,7 @@ public class MoviePlayer implements
     public void onShown() {
         mShowing = true;
         setProgress();
-
-        // System UI is invisible by default until the flag is set by user interaction
-        // See VideoView's onSystemUiVisibilityChange listener for details.
-        if (mAllowShowingSystemUI) {
-            showSystemUi(true);
-        }
+        showSystemUi(true);
     }
 
     @Override
index 1f5bfd9..1f36306 100644 (file)
@@ -255,6 +255,7 @@ public class TimeBar extends View {
             return true;
           }
           break;
+        case MotionEvent.ACTION_CANCEL:
         case MotionEvent.ACTION_UP:
           if (scrubbing) {
             listener.onScrubbingEnd(getScrubberTime());