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

Commit 67c59e98 authored by Tyler Gunn's avatar Tyler Gunn Committed by Automerger Merge Worker
Browse files

Propagate verstat from extras if present. am: 401cfd3a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/15180570

Change-Id: I6881320fd34260d533df419f79a41d6794adff0b
parents 2a35ae95 401cfd3a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        void onBluetoothCallQualityReport(Call call, BluetoothCallQualityReport report);
        void onReceivedDeviceToDeviceMessage(Call call, int messageType, int messageValue);
        void onReceivedCallQualityReport(Call call, CallQuality callQuality);
        void onCallerNumberVerificationStatusChanged(Call call, int callerNumberVerificationStatus);
    }

    public abstract static class ListenerBase implements Listener {
@@ -258,6 +259,9 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        public void onReceivedDeviceToDeviceMessage(Call call, int messageType, int messageValue) {}
        @Override
        public void onReceivedCallQualityReport(Call call, CallQuality callQuality) {}
        @Override
        public void onCallerNumberVerificationStatusChanged(Call call,
                int callerNumberVerificationStatus) {}
    }

    private final CallerInfoLookupHelper.OnQueryCompleteListener mCallerInfoQueryListener =
@@ -1323,6 +1327,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
    public void setCallerNumberVerificationStatus(
            @Connection.VerificationStatus int callerNumberVerificationStatus) {
        mCallerNumberVerificationStatus = callerNumberVerificationStatus;
        mListeners.forEach(l -> l.onCallerNumberVerificationStatusChanged(this,
                callerNumberVerificationStatus));
    }

    public @Connection.VerificationStatus int getCallerNumberVerificationStatus() {
@@ -2754,6 +2760,16 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            setOriginalConnectionId(extras.getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID));
        }

        if (extras.containsKey(Connection.EXTRA_CALLER_NUMBER_VERIFICATION_STATUS)
                && source == SOURCE_CONNECTION_SERVICE) {
            int callerNumberVerificationStatus =
                    extras.getInt(Connection.EXTRA_CALLER_NUMBER_VERIFICATION_STATUS);
            if (mCallerNumberVerificationStatus != callerNumberVerificationStatus) {
                Log.addEvent(this, LogUtils.Events.VERSTAT_CHANGED, callerNumberVerificationStatus);
                setCallerNumberVerificationStatus(callerNumberVerificationStatus);
            }
        }

        // The remote connection service API can track the phone account which was originally
        // requested to create a connection via the remote connection service API; we store that so
        // we have some visibility into how a call was actually placed.
+6 −0
Original line number Diff line number Diff line
@@ -893,6 +893,12 @@ public class InCallController extends CallsManagerListenerBase implements
        public void onRemoteRttRequest(Call call, int requestId) {
            notifyRemoteRttRequest(call, requestId);
        }

        @Override
        public void onCallerNumberVerificationStatusChanged(Call call,
                int callerNumberVerificationStatus) {
            updateCall(call);
        }
    };

    private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
+1 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ public class LogUtils {
        public static final String OVERRIDE_DISCONNECT_MESSAGE = "OVERRIDE_DISCONNECT_MSG";
        public static final String CALL_DIAGNOSTIC_SERVICE_TIMEOUT =
                "CALL_DIAGNOSTIC_SERVICE_TIMEOUT";
        public static final String VERSTAT_CHANGED = "VERSTAT_CHANGED";

        public static class Timings {
            public static final String ACCEPT_TIMING = "accept";