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

Commit b99702b1 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Fix missing app name in call redirection dialog."

parents 68518e59 6b1a5ee0
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2025,7 +2025,8 @@ public class CallsManager extends Call.ListenerBase
                            + "callId=%s, callRedirectionAppName=%s",
                    call.getId(), callRedirectionApp);

            showRedirectionDialog(call.getId());
            showRedirectionDialog(call.getId(),
                    mRoleManagerAdapter.getApplicationLabelForPackageName(callRedirectionApp));
        } else {
            call.setTargetPhoneAccount(phoneAccountHandle);
            placeOutgoingCall(call, handle, gatewayInfo, speakerphoneOn, videoState);
@@ -2044,7 +2045,7 @@ public class CallsManager extends Call.ListenerBase
     * content on the screen.
     * @param callId The ID of the call to show the redirection dialog for.
     */
    private void showRedirectionDialog(@NonNull String callId) {
    private void showRedirectionDialog(@NonNull String callId, @NonNull CharSequence appName) {
        AlertDialog confirmDialog = new AlertDialog.Builder(mContext).create();
        LayoutInflater layoutInflater = LayoutInflater.from(mContext);
        View dialogView = layoutInflater.inflate(R.layout.call_redirection_confirm_dialog, null);
@@ -2066,8 +2067,8 @@ public class CallsManager extends Call.ListenerBase
        });

        Button buttonSecondLine = (Button) dialogView.findViewById(R.id.buttonSecondLine);
        buttonSecondLine.setText(mContext.getText(
                R.string.alert_place_outgoing_call_with_redirection));
        buttonSecondLine.setText(mContext.getString(
                R.string.alert_place_outgoing_call_with_redirection, appName));
        buttonSecondLine.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {