Loading res/xml/development_prefs.xml +0 −7 Original line number Diff line number Diff line Loading @@ -65,13 +65,6 @@ android:persistent="false" android:title="@string/system_ui_settings" /> <com.android.settings.DropDownPreference android:key="night_mode" android:title="@string/night_mode_title" android:summary="@string/night_mode_summary" android:entries="@array/night_mode_entries" android:entryValues="@array/night_mode_values" /> <PreferenceCategory android:key="debug_debugging_category" android:title="@string/debug_debugging_category"> Loading src/com/android/settings/DevelopmentSettings.java +0 −26 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.app.AlertDialog; import android.app.AppOpsManager; import android.app.AppOpsManager.PackageOps; import android.app.Dialog; import android.app.UiModeManager; import android.app.admin.DevicePolicyManager; import android.app.backup.IBackupManager; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -175,8 +174,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String TERMINAL_APP_PACKAGE = "com.android.terminal"; private static final String KEY_NIGHT_MODE = "night_mode"; private static final int RESULT_DEBUG_APP = 1000; private static final int RESULT_MOCK_LOCATION_APP = 1001; Loading Loading @@ -259,8 +256,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private SwitchPreference mShowAllANRs; private DropDownPreference mNightModePreference; private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>(); private final ArrayList<SwitchPreference> mResetSwitchPrefs Loading Loading @@ -419,27 +414,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mAllPrefs.add(hdcpChecking); removePreferenceForProduction(hdcpChecking); } mNightModePreference = (DropDownPreference) findPreference(KEY_NIGHT_MODE); final UiModeManager uiManager = (UiModeManager) getSystemService( Context.UI_MODE_SERVICE); final int currentNightMode = uiManager.getNightMode(); mNightModePreference.setSelectedValue(String.valueOf(currentNightMode)); mNightModePreference.setCallback(new DropDownPreference.Callback() { @Override public boolean onItemSelected(int pos, 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; } } }); } private ListPreference addListPreference(String prefKey) { Loading Loading
res/xml/development_prefs.xml +0 −7 Original line number Diff line number Diff line Loading @@ -65,13 +65,6 @@ android:persistent="false" android:title="@string/system_ui_settings" /> <com.android.settings.DropDownPreference android:key="night_mode" android:title="@string/night_mode_title" android:summary="@string/night_mode_summary" android:entries="@array/night_mode_entries" android:entryValues="@array/night_mode_values" /> <PreferenceCategory android:key="debug_debugging_category" android:title="@string/debug_debugging_category"> Loading
src/com/android/settings/DevelopmentSettings.java +0 −26 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.app.AlertDialog; import android.app.AppOpsManager; import android.app.AppOpsManager.PackageOps; import android.app.Dialog; import android.app.UiModeManager; import android.app.admin.DevicePolicyManager; import android.app.backup.IBackupManager; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -175,8 +174,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String TERMINAL_APP_PACKAGE = "com.android.terminal"; private static final String KEY_NIGHT_MODE = "night_mode"; private static final int RESULT_DEBUG_APP = 1000; private static final int RESULT_MOCK_LOCATION_APP = 1001; Loading Loading @@ -259,8 +256,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private SwitchPreference mShowAllANRs; private DropDownPreference mNightModePreference; private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>(); private final ArrayList<SwitchPreference> mResetSwitchPrefs Loading Loading @@ -419,27 +414,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mAllPrefs.add(hdcpChecking); removePreferenceForProduction(hdcpChecking); } mNightModePreference = (DropDownPreference) findPreference(KEY_NIGHT_MODE); final UiModeManager uiManager = (UiModeManager) getSystemService( Context.UI_MODE_SERVICE); final int currentNightMode = uiManager.getNightMode(); mNightModePreference.setSelectedValue(String.valueOf(currentNightMode)); mNightModePreference.setCallback(new DropDownPreference.Callback() { @Override public boolean onItemSelected(int pos, 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; } } }); } private ListPreference addListPreference(String prefKey) { Loading