Loading packages/Keyguard/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -399,4 +399,5 @@ number">%d</xliff:g> remaining attempt before SIM becomes permanently unusable. number">%d</xliff:g> remaining attempts before SIM becomes permanently unusable. Contact carrier for details.</item> </plurals> <string name="button_lockscreen_emergency_call">Emergency call</string> </resources> packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +18 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ public class EmergencyButton extends Button { private final boolean mIsVoiceCapable; private final boolean mEnableEmergencyCallWhileSimLocked; private final boolean mIsCarrierSupported = isCarrierOneSupported(); public static final String PROPERTY_RADIO_ATEL_CARRIER = "persist.radio.atel.carrier"; public static final String CARRIER_ONE_DEFAULT_MCC_MNC = "405854"; public EmergencyButton(Context context) { this(context, null); Loading Loading @@ -172,9 +176,14 @@ public class EmergencyButton extends Button { int textId; if (isInCall()) { textId = com.android.internal.R.string.lockscreen_return_to_call; } else { if (mIsCarrierSupported) { // Text "Emergency call" textId = R.string.button_lockscreen_emergency_call; } else { textId = com.android.internal.R.string.lockscreen_emergency_call; } } setText(textId); } else { setVisibility(View.GONE); Loading Loading @@ -202,4 +211,12 @@ public class EmergencyButton extends Button { private TelecomManager getTelecommManager() { return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); } /** * Check is carrier one supported or not */ public static boolean isCarrierOneSupported() { String property = SystemProperties.get(PROPERTY_RADIO_ATEL_CARRIER); return CARRIER_ONE_DEFAULT_MCC_MNC.equals(property); } } Loading
packages/Keyguard/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -399,4 +399,5 @@ number">%d</xliff:g> remaining attempt before SIM becomes permanently unusable. number">%d</xliff:g> remaining attempts before SIM becomes permanently unusable. Contact carrier for details.</item> </plurals> <string name="button_lockscreen_emergency_call">Emergency call</string> </resources>
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +18 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ public class EmergencyButton extends Button { private final boolean mIsVoiceCapable; private final boolean mEnableEmergencyCallWhileSimLocked; private final boolean mIsCarrierSupported = isCarrierOneSupported(); public static final String PROPERTY_RADIO_ATEL_CARRIER = "persist.radio.atel.carrier"; public static final String CARRIER_ONE_DEFAULT_MCC_MNC = "405854"; public EmergencyButton(Context context) { this(context, null); Loading Loading @@ -172,9 +176,14 @@ public class EmergencyButton extends Button { int textId; if (isInCall()) { textId = com.android.internal.R.string.lockscreen_return_to_call; } else { if (mIsCarrierSupported) { // Text "Emergency call" textId = R.string.button_lockscreen_emergency_call; } else { textId = com.android.internal.R.string.lockscreen_emergency_call; } } setText(textId); } else { setVisibility(View.GONE); Loading Loading @@ -202,4 +211,12 @@ public class EmergencyButton extends Button { private TelecomManager getTelecommManager() { return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); } /** * Check is carrier one supported or not */ public static boolean isCarrierOneSupported() { String property = SystemProperties.get(PROPERTY_RADIO_ATEL_CARRIER); return CARRIER_ONE_DEFAULT_MCC_MNC.equals(property); } }