diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-12 04:14:00 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-12 04:14:00 +0000 |
commit | 6e36111107aefa3fcb1344d20e79ac592b0053c2 (patch) | |
tree | 570175f4e4563cb4009c59960581fb7f02ac435c /service | |
parent | 879a88eaef623d6a5eb5e60ad95a65b9693b1239 (diff) | |
parent | c08e37a56604576e02e6e348cc50a09fb4745562 (diff) |
Merge "ConfigWifiDisableInEcbm: add null check and change default value" into rvc-dev am: c08e37a566
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/11844679
Change-Id: Iad1a628a8ec74f41f00ae27706b3264c5564bdc3
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) { |