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

Commit 7996b240 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix missing app name in call redirection dialog.

When the call redirection dialog issue was fixed, the app name was not
populated in the "Redirect call using <appname>" string.

Test: Perform redirection with redirection app and confirm app name is
present.
Fixes: 154515999

Change-Id: I89397109af4a4b0a4696470ebdb6f711fabf3190
parent 900e03bf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2031,7 +2031,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);
@@ -2050,7 +2051,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);
@@ -2072,8 +2073,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) {