Merge "Tethering: Don't crash if wifi unavailable." am: 084e8536d1 am: b1b7db8c76 am: 911b4cf5cd
Change-Id: I62927826271d36eb89f39ac076f0bf9522a61423
This commit is contained in:
@@ -314,9 +314,13 @@ public class Tethering {
|
||||
|
||||
startStateMachineUpdaters(mHandler);
|
||||
startTrackDefaultNetwork();
|
||||
getWifiManager().registerSoftApCallback(
|
||||
mHandler::post /* executor */,
|
||||
new TetheringSoftApCallback());
|
||||
|
||||
final WifiManager wifiManager = getWifiManager();
|
||||
if (wifiManager != null) {
|
||||
wifiManager.registerSoftApCallback(
|
||||
mHandler::post /* executor */,
|
||||
new TetheringSoftApCallback());
|
||||
}
|
||||
}
|
||||
|
||||
private void startStateMachineUpdaters(Handler handler) {
|
||||
|
||||
Reference in New Issue
Block a user