summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-10-05 12:00:10 -0700
committerJeff Brown <jeffbrown@google.com>2011-10-05 16:12:07 -0700
commit4dfce20cac7492882d366d053006795aefad59da (patch)
treea0a266f97f0f06b7e6b8def3da32800abf17bd7f /packages
parent66fb1f3f3d8038d6bf216b52ba21a7e42fda040f (diff)
downloadframeworks_base-4dfce20cac7492882d366d053006795aefad59da.zip
frameworks_base-4dfce20cac7492882d366d053006795aefad59da.tar.gz
frameworks_base-4dfce20cac7492882d366d053006795aefad59da.tar.bz2
Make SENSOR orientation modes trump rotation lock.
Bug: 5371750 Change-Id: I4d18b6c8ba1de0afd5929ddb8d7123272e35fbe2
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java
index 5ac5ad0..a31e2a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java
@@ -22,6 +22,7 @@ import android.os.AsyncTask;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Settings;
+import android.util.Log;
import android.util.Slog;
import android.view.IWindowManager;
import android.widget.CompoundButton;
@@ -63,13 +64,13 @@ public class AutoRotateController implements CompoundButton.OnCheckedChangeListe
try {
IWindowManager wm = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
- ContentResolver cr = mContext.getContentResolver();
if (autorotate) {
wm.thawRotation();
} else {
- wm.freezeRotation();
+ wm.freezeRotation(-1);
}
} catch (RemoteException exc) {
+ Log.w(TAG, "Unable to save auto-rotate setting");
}
}
});