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

Unified Diff: services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java

Issue 2890423003: [Media controls] Integrate rotate-to-fullscreen with orientation lock (Closed)
Patch Set: Fix existing tests 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
Index: services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java
diff --git a/services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java b/services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java
index 6d878a98ff905b02bd01085f7d5efe6ef7857ac2..f6f9c9a3c309ef7a01c8d9c3e2ef4ecba4d3634a 100644
--- a/services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java
+++ b/services/device/screen_orientation/android/java/src/org/chromium/device/screen_orientation/ScreenOrientationListener.java
@@ -4,6 +4,9 @@
package org.chromium.device.screen_orientation;
+import android.provider.Settings;
+
+import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -33,4 +36,11 @@ class ScreenOrientationListener {
}
});
}
+
+ @CalledByNative
+ static boolean isAutoRotateEnabledByUser() {
+ return Settings.System.getInt(ContextUtils.getApplicationContext().getContentResolver(),
+ Settings.System.ACCELEROMETER_ROTATION, 0)
+ == 1;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698