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

Commit c4477dcb authored by Thomas Nguyen's avatar Thomas Nguyen Committed by Automerger Merge Worker
Browse files

Merge "Enforce the event EVENT_DISPLAY_SOS_MESSAGE sent only for emergency...

Merge "Enforce the event EVENT_DISPLAY_SOS_MESSAGE sent only for emergency call" into udc-dev am: d9e1359d

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



Change-Id: Id5181c8a862471590bede8ab36b27764a022e248
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents df577e3f d9e1359d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.telecom;

import static android.provider.CallLog.Calls.MISSED_REASON_NOT_MISSED;
import static android.telecom.Call.EVENT_DISPLAY_SOS_MESSAGE;

import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -4083,6 +4084,12 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
                l.onReceivedCallQualityReport(this, callQuality);
            }
        } else {
            if (event.equals(EVENT_DISPLAY_SOS_MESSAGE) && !isEmergencyCall()) {
                Log.w(this, "onConnectionEvent: EVENT_DISPLAY_SOS_MESSAGE is sent "
                        + "without an emergency call");
                return;
            }

            for (Listener l : mListeners) {
                l.onConnectionEvent(this, event, extras);
            }