Allow TetherService to take a callback to receiver provision results.

See ag/850685 for corresponding framework changes. This is being done
as part of exposing a cleaner tethering API which will be used by
Quick Settings and Settings.

BUG: 26247383
Change-Id: I061b8b8b2b0c5bbe98f50deb051e2bfb8e773d61
This commit is contained in:
Jeremy Klein
2016-01-22 16:14:05 -08:00
parent 20c9817713
commit 8a934767dc
3 changed files with 63 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ package com.android.settings;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import android.util.Log;
@@ -25,7 +26,8 @@ public class HotspotOffReceiver extends BroadcastReceiver {
if (wifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_DISABLED) {
if (DEBUG) Log.d(TAG, "TetherService.cancelRecheckAlarmIfNecessary called");
// The hotspot has been turned off, we don't need to recheck tethering.
TetherService.cancelRecheckAlarmIfNecessary(context, TetherUtil.TETHERING_WIFI);
TetherService.cancelRecheckAlarmIfNecessary(
context, ConnectivityManager.TETHERING_WIFI);
}
}
}