[Android] move/rename VideoOverflowDialog outside of gui.video

Sébastien Toque git at videolan.org
Sun Dec 30 19:30:25 CET 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Dec 28 23:15:07 2012 +0100| [ba60b703556874b848ea5b492e882a5a6f221766] | committer: Sébastien Toque

move/rename VideoOverflowDialog outside of gui.video

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ba60b703556874b848ea5b492e882a5a6f221766
---

 .../{video/VideoOverflowDialog.java => AdvFuncDialog.java} |    8 ++++----
 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java    |   12 +++++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoOverflowDialog.java b/vlc-android/src/org/videolan/vlc/gui/AdvFuncDialog.java
similarity index 96%
rename from vlc-android/src/org/videolan/vlc/gui/video/VideoOverflowDialog.java
rename to vlc-android/src/org/videolan/vlc/gui/AdvFuncDialog.java
index ce51ff6..7bf6b38 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoOverflowDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AdvFuncDialog.java
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * VideoOverflowDialog.java
+ * AdvFuncDialog.java
  *****************************************************************************
  * Copyright © 2012 VLC authors and VideoLAN
  *
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
-package org.videolan.vlc.gui.video;
+package org.videolan.vlc.gui;
 
 import java.util.Calendar;
 
@@ -34,7 +34,7 @@ import android.view.ViewGroup;
 import android.widget.ImageButton;
 import android.widget.TextView;
 
-public class VideoOverflowDialog extends Dialog {
+public class AdvFuncDialog extends Dialog {
     public final static String TAG = "VLC/AdvFuncPopupWindow";
 
     private static View mAdvFuncView;
@@ -48,7 +48,7 @@ public class VideoOverflowDialog extends Dialog {
     /**
      * Put all advance functionality here
      */
-    public VideoOverflowDialog(Activity activity) {
+    public AdvFuncDialog(Activity activity) {
         super(activity);
         setOwnerActivity(activity);
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 5f31cb5..048f64d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -37,6 +37,7 @@ import org.videolan.vlc.R;
 import org.videolan.vlc.Util;
 import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.WeakHandler;
+import org.videolan.vlc.gui.AdvFuncDialog;
 import org.videolan.vlc.gui.PreferencesActivity;
 import org.videolan.vlc.gui.audio.AudioPlayerActivity;
 import org.videolan.vlc.interfaces.IPlayerControl;
@@ -173,7 +174,7 @@ public class VideoPlayerActivity extends Activity {
     private ArrayList<String> mSubtitleTracksList;
 
     // Advance Function
-    private VideoOverflowDialog mOverflowDialog;
+    private AdvFuncDialog mAdvFuncDialog;
 
     @Override
     @TargetApi(11)
@@ -356,7 +357,8 @@ public class VideoPlayerActivity extends Activity {
     @Override
     protected void onStop() {
         super.onStop();
-        mOverflowDialog.destroyAdvFuncDialog();
+        if (mAdvFuncDialog != null)
+            mAdvFuncDialog.destroyAdvFuncDialog();
     }
 
     @Override
@@ -1329,8 +1331,8 @@ public class VideoPlayerActivity extends Activity {
     }
 
     public void showAdvanceFunction(View v) {
-        if (mOverflowDialog == null)
-            mOverflowDialog = new VideoOverflowDialog(this);
-        mOverflowDialog.show();
+        if (mAdvFuncDialog == null)
+            mAdvFuncDialog = new AdvFuncDialog(this);
+        mAdvFuncDialog.show();
     }
 }



More information about the Android mailing list