summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/Utils.java
diff options
context:
space:
mode:
authorEvan Laird <evanlaird@google.com>2019-01-08 14:16:29 -0500
committerEvan Laird <evanlaird@google.com>2019-01-08 14:28:33 -0500
commit0e48aacfb339df4240ae3bb34a7bfa828a33caf5 (patch)
treee62de50d30f4af3954e3983c822ea1deed83a803 /packages/SettingsLib/src/com/android/settingslib/Utils.java
parentf2841e2c90e36205dc72b04df41b846225c09ec8 (diff)
Exclude IWLAN network type from isInService check
The current behavior of MobileNetworkController is to consider the device in service if we have an out_of_service service state, but an in_service data reg state. This is to handle "data only" SIM cards. This change excludes IWLAN network types from this behavior because that is the state of wifi calling and shouldn't cause the device to report cell service. Change-Id: I408fe282ebeb00425776b745abee0468ac0567c9 Fixes: 111958683 Test: atest com.android.settingslib.UtilsTest#isInService_voiceOutOfServiceDataOutOfService_returnFalse
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/Utils.java')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/Utils.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index 6abe76a1e753..595aeb3ecc10 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -1,5 +1,7 @@
package com.android.settingslib;
+import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
+
import android.annotation.ColorInt;
import android.content.Context;
import android.content.Intent;
@@ -429,12 +431,14 @@ public class Utils {
// and do not support voice service, and on these SIM cards, we
// want to show signal bars for data service as well as the "no
// service" or "emergency calls only" text that indicates that voice
- // is not available.
+ // is not available. Note that we ignore the IWLAN service state
+ // because that state indicates the use of VoWIFI and not cell service
int state = serviceState.getState();
int dataState = serviceState.getDataRegState();
if (state == ServiceState.STATE_OUT_OF_SERVICE
|| state == ServiceState.STATE_EMERGENCY_ONLY) {
- if (dataState == ServiceState.STATE_IN_SERVICE) {
+ if (dataState == ServiceState.STATE_IN_SERVICE
+ && serviceState.getDataNetworkType() != RIL_RADIO_TECHNOLOGY_IWLAN) {
return ServiceState.STATE_IN_SERVICE;
}
}