Merge "Only start tether when not already enabled" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-26 20:57:57 +00:00
committed by Android (Google) Code Review
2 changed files with 27 additions and 6 deletions

View File

@@ -91,10 +91,10 @@ public class WifiTetherSwitchBarController implements SwitchWidgetController.OnS
@Override
public boolean onSwitchToggled(boolean isChecked) {
if (isChecked) {
startTether();
} else {
if (!isChecked) {
stopTether();
} else if (!mWifiManager.isWifiApEnabled()) {
startTether();
}
return true;
}