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

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

Revert "Cache satellite service states and restructure callback ..."

Revert submission 22148859-Cache satellite states

Reason for revert: cause regression b/275274229
Reverted changes: /q/submissionid:22148859-Cache+satellite+states

Change-Id: I1cacc082e574d58b922751d0106961b833f1d87a
parent 3482449f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -3034,13 +3034,6 @@ public interface CommandsInterface {
     */
    default void getSatellitePowerState(Message result) {}

    /**
     * Get satellite provision state.
     *
     * @param result Message that will be sent back to the requester
     */
    default void getSatelliteProvisionState(Message result) {}

    /**
     * Check whether satellite modem is supported by the device.
     *
+0 −8
Original line number Diff line number Diff line
@@ -5315,14 +5315,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.isSatelliteSupported(result);
    }

    /**
     * Check whether the satellite modem is provisioned.
     * @param result The Message to send the result of the operation to.
     */
    public void isSatelliteProvisioned(Message result) {
        mCi.getSatelliteProvisionState(result);
    }

    /**
     * Get the satellite capabilities.
     * @param result The Message to send the result of the operation to.
+0 −15
Original line number Diff line number Diff line
@@ -5788,21 +5788,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    /**
     * Get satellite provision state.
     *
     * @param result Message that will be sent back to the requester
     */
    @Override
    public void getSatelliteProvisionState(Message result) {
        // Satellite HAL APIs are not supported before Android V.
        if (result != null) {
            AsyncResult.forMessage(result, null,
                    CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
            result.sendToTarget();
        }
    }

    /**
     * Provision the subscription with a satellite provider. This is needed to register the
     * subscription if the provider allows dynamic registration.
+0 −13
Original line number Diff line number Diff line
@@ -186,7 +186,6 @@ public class DatagramController {
        mSendErrorCode = errorCode;
        mPointingAppController.updateSendDatagramTransferState(subId, datagramTransferState,
                sendPendingCount, errorCode);
        notifyDatagramTransferStateChangedToSessionController();
    }

    /**
@@ -211,7 +210,6 @@ public class DatagramController {
        mReceiveErrorCode = errorCode;
        mPointingAppController.updateReceiveDatagramTransferState(subId, datagramTransferState,
                receivePendingCount, errorCode);
        notifyDatagramTransferStateChangedToSessionController();
    }

    /**
@@ -222,17 +220,6 @@ public class DatagramController {
        return mReceivePendingCount;
    }

    private void notifyDatagramTransferStateChangedToSessionController() {
        SatelliteSessionController sessionController = SatelliteSessionController.getInstance();
        if (sessionController == null) {
            loge("notifyDatagramTransferStateChangeToSessionController: SatelliteSessionController"
                    + " is not initialized yet");
        } else {
            sessionController.onDatagramTransferStateChanged(
                    mSendDatagramTransferState, mReceiveDatagramTransferState);
        }
    }

    private static void logd(@NonNull String log) {
        Rlog.d(TAG, log);
    }
+4 −0
Original line number Diff line number Diff line
@@ -445,6 +445,8 @@ public class DatagramReceiver extends Handler {
            satelliteDatagramListenerHandler = new SatelliteDatagramListenerHandler(
                    mBackgroundHandler.getLooper(), validSubId);
            if (SatelliteModemInterface.getInstance().isSatelliteServiceSupported()) {
                // TODO: remove this as SatelliteModemInterface can register for incoming datagrams
                // on boot up itself.
                SatelliteModemInterface.getInstance().registerForSatelliteDatagramsReceived(
                        satelliteDatagramListenerHandler,
                        SatelliteDatagramListenerHandler.EVENT_SATELLITE_DATAGRAM_RECEIVED, null);
@@ -543,4 +545,6 @@ public class DatagramReceiver extends Handler {
    private static void loge(@NonNull String log) {
        Rlog.e(TAG, log);
    }

    // TODO: An api change - do not pass the binder from Telephony to Applications
}
Loading