CompatibilityMode settings
This commit is contained in:
committed by
Mitsuru Oshima
parent
ed29a65835
commit
ef0bed33b9
@@ -886,6 +886,13 @@
|
||||
<!-- Sound & display settings screen, setting option summary to change screen timeout -->
|
||||
<string name="screen_timeout_summary">Adjust the delay before the screen automatically turns off</string>
|
||||
|
||||
<!-- Sound & display settings screen, compatibility mode check box label -->
|
||||
<string name="compatibility_mode_title">Compatibility Mode</string>
|
||||
<!-- Sound & display settings screen, compatibility mode option summary text when check box is selected -->
|
||||
<string name="compatibility_mode_summary_on">Run older apps in Compatibility mode. This require rebooting. </string>
|
||||
<!-- Sound & display settings screen, compatibility mode option summary text when check box is clear -->
|
||||
<string name="compatibility_mode_summary_off">Run older apps in Compatibility mode. This require rebooting. </string>
|
||||
|
||||
<!-- SIM lock settings title -->
|
||||
<string name="sim_lock_settings">SIM card lock settings</string>
|
||||
<!-- Security & location settings screen, setting option name -->
|
||||
|
@@ -124,6 +124,11 @@
|
||||
android:entries="@array/screen_timeout_entries"
|
||||
android:entryValues="@array/screen_timeout_values" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="compatibility_mode"
|
||||
android:title="@string/compatibility_mode_title"
|
||||
android:summaryOn="@string/compatibility_mode_summary_on"
|
||||
android:summaryOff="@string/compatibility_mode_summary_off" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -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