Merge \\"Do not use TetherUtil.setWifiTethering\\" into nyc-mr1-dev am: 62edbf484e

am: 9170100f6c

Change-Id: If1ddb743ac63cced7ef6a75f8f87d3465051a782
This commit is contained in:
Christopher Wiley
2016-07-19 16:07:26 +00:00
committed by android-build-merger
3 changed files with 7 additions and 12 deletions

View File

@@ -19,6 +19,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Icon;
import android.net.ConnectivityManager;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.os.UserHandle;
@@ -102,7 +103,9 @@ public class HotspotCondition extends Condition {
if (admin != null) {
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(context, admin);
} else {
TetherUtil.setWifiTethering(false, context);
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(
Context.CONNECTIVITY_SERVICE);
cm.stopTethering(ConnectivityManager.TETHERING_WIFI);
setActive(false);
}
} else {