summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoger Wang <wangroger@google.com>2019-11-18 18:36:18 +0800
committerRoger Wang <wangroger@google.com>2019-11-18 18:48:15 +0800
commit270020722e8d90d8bb98cdf4d43eaeebe0db6da6 (patch)
treea98d7dda13045e297a69d6ce91b022b515d27083 /service
parent7703348beff18ed6cfe4abec9e4d8ab227833c85 (diff)
Wifi watchdog feature overlay
Add OEM feature overlay for this feature. Enabled by default. Bug: 143540634 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class com.android.server.wifi.WifiLastResortWatchdogTest OK (43 tests) Test: flash device with the default value (true) and config can be overwrite by overlay. Change-Id: I6fdcbdcf742acece3aa5d4a415946f7c98c98bfe
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiLastResortWatchdog.java5
-rw-r--r--service/res/values/config.xml3
-rw-r--r--service/res/values/overlayable.xml1
3 files changed, 8 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
index efc59e64b..5dc799d65 100644
--- a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
+++ b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
@@ -28,6 +28,7 @@ import android.util.Log;
import android.util.Pair;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.wifi.R;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -119,7 +120,7 @@ public class WifiLastResortWatchdog {
private final Handler mHandler;
private final WifiThreadRunner mWifiThreadRunner;
- private boolean mWatchdogFeatureEnabled = true;
+ private boolean mWatchdogFeatureEnabled;
/**
* Local log used for debugging any WifiLastResortWatchdog issues.
@@ -142,6 +143,8 @@ public class WifiLastResortWatchdog {
processMessage(msg);
}
};
+ mWatchdogFeatureEnabled = mContext.getResources()
+ .getBoolean(R.bool.config_wifi_watchdog_enabled);
}
/**
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 0b3623229..3cc44babe 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -225,4 +225,7 @@
<!-- Indicates that a full bugreport should be triggered when wifi diagnostics detects an error on non-user (i.e debug) builds -->
<bool translatable="false" name="config_wifi_diagnostics_bugreport_enabled">false</bool>
+
+ <!-- Indicates that wifi watchdog is enabled on this device -->
+ <bool translatable="false" name="config_wifi_watchdog_enabled">true</bool>
</resources>
diff --git a/service/res/values/overlayable.xml b/service/res/values/overlayable.xml
index 909a669eb..c42212dff 100644
--- a/service/res/values/overlayable.xml
+++ b/service/res/values/overlayable.xml
@@ -98,6 +98,7 @@
<item type="string" name="wifi_tether_configure_ssid_default" />
<item type="string" name="wifi_localhotspot_configure_ssid_default" />
<item type="bool" name="config_wifi_diagnostics_bugreport_enabled" />
+ <item type="bool" name="config_wifi_watchdog_enabled" />
<!-- Params from config.xml that can be overlayed -->
<!-- Params from strings.xml that can be overlayed -->