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

Commit 9b351e94 authored by Jack Yu's avatar Jack Yu
Browse files

Added missed incoming call SMS support

Provided a way for carrier to notify their users
about missed incoming call via special SMS.

Bug: 144068181
Test: MissedIncomingCallSmsFilterTest
Change-Id: I6da064bd20f3b187f2e5b74376af694bfb612c54
parent bbd43ec0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -311,7 +311,18 @@ public final class CallLogManager extends CallsManagerListenerBase {
     */
    void logCall(Call call, int callLogType,
        @Nullable LogCallCompletedListener logCallCompletedListener, CallFilteringResult result) {
        final long creationTime = call.getCreationTimeMillis();
        long creationTime;

        if (call.getConnectTimeMillis() != 0
                && call.getConnectTimeMillis() < call.getCreationTimeMillis()) {
            // If connected time is available, use connected time. The connected time might be
            // earlier than created time since it might come from carrier sent special SMS to
            // notifier user earlier missed call.
            creationTime = call.getConnectTimeMillis();
        } else {
            creationTime = call.getCreationTimeMillis();
        }

        final long age = call.getAgeMillis();

        final String logNumber = getLogNumber(call);
+5 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import android.telecom.PhoneAccountHandle;
import android.telecom.StatusHints;
import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
import android.telephony.TelephonyManager;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telecom.IConnectionService;
@@ -1918,6 +1917,11 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
            // A connection that begins in the DISCONNECTED state is an indication of
            // failure to connect; we handle all failures uniformly
            Call foundCall = mCallIdMapper.getCall(callId);

            if (connection.getConnectTimeMillis() != 0) {
                foundCall.setConnectTimeMillis(connection.getConnectTimeMillis());
            }

            if (foundCall != null) {
                // The post-dial digits are created when the call is first created.  Normally
                // the ConnectionService is responsible for stripping them from the address, but