diff options
author | Wink Saville <wink@google.com> | 2010-08-13 16:11:42 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2010-08-13 16:11:42 -0700 |
commit | c7a98341b053bd8090accca151e8f3522f2dd126 (patch) | |
tree | e0bb31a0ff2634cfe9b2750e21a95f5b1d6ab053 /wifi | |
parent | 72dc780f57b4396b808032d592c41d35644a3277 (diff) | |
download | frameworks_base-c7a98341b053bd8090accca151e8f3522f2dd126.zip frameworks_base-c7a98341b053bd8090accca151e8f3522f2dd126.tar.gz frameworks_base-c7a98341b053bd8090accca151e8f3522f2dd126.tar.bz2 |
Add documentation to NetworkStateTracker and a small change to the API.
Also, removed some unused NetworkStateTracker event codes.
The API change was to add context and target to startMonitor, this makes
it easier to document what the actual interface contract is.
Change-Id: If9b52486c3c281fe4794bc78417c8b03888414b1
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 8e1b236..a5f62c1 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -56,10 +56,7 @@ public class WifiStateTracker implements NetworkStateTracker { private BroadcastReceiver mWifiStateReceiver; private WifiManager mWifiManager; - public WifiStateTracker(Context context, Handler target) { - mCsHandler = target; - mContext = context; - + public WifiStateTracker() { mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, NETWORKTYPE, ""); mNetworkProperties = new NetworkProperties(); @@ -80,7 +77,10 @@ public class WifiStateTracker implements NetworkStateTracker { /** * Begin monitoring wifi connectivity */ - public void startMonitoring() { + public void startMonitoring(Context context, Handler target) { + mCsHandler = target; + mContext = context; + mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); IntentFilter filter = new IntentFilter(); filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); |