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

Commit d9e1359d authored by Thomas Nguyen's avatar Thomas Nguyen Committed by Android (Google) Code Review
Browse files

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

parents 257676d1 09ecd683
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);
            }