resolved conflicts for merge of f9360dbc
to master
Change-Id: I2e468d83a7ce5200c59f63b4362e7bee10d0a2eb
This commit is contained in:
@@ -100,20 +100,27 @@ public class WifiEnabler implements SwitchBar.OnSwitchChangeListener {
|
||||
// The order matters! We really should not depend on this. :(
|
||||
mIntentFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);
|
||||
mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
|
||||
setupSwitchBar();
|
||||
}
|
||||
|
||||
public void setupSwitchBar() {
|
||||
mSwitchBar.addOnSwitchChangeListener(this);
|
||||
mSwitchBar.show();
|
||||
}
|
||||
|
||||
public void teardownSwitchBar() {
|
||||
mSwitchBar.removeOnSwitchChangeListener(this);
|
||||
mSwitchBar.hide();
|
||||
}
|
||||
|
||||
public void resume(Context context) {
|
||||
mContext = context;
|
||||
// Wi-Fi state is sticky, so just let the receiver update UI
|
||||
mContext.registerReceiver(mReceiver, mIntentFilter);
|
||||
mSwitchBar.addOnSwitchChangeListener(this);
|
||||
mSwitchBar.show();
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
mContext.unregisterReceiver(mReceiver);
|
||||
mSwitchBar.removeOnSwitchChangeListener(this);
|
||||
mSwitchBar.hide();
|
||||
}
|
||||
|
||||
private void handleWifiStateChanged(int state) {
|
||||
|
Reference in New Issue
Block a user