Merge "TetherUtil: Use ConnectivityManager for tethering" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fb0ec9de84
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user