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

Commit 560bc9e3 authored by Sarah Chin's avatar Sarah Chin Committed by Android (Google) Code Review
Browse files

Merge "Fix minor bugs with calling APIs through vendor satellite service" into udc-dev

parents f17c4fb3 fdd94b8c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -998,13 +998,15 @@ public class SatelliteModemInterface {
    }

    public boolean isSatelliteServiceSupported() {
        // TODO: update this method
        // TODO: update this method to check a device config instead
        return mIsSatelliteServiceSupported;
    }

    private static void sendMessageWithResult(@NonNull Message message, @Nullable Object result,
            @SatelliteManager.SatelliteError int error) {
        AsyncResult.forMessage(message, result, new SatelliteException(error));
        SatelliteException exception = error == SatelliteManager.SATELLITE_ERROR_NONE
                ? null : new SatelliteException(error);
        AsyncResult.forMessage(message, result, exception);
        message.sendToTarget();
    }

+4 −3
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.AsyncResult;
import android.telephony.Rlog;
import android.telephony.SubscriptionManager;
import android.telephony.satellite.PointingInfo;
import android.telephony.satellite.SatelliteCapabilities;
import android.telephony.satellite.SatelliteDatagram;
@@ -221,10 +220,12 @@ public class SatelliteServiceUtils {
        } else {
            errorCode = SatelliteManager.SATELLITE_ERROR;
            if (ar.exception instanceof CommandException) {
                CommandException.Error error =
                        ((CommandException) (ar.exception)).getCommandError();
                CommandException.Error error = ((CommandException) ar.exception).getCommandError();
                errorCode = RILUtils.convertToSatelliteError(error);
                loge(caller + " CommandException: " + ar.exception);
            } else if (ar.exception instanceof SatelliteManager.SatelliteException) {
                errorCode = ((SatelliteManager.SatelliteException) ar.exception).getErrorCode();
                loge(caller + " SatelliteException: " + ar.exception);
            } else {
                loge(caller + " unknown exception: " + ar.exception);
            }