Loading java/com/android/dialer/dialpadview/DialpadFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -470,11 +470,13 @@ public class DialpadFragment extends Fragment } if (shouldShowEmergencyCallWarning(getContext())) { digitsHint.setText( getContext().getString(R.string.dialpad_hint_emergency_calling_not_available)); String hint = getContext().getString(R.string.dialpad_hint_emergency_calling_not_available); digits.setContentDescription(hint); digitsHint.setText(hint); digitsHint.setVisibility(View.VISIBLE); return; } digits.setContentDescription(null); digitsHint.setVisibility(View.GONE); } Loading java/com/android/dialer/dialpadview/res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ Ignored if empty. --> <string name="config_prohibited_phone_number_regexp" translatable="false"></string> <!-- Warning hint shown in the dialpad input field when emergency call (911, etc.) cannot be made. <!-- Warning hint shown in the dialpad input field when emergency call (911, etc.) cannot be made over wifi. [CHAR_LIMIT=60] --> <string name="dialpad_hint_emergency_calling_not_available">Emergency calling not available</string> <string name="dialpad_hint_emergency_calling_not_available">Can\'t make emergency calls over WiFi</string> <!-- Dialog message which is shown when the user tries to make a phone call to prohibited phone numbers [CHAR LIMIT=NONE] --> Loading java/com/android/dialer/precall/impl/CallingAccountSelector.java +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.support.annotation.VisibleForTesting; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener; import com.android.dialer.callintent.CallIntentBuilder; Loading Loading @@ -65,6 +66,10 @@ public class CallingAccountSelector implements PreCallAction { if (builder.getPhoneAccountHandle() != null) { return false; } if (PhoneNumberUtils.isEmergencyNumber(builder.getUri().getSchemeSpecificPart())) { return false; } TelecomManager telecomManager = context.getSystemService(TelecomManager.class); List<PhoneAccountHandle> accounts = telecomManager.getCallCapablePhoneAccounts(); if (accounts.size() <= 1) { Loading java/com/android/incallui/CallButtonPresenter.java +2 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,8 @@ public class CallButtonPresenter otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle()); boolean showSwapSim = otherAccount != null !call.isEmergencyCall() && otherAccount != null && !call.isVoiceMailNumber() && DialerCall.State.isDialing(call.getState()) // Most devices cannot make calls on 2 SIMs at the same time. Loading Loading
java/com/android/dialer/dialpadview/DialpadFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -470,11 +470,13 @@ public class DialpadFragment extends Fragment } if (shouldShowEmergencyCallWarning(getContext())) { digitsHint.setText( getContext().getString(R.string.dialpad_hint_emergency_calling_not_available)); String hint = getContext().getString(R.string.dialpad_hint_emergency_calling_not_available); digits.setContentDescription(hint); digitsHint.setText(hint); digitsHint.setVisibility(View.VISIBLE); return; } digits.setContentDescription(null); digitsHint.setVisibility(View.GONE); } Loading
java/com/android/dialer/dialpadview/res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ Ignored if empty. --> <string name="config_prohibited_phone_number_regexp" translatable="false"></string> <!-- Warning hint shown in the dialpad input field when emergency call (911, etc.) cannot be made. <!-- Warning hint shown in the dialpad input field when emergency call (911, etc.) cannot be made over wifi. [CHAR_LIMIT=60] --> <string name="dialpad_hint_emergency_calling_not_available">Emergency calling not available</string> <string name="dialpad_hint_emergency_calling_not_available">Can\'t make emergency calls over WiFi</string> <!-- Dialog message which is shown when the user tries to make a phone call to prohibited phone numbers [CHAR LIMIT=NONE] --> Loading
java/com/android/dialer/precall/impl/CallingAccountSelector.java +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.support.annotation.VisibleForTesting; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener; import com.android.dialer.callintent.CallIntentBuilder; Loading Loading @@ -65,6 +66,10 @@ public class CallingAccountSelector implements PreCallAction { if (builder.getPhoneAccountHandle() != null) { return false; } if (PhoneNumberUtils.isEmergencyNumber(builder.getUri().getSchemeSpecificPart())) { return false; } TelecomManager telecomManager = context.getSystemService(TelecomManager.class); List<PhoneAccountHandle> accounts = telecomManager.getCallCapablePhoneAccounts(); if (accounts.size() <= 1) { Loading
java/com/android/incallui/CallButtonPresenter.java +2 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,8 @@ public class CallButtonPresenter otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle()); boolean showSwapSim = otherAccount != null !call.isEmergencyCall() && otherAccount != null && !call.isVoiceMailNumber() && DialerCall.State.isDialing(call.getState()) // Most devices cannot make calls on 2 SIMs at the same time. Loading