[Android] Merge dimStatusBarICS into dimStatusBar
Sébastien Toque
git at videolan.org
Wed Jul 18 01:27:03 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Wed Jul 18 00:58:07 2012 +0200| [00d189a5ea729f3ded37f6ef99641db0e64ae7e0] | committer: Sébastien Toque
Merge dimStatusBarICS into dimStatusBar
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=00d189a5ea729f3ded37f6ef99641db0e64ae7e0
---
.../vlc/gui/video/VideoPlayerActivity.java | 24 +++++++-------------
1 file changed, 8 insertions(+), 16 deletions(-)
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 e9d7660..14f8327 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -476,7 +476,7 @@ public class VideoPlayerActivity extends Activity {
activity.fadeOutInfo();
break;
case HIDE_NAV:
- activity.dimStatusBarICS();
+ activity.dimStatusBar(true);
break;
}
}
@@ -860,30 +860,22 @@ public class VideoPlayerActivity extends Activity {
}
/**
- * Dim the status bar and/or navigation icons when needed.
- * Android 3.0 and later
+ * Dim the status bar and/or navigation icons when needed on Android 3.x.
+ * Hide it on Android 4.0 and later
*/
@TargetApi(11)
- private void dimStatusBar(boolean dim) {
- if(Util.isHoneycombOrLater()) {
+ private void dimStatusBar(boolean dim) {
+ if (Util.isHoneycombOrLater()) {
if (dim) {
- mSurface.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
+ mSurface.setSystemUiVisibility(Util.isICSOrLater()
+ ? View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ : View.SYSTEM_UI_FLAG_LOW_PROFILE);
} else {
mSurface.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
}
}
}
- /**
- * ICS full-screen profile
- * Android 4.0 and later only
- */
- @TargetApi(14)
- private void dimStatusBarICS() {
- if(Util.isICSOrLater())
- mSurface.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
- }
-
private void updateOverlayPausePlay() {
if (mLibVLC == null) {
return;
More information about the Android
mailing list