summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiInjector.java2
-rw-r--r--service/java/com/android/server/wifi/WifiLastResortWatchdog.java9
2 files changed, 5 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java
index 24e125a29..a0dd45545 100644
--- a/service/java/com/android/server/wifi/WifiInjector.java
+++ b/service/java/com/android/server/wifi/WifiInjector.java
@@ -525,7 +525,7 @@ public class WifiInjector {
mWifiCoreHandlerThread.getLooper(), mFrameworkFacade, mClock, mWifiMetrics,
mWifiConfigManager, mWifiConfigStore, clientModeImpl,
new ConnectToNetworkNotificationBuilder(mContext, mFrameworkFacade));
- mWifiLastResortWatchdog = new WifiLastResortWatchdog(mSelfRecovery, mClock,
+ mWifiLastResortWatchdog = new WifiLastResortWatchdog(this, mClock,
mWifiMetrics, clientModeImpl, clientModeImpl.getHandler().getLooper());
return new WifiConnectivityManager(mContext, getScoringParams(),
clientModeImpl, this,
diff --git a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
index 6a9b2f825..87d060d9b 100644
--- a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
+++ b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
@@ -87,7 +87,7 @@ public class WifiLastResortWatchdog {
private boolean mWatchdogAllowedToTrigger = true;
private long mTimeLastTrigger;
- private SelfRecovery mSelfRecovery;
+ private WifiInjector mWifiInjector;
private WifiMetrics mWifiMetrics;
private ClientModeImpl mClientModeImpl;
private Looper mClientModeImplLooper;
@@ -97,9 +97,9 @@ public class WifiLastResortWatchdog {
// did not fix the problem
private boolean mWatchdogFixedWifi = true;
- WifiLastResortWatchdog(SelfRecovery selfRecovery, Clock clock, WifiMetrics wifiMetrics,
+ WifiLastResortWatchdog(WifiInjector wifiInjector, Clock clock, WifiMetrics wifiMetrics,
ClientModeImpl clientModeImpl, Looper clientModeImplLooper) {
- mSelfRecovery = selfRecovery;
+ mWifiInjector = wifiInjector;
mClock = clock;
mWifiMetrics = wifiMetrics;
mClientModeImpl = clientModeImpl;
@@ -225,8 +225,7 @@ public class WifiLastResortWatchdog {
mWatchdogFixedWifi = true;
Log.e(TAG, "Watchdog triggering recovery");
mTimeLastTrigger = mClock.getElapsedSinceBootMillis();
- mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
- // increment various watchdog trigger count stats
+ mWifiInjector.getSelfRecovery().trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
incrementWifiMetricsTriggerCounts();
clearAllFailureCounts();
}