@@ -53,6 +53,7 @@ public class SpareParts extends PreferenceActivity
53
53
54
54
//extra
55
55
private static final String MENU_UNLOCK_SCREEN_PREF = "menu_unlock_screen" ;
56
+ private static final String LAUNCHER_ORIENTATION_PREF = "launcher_orientation" ;
56
57
//end extra
57
58
58
59
private static final String WINDOW_ANIMATIONS_PREF = "window_animations" ;
@@ -67,6 +68,7 @@ public class SpareParts extends PreferenceActivity
67
68
68
69
//extra
69
70
private CheckBoxPreference mMenuUnlockScreenPref ;
71
+ private CheckBoxPreference mLauncherOrientationPref ;
70
72
//end extra
71
73
72
74
private ListPreference mWindowAnimationsPref ;
@@ -123,6 +125,7 @@ public void onCreate(Bundle icicle) {
123
125
124
126
//extra
125
127
mMenuUnlockScreenPref = (CheckBoxPreference ) prefSet .findPreference (MENU_UNLOCK_SCREEN_PREF );
128
+ mLauncherOrientationPref = (CheckBoxPreference ) prefSet .findPreference (LAUNCHER_ORIENTATION_PREF );
126
129
//end extra
127
130
128
131
mWindowAnimationsPref = (ListPreference ) prefSet .findPreference (WINDOW_ANIMATIONS_PREF );
@@ -158,6 +161,9 @@ private void updateToggles() {
158
161
mMenuUnlockScreenPref .setChecked (Settings .System .getInt (
159
162
getContentResolver (),
160
163
Settings .System .MENU_UNLOCK_SCREEN , 0 ) != 0 );
164
+ mLauncherOrientationPref .setChecked (Settings .System .getInt (
165
+ getContentResolver (),
166
+ Settings .System .LAUNCHER_ORIENTATION , 0 ) != 0 );
161
167
//end extra
162
168
mFancyImeAnimationsPref .setChecked (Settings .System .getInt (
163
169
getContentResolver (),
@@ -264,6 +270,10 @@ public void onSharedPreferenceChanged(SharedPreferences preferences, String key)
264
270
Settings .System .putInt (getContentResolver (),
265
271
Settings .System .MENU_UNLOCK_SCREEN ,
266
272
mMenuUnlockScreenPref .isChecked () ? 1 : 0 );
273
+ } else if (LAUNCHER_ORIENTATION_PREF .equals (key )) {
274
+ Settings .System .putInt (getContentResolver (),
275
+ Settings .System .LAUNCHER_ORIENTATION ,
276
+ mLauncherOrientationPref .isChecked () ? 1 : 0 );
267
277
//end extra
268
278
} else if (FANCY_IME_ANIMATIONS_PREF .equals (key )) {
269
279
Settings .System .putInt (getContentResolver (),
0 commit comments