Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd471190 authored by twyen's avatar twyen Committed by android-build-merger
Browse files

Merge changes I54dbbaad,If0adf10a am: c4d4925c am: 3655448f

am: 53caea0c

Change-Id: I493129bc0832b418017ee72199b64e2c3e4b409c
parents 84d8fb9f 53caea0c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
  }

+2 −2
Original line number Diff line number Diff line
@@ -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] -->
+5 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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) {
+2 −1
Original line number Diff line number Diff line
@@ -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.