diff options
author | Robert Greenwalt <robdroid@android.com> | 2010-03-04 13:26:29 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-04 13:26:29 -0800 |
commit | 5e3c7670a26de0f2a623a60ead2e900fe5080b0c (patch) | |
tree | 24a738b493097adb75c9590354f69d724b3f591b | |
parent | f4c4b59f13a0cadd55832004e56ff7b6d827f7f0 (diff) | |
parent | 0affd6a00257835980a0919b2aaf2c378194f99b (diff) | |
download | packages_apps_Settings-5e3c7670a26de0f2a623a60ead2e900fe5080b0c.zip packages_apps_Settings-5e3c7670a26de0f2a623a60ead2e900fe5080b0c.tar.gz packages_apps_Settings-5e3c7670a26de0f2a623a60ead2e900fe5080b0c.tar.bz2 |
Merge "Update Tether Settings UI."
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | res/xml/tether_prefs.xml | 5 | ||||
-rw-r--r-- | src/com/android/settings/TetherSettings.java | 20 |
3 files changed, 0 insertions, 29 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 410fbf0..2c42797 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1352,10 +1352,6 @@ <!-- Title of the screen for adjusting tethering settings --> <string name="tether_screen_title">Tethering settings</string> - <!-- Tethering notification toggle - controls whether a notification will appear when a tetherable connection becomes available --> - <string name="enable_tether_notice_checkbox">Notifications</string> - <!-- Tethering notification summary explains the notification toggle --> - <string name="enable_tether_notice_checkbox_summary">Show a notification when USB tethering is available</string> <!-- USB Tethering options --> <string name="usb_tethering_button_text">USB tethering</string> <!-- USB available subtext - shown when USB is connected but not currently being tethered --> diff --git a/res/xml/tether_prefs.xml b/res/xml/tether_prefs.xml index 321129f..b903eaf 100644 --- a/res/xml/tether_prefs.xml +++ b/res/xml/tether_prefs.xml @@ -27,9 +27,4 @@ android:targetClass="com.android.internal.app.TetherActivity" /> </PreferenceScreen> - <CheckBoxPreference - android:key="enable_tether_notice" - android:title="@string/enable_tether_notice_checkbox" - android:summary="@string/enable_tether_notice_checkbox_summary"/> - </PreferenceScreen> diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java index ec552a5..3e41bb8 100644 --- a/src/com/android/settings/TetherSettings.java +++ b/src/com/android/settings/TetherSettings.java @@ -36,11 +36,8 @@ import java.util.ArrayList; * Displays preferences for Tethering. */ public class TetherSettings extends PreferenceActivity { - - private static final String ENABLE_TETHER_NOTICE = "enable_tether_notice"; private static final String USB_TETHER_SETTINGS = "usb_tether_settings"; - private CheckBoxPreference mEnableTetherNotice; private PreferenceScreen mUsbTether; private BroadcastReceiver mTetherChangeReceiver; @@ -57,7 +54,6 @@ public class TetherSettings extends PreferenceActivity { addPreferencesFromResource(R.xml.tether_prefs); - mEnableTetherNotice = (CheckBoxPreference) findPreference(ENABLE_TETHER_NOTICE); mUsbTether = (PreferenceScreen) findPreference(USB_TETHER_SETTINGS); ConnectivityManager cm = @@ -65,7 +61,6 @@ public class TetherSettings extends PreferenceActivity { mUsbRegexs = cm.getTetherableUsbRegexs(); if (mUsbRegexs.length == 0) { getPreferenceScreen().removePreference(mUsbTether); - getPreferenceScreen().removePreference(mEnableTetherNotice); } mWifiRegexs = cm.getTetherableWifiRegexs(); } @@ -88,8 +83,6 @@ public class TetherSettings extends PreferenceActivity { @Override protected void onResume() { super.onResume(); - mEnableTetherNotice.setChecked(Settings.Secure.getInt(getContentResolver(), - Settings.Secure.TETHER_NOTIFY, 0) != 0); IntentFilter filter = new IntentFilter(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); filter.addAction(Intent.ACTION_MEDIA_SHARED); @@ -160,17 +153,4 @@ public class TetherSettings extends PreferenceActivity { mUsbTether.setEnabled(false); } } - - @Override - public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { - - if (preference == mEnableTetherNotice) { - boolean newState = mEnableTetherNotice.isChecked(); - Settings.Secure.putInt(getContentResolver(), - Settings.Secure.TETHER_NOTIFY, newState ? 1 : 0); - return true; - } - return false; - } - } |