Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2881403003: [VrShell] Mask system ui flags before checking. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index 3140ea2a30068689a6b33191498948d3a183dd4d..2a17e74ce1b6079d0baaa3c6411777e217a3b203 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -533,7 +533,9 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
private boolean isWindowModeCorrectForVr() {
int flags = mActivity.getWindow().getDecorView().getSystemUiVisibility();
int orientation = mActivity.getResources().getConfiguration().orientation;
- return flags == VR_SYSTEM_UI_FLAGS && orientation == Configuration.ORIENTATION_LANDSCAPE;
+ // Mask the flags to only those that we care about.
+ return (flags & VR_SYSTEM_UI_FLAGS) == VR_SYSTEM_UI_FLAGS
billorr1 2017/05/16 21:50:05 Are there any flags we want to ensure are not set?
mthiesse 2017/05/16 21:56:14 We probably want to make sure that we don't have S
amp 2017/05/16 22:19:54 I'm not sure. It's possible we may have to adjust
+ && orientation == Configuration.ORIENTATION_LANDSCAPE;
}
private void setWindowModeForVr(int requestedOrientation) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698