Loading core/java/android/view/WindowOrientationListener.java +16 −15 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public abstract class WindowOrientationListener { private static final String TAG = "WindowOrientationListener"; private static final boolean DEBUG = false; private static final boolean localLOGV = DEBUG || Config.DEBUG; private static int sAccelerometerMode = 5; private static int sAccelerometerMode = 13; private SensorManager mSensorManager; private boolean mEnabled = false; private int mRate; Loading Loading @@ -166,7 +166,7 @@ public abstract class WindowOrientationListener { public void update() { ContentResolver resolver = mContext.getContentResolver(); sAccelerometerMode = Settings.System.getInt(resolver, Settings.System.ACCELEROMETER_ROTATION_MODE, 5); Settings.System.ACCELEROMETER_ROTATION_MODE, 13); if (localLOGV) Log.i(TAG, "sAccelerometerMode=" + sAccelerometerMode); } } Loading Loading @@ -373,9 +373,11 @@ public abstract class WindowOrientationListener { return; } boolean allowed = rotation == ROTATION_0; if (!allowed) { boolean allowed = true; switch (rotation) { case ROTATION_0: allowed = (sAccelerometerMode & 8) != 0; break; case ROTATION_90: allowed = (sAccelerometerMode & 1) != 0; break; Loading @@ -386,7 +388,6 @@ public abstract class WindowOrientationListener { allowed = (sAccelerometerMode & 4) != 0; break; } } if (!allowed) { if (localLOGV) Log.i(TAG, " not allowed rotation = " + rotation); return; Loading Loading
core/java/android/view/WindowOrientationListener.java +16 −15 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public abstract class WindowOrientationListener { private static final String TAG = "WindowOrientationListener"; private static final boolean DEBUG = false; private static final boolean localLOGV = DEBUG || Config.DEBUG; private static int sAccelerometerMode = 5; private static int sAccelerometerMode = 13; private SensorManager mSensorManager; private boolean mEnabled = false; private int mRate; Loading Loading @@ -166,7 +166,7 @@ public abstract class WindowOrientationListener { public void update() { ContentResolver resolver = mContext.getContentResolver(); sAccelerometerMode = Settings.System.getInt(resolver, Settings.System.ACCELEROMETER_ROTATION_MODE, 5); Settings.System.ACCELEROMETER_ROTATION_MODE, 13); if (localLOGV) Log.i(TAG, "sAccelerometerMode=" + sAccelerometerMode); } } Loading Loading @@ -373,9 +373,11 @@ public abstract class WindowOrientationListener { return; } boolean allowed = rotation == ROTATION_0; if (!allowed) { boolean allowed = true; switch (rotation) { case ROTATION_0: allowed = (sAccelerometerMode & 8) != 0; break; case ROTATION_90: allowed = (sAccelerometerMode & 1) != 0; break; Loading @@ -386,7 +388,6 @@ public abstract class WindowOrientationListener { allowed = (sAccelerometerMode & 4) != 0; break; } } if (!allowed) { if (localLOGV) Log.i(TAG, " not allowed rotation = " + rotation); return; Loading