diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-12 04:00:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-06-12 04:00:04 +0000 |
commit | c08e37a56604576e02e6e348cc50a09fb4745562 (patch) | |
tree | 3aad82c0c817b201a9c83e4d0d304572c0c2732b /service | |
parent | 9f5fc7ac7400f64ba6c5f1a376c3abd548a16caa (diff) | |
parent | e0adae2b89091561ab918f3cc1ff60f21121e197 (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.java | 13 |
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) { |