aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2013-07-08 16:25:40 -0700
committerWink Saville <wink@google.com>2013-07-08 16:25:40 -0700
commit9c430a4d72c8c962caefb916e82a4c82eca7068c (patch)
tree53b4bc4af5f8f6fa0085309898685178b1e24290
parent0c5a2697697b49228bd2e23dc8d8217877a0fd7b (diff)
downloadtelephony-jb-mr2.0-release.tar.gz
Only show "Emergency calls only" if a GSM device is voice capable.android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1jb-mr2.0-releasejb-mr2-dev
This fix uses the config_voice_capable compile time switch to be sure GsmServiceStateTracker.mEmergencyOnly is false if the device isn't voice capable. Thus GsmServiceStateTracker.updateSpnDisplay will not send the SPN_STRINGS_UPDATED_ACTION intent with emergency_calls_only as the PLMN. Instead, it will aways be the string defined by the lockscreen_carrier_default, typically "No service". Bug: 9422921 Change-Id: I74e89c4a29d0d8e3d5cc1726adedb0c2634cf257
-rw-r--r--src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 1ce08c38da..acb4972538 100644
--- a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -642,10 +642,13 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
mNewSS.setState(regCodeToServiceState(regState));
mNewSS.setRilVoiceRadioTechnology(type);
- if (regState == ServiceState.RIL_REG_STATE_DENIED_EMERGENCY_CALL_ENABLED
+ boolean isVoiceCapable = mPhoneBase.getContext().getResources()
+ .getBoolean(com.android.internal.R.bool.config_voice_capable);
+ if ((regState == ServiceState.RIL_REG_STATE_DENIED_EMERGENCY_CALL_ENABLED
|| regState == ServiceState.RIL_REG_STATE_NOT_REG_EMERGENCY_CALL_ENABLED
|| regState == ServiceState.RIL_REG_STATE_SEARCHING_EMERGENCY_CALL_ENABLED
- || regState == ServiceState.RIL_REG_STATE_UNKNOWN_EMERGENCY_CALL_ENABLED) {
+ || regState == ServiceState.RIL_REG_STATE_UNKNOWN_EMERGENCY_CALL_ENABLED)
+ && isVoiceCapable) {
mEmergencyOnly = true;
} else {
mEmergencyOnly = false;