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

Commit 6b1a5ee0 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.
Bug: 154515999
Fixes: 155097672
Merged-In: I1ff848c0652413ea82f33de65c4ba14a9d9bfff0
Change-Id: I89397109af4a4b0a4696470ebdb6f711fabf3190
parent ea9b365b
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) {