[Android] Video Player : set flag for "Combined Bar tablet"
Alexandre Perraud
git at videolan.org
Tue Nov 6 15:33:20 CET 2012
vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Nov 6 12:30:40 2012 +0100| [b81fe83213d38d695fdb6aa71329dbc3e4e170e0] | committer: Jean-Baptiste Kempf
Video Player : set flag for "Combined Bar tablet"
and fix double touch bug.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b81fe83213d38d695fdb6aa71329dbc3e4e170e0
---
vlc-android/src/org/videolan/vlc/Util.java | 9 ++++++++-
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 9 +++++----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index 344a99a..601a58a 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -47,7 +47,7 @@ import android.widget.Toast;
public class Util {
public final static String TAG = "VLC/Util";
- public final static boolean hasNavBar;
+ private final static boolean hasNavBar;
/** A set of utility functions for the VLC application */
static {
@@ -253,6 +253,13 @@ public class Util {
return hasNavBar;
}
+ /** hasCombBar test if device has Combined Bar : only for tablet with Honeycomb or ICS */
+ public static boolean hasCombBar() {
+ return (!isPhone()
+ && ((android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) &&
+ (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.JELLY_BEAN)));
+ }
+
private static String errorMsg = null;
private static boolean isCompatible = false;
public static String getErrorMsg() {
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 0dc9f9c..792754d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1127,11 +1127,12 @@ public class VideoPlayerActivity extends Activity {
private void dimStatusBar(boolean dim) {
if (!Util.isHoneycombOrLater())
return;
-
mSurface.setSystemUiVisibility(
- dim ? (Util.hasNavBar()
- ? View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_LOW_PROFILE
- : View.SYSTEM_UI_FLAG_LOW_PROFILE)
+ dim ? (Util.hasCombBar()
+ ? View.SYSTEM_UI_FLAG_LOW_PROFILE
+ : Util.hasNavBar()
+ ? View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ : View.SYSTEM_UI_FLAG_LOW_PROFILE)
: View.SYSTEM_UI_FLAG_VISIBLE);
}
More information about the Android
mailing list