Settings: "Rotation lock" retains existing orientation.

Enabling "Rotation lock" when in landscape will stay in landscape
instead of forcing to portrait.

Bug: 6481542
Change-Id: Ide6171437a207f97a8fc3123ad8b2fe27323336f
This commit is contained in:
John Spurlock
2012-05-22 09:51:02 -04:00
parent 766b286187
commit 523d5a6e04

View File

@@ -37,7 +37,6 @@ import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
import android.view.IWindowManager;
import android.view.Surface;
import com.android.settings.DreamSettings;
@@ -260,7 +259,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
if (!mRotationLock.isChecked()) {
wm.thawRotation();
} else {
wm.freezeRotation(Surface.ROTATION_0);
wm.freezeRotation(-1);
}
} catch (RemoteException exc) {
Log.w(TAG, "Unable to save auto-rotate setting");