summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-12 04:00:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-12 04:00:04 +0000
commitc08e37a56604576e02e6e348cc50a09fb4745562 (patch)
tree3aad82c0c817b201a9c83e4d0d304572c0c2732b /service
parent9f5fc7ac7400f64ba6c5f1a376c3abd548a16caa (diff)
parente0adae2b89091561ab918f3cc1ff60f21121e197 (diff)
Merge "ConfigWifiDisableInEcbm: add null check and change default value" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/FrameworkFacade.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/FrameworkFacade.java b/service/java/com/android/server/wifi/FrameworkFacade.java
index a0b510f0f..875154e5b 100644
--- a/service/java/com/android/server/wifi/FrameworkFacade.java
+++ b/service/java/com/android/server/wifi/FrameworkFacade.java
@@ -32,6 +32,7 @@ import android.net.TrafficStats;
import android.net.Uri;
import android.net.ip.IpClientCallbacks;
import android.net.ip.IpClientUtil;
+import android.os.PersistableBundle;
import android.provider.Settings;
import android.telephony.CarrierConfigManager;
import android.util.Log;
@@ -173,12 +174,14 @@ public class FrameworkFacade {
public boolean getConfigWiFiDisableInECBM(Context context) {
CarrierConfigManager configManager = getCarrierConfigManager(context);
- if (configManager != null) {
- return configManager.getConfig().getBoolean(
- CarrierConfigManager.KEY_CONFIG_WIFI_DISABLE_IN_ECBM);
+ if (configManager == null) {
+ return false;
}
- /* Default to TRUE */
- return true;
+ PersistableBundle bundle = configManager.getConfig();
+ if (bundle == null) {
+ return false;
+ }
+ return bundle.getBoolean(CarrierConfigManager.KEY_CONFIG_WIFI_DISABLE_IN_ECBM);
}
public long getTxPackets(String iface) {