Wifi Setting: Use SoftApConfiguration for Tether Setting
Bug: 145578449 Test: Manual Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest Change-Id: I02b4dcbb7b6e29b67ecc7356200f3fc3a1007562
This commit is contained in:
@@ -22,7 +22,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.SoftApConfiguration;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -114,13 +114,12 @@ public class HotspotConditionController implements ConditionalCardController {
|
||||
}
|
||||
|
||||
private CharSequence getSsid() {
|
||||
WifiConfiguration wifiConfig = mWifiManager.getWifiApConfiguration();
|
||||
if (wifiConfig == null) {
|
||||
final SoftApConfiguration softApConfig = mWifiManager.getSoftApConfiguration();
|
||||
if (softApConfig == null) {
|
||||
// Should never happen.
|
||||
return "";
|
||||
} else {
|
||||
return wifiConfig.SSID;
|
||||
}
|
||||
return softApConfig.getSsid();
|
||||
}
|
||||
|
||||
public class Receiver extends BroadcastReceiver {
|
||||
|
Reference in New Issue
Block a user