summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/wifi/WifiEnabler.java
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2010-02-04 16:16:25 +0800
committerChia-chi Yeh <chiachi@android.com>2010-02-04 16:16:25 +0800
commit9dee8a96c5682aebff50adc8c87519ee6c36e3ef (patch)
treecc79315646aa269fcf6b46d9d64d3bed809fb8ab /src/com/android/settings/wifi/WifiEnabler.java
parenta5a67306a4c7a066d97802333a473be94661e091 (diff)
downloadpackages_apps_Settings-9dee8a96c5682aebff50adc8c87519ee6c36e3ef.tar.gz
packages_apps_Settings-9dee8a96c5682aebff50adc8c87519ee6c36e3ef.tar.bz2
packages_apps_Settings-9dee8a96c5682aebff50adc8c87519ee6c36e3ef.zip
WifiSettings: tweak the order of calls to registerReceiver() to make the UI better.
Diffstat (limited to 'src/com/android/settings/wifi/WifiEnabler.java')
-rw-r--r--src/com/android/settings/wifi/WifiEnabler.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/settings/wifi/WifiEnabler.java b/src/com/android/settings/wifi/WifiEnabler.java
index 7ede80dd4..6c55136b6 100644
--- a/src/com/android/settings/wifi/WifiEnabler.java
+++ b/src/com/android/settings/wifi/WifiEnabler.java
@@ -58,18 +58,12 @@ public class WifiEnabler implements Preference.OnPreferenceChangeListener {
};
public WifiEnabler(Context context, CheckBoxPreference checkBox) {
- this(context, (WifiManager) context.getSystemService(Context.WIFI_SERVICE),
- checkBox);
- }
-
- public WifiEnabler(Context context, WifiManager wifiManager,
- CheckBoxPreference checkBox) {
mContext = context;
mCheckBox = checkBox;
- mWifiManager = wifiManager;
mOriginalSummary = checkBox.getSummary();
checkBox.setPersistent(false);
-
+
+ mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
mIntentFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
// The order matters! We really should not depend on this. :(
mIntentFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);