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

Commit 23ab08bb authored by Thomas Stuart's avatar Thomas Stuart Committed by Android (Google) Code Review
Browse files

Merge "Log the business call composer values if set" into main

parents 5c6f17ba 885a9312
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -22,10 +22,16 @@ flag{
  bug: "292597423"
}


flag{
  name: "set_mute_state"
  namespace: "telecom"
  description: "transactional calls need the ability to mute the call audio input"
  bug: "310669304"
}

flag{
  name: "business_call_composer"
  namespace: "telecom"
  description: "Enables enriched calling features (e.g. Business name will show for a call)"
  bug: "311688497"
}
+7 −1
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.util.Pair;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.telecom.callfiltering.CallFilteringResult;
import com.android.server.telecom.flags.FeatureFlags;
import com.android.server.telecom.flags.Flags;

import java.util.Arrays;
import java.util.Locale;
@@ -418,7 +419,12 @@ public final class CallLogManager extends CallsManagerListenerBase {
        paramBuilder.setCallType(callLogType);
        paramBuilder.setIsRead(call.isSelfManaged());
        paramBuilder.setMissedReason(call.getMissedReason());

        if (Flags.businessCallComposer() && call.getExtras() != null) {
            paramBuilder.setIsBusinessCall(call.getExtras().getBoolean(
                    android.telecom.Call.EXTRA_IS_BUSINESS_CALL, false));
            paramBuilder.setBusinessName(call.getExtras().getString(
                    android.telecom.Call.EXTRA_ASSERTED_DISPLAY_NAME, ""));
        }
        sendAddCallBroadcast(callLogType, call.getAgeMillis());

        boolean okayToLog =
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class ParcelableCallUtils {
        RESTRICTED_CALL_SCREENING_EXTRA_KEYS = new ArrayList<>();
        RESTRICTED_CALL_SCREENING_EXTRA_KEYS.add(android.telecom.Connection.EXTRA_SIP_INVITE);
        RESTRICTED_CALL_SCREENING_EXTRA_KEYS.add(ImsCallProfile.EXTRA_IS_BUSINESS_CALL);
        RESTRICTED_CALL_SCREENING_EXTRA_KEYS.add(ImsCallProfile.EXTRA_ASSERTED_DISPLAY_NAME);
    }

    public static class Converter {
+5 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import com.android.server.telecom.flags.Flags;

import java.util.Collection;
import java.util.List;
import java.util.Optional;
@@ -263,6 +265,8 @@ public class TestInCallUI extends Activity {
                        .getIntentExtras().getString(TelecomManager.EXTRA_CALL_SUBJECT);
                boolean isBusiness = call.getDetails()
                        .getExtras().getBoolean(ImsCallProfile.EXTRA_IS_BUSINESS_CALL);
                String businessName = call.getDetails()
                            .getExtras().getString(ImsCallProfile.EXTRA_ASSERTED_DISPLAY_NAME);

                StringBuilder display = new StringBuilder();
                display.append("priority=");
@@ -286,6 +290,7 @@ public class TestInCallUI extends Activity {

                display.append(" subject=" + subject);
                display.append(" isBusiness=" + isBusiness);
                display.append(" businessName=" + businessName);
                TextView attachmentsTextView = findViewById(R.id.incoming_composer_attachments);
                attachmentsTextView.setText(display.toString());
                break;