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

Commit b81a58e1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12710726 from 9a1ed7c3 to 25Q1-release

Change-Id: I71f958dbafd9a8eb444137d1f17e38d116100870
parents 512b44a6 9a1ed7c3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8093,7 +8093,8 @@ public class SatelliteController extends Handler {
                NTN_SIGNAL_STRENGTH_NONE);

        if (isInCarrierRoamingNbIotNtn(phone)) {
            if (mSatelliteSessionController.isInConnectedState()) {
            if (mSatelliteSessionController != null
                    && mSatelliteSessionController.isInConnectedState()) {
                synchronized (mNtnSignalsStrengthLock) {
                    carrierRoamingNtnSignalStrength = mNtnSignalStrength;
                }
+13 −1
Original line number Diff line number Diff line
@@ -555,31 +555,43 @@ public class SatelliteServiceUtils {
        convertedSpecifier.mMccMnc = systemSelectionSpecifier.getMccMnc();
        convertedSpecifier.mBands = systemSelectionSpecifier.getBands().toArray();
        convertedSpecifier.mEarfcs = systemSelectionSpecifier.getEarfcns().toArray();

        SatelliteInfo[] satelliteInfos = systemSelectionSpecifier.getSatelliteInfos();
        android.telephony.satellite.stub.SatelliteInfo[] halSatelliteInfos =
                new android.telephony.satellite.stub.SatelliteInfo[satelliteInfos.length];
        for (int i = 0; i < satelliteInfos.length; i++) {
            halSatelliteInfos[i] = new android.telephony.satellite.stub.SatelliteInfo();

            halSatelliteInfos[i].id = new android.telephony.satellite.stub.UUID();
            halSatelliteInfos[i].id.mostSigBits =
                    satelliteInfos[i].getSatelliteId().getMostSignificantBits();
            halSatelliteInfos[i].id.leastSigBits =
                    satelliteInfos[i].getSatelliteId().getLeastSignificantBits();

            halSatelliteInfos[i].position =
                    new android.telephony.satellite.stub.SatellitePosition();
            halSatelliteInfos[i].position.longitudeDegree =
                    satelliteInfos[i].getSatellitePosition().getLongitudeDegrees();
            halSatelliteInfos[i].position.altitudeKm =
                    satelliteInfos[i].getSatellitePosition().getAltitudeKm();

            halSatelliteInfos[i].bands = satelliteInfos[i].getBands().stream().mapToInt(
                    Integer::intValue).toArray();

            List<EarfcnRange> earfcnRangeList = satelliteInfos[i].getEarfcnRanges();
            halSatelliteInfos[i].earfcnRanges =
                    new android.telephony.satellite.stub.EarfcnRange[earfcnRangeList.size()];
            for (int j = 0; j < earfcnRangeList.size(); j++) {
                halSatelliteInfos[i].earfcnRanges[j] =
                        new android.telephony.satellite.stub.EarfcnRange();
                halSatelliteInfos[i].earfcnRanges[j].startEarfcn = earfcnRangeList.get(
                        j).getStartEarfcn();
                halSatelliteInfos[i].earfcnRanges[j].endEarfcn = earfcnRangeList.get(
                        j).getStartEarfcn();
                        j).getEndEarfcn();
            }
        }
        convertedSpecifier.satelliteInfos = halSatelliteInfos;

        convertedSpecifier.tagIds = systemSelectionSpecifier.getTagIds().toArray();
        return convertedSpecifier;
    }
+15 −4
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ import android.text.TextUtils;
import android.util.Log;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.DeviceStateMonitor;
import com.android.internal.telephony.ExponentialBackoff;
@@ -586,13 +585,25 @@ public class SatelliteSessionController extends StateMachine {
    }

    /**
     * Get whether state machine is in connected state.
     * Get whether device is connected to satellite.
     *
     * @return {@code true} if state machine is in connected state and {@code false} otherwise.
     * @return {@code true} if device is connected to satellite else return {@code false}.
     */
    public boolean isInConnectedState() {
        if (DBG) plogd("isInConnectedState: getCurrentState=" + getCurrentState());
        return getCurrentState() == mConnectedState;
        if (getCurrentState() == null) {
            return false;
        }

        switch (getCurrentState().getName()) {
            case "ConnectedState":
            case "TransferringState":
                return true;
            case "IdleState":
                return isConcurrentTnScanningSupported();
            default:
                return false;
        }
    }