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

Commit 86c55cc7 authored by Stephanie Bak's avatar Stephanie Bak
Browse files

Revert "Remove PhoneAccountHandle when building the intent to call Voicemail."

This reverts commit ccb08c60.

Reason for revert:
DroidMonitor-triggered revert due to breakage <https://android-build.googleplex.com/builds/quarterdeck?branch=git_qt-qpr1-dev&target=sdk_phone_armv7-sdk&lkgb=7907174&lkbb=7907338&fkbb=7907338>, bug <https://buganizer.corp.google.com/issues/206026332>

Bug: 206026332
Change-Id: I1430939682bbeb03259a2698edffb734f35547b9
parent ccb08c60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
      case CallbackAction.VOICE:
        if (callLogCache.isVoicemailNumber(accountHandle, number)) {
          // Call to generic voicemail number, in case there are multiple accounts
          primaryActionButtonView.setTag(IntentProvider.getReturnVoicemailCallIntentProvider());
          primaryActionButtonView.setTag(IntentProvider.getReturnVoicemailCallIntentProvider(null));
        } else if (canSupportAssistedDialing()) {
          primaryActionButtonView.setTag(
              IntentProvider.getAssistedDialIntentProvider(
+3 −2
Original line number Diff line number Diff line
@@ -146,13 +146,14 @@ public abstract class IntentProvider {
    };
  }

  public static IntentProvider getReturnVoicemailCallIntentProvider() {
  public static IntentProvider getReturnVoicemailCallIntentProvider(
      @Nullable PhoneAccountHandle phoneAccountHandle) {
    return new IntentProvider() {
      @Override
      public Intent getIntent(Context context) {
        return PreCall.getIntent(
            context,
            CallIntentBuilder.forVoicemail(CallInitiationType.Type.CALL_LOG));
            CallIntentBuilder.forVoicemail(phoneAccountHandle, CallInitiationType.Type.CALL_LOG));
      }
    };
  }
+2 −2
Original line number Diff line number Diff line
@@ -113,10 +113,10 @@ public class CallIntentBuilder implements Parcelable {
  }

  public static CallIntentBuilder forVoicemail(
      CallInitiationType.Type callInitiationType) {
      @Nullable PhoneAccountHandle phoneAccountHandle, CallInitiationType.Type callInitiationType) {
    return new CallIntentBuilder(
            Uri.fromParts(PhoneAccount.SCHEME_VOICEMAIL, "", null), callInitiationType)
        .setPhoneAccountHandle(null);
        .setPhoneAccountHandle(phoneAccountHandle);
  }

  public void setUri(@NonNull Uri uri) {
+1 −1
Original line number Diff line number Diff line
@@ -1035,7 +1035,7 @@ public class DialpadFragment extends Fragment

  public void callVoicemail() {
    PreCall.start(
        getContext(), CallIntentBuilder.forVoicemail(CallInitiationType.Type.DIALPAD));
        getContext(), CallIntentBuilder.forVoicemail(null, CallInitiationType.Type.DIALPAD));
    hideAndClearDialpad();
  }

+8 −8
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_activating_title),
          context.getString(R.string.voicemail_error_activating_message),
          VoicemailErrorMessage.createCallVoicemailAction(context));
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()));
    }

    if (Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION == status.notificationChannelState) {
@@ -77,7 +77,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_activation_failed_title),
          context.getString(R.string.voicemail_error_activation_failed_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -85,7 +85,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_no_data_title),
          context.getString(R.string.voicemail_error_no_data_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -93,7 +93,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_no_data_title),
          context.getString(R.string.voicemail_error_no_data_cellular_required_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -101,7 +101,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_bad_config_title),
          context.getString(R.string.voicemail_error_bad_config_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -109,7 +109,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_communication_title),
          context.getString(R.string.voicemail_error_communication_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -117,7 +117,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_server_title),
          context.getString(R.string.voicemail_error_server_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

@@ -125,7 +125,7 @@ public class OmtpVoicemailMessageCreator {
      return new VoicemailErrorMessage(
          context.getString(R.string.voicemail_error_server_connection_title),
          context.getString(R.string.voicemail_error_server_connection_message),
          VoicemailErrorMessage.createCallVoicemailAction(context),
          VoicemailErrorMessage.createCallVoicemailAction(context, status.getPhoneAccountHandle()),
          VoicemailErrorMessage.createRetryAction(context, status));
    }

Loading