Merge "Register for ACTION_WIFI_SCAN_AVAILABILITY_CHANGED" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0fffed6154
@@ -259,13 +259,16 @@ public class ContextHubService extends IContextHubService.Stub {
|
||||
BroadcastReceiver wifiReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(intent.getAction())) {
|
||||
if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(intent.getAction())
|
||||
|| WifiManager.ACTION_WIFI_SCAN_AVAILABILITY_CHANGED.equals(
|
||||
intent.getAction())) {
|
||||
sendWifiSettingUpdate(false /* forceUpdate */);
|
||||
}
|
||||
}
|
||||
};
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.ACTION_WIFI_SCAN_AVAILABILITY_CHANGED);
|
||||
mContext.registerReceiver(wifiReceiver, filter);
|
||||
|
||||
mContext.getContentResolver().registerContentObserver(
|
||||
|
||||
Reference in New Issue
Block a user