CompatibilityMode settings
This commit is contained in:
committed by
Mitsuru Oshima
parent
ed29a65835
commit
ef0bed33b9
@@ -17,6 +17,7 @@
|
||||
package com.android.settings;
|
||||
|
||||
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
|
||||
import static android.provider.Settings.System.COMPATIBILITY_MODE;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ContentResolver;
|
||||
@@ -52,6 +53,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
|
||||
private static final String KEY_ANIMATIONS = "animations";
|
||||
private static final String KEY_ACCELEROMETER = "accelerometer";
|
||||
private static final String KEY_PLAY_MEDIA_NOTIFICATION_SOUNDS = "play_media_notification_sounds";
|
||||
private static final String KEY_COMPATIBILITY_MODE = "compatibility_mode";
|
||||
|
||||
private CheckBoxPreference mSilent;
|
||||
|
||||
@@ -71,6 +73,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
|
||||
private CheckBoxPreference mSoundEffects;
|
||||
private CheckBoxPreference mAnimations;
|
||||
private CheckBoxPreference mAccelerometer;
|
||||
private CheckBoxPreference mCompatibilityMode;
|
||||
private float[] mAnimationScales;
|
||||
|
||||
private AudioManager mAudioManager;
|
||||
@@ -112,6 +115,10 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
|
||||
mAnimations.setPersistent(false);
|
||||
mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER);
|
||||
mAccelerometer.setPersistent(false);
|
||||
mCompatibilityMode = (CheckBoxPreference) findPreference(KEY_COMPATIBILITY_MODE);
|
||||
mCompatibilityMode.setPersistent(false);
|
||||
mCompatibilityMode.setChecked(Settings.System.getInt(resolver,
|
||||
Settings.System.COMPATIBILITY_MODE, 1) != 0);
|
||||
|
||||
ListPreference screenTimeoutPreference =
|
||||
(ListPreference) findPreference(KEY_SCREEN_TIMEOUT);
|
||||
@@ -249,6 +256,10 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
|
||||
Settings.System.putInt(getContentResolver(),
|
||||
Settings.System.ACCELEROMETER_ROTATION,
|
||||
mAccelerometer.isChecked() ? 1 : 0);
|
||||
} else if (preference == mCompatibilityMode) {
|
||||
Settings.System.putInt(getContentResolver(),
|
||||
Settings.System.COMPATIBILITY_MODE,
|
||||
mCompatibilityMode.isChecked() ? 1 : 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user