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; |
+ } |
} |