Merge "Tethering: Don't crash if wifi unavailable." am: 084e8536d1
Change-Id: If873646e8e9ef2d79abd0ef19ae623e2f5ada7ac
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