Remove night mode from developer settings
It's in SysUI Tuner now. Change-Id: If1c248bfaa964b4f37155619a4c54f836d33e468
This commit is contained in:
@@ -5710,7 +5710,6 @@
|
|||||||
<string name="keywords_display">screen, touchscreen</string>
|
<string name="keywords_display">screen, touchscreen</string>
|
||||||
<string name="keywords_display_brightness_level">dim screen, touchscreen, battery</string>
|
<string name="keywords_display_brightness_level">dim screen, touchscreen, battery</string>
|
||||||
<string name="keywords_display_auto_brightness">dim screen, touchscreen, battery</string>
|
<string name="keywords_display_auto_brightness">dim screen, touchscreen, battery</string>
|
||||||
<string name="keywords_display_night_mode">dark theme, night mode, dim screen, invert brightness</string>
|
|
||||||
<string name="keywords_display_wallpaper">background, personalize, customize display</string>
|
<string name="keywords_display_wallpaper">background, personalize, customize display</string>
|
||||||
<string name="keywords_display_font_size">text size</string>
|
<string name="keywords_display_font_size">text size</string>
|
||||||
<string name="keywords_display_cast_screen">project, cast</string>
|
<string name="keywords_display_cast_screen">project, cast</string>
|
||||||
|
@@ -60,13 +60,6 @@
|
|||||||
android:summary="@string/runningservices_settings_summary"
|
android:summary="@string/runningservices_settings_summary"
|
||||||
android:fragment="com.android.settings.applications.RunningServices" />
|
android:fragment="com.android.settings.applications.RunningServices" />
|
||||||
|
|
||||||
<DropDownPreference
|
|
||||||
android:key="night_mode"
|
|
||||||
android:title="@string/night_mode_title"
|
|
||||||
android:summary="%s"
|
|
||||||
android:entries="@array/night_mode_entries"
|
|
||||||
android:entryValues="@array/night_mode_values" />
|
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="convert_to_file_encryption"
|
android:key="convert_to_file_encryption"
|
||||||
android:title="@string/convert_to_file_encryption"
|
android:title="@string/convert_to_file_encryption"
|
||||||
|
@@ -201,7 +201,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
private static final String TERMINAL_APP_PACKAGE = "com.android.terminal";
|
private static final String TERMINAL_APP_PACKAGE = "com.android.terminal";
|
||||||
|
|
||||||
private static final String KEY_NIGHT_MODE = "night_mode";
|
|
||||||
private static final String KEY_CONVERT_FBE = "convert_to_file_encryption";
|
private static final String KEY_CONVERT_FBE = "convert_to_file_encryption";
|
||||||
|
|
||||||
private static final String OTA_DISABLE_AUTOMATIC_UPDATE_KEY = "ota_disable_automatic_update";
|
private static final String OTA_DISABLE_AUTOMATIC_UPDATE_KEY = "ota_disable_automatic_update";
|
||||||
@@ -288,8 +287,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
private SwitchPreference mShowAllANRs;
|
private SwitchPreference mShowAllANRs;
|
||||||
|
|
||||||
private DropDownPreference mNightModePreference;
|
|
||||||
|
|
||||||
private ColorModePreference mColorModePreference;
|
private ColorModePreference mColorModePreference;
|
||||||
|
|
||||||
private SwitchPreference mForceResizable;
|
private SwitchPreference mForceResizable;
|
||||||
@@ -467,27 +464,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
mOtaDisableAutomaticUpdate = findAndInitSwitchPref(OTA_DISABLE_AUTOMATIC_UPDATE_KEY);
|
mOtaDisableAutomaticUpdate = findAndInitSwitchPref(OTA_DISABLE_AUTOMATIC_UPDATE_KEY);
|
||||||
|
|
||||||
mNightModePreference = (DropDownPreference) findPreference(KEY_NIGHT_MODE);
|
|
||||||
final UiModeManager uiManager = (UiModeManager) getSystemService(
|
|
||||||
Context.UI_MODE_SERVICE);
|
|
||||||
final int currentNightMode = uiManager.getNightMode();
|
|
||||||
mNightModePreference.setValue(String.valueOf(currentNightMode));
|
|
||||||
mNightModePreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
try {
|
|
||||||
final int value = Integer.parseInt((String) newValue);
|
|
||||||
final UiModeManager uiManager = (UiModeManager) getSystemService(
|
|
||||||
Context.UI_MODE_SERVICE);
|
|
||||||
uiManager.setNightMode(value);
|
|
||||||
return true;
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
Log.e(TAG, "could not persist night mode setting", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mColorModePreference = (ColorModePreference) findPreference(KEY_COLOR_MODE);
|
mColorModePreference = (ColorModePreference) findPreference(KEY_COLOR_MODE);
|
||||||
mColorModePreference.updateCurrentAndSupported();
|
mColorModePreference.updateCurrentAndSupported();
|
||||||
if (mColorModePreference.getTransformsCount() < 2) {
|
if (mColorModePreference.getTransformsCount() < 2) {
|
||||||
|
Reference in New Issue
Block a user