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

Commit 1e1ff94b 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
Merged-In: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
Change-Id: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
(cherry picked from commit 0630b6c3)
parent 3f9ddc30
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3358,7 +3358,6 @@ public abstract class Connection extends Conferenceable {
        private boolean mImmutable = false;
        public FailureSignalingConnection(DisconnectCause disconnectCause) {
            setDisconnected(disconnectCause);
            mImmutable = true;
        }

        public void checkImmutable() {
+8 −0
Original line number Diff line number Diff line
@@ -329,6 +329,14 @@ public class TelecomManager {
    public static final String EXTRA_CALL_CREATED_TIME_MILLIS =
            "android.telecom.extra.CALL_CREATED_TIME_MILLIS";

    /**
     * Optional extra for incoming and outgoing calls containing a long which specifies the Epoch
     * time the call was created.
     * @hide
     */
    public static final String EXTRA_CALL_CREATED_EPOCH_TIME_MILLIS =
            "android.telecom.extra.CALL_CREATED_EPOCH_TIME_MILLIS";

    /**
     * Optional extra for incoming and outgoing calls containing a long which specifies the time
     * telecom began routing the call. This value is in milliseconds since boot.
+27 −0
Original line number Diff line number Diff line
@@ -3549,6 +3549,30 @@ public class CarrierConfigManager {
    public static final String KEY_SHOW_FORWARDED_NUMBER_BOOL =
            "show_forwarded_number_bool";

    /**
     * The list of originating address of missed incoming call SMS. If the SMS has originator
     * matched, the SMS will be treated as special SMS for notifying missed incoming call to the
     * user.
     *
     * @hide
     */
    public static final String KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY =
            "missed_incoming_call_sms_originator_string_array";

    /**
     * The patterns of missed incoming call sms. This is the regular expression used for
     * matching the missed incoming call's date, time, and caller id. The pattern should match
     * fields for at least month, day, hour, and minute. Year is optional although it is encouraged.
     *
     * An usable pattern should look like this:
     * ^(?<month>0[1-9]|1[012])\/(?<day>0[1-9]|1[0-9]|2[0-9]|3[0-1]) (?<hour>[0-1][0-9]|2[0-3]):
     * (?<minute>[0-5][0-9])\s*(?<callerId>[0-9]+)\s*$
     *
     * @hide
     */
    public static final String KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY =
            "missed_incoming_call_sms_pattern_string_array";

    /** The default value for every variable. */
    private final static PersistableBundle sDefaults;

@@ -4057,6 +4081,9 @@ public class CarrierConfigManager {
        sDefaults.putBoolean(ENABLE_EAP_METHOD_PREFIX_BOOL, false);
        sDefaults.putBoolean(KEY_SHOW_FORWARDED_NUMBER_BOOL, false);
        sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG, TimeUnit.DAYS.toMillis(1));
        sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY,
                new String[0]);
        sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]);
    }

    /**