diff options
-rw-r--r-- | res/values/cm_strings.xml | 7 | ||||
-rw-r--r-- | res/xml/development_prefs.xml | 4 | ||||
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index d38b8c6..bdf0efa 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -300,10 +300,11 @@ <!-- Warning for Adb over Network --> <string name="adb_over_network_warning">WARNING: When ADB over network is enabled, your phone is open for intrusions on all connected networks, including GSM data network!\n\nOnly use this feature when you are connected on trusted networks.\n\nDo you really want to enable this function?</string> - <!-- Hostname setting --> - <string name="device_hostname">Device hostname</string> - <!-- Setting checkbox summary for displaying USB debugging notification --> <string name="adb_notify">Debugging notify</string> <string name="adb_notify_summary">Display a notification when USB or network debugging is enabled</string> + + <!-- Hostname setting --> + <string name="device_hostname">Device hostname</string> + </resources> diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml index 6e3d044..b1651e3 100644 --- a/res/xml/development_prefs.xml +++ b/res/xml/development_prefs.xml @@ -86,13 +86,13 @@ android:title="@string/enable_adb_cm" android:summary="@string/enable_adb_summary_cm"/> - <CheckBoxPreference + <SwitchPreference android:key="adb_notify" android:title="@string/adb_notify" android:summary="@string/adb_notify_summary" android:dependency="enable_adb"/> - <CheckBoxPreference + <SwitchPreference android:key="adb_over_network" android:title="@string/adb_over_network" android:summary="@string/adb_over_network_summary" diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 8181d38..0c55cb3 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -206,8 +206,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private boolean mDontPokeProperties; private SwitchPreference mEnableAdb; - private CheckBoxPreference mAdbNotify; - private CheckBoxPreference mAdbOverNetwork; + private SwitchPreference mAdbNotify; + private SwitchPreference mAdbOverNetwork; private Preference mClearAdbKeys; private SwitchPreference mEnableTerminal; private Preference mBugreport; @@ -315,9 +315,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment findPreference(DEBUG_DEBUGGING_CATEGORY_KEY); mEnableAdb = findAndInitSwitchPref(ENABLE_ADB); - mAdbNotify = findAndInitCheckboxPref(ADB_NOTIFY); + mAdbNotify = findAndInitSwitchPref(ADB_NOTIFY); mAllPrefs.add(mAdbNotify); - mAdbOverNetwork = findAndInitCheckboxPref(ADB_TCPIP); + mAdbOverNetwork = findAndInitSwitchPref(ADB_TCPIP); mClearAdbKeys = findPreference(CLEAR_ADB_KEYS); if (!SystemProperties.getBoolean("ro.adb.secure", false)) { @@ -658,7 +658,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment Settings.Secure.ADB_PORT, 0); boolean enabled = port > 0; - updateCheckBox(mAdbOverNetwork, enabled); + updateSwitchPreference(mAdbOverNetwork, enabled); WifiInfo wifiInfo = null; |