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

Commit 1819552c authored by Tyler Gunn's avatar Tyler Gunn Committed by Automerger Merge Worker
Browse files

Fix missing app name in call redirection dialog. am: 7996b240

Change-Id: I39e78cb406b8a1270b64937d2849ddf75762053a
parents 5698a889 7996b240
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) {