Merge "TetherUtil: Use ConnectivityManager for tethering" into nyc-mr1-dev

This commit is contained in:
TreeHugger Robot
2016-07-19 15:55:30 +00:00
committed by Android (Google) Code Review

View File

@@ -16,18 +16,11 @@
package com.android.settingslib;
import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.SystemProperties;
import android.telephony.CarrierConfigManager;
public class TetherUtil {
public static boolean setWifiTethering(boolean enable, Context context) {
final WifiManager wifiManager =
(WifiManager) context.getSystemService(Context.WIFI_SERVICE);
return wifiManager.setWifiApEnabled(null, enable);
}
private static boolean isEntitlementCheckRequired(Context context) {
final CarrierConfigManager configManager = (CarrierConfigManager) context
.getSystemService(Context.CARRIER_CONFIG_SERVICE);