[Android] do not call setSystemUiVisibility on devices without navigation bar, it' s useless, and it can cause a glitch
Sébastien Toque
git at videolan.org
Sun Dec 23 21:34:17 CET 2012
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Dec 23 21:33:32 2012 +0100| [125776184055bed3e10f0527c998c5a94f2654ff] | committer: Sébastien Toque
do not call setSystemUiVisibility on devices without navigation bar, it's useless, and it can cause a glitch
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=125776184055bed3e10f0527c998c5a94f2654ff
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 ++----
1 file changed, 2 insertions(+), 4 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 e105aaa..99b2fc7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1129,14 +1129,12 @@ public class VideoPlayerActivity extends Activity {
*/
@TargetApi(11)
private void dimStatusBar(boolean dim) {
- if (!Util.isHoneycombOrLater())
+ if (!Util.isHoneycombOrLater() || !Util.hasNavBar())
return;
mSurface.setSystemUiVisibility(
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_HIDE_NAVIGATION)
: View.SYSTEM_UI_FLAG_VISIBLE);
}
More information about the Android
mailing list