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

Commit ce66edbc authored by Thomas Nguyen's avatar Thomas Nguyen
Browse files

Revert "Add SatelliteProxy"

Revert submission 20583557-Satellite APIs

Reason for revert: Radio HAL for satellite APIs are not needed.

Reverted changes: /q/submissionid:20583557-Satellite+APIs

Bug: 304622222
Test: SMS, MMS, call with live network.
SatelliteManagerTestOnMockService SatelliteManagerTest SatelliteControllerTest
DatagramDispatcherTest DatagramReceiverTest SatelliteSOSMessageRecommenderTest
NtnCapabilityResolverTest ServiceStateTrackerTest VtsHalRadioTargetTest

Change-Id: I20bd848c0cc1417d73a777303ad989cb5c1871f6
parent 3536e852
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ java_library {
        "android.hardware.radio.modem-V3-java",
        "android.hardware.radio.network-V3-java",
        "android.hardware.radio.sim-V3-java",
        "android.hardware.radio.satellite-V1-java",
        "android.hardware.radio.voice-V3-java",
        "voip-common",
        "ims-common",
+0 −85
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
package com.android.internal.telephony;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.AsyncResult;
@@ -119,13 +118,6 @@ public abstract class BaseCommands implements CommandsInterface {
    protected RegistrantList mConnectionSetupFailureRegistrants = new RegistrantList();
    protected RegistrantList mNotifyAnbrRegistrants = new RegistrantList();
    protected RegistrantList mTriggerImsDeregistrationRegistrants = new RegistrantList();
    protected RegistrantList mPendingSatelliteMessageCountRegistrants = new RegistrantList();
    protected RegistrantList mNewSatelliteMessagesRegistrants = new RegistrantList();
    protected RegistrantList mSatelliteMessagesTransferCompleteRegistrants = new RegistrantList();
    protected RegistrantList mSatellitePointingInfoChangedRegistrants = new RegistrantList();
    protected RegistrantList mSatelliteModeChangedRegistrants = new RegistrantList();
    protected RegistrantList mSatelliteRadioTechnologyChangedRegistrants = new RegistrantList();
    protected RegistrantList mSatelliteProvisionStateChangedRegistrants = new RegistrantList();

    @UnsupportedAppUsage
    protected Registrant mGsmSmsRegistrant;
@@ -1182,81 +1174,4 @@ public abstract class BaseCommands implements CommandsInterface {
    public void unregisterForTriggerImsDeregistration(Handler h) {
        mTriggerImsDeregistrationRegistrants.remove(h);
    }

    @Override
    public void registerForPendingSatelliteMessageCount(
            @NonNull Handler h, int what, @Nullable Object obj) {
        mPendingSatelliteMessageCountRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForPendingSatelliteMessageCount(@NonNull Handler h) {
        mPendingSatelliteMessageCountRegistrants.remove(h);
    }

    @Override
    public void registerForNewSatelliteMessages(
            @NonNull Handler h, int what, @Nullable Object obj) {
        mNewSatelliteMessagesRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForNewSatelliteMessages(@NonNull Handler h) {
        mNewSatelliteMessagesRegistrants.remove(h);
    }

    @Override
    public void registerForSatelliteMessagesTransferComplete(@NonNull Handler h,
            int what, @Nullable Object obj) {
        mSatelliteMessagesTransferCompleteRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForSatelliteMessagesTransferComplete(@NonNull Handler h) {
        mSatelliteMessagesTransferCompleteRegistrants.remove(h);
    }

    @Override
    public void registerForSatellitePointingInfoChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {
        mSatellitePointingInfoChangedRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForSatellitePointingInfoChanged(@NonNull Handler h) {
        mSatellitePointingInfoChangedRegistrants.remove(h);
    }

    @Override
    public void registerForSatelliteModeChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {
        mSatelliteModeChangedRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForSatelliteModeChanged(@NonNull Handler h) {
        mSatelliteModeChangedRegistrants.remove(h);
    }

    @Override
    public void registerForSatelliteRadioTechnologyChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {
        mSatelliteRadioTechnologyChangedRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForSatelliteRadioTechnologyChanged(@NonNull Handler h) {
        mSatelliteRadioTechnologyChangedRegistrants.remove(h);
    }

    @Override
    public void registerForSatelliteProvisionStateChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {
        mSatelliteProvisionStateChangedRegistrants.add(h, what, obj);
    }

    @Override
    public void unregisterForSatelliteProvisionStateChanged(@NonNull Handler h) {
        mSatelliteProvisionStateChangedRegistrants.remove(h);
    }
}
+0 −22
Original line number Diff line number Diff line
@@ -352,28 +352,6 @@ public class CommandException extends RuntimeException {
                return new CommandException(Error.RF_HARDWARE_ISSUE);
            case RILConstants.NO_RF_CALIBRATION_INFO:
                return new CommandException(Error.NO_RF_CALIBRATION_INFO);
            case RILConstants.ENCODING_NOT_SUPPORTED:
                return new CommandException(Error.ENCODING_NOT_SUPPORTED);
            case RILConstants.FEATURE_NOT_SUPPORTED:
                return new CommandException(Error.FEATURE_NOT_SUPPORTED);
            case RILConstants.INVALID_CONTACT:
                return new CommandException(Error.INVALID_CONTACT);
            case RILConstants.MODEM_INCOMPATIBLE:
                return new CommandException(Error.MODEM_INCOMPATIBLE);
            case RILConstants.NETWORK_TIMEOUT:
                return new CommandException(Error.NETWORK_TIMEOUT);
            case RILConstants.NO_SATELLITE_SIGNAL:
                return new CommandException(Error.NO_SATELLITE_SIGNAL);
            case RILConstants.NOT_SUFFICIENT_ACCOUNT_BALANCE:
                return new CommandException(Error.NOT_SUFFICIENT_ACCOUNT_BALANCE);
            case RILConstants.RADIO_TECHNOLOGY_NOT_SUPPORTED:
                return new CommandException(Error.RADIO_TECHNOLOGY_NOT_SUPPORTED);
            case RILConstants.SUBSCRIBER_NOT_AUTHORIZED:
                return new CommandException(Error.SUBSCRIBER_NOT_AUTHORIZED);
            case RILConstants.SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL:
                return new CommandException(Error.SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL);
            case RILConstants.UNIDENTIFIED_SUBSCRIBER:
                return new CommandException(Error.UNIDENTIFIED_SUBSCRIBER);
            default:
                Rlog.e("GSM", "Unrecognized RIL errno " + ril_errno);
                return new CommandException(Error.INVALID_RESPONSE);
+100 −360
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ public interface CommandsInterface {
    // Used as parameters for call forward methods below
    static final int CF_ACTION_DISABLE          = 0;
    static final int CF_ACTION_ENABLE           = 1;
//  static final int CF_ACTION_UNUSED           = 2;
    static final int CF_ACTION_REGISTRATION     = 3;
    static final int CF_ACTION_ERASURE          = 4;

@@ -2627,13 +2626,13 @@ public interface CommandsInterface {
     *
     * @param result Callback message containing the count of ADN valid record.
     */
    public void getSimPhonebookRecords(Message result);
    void getSimPhonebookRecords(Message result);

    /**
     * Request the SIM phonebook Capacity of all activated UICC applications
     *
     */
    public void getSimPhonebookCapacity(Message result);
    void getSimPhonebookCapacity(Message result);

    /**
     * Request to insert/delete/update the SIM phonebook record
@@ -2641,7 +2640,7 @@ public interface CommandsInterface {
     * @param phonebookRecordInfo adn record information to be updated
     * @param result Callback message containing the SIM phonebook record index.
     */
    public void updateSimPhonebookRecord(SimPhonebookRecord phonebookRecordInfo, Message result);
    void updateSimPhonebookRecord(SimPhonebookRecord phonebookRecordInfo, Message result);

    /**
     * Registers the handler when the SIM phonebook is changed.
@@ -2650,14 +2649,14 @@ public interface CommandsInterface {
     * @param what User-defined message code.
     * @param obj User object .
     */
    public void registerForSimPhonebookChanged(Handler h, int what, Object obj);
    void registerForSimPhonebookChanged(Handler h, int what, Object obj);

    /**
     * Unregister for notifications when SIM phonebook has already init done.
     *
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForSimPhonebookChanged(Handler h);
    void unregisterForSimPhonebookChanged(Handler h);

    /**
     * Registers the handler when a group of SIM phonebook records received.
@@ -2666,14 +2665,14 @@ public interface CommandsInterface {
     * @param what User-defined message code.
     * @param obj User object.
     */
    public void registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj);
    void registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj);

    /**
     * Unregister for notifications when a group of SIM phonebook records received.
     *
     * @param h Handler to be removed from the registrant list.
     */
     public void unregisterForSimPhonebookRecordsReceived(Handler h);
    void unregisterForSimPhonebookRecordsReceived(Handler h);

    /**
     * Registers for notifications of connection setup failure.
@@ -2892,263 +2891,4 @@ public interface CommandsInterface {
     * @param result Callback message to receive the result.
     */
    default void isN1ModeEnabled(Message result) {}

    /**
     * Get feature capabilities supported by satellite.
     *
     * @param result Message that will be sent back to the requester
     */
    default void getSatelliteCapabilities(Message result) {}

    /**
     * Turn satellite modem on/off.
     *
     * @param result Message that will be sent back to the requester
     * @param on {@code true} for turning on.
     *           {@code false} for turning off.
     */
    default void setSatellitePower(Message result, boolean on) {}

    /**
     * Get satellite modem state.
     *
     * @param result Message that will be sent back to the requester
     */
    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.
     *
     * @param result Message that will be sent back to the requester
     */
    default void isSatelliteSupported(Message result) {}

    /**
     * Provision the subscription with a satellite provider. This is needed to register the
     * subscription if the provider allows dynamic registration.
     *
     * @param result Message that will be sent back to the requester.
     * @param imei IMEI of the SIM associated with the satellite modem.
     * @param msisdn MSISDN of the SIM associated with the satellite modem.
     * @param imsi IMSI of the SIM associated with the satellite modem.
     * @param features List of features to be provisioned.
     */
    default void provisionSatelliteService(
            Message result, String imei, String msisdn, String imsi, int[] features) {}

    /**
     * Add contacts that are allowed to be used for satellite communication. This is applicable for
     * incoming messages as well.
     *
     * @param result Message that will be sent back to the requester.
     * @param contacts List of allowed contacts to be added.
     */
    default void addAllowedSatelliteContacts(Message result, String[] contacts) {}

    /**
     * Remove contacts that are allowed to be used for satellite communication. This is applicable
     * for incoming messages as well.
     *
     * @param result Message that will be sent back to the requester.
     * @param contacts List of allowed contacts to be removed.
     */
    default void removeAllowedSatelliteContacts(Message result, String[] contacts) {}

    /**
     * Send text messages.
     *
     * @param result Message that will be sent back to the requester.
     * @param messages List of messages in text format to be sent.
     * @param destination The recipient of the message.
     * @param latitude The current latitude of the device.
     * @param longitude The current longitude of the device. The location (i.e., latitude and
     *        longitude) of the device will be filled for emergency messages.
     */
    default void sendSatelliteMessages(Message result, String[] messages, String destination,
            double latitude, double longitude) {}

    /**
     * Get pending messages.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void getPendingSatelliteMessages(Message result) {}

    /**
     * Get current satellite registration mode.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void getSatelliteMode(Message result) {}

    /**
     * Set the filter for what type of indication framework want to receive from modem.
     *
     * @param result Message that will be sent back to the requester.
     * @param filterBitmask The filter bitmask identifying what type of indication Telephony
     *                      framework wants to receive from modem.
     */
    default void setSatelliteIndicationFilter(Message result, int filterBitmask) {}

    /**
     * User started pointing to the satellite. Modem should continue to update the ponting input
     * as user moves device.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void startSendingSatellitePointingInfo(Message result) {}

    /**
     * Stop sending satellite pointing info to the framework.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void stopSendingSatellitePointingInfo(Message result) {}

    /**
     * Get max number of characters per text message.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void getMaxCharactersPerSatelliteTextMessage(Message result) {}

    /**
     * Get whether satellite communication is allowed for the current location.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void isSatelliteCommunicationAllowedForCurrentLocation(Message result) {}

    /**
     * Get the time after which the satellite will be visible.
     *
     * @param result Message that will be sent back to the requester.
     */
    default void getTimeForNextSatelliteVisibility(Message result) {}

    /**
     * Registers for pending message count from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForPendingSatelliteMessageCount(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for pending message count from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForPendingSatelliteMessageCount(@NonNull Handler h) {}

    /**
     * Registers for new messages from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForNewSatelliteMessages(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for new messages from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForNewSatelliteMessages(@NonNull Handler h) {}

    /**
     * Registers for messages transfer complete from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForSatelliteMessagesTransferComplete(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for messages transfer complete from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatelliteMessagesTransferComplete(@NonNull Handler h) {}

    /**
     * Registers for pointing info changed from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForSatellitePointingInfoChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for pointing info changed from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatellitePointingInfoChanged(@NonNull Handler h) {}

    /**
     * Registers for mode changed from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForSatelliteModeChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for mode changed from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatelliteModeChanged(@NonNull Handler h) {}

    /**
     * Registers for radio technology changed from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForSatelliteRadioTechnologyChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for radio technology changed from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatelliteRadioTechnologyChanged(@NonNull Handler h) {}

    /**
     * Registers for provision state changed from satellite modem.
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    default void registerForSatelliteProvisionStateChanged(@NonNull Handler h,
            int what, @Nullable Object obj) {}

    /**
     * Unregisters for provision state changed from satellite modem.
     *
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatelliteProvisionStateChanged(@NonNull Handler h) {}
}
 No newline at end of file
+0 −34
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static android.telephony.TelephonyManager.HAL_SERVICE_IMS;
import static android.telephony.TelephonyManager.HAL_SERVICE_MESSAGING;
import static android.telephony.TelephonyManager.HAL_SERVICE_MODEM;
import static android.telephony.TelephonyManager.HAL_SERVICE_NETWORK;
import static android.telephony.TelephonyManager.HAL_SERVICE_SATELLITE;
import static android.telephony.TelephonyManager.HAL_SERVICE_SIM;
import static android.telephony.TelephonyManager.HAL_SERVICE_VOICE;

@@ -45,8 +44,6 @@ public class MockModem {
    private static final String BIND_IRADIOVOICE = "android.telephony.mockmodem.iradiovoice";
    private static final String BIND_IRADIOIMS = "android.telephony.mockmodem.iradioims";
    private static final String BIND_IRADIOCONFIG = "android.telephony.mockmodem.iradioconfig";
    private static final String BIND_IRADIOSATELLITE =
            "android.telephony.mockmodem.iradiosatellite";
    private static final String PHONE_ID = "phone_id";

    private static final byte DEFAULT_PHONE_ID = 0x00;
@@ -68,7 +65,6 @@ public class MockModem {
    private IBinder mVoiceBinder;
    private IBinder mImsBinder;
    private IBinder mConfigBinder;
    private IBinder mSatelliteBinder;
    private ServiceConnection mModemServiceConnection;
    private ServiceConnection mSimServiceConnection;
    private ServiceConnection mMessagingServiceConnection;
@@ -77,7 +73,6 @@ public class MockModem {
    private ServiceConnection mVoiceServiceConnection;
    private ServiceConnection mImsServiceConnection;
    private ServiceConnection mConfigServiceConnection;
    private ServiceConnection mSatelliteServiceConnection;

    private byte mPhoneId;
    private String mTag;
@@ -120,8 +115,6 @@ public class MockModem {
                mVoiceBinder = binder;
            } else if (mService == HAL_SERVICE_IMS) {
                mImsBinder = binder;
            } else if (mService == HAL_SERVICE_SATELLITE) {
                mSatelliteBinder = binder;
            } else if (mService == RADIOCONFIG_SERVICE) {
                mConfigBinder = binder;
            }
@@ -145,8 +138,6 @@ public class MockModem {
                mVoiceBinder = null;
            } else if (mService == HAL_SERVICE_IMS) {
                mImsBinder = null;
            } else if (mService == HAL_SERVICE_SATELLITE) {
                mSatelliteBinder = null;
            } else if (mService == RADIOCONFIG_SERVICE) {
                mConfigBinder = null;
            }
@@ -188,8 +179,6 @@ public class MockModem {
                return mVoiceBinder;
            case HAL_SERVICE_IMS:
                return mImsBinder;
            case HAL_SERVICE_SATELLITE:
                return mSatelliteBinder;
            case RADIOCONFIG_SERVICE:
                return mConfigBinder;
            default:
@@ -317,20 +306,6 @@ public class MockModem {
            } else {
                Rlog.d(TAG, "IRadio Ims is bound");
            }
        } else if (service == HAL_SERVICE_SATELLITE) {
            if (mSatelliteBinder == null) {
                mSatelliteServiceConnection = new MockModemConnection(HAL_SERVICE_SATELLITE);

                boolean status =
                        bindModuleToMockModemService(
                                mPhoneId, BIND_IRADIOSATELLITE, mSatelliteServiceConnection);
                if (!status) {
                    Rlog.d(TAG, "IRadio Satellite bind fail");
                    mSatelliteServiceConnection = null;
                }
            } else {
                Rlog.d(TAG, "IRadio Satellite is bound");
            }
        }
    }

@@ -393,13 +368,6 @@ public class MockModem {
                mImsBinder = null;
                Rlog.d(TAG, "unbind IRadio Ims");
            }
        } else if (service == HAL_SERVICE_SATELLITE) {
            if (mSatelliteServiceConnection != null) {
                mContext.unbindService(mSatelliteServiceConnection);
                mSatelliteServiceConnection = null;
                mSatelliteBinder = null;
                Rlog.d(TAG, "unbind IRadio Satellite");
            }
        }
    }

@@ -423,8 +391,6 @@ public class MockModem {
                return "voice";
            case HAL_SERVICE_IMS:
                return "ims";
            case HAL_SERVICE_SATELLITE:
                return "satellite";
            case RADIOCONFIG_SERVICE:
                return "config";
            default:
Loading