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

Commit 8f328fdf authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Clear calling identity inside shouldSendSmsToDatagramDispatcher

Bug: 378982497
Test: Manally tested SMS/CALLS/MMS/DATA
FLAG: EXEMPT bugfix
Change-Id: Id7820c5493aa5cf02de63355318d6196668a07f9
parent 6128ce23
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -193,7 +193,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import com.android.internal.R;

/**
 * Satellite controller is the backend service of
@@ -8051,6 +8050,8 @@ public class SatelliteController extends Handler {

    /** Returns whether to send SMS to DatagramDispatcher or not. */
    public boolean shouldSendSmsToDatagramDispatcher(@Nullable Phone phone) {
        final long identity = Binder.clearCallingIdentity();
        try {
            if (!isInCarrierRoamingNbIotNtn(phone)) {
                return false;
            }
@@ -8061,5 +8062,8 @@ public class SatelliteController extends Handler {

            int[] services = getSupportedServicesOnCarrierRoamingNtn(phone.getSubId());
            return ArrayUtils.contains(services, NetworkRegistrationInfo.SERVICE_TYPE_SMS);
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }
}