Merge "DO NOT MERGE Revert "Add Satellite HAL APIs"" into udc-dev

This commit is contained in:
Thomas Nguyen 2023-03-11 01:37:02 +00:00 committed by Android (Google) Code Review
commit 82d90d086f
39 changed files with 22 additions and 2669 deletions

View file

@ -499,16 +499,6 @@
<instance>slot3</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.satellite</name>
<version>1</version>
<interface>
<name>IRadioSatellite</name>
<instance>slot1</instance>
<instance>slot2</instance>
<instance>slot3</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.ims.media</name>
<version>1</version>

View file

@ -262,19 +262,3 @@ aidl_interface {
},
},
}
aidl_interface {
name: "android.hardware.radio.satellite",
vendor_available: true,
srcs: ["android/hardware/radio/satellite/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V2"],
backend: {
cpp: {
enabled: false,
},
java: {
sdk_version: "module_current",
},
},
}

View file

@ -1,53 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@VintfStability
interface IRadioSatellite {
oneway void addAllowedSatelliteContacts(in int serial, in String[] contacts);
oneway void getCapabilities(in int serial);
oneway void getMaxCharactersPerTextMessage(in int serial);
oneway void getPendingMessages(in int serial);
oneway void getPowerState(in int serial);
oneway void getSatelliteMode(in int serial);
oneway void getTimeForNextSatelliteVisibility(in int serial);
oneway void provisionService(in int serial, in String imei, in String msisdn, in String imsi, in android.hardware.radio.satellite.SatelliteFeature[] features);
oneway void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
oneway void responseAcknowledgement();
oneway void sendMessages(in int serial, in String[] messages, in String destination, in double latitude, in double longitude);
oneway void setIndicationFilter(in int serial, in int filterBitmask);
oneway void setPower(in int serial, in boolean on);
oneway void setResponseFunctions(in android.hardware.radio.satellite.IRadioSatelliteResponse satelliteResponse, in android.hardware.radio.satellite.IRadioSatelliteIndication satelliteIndication);
oneway void startSendingSatellitePointingInfo(in int serial);
oneway void stopSendingSatellitePointingInfo(in int serial);
}

View file

@ -1,44 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@VintfStability
interface IRadioSatelliteIndication {
oneway void onMessagesTransferComplete(in android.hardware.radio.RadioIndicationType type, in boolean complete);
oneway void onNewMessages(in android.hardware.radio.RadioIndicationType type, in String[] messages);
oneway void onPendingMessageCount(in android.hardware.radio.RadioIndicationType type, in int count);
oneway void onProvisionStateChanged(in android.hardware.radio.RadioIndicationType type, boolean provisioned, in android.hardware.radio.satellite.SatelliteFeature[] features);
oneway void onSatelliteModeChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.SatelliteMode mode);
oneway void onSatellitePointingInfoChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.PointingInfo pointingInfo);
oneway void onSatelliteRadioTechnologyChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.NTRadioTechnology technology);
}

View file

@ -1,52 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@VintfStability
interface IRadioSatelliteResponse {
oneway void acknowledgeRequest(in int serial);
oneway void addAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void getCapabilitiesResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteCapabilities capabilities);
oneway void getMaxCharactersPerTextMessageResponse(in android.hardware.radio.RadioResponseInfo info, in int charLimit);
oneway void getPendingMessagesResponse(in android.hardware.radio.RadioResponseInfo info, in String[] messages);
oneway void getPowerStateResponse(in android.hardware.radio.RadioResponseInfo info, in boolean on);
oneway void getSatelliteModeResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteMode mode, in android.hardware.radio.satellite.NTRadioTechnology technology);
oneway void getTimeForNextSatelliteVisibilityResponse(in android.hardware.radio.RadioResponseInfo info, in int timeInSeconds);
oneway void provisionServiceResponse(in android.hardware.radio.RadioResponseInfo info, in boolean provisioned);
oneway void removeAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void sendMessagesResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setIndicationFilterResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setPowerResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void startSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void stopSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
}

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum IndicationFilter {
NONE = 0,
SATELLITE_MODE = 1,
}

View file

@ -1,41 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum NTRadioTechnology {
NB_IOT_NTN = 0,
NR_NTN = 1,
EMTC_NTN = 2,
PROPRIETARY = 3,
}

View file

@ -1,42 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@JavaDerive(toString=true) @VintfStability
parcelable PointingInfo {
float satelliteAzimuthDegrees;
float satelliteElevationDegrees;
float antennaAzimuthDegrees;
float antennaPitchDegrees;
float antennaRollDegrees;
}

View file

@ -1,42 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@JavaDerive(toString=true) @VintfStability
parcelable SatelliteCapabilities {
android.hardware.radio.satellite.NTRadioTechnology[] supportedRadioTechnologies;
boolean isAlwaysOn;
boolean needsPointingToSatellite;
android.hardware.radio.satellite.SatelliteFeature[] supportedFeatures;
boolean needsSeparateSimProfile;
}

View file

@ -1,41 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SatelliteFeature {
SOS_SMS = 0,
EMERGENCY_SMS = 1,
SMS = 2,
LOCATION_SHARING = 3,
}

View file

@ -1,42 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.satellite;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SatelliteMode {
POWERED_OFF = 0,
OUT_OF_SERVICE_NOT_SEARCHING = 1,
OUT_OF_SERVICE_SEARCHING = 2,
ACQUIRED = 3,
MESSAGE_TRANSFERRING = 4,
}

View file

@ -34,28 +34,28 @@
package android.hardware.radio;
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioAccessFamily {
UNKNOWN = (1 << android.hardware.radio.RadioTechnology.UNKNOWN),
GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS),
EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE),
UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS),
IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A),
IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B),
ONE_X_RTT = (1 << android.hardware.radio.RadioTechnology.ONE_X_RTT),
EVDO_0 = (1 << android.hardware.radio.RadioTechnology.EVDO_0),
EVDO_A = (1 << android.hardware.radio.RadioTechnology.EVDO_A),
HSDPA = (1 << android.hardware.radio.RadioTechnology.HSDPA),
HSUPA = (1 << android.hardware.radio.RadioTechnology.HSUPA),
HSPA = (1 << android.hardware.radio.RadioTechnology.HSPA),
EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B),
EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD),
LTE = (1 << android.hardware.radio.RadioTechnology.LTE),
HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP),
GSM = (1 << android.hardware.radio.RadioTechnology.GSM),
TD_SCDMA = (1 << android.hardware.radio.RadioTechnology.TD_SCDMA),
IWLAN = (1 << android.hardware.radio.RadioTechnology.IWLAN),
UNKNOWN = (1 << android.hardware.radio.RadioTechnology.UNKNOWN) /* 1 */,
GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS) /* 2 */,
EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE) /* 4 */,
UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS) /* 8 */,
IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A) /* 16 */,
IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B) /* 32 */,
ONE_X_RTT = (1 << android.hardware.radio.RadioTechnology.ONE_X_RTT) /* 64 */,
EVDO_0 = (1 << android.hardware.radio.RadioTechnology.EVDO_0) /* 128 */,
EVDO_A = (1 << android.hardware.radio.RadioTechnology.EVDO_A) /* 256 */,
HSDPA = (1 << android.hardware.radio.RadioTechnology.HSDPA) /* 512 */,
HSUPA = (1 << android.hardware.radio.RadioTechnology.HSUPA) /* 1024 */,
HSPA = (1 << android.hardware.radio.RadioTechnology.HSPA) /* 2048 */,
EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B) /* 4096 */,
EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD) /* 8192 */,
LTE = (1 << android.hardware.radio.RadioTechnology.LTE) /* 16384 */,
HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP) /* 32768 */,
GSM = (1 << android.hardware.radio.RadioTechnology.GSM) /* 65536 */,
TD_SCDMA = (1 << android.hardware.radio.RadioTechnology.TD_SCDMA) /* 131072 */,
IWLAN = (1 << android.hardware.radio.RadioTechnology.IWLAN) /* 262144 */,
/**
* @deprecated use LTE instead.
*/
LTE_CA = (1 << android.hardware.radio.RadioTechnology.LTE_CA),
NR = (1 << android.hardware.radio.RadioTechnology.NR),
LTE_CA = (1 << android.hardware.radio.RadioTechnology.LTE_CA) /* 524288 */,
NR = (1 << android.hardware.radio.RadioTechnology.NR) /* 1048576 */,
}

View file

@ -37,5 +37,5 @@ parcelable RadioConst {
const int MAX_RILDS = 3;
const int MAX_UUID_LENGTH = 64;
const int CARD_MAX_APPS = 8;
const int P2_CONSTANT_NO_P2 = (-1);
const int P2_CONSTANT_NO_P2 = (-1) /* -1 */;
}

View file

@ -123,15 +123,4 @@ enum RadioError {
BLOCKED_DUE_TO_CALL = 69,
RF_HARDWARE_ISSUE = 70,
NO_RF_CALIBRATION_INFO = 71,
ENCODING_NOT_SUPPORTED = 72,
FEATURE_NOT_SUPPORTED = 73,
INVALID_CONTACT = 74,
MODEM_INCOMPATIBLE = 75,
NETWORK_TIMEOUT = 76,
NO_SATELLITE_SIGNAL = 77,
NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
SUBSCRIBER_NOT_AUTHORIZED = 80,
SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
UNIDENTIFIED_SUBSCRIBER = 82,
}

View file

@ -301,51 +301,4 @@ enum RadioError {
* Unlike RF_HARDWARE_ISSUE, this is a SW problem and no HW repair is needed.
*/
NO_RF_CALIBRATION_INFO = 71,
/**
* The encoding scheme is not supported by either the network or the MS.
*/
ENCODING_NOT_SUPPORTED = 72,
/**
* The requesting feature is not supported by the service provider/operator.
*/
FEATURE_NOT_SUPPORTED = 73,
/**
* The contact to be added is either not existing or not valid.
*/
INVALID_CONTACT = 74,
/**
* The modem of the MS is not compatible with the service provider/operator. This generic error
* should be used only when there are some mimatches in the capabilities between the MS and
* the operator and the error cannot be mapped properly to other specific network errors.
*/
MODEM_INCOMPATIBLE = 75,
/**
* Modem timeout to receive ACK or response from network after sending a request to the network.
*/
NETWORK_TIMEOUT = 76,
/**
* Modem fails to communicate with the satellite network since there is no satellite signal.
*/
NO_SATELLITE_SIGNAL = 77,
/**
* The request cannot be performed since the subscriber's account balance is not sufficient.
*/
NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
/**
* The radio technology is not supported by the service provider/operator.
*/
RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
/**
* The subscription is not authorized to register with the service provider/operator.
*/
SUBSCRIBER_NOT_AUTHORIZED = 80,
/**
* While processing a request from the Framework, the satellite modem detects terrestrial
* signal, aborts the request, and switches to the terrestrial network.
*/
SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
/**
* The subscriber is not registered in the service provider.
*/
UNIDENTIFIED_SUBSCRIBER = 82
}

View file

@ -1,168 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
import android.hardware.radio.satellite.IRadioSatelliteIndication;
import android.hardware.radio.satellite.IRadioSatelliteResponse;
import android.hardware.radio.satellite.IndicationFilter;
import android.hardware.radio.satellite.SatelliteFeature;
/**
* This interface is used by telephony to send commands to and query info from satellite modem.
* All the functions have minimum one parameter:
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
*/
@VintfStability
oneway interface IRadioSatellite {
/**
* Add contacts that are allowed to be used for satellite communication. This is applicable for
* incoming messages as well.
*
* @param serial Serial number of request.
* @param contacts List of allowed contacts to be added.
*/
void addAllowedSatelliteContacts(in int serial, in String[] contacts);
/**
* Get feature capabilities supported by satellite.
*
* @param serial Serial number of request.
*/
void getCapabilities(in int serial);
/**
* Get max number of characters per text message.
*
* @param serial Serial number of request.
*/
void getMaxCharactersPerTextMessage(in int serial);
/**
* Get pending messages.
*
* @param serial Serial number of request.
*/
void getPendingMessages(in int serial);
/**
* Get satellite modem state.
*
* @param serial Serial number of request.
*/
void getPowerState(in int serial);
/**
* Get current satellite registration mode, which is defined in {@link #SatelliteMode}.
*
* @param serial Serial number of request.
*/
void getSatelliteMode(in int serial);
/**
* Get time for next visibility of satellite.
*
* @param serial Serial number of request.
*/
void getTimeForNextSatelliteVisibility(in int serial);
/**
* Provision the subscription with a satellite provider. This is needed to register the
* subscription if the provider allows dynamic registration.
*
* @param serial Serial number of request.
* @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.
*/
void provisionService(in int serial, in String imei, in String msisdn, in String imsi,
in SatelliteFeature[] features);
/**
* Remove contacts that are allowed to be used for satellite communication. This is applicable
* for incoming messages as well.
*
* @param serial Serial number of request.
* @param contacts List of allowed contacts to be removed.
*/
void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
/**
* When response type received from a radio indication or radio response is
* RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
* acknowledge the receipt of those messages by sending responseAcknowledgement().
*/
void responseAcknowledgement();
/**
* Send text messages.
*
* @param serial Serial number of request.
* @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.
*/
void sendMessages(in int serial, in String[] messages, in String destination,
in double latitude, in double longitude);
/**
* Set the filter for what type of indication framework want to receive from modem.
*
* @param serial Serial number of request.
* @param filterBitmask The filter bitmask identifying what type of indication Telephony
* framework wants to receive from modem. This bitmask is the 'or'
* combination of the enum values defined in {@link #IndicationFilter}.
*/
void setIndicationFilter(in int serial, in int filterBitmask);
/**
* Turn satellite modem on/off.
*
* @param serial Serial number of request.
* @param on True for turning on.
* False for turning off.
*/
void setPower(in int serial, in boolean on);
/**
* Set response functions for Satellite requests and indications.
*
* @param satelliteResponse Object containing response functions
* @param satelliteIndication Object containing radio indications
*/
void setResponseFunctions(in IRadioSatelliteResponse satelliteResponse,
in IRadioSatelliteIndication satelliteIndication);
/**
* User started pointing to the satellite. Modem should continue to update the pointing input
* as user device/satellite moves.
*
* @param serial Serial number of request.
*/
void startSendingSatellitePointingInfo(in int serial);
/**
* Stop sending satellite pointing info to the framework.
*
* @param serial Serial number of request.
*/
void stopSendingSatellitePointingInfo(in int serial);
}

View file

@ -1,90 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
import android.hardware.radio.RadioIndicationType;
import android.hardware.radio.satellite.NTRadioTechnology;
import android.hardware.radio.satellite.PointingInfo;
import android.hardware.radio.satellite.SatelliteFeature;
import android.hardware.radio.satellite.SatelliteMode;
/**
* Interface declaring unsolicited radio indications for satellite APIs.
*/
@VintfStability
oneway interface IRadioSatelliteIndication {
/**
* Confirms that ongoing message transfer is complete.
*
* @param type Type of radio indication
* @param complete True mean the transfer is complete.
* False means the transfer is not complete.
*/
void onMessagesTransferComplete(in RadioIndicationType type, in boolean complete);
/**
* Indicates new message received on device.
*
* @param type Type of radio indication
* @param messages List of new messages received.
*/
void onNewMessages(in RadioIndicationType type, in String[] messages);
/**
* Indicates that satellite has pending messages for the device to be pulled.
*
* @param type Type of radio indication
* @param count Number of pending messages.
*/
void onPendingMessageCount(in RadioIndicationType type, in int count);
/**
* Indicate that satellite provision state has changed.
*
* @param type Type of radio indication
* @param provisioned True means the service is provisioned.
* False means the service is not provisioned.
* @param features List of Feature whose provision state has changed.
*/
void onProvisionStateChanged(
in RadioIndicationType type, boolean provisioned, in SatelliteFeature[] features);
/**
* Indicate that satellite mode has changed.
*
* @param type Type of radio indication
* @param mode The current mode of the satellite modem.
*/
void onSatelliteModeChanged(in RadioIndicationType type, in SatelliteMode mode);
/**
* Indicate that satellite Pointing input has changed.
*
* @param type Type of radio indication
* @param pointingInfo The current pointing info.
*/
void onSatellitePointingInfoChanged(in RadioIndicationType type, in PointingInfo pointingInfo);
/**
* Indicate that satellite radio technology has changed.
*
* @param type Type of radio indication
* @param technology The current technology of the satellite modem.
*/
void onSatelliteRadioTechnologyChanged(
in RadioIndicationType type, in NTRadioTechnology technology);
}

View file

@ -1,461 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
import android.hardware.radio.RadioResponseInfo;
import android.hardware.radio.satellite.NTRadioTechnology;
import android.hardware.radio.satellite.SatelliteCapabilities;
import android.hardware.radio.satellite.SatelliteMode;
/**
* Interface declaring response functions to solicited radio requests for satellite APIs.
*/
@VintfStability
oneway interface IRadioSatelliteResponse {
/**
* Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
* radio request which take long time to respond. For more details, refer
* https://source.android.com/devices/tech/connect/ril.html
*
* @param serial Serial no. of the request whose acknowledgement is sent.
*/
void acknowledgeRequest(in int serial);
/**
* Response of the request addAllowedSatelliteContacts.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:ABORTED
* RadioError:ACCESS_BARRED
* RadioError:CANCELLED
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_CONTACT
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NETWORK_ERR
* RadioError:NETWORK_NOT_READY
* RadioError:NETWORK_REJECT
* RadioError:NETWORK_TIMEOUT
* RadioError:NO_MEMORY
* RadioError:NO_NETWORK_FOUND
* RadioError:NO_RESOURCES
* RadioError:NO_SATELLITE_SIGNAL
* RadioError:NO_SUBSCRIPTION
* RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SIM_ABSENT
* RadioError:SIM_BUSY
* RadioError:SIM_ERR
* RadioError:SIM_FULL
* RadioError:SYSTEM_ERR
* RadioError:UNIDENTIFIED_SUBSCRIBER
*/
void addAllowedSatelliteContactsResponse(in RadioResponseInfo info);
/**
* Response of the request getCapabilities.
*
* @param info Response info struct containing serial no. and error
* @param capabilities List of capabilities that the satellite modem supports.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void getCapabilitiesResponse(in RadioResponseInfo info, in SatelliteCapabilities capabilities);
/**
* Response of the request getMaxCharactersPerTextMessage.
*
* @param info Response info struct containing serial no. and error
* @param charLimit Maximum number of characters in a text message that can be sent.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void getMaxCharactersPerTextMessageResponse(in RadioResponseInfo info, in int charLimit);
/**
* Response of the request getPendingMessages.
*
* @param info Response info struct containing serial no. and error
* @param messages List of pending messages received.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:ABORTED
* RadioError:ACCESS_BARRED
* RadioError:BLOCKED_DUE_TO_CALL
* RadioError:CANCELLED
* RadioError:ENCODING_ERR
* RadioError:ENCODING_NOT_SUPPORTED
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_SMS_FORMAT
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NETWORK_ERR
* RadioError:NETWORK_NOT_READY
* RadioError:NETWORK_REJECT
* RadioError:NETWORK_TIMEOUT
* RadioError:NO_MEMORY
* RadioError:NO_NETWORK_FOUND
* RadioError:NO_RESOURCES
* RadioError:NO_SMS_TO_ACK
* RadioError:NO_SATELLITE_SIGNAL
* RadioError:NO_SUBSCRIPTION
* RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SIM_ABSENT
* RadioError:SIM_BUSY
* RadioError:SIM_ERR
* RadioError:SIM_FULL
* RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
* RadioError:SYSTEM_ERR
* RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
*/
void getPendingMessagesResponse(in RadioResponseInfo info, in String[] messages);
/**
* Response of the request getPowerSate.
*
* @param info Response info struct containing serial no. and error
* @param on True means the modem is ON.
* False means the modem is OFF.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void getPowerStateResponse(in RadioResponseInfo info, in boolean on);
/**
* Response of the request getSatelliteMode.
*
* @param info Response info struct containing serial no. and error
* @param mode Current Mode of the satellite modem.
* @param technology The current technology of the satellite modem.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void getSatelliteModeResponse(
in RadioResponseInfo info, in SatelliteMode mode, in NTRadioTechnology technology);
/**
* Response of the request getTimeForNextSatelliteVisibility.
*
* @param info Response info struct containing serial no. and error
* @param timeInSeconds The duration in seconds after which the satellite will be visible.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void getTimeForNextSatelliteVisibilityResponse(in RadioResponseInfo info, in int timeInSeconds);
/**
* Response of the request provisionService.
*
* @param info Response info struct containing serial no. and error
* @param provisioned True means the service is provisioned.
* False means the service is not provisioned.
*
* Valid errors returned:
* RadioError:NONE
* RadioError:ABORTED
* RadioError:ACCESS_BARRED
* RadioError:CANCELLED
* RadioError:FEATURE_NOT_SUPPORTED
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:MODEM_INCOMPATIBLE
* RadioError:NETWORK_ERR
* RadioError:NETWORK_NOT_READY
* RadioError:NETWORK_REJECT
* RadioError:NETWORK_TIMEOUT
* RadioError:NO_MEMORY
* RadioError:NO_NETWORK_FOUND
* RadioError:NO_RESOURCES
* RadioError:NO_SATELLITE_SIGNAL
* RadioError:NO_SUBSCRIPTION
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:RADIO_TECHNOLOGY_NOT_SUPPORTED
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SIM_ABSENT
* RadioError:SIM_BUSY
* RadioError:SIM_ERR
* RadioError:SIM_FULL
* RadioError:SUBSCRIBER_NOT_AUTHORIZED
* RadioError:SYSTEM_ERR
*/
void provisionServiceResponse(in RadioResponseInfo info, in boolean provisioned);
/**
* Response of the request removeAllowedSatelliteContacts.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:ABORTED
* RadioError:ACCESS_BARRED
* RadioError:CANCELLED
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_CONTACT
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NETWORK_ERR
* RadioError:NETWORK_NOT_READY
* RadioError:NETWORK_REJECT
* RadioError:NETWORK_TIMEOUT
* RadioError:NO_MEMORY
* RadioError:NO_NETWORK_FOUND
* RadioError:NO_RESOURCES
* RadioError:NO_SATELLITE_SIGNAL
* RadioError:NO_SUBSCRIPTION
* RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SIM_ABSENT
* RadioError:SIM_BUSY
* RadioError:SIM_ERR
* RadioError:SIM_FULL
* RadioError:SYSTEM_ERR
* RadioError:UNIDENTIFIED_SUBSCRIBER
*/
void removeAllowedSatelliteContactsResponse(in RadioResponseInfo info);
/**
* Response of the request sendMessages.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:ABORTED
* RadioError:ACCESS_BARRED
* RadioError:BLOCKED_DUE_TO_CALL
* RadioError:CANCELLED
* RadioError:ENCODING_ERR
* RadioError:ENCODING_NOT_SUPPORTED
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_SMS_FORMAT
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NETWORK_ERR
* RadioError:NETWORK_NOT_READY
* RadioError:NETWORK_REJECT
* RadioError:NETWORK_TIMEOUT
* RadioError:NO_MEMORY
* RadioError:NO_NETWORK_FOUND
* RadioError:NO_RESOURCES
* RadioError:NO_SMS_TO_ACK
* RadioError:NO_SATELLITE_SIGNAL
* RadioError:NO_SUBSCRIPTION
* RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SIM_ABSENT
* RadioError:SIM_BUSY
* RadioError:SIM_ERR
* RadioError:SIM_FULL
* RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
* RadioError:SMS_SEND_FAIL_RETRY
* RadioError:SYSTEM_ERR
* RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
* RadioError:UNIDENTIFIED_SUBSCRIBER
*/
void sendMessagesResponse(in RadioResponseInfo info);
/**
* Response of the request setIndicationFilter.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void setIndicationFilterResponse(in RadioResponseInfo info);
/**
* Response of the request setPower.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:NO_RF_CALIBRATION_INFO
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:RF_HARDWARE_ISSUE
* RadioError:SYSTEM_ERR
*/
void setPowerResponse(in RadioResponseInfo info);
/**
* Response of the request startSendingSatellitePointingInfo.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void startSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
/**
* Response of the request stopSendingSatellitePointingInfo.
*
* @param info Response info struct containing serial no. and error
*
* Valid errors returned:
* RadioError:NONE
* RadioError:INTERNAL_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:INVALID_MODEM_STATE
* RadioError:INVALID_SIM_STATE
* RadioError:INVALID_STATE
* RadioError:MODEM_ERR
* RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
*/
void stopSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
}

View file

@ -1,25 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
enum IndicationFilter {
NONE = 0,
SATELLITE_MODE = 1
}

View file

@ -1,31 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
enum NTRadioTechnology {
/* 3GPP NB-IoT (Narrowband Internet of Things) over Non-Terrestrial-Networks technology */
NB_IOT_NTN = 0,
/* 3GPP 5G NR over Non-Terrestrial-Networks technology */
NR_NTN = 1,
/* 3GPP eMTC (enhanced Machine-Type Communication) over Non-Terrestrial-Networks technology */
EMTC_NTN = 2,
/* Proprietary technology like Iridium or Bullitt */
PROPRIETARY = 3
}

View file

@ -1,42 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
@VintfStability
@JavaDerive(toString=true)
parcelable PointingInfo {
/* Satellite azimuth in degrees */
float satelliteAzimuthDegrees;
/* Satellite elevation in degrees */
float satelliteElevationDegrees;
/* Antenna azimuth in degrees */
float antennaAzimuthDegrees;
/**
* Angle of rotation about the x axis. This value represents the angle between a plane
* parallel to the device's screen and a plane parallel to the ground.
*/
float antennaPitchDegrees;
/**
* Angle of rotation about the y axis. This value represents the angle between a plane
* perpendicular to the device's screen and a plane parallel to the ground.
*/
float antennaRollDegrees;
}

View file

@ -1,50 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
import android.hardware.radio.satellite.NTRadioTechnology;
import android.hardware.radio.satellite.SatelliteFeature;
@VintfStability
@JavaDerive(toString=true)
parcelable SatelliteCapabilities {
/**
* List of technologies supported by the satellite modem.
*/
NTRadioTechnology[] supportedRadioTechnologies;
/**
* Whether satellite mode is always on (this indicates the power impact of keeping it on is
* very minimal).
*/
boolean isAlwaysOn;
/**
* Whether UE needs to point to a satellite to send and receive data.
*/
boolean needsPointingToSatellite;
/**
* List of features supported by the satellite modem.
*/
SatelliteFeature[] supportedFeatures;
/**
* Whether UE needs a separate SIM profile to communicate with satellite network.
*/
boolean needsSeparateSimProfile;
}

View file

@ -1,31 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
enum SatelliteFeature {
/* Able to send and receive SMS messages to/from SOS numbers like call/service centers */
SOS_SMS = 0,
/* Able to send and receive SMS messages to/from emergency numbers like 911 */
EMERGENCY_SMS = 1,
/* Able to send and receive SMS messages to/from any allowed contacts */
SMS = 2,
/* Able to send device location to allowed contacts */
LOCATION_SHARING = 3
}

View file

@ -1,33 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio.satellite;
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
enum SatelliteMode {
/* Satellite modem is powered off */
POWERED_OFF = 0,
/* Satellite modem is in out of service state and not searching for satellite signal */
OUT_OF_SERVICE_NOT_SEARCHING = 1,
/* Satellite modem is in out of service state and searching for satellite signal */
OUT_OF_SERVICE_SEARCHING = 2,
/* Satellite modem has found satellite signal and gets connected to the satellite network */
ACQUIRED = 3,
/* Satellite modem is sending and/or receiving messages */
MESSAGE_TRANSFERRING = 4
}

View file

@ -43,7 +43,6 @@ cc_library {
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
"android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
"android.hardware.radio@1.0",
@ -94,9 +93,6 @@ cc_library {
"sap/Sap.cpp",
"sap/SapCallback.cpp",
"sap/structs.cpp",
"satellite/RadioIndication-satellite.cpp",
"satellite/RadioResponse-satellite.cpp",
"satellite/RadioSatellite.cpp",
"sim/RadioIndication-sim.cpp",
"sim/RadioResponse-sim.cpp",
"sim/RadioSim.cpp",

View file

@ -23,7 +23,6 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingIndication.h>
#include <aidl/android/hardware/radio/modem/IRadioModemIndication.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkIndication.h>
#include <aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.h>
#include <aidl/android/hardware/radio/sim/IRadioSimIndication.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceIndication.h>
#include <android/hardware/radio/1.6/IRadioIndication.h>
@ -61,10 +60,6 @@ class RadioIndication : public V1_6::IRadioIndication {
::aidl::android::hardware::radio::ims::IRadioImsIndication,
::aidl::android::hardware::radio::ims::IRadioImsIndicationDefault, true>
mImsCb;
GuaranteedCallback< //
::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication,
::aidl::android::hardware::radio::satellite::IRadioSatelliteIndicationDefault, true>
mSatelliteCb;
// IRadioIndication @ 1.0
Return<void> radioStateChanged(V1_0::RadioIndicationType type,
@ -232,9 +227,6 @@ class RadioIndication : public V1_6::IRadioIndication {
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voicCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataIndication> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>
@ -244,8 +236,6 @@ class RadioIndication : public V1_6::IRadioIndication {
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimIndication> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb();
std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
satelliteCb();
};
} // namespace android::hardware::radio::compat

View file

@ -24,7 +24,6 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingResponse.h>
#include <aidl/android/hardware/radio/modem/IRadioModemResponse.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkResponse.h>
#include <aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.h>
#include <aidl/android/hardware/radio/sim/IRadioSimResponse.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceResponse.h>
#include <android/hardware/radio/1.6/IRadioResponse.h>
@ -55,9 +54,6 @@ class RadioResponse : public V1_6::IRadioResponse {
GuaranteedCallback<::aidl::android::hardware::radio::ims::IRadioImsResponse,
::aidl::android::hardware::radio::ims::IRadioImsResponseDefault>
mImsCb;
GuaranteedCallback<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse,
::aidl::android::hardware::radio::satellite::IRadioSatelliteResponseDefault>
mSatelliteCb;
// IRadioResponse @ 1.0
Return<void> getIccCardStatusResponse(const V1_0::RadioResponseInfo& info,
@ -451,9 +447,6 @@ class RadioResponse : public V1_6::IRadioResponse {
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>
@ -463,8 +456,6 @@ class RadioResponse : public V1_6::IRadioResponse {
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimResponse> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb();
std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
satelliteCb();
};
} // namespace android::hardware::radio::compat

View file

@ -1,65 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "RadioCompatBase.h"
#include <aidl/android/hardware/radio/satellite/BnRadioSatellite.h>
namespace android::hardware::radio::compat {
class RadioSatellite : public RadioCompatBase,
public aidl::android::hardware::radio::satellite::BnRadioSatellite {
::ndk::ScopedAStatus responseAcknowledgement() override;
::ndk::ScopedAStatus getCapabilities(int32_t serial) override;
::ndk::ScopedAStatus setPower(int32_t serial, bool on) override;
::ndk::ScopedAStatus getPowerState(int32_t serial) override;
::ndk::ScopedAStatus provisionService(
int32_t serial, const std::string& imei, const std::string& msisdn,
const std::string& imsi,
const std::vector<::aidl::android::hardware::radio::satellite::SatelliteFeature>&
features) override;
::ndk::ScopedAStatus addAllowedSatelliteContacts(
int32_t serial, const std::vector<std::string>& contacts) override;
::ndk::ScopedAStatus removeAllowedSatelliteContacts(
int32_t serial, const std::vector<std::string>& contacts) override;
::ndk::ScopedAStatus sendMessages(int32_t serial, const std::vector<std::string>& messages,
const std::string& destination, double latitude,
double longitude) override;
::ndk::ScopedAStatus getPendingMessages(int32_t serial) override;
::ndk::ScopedAStatus getSatelliteMode(int32_t serial) override;
::ndk::ScopedAStatus setIndicationFilter(int32_t serial, int32_t filterBitmask) override;
::ndk::ScopedAStatus startSendingSatellitePointingInfo(int32_t serial) override;
::ndk::ScopedAStatus stopSendingSatellitePointingInfo(int32_t serial) override;
::ndk::ScopedAStatus getMaxCharactersPerTextMessage(int32_t serial) override;
::ndk::ScopedAStatus getTimeForNextSatelliteVisibility(int32_t serial) override;
::ndk::ScopedAStatus setResponseFunctions(
const std::shared_ptr<
::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>&
radioSatelliteResponse,
const std::shared_ptr<
::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>&
radioSatelliteIndication) override;
protected:
std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse> respond();
public:
using RadioCompatBase::RadioCompatBase;
};
} // namespace android::hardware::radio::compat

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libradiocompat/RadioIndication.h>
#include "commonStructs.h"
#include "debug.h"
#include "collections.h"
#define RADIO_MODULE "RadioSatelliteIndication"
namespace android::hardware::radio::compat {
namespace aidl = ::aidl::android::hardware::radio::satellite;
void RadioIndication::setResponseFunction(
std::shared_ptr<aidl::IRadioSatelliteIndication> satelliteCb) {
mSatelliteCb = satelliteCb;
}
std::shared_ptr<aidl::IRadioSatelliteIndication> RadioIndication::satelliteCb() {
return mSatelliteCb.get();
}
} // namespace android::hardware::radio::compat

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libradiocompat/RadioResponse.h>
#include "commonStructs.h"
#include "debug.h"
#include "collections.h"
#define RADIO_MODULE "RadioSatelliteResponse"
namespace android::hardware::radio::compat {
namespace aidl = ::aidl::android::hardware::radio::satellite;
void RadioResponse::setResponseFunction(
std::shared_ptr<aidl::IRadioSatelliteResponse> satelliteCb) {
mSatelliteCb = satelliteCb;
}
std::shared_ptr<aidl::IRadioSatelliteResponse> RadioResponse::satelliteCb() {
return mSatelliteCb.get();
}
} // namespace android::hardware::radio::compat

View file

@ -1,128 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libradiocompat/RadioSatellite.h>
#include "commonStructs.h"
#include "debug.h"
#include "collections.h"
#define RADIO_MODULE "RadioSatellite"
namespace android::hardware::radio::compat {
using ::ndk::ScopedAStatus;
namespace aidl = ::aidl::android::hardware::radio::satellite;
constexpr auto ok = &ScopedAStatus::ok;
std::shared_ptr<aidl::IRadioSatelliteResponse> RadioSatellite::respond() {
return mCallbackManager->response().satelliteCb();
}
ScopedAStatus RadioSatellite::responseAcknowledgement() {
LOG(ERROR) << " responseAcknowledgement is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getCapabilities(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getCapabilities is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::setPower(int32_t serial, bool /*on*/) {
LOG_CALL << serial;
LOG(ERROR) << " setPower is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getPowerState(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getPowerSate is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::provisionService(
int32_t serial, const std::string& /*imei*/, const std::string& /*msisdn*/,
const std::string& /*imsi*/,
const std::vector<
::aidl::android::hardware::radio::satellite::SatelliteFeature>& /*features*/) {
LOG_CALL << serial;
LOG(ERROR) << " provisionService is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::addAllowedSatelliteContacts(
int32_t serial, const std::vector<std::string>& /*contacts*/) {
LOG_CALL << serial;
LOG(ERROR) << " addAllowedSatelliteContacts is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::removeAllowedSatelliteContacts(
int32_t serial, const std::vector<std::string>& /*contacts*/) {
LOG_CALL << serial;
LOG(ERROR) << " removeAllowedSatelliteContacts is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::sendMessages(int32_t serial,
const std::vector<std::string>& /*messages*/,
const std::string& /*destination*/, double /*latitude*/,
double /*longitude*/) {
LOG_CALL << serial;
LOG(ERROR) << " sendMessage is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getPendingMessages(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getPendingMessages is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getSatelliteMode(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getSatelliteMode is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::setIndicationFilter(int32_t serial, int32_t /*filterBitmask*/) {
LOG_CALL << serial;
LOG(ERROR) << " setIndicationFilter is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::startSendingSatellitePointingInfo(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " startSendingSatellitePointingInfo is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::stopSendingSatellitePointingInfo(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " stopSendingSatellitePointingInfo is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getMaxCharactersPerTextMessage(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getMaxCharactersPerTextMessage is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::getTimeForNextSatelliteVisibility(int32_t serial) {
LOG_CALL << serial;
LOG(ERROR) << " getTimeForNextSatelliteVisibility is unsupported by HIDL HALs";
return ok();
}
ScopedAStatus RadioSatellite::setResponseFunctions(
const std::shared_ptr<aidl::IRadioSatelliteResponse>& response,
const std::shared_ptr<aidl::IRadioSatelliteIndication>& indication) {
LOG_CALL << response << ' ' << indication;
mCallbackManager->setResponseFunctions(response, indication);
return ok();
}
} // namespace android::hardware::radio::compat

View file

@ -46,7 +46,6 @@ cc_binary {
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
"android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
"android.hardware.radio@1.0",

View file

@ -58,9 +58,6 @@ cc_test {
"radio_network_test.cpp",
"radio_sap_callback.cpp",
"radio_sap_test.cpp",
"radio_satellite_indication.cpp",
"radio_satellite_response.cpp",
"radio_satellite_test.cpp",
"radio_sim_indication.cpp",
"radio_sim_response.cpp",
"radio_sim_test.cpp",
@ -83,7 +80,6 @@ cc_test {
"android.hardware.radio.modem-V2-ndk",
"android.hardware.radio.network-V2-ndk",
"android.hardware.radio.sap-V1-ndk",
"android.hardware.radio.satellite-V1-ndk",
"android.hardware.radio.sim-V2-ndk",
"android.hardware.radio.voice-V2-ndk",
],

View file

@ -24,7 +24,6 @@
#include "radio_modem_utils.h"
#include "radio_network_utils.h"
#include "radio_sap_utils.h"
#include "radio_satellite_utils.h"
#include "radio_sim_utils.h"
#include "radio_voice_utils.h"
@ -80,12 +79,6 @@ INSTANTIATE_TEST_SUITE_P(
testing::ValuesIn(android::getAidlHalInstanceNames(IRadioIms::descriptor)),
android::PrintInstanceNameToString);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioSatelliteTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, RadioSatelliteTest,
testing::ValuesIn(android::getAidlHalInstanceNames(IRadioSatellite::descriptor)),
android::PrintInstanceNameToString);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioImsMediaTest);
INSTANTIATE_TEST_SUITE_P(PerInstance, RadioImsMediaTest,
testing::ValuesIn(android::getAidlHalInstanceNames(IImsMedia::descriptor)),

View file

@ -69,8 +69,6 @@ static constexpr const char* FEATURE_TELEPHONY_CDMA = "android.hardware.telephon
static constexpr const char* FEATURE_TELEPHONY_IMS = "android.hardware.telephony.ims";
static constexpr const char* FEATURE_TELEPHONY_SATELLITE = "android.hardware.telephony.satellite";
#define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
#define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
#define MODEM_SET_SIM_POWER_DELAY_IN_SECONDS 2

View file

@ -1,56 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "radio_satellite_utils.h"
RadioSatelliteIndication::RadioSatelliteIndication(RadioServiceTest& parent)
: parent_satellite(parent) {}
ndk::ScopedAStatus RadioSatelliteIndication::onPendingMessageCount(RadioIndicationType /*type*/,
int32_t /*count*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onNewMessages(
RadioIndicationType /*type*/, const std::vector<std::string>& /*messages*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onMessagesTransferComplete(
RadioIndicationType /*type*/, bool /*complete*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onSatellitePointingInfoChanged(
RadioIndicationType /*type*/, const PointingInfo& /*pointingInfo*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteModeChanged(RadioIndicationType /*type*/,
SatelliteMode /*mode*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteRadioTechnologyChanged(
RadioIndicationType /*type*/, NTRadioTechnology /*technology*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteIndication::onProvisionStateChanged(
RadioIndicationType /*type*/, bool /*provisioned*/,
const std::vector<SatelliteFeature>& /*features*/) {
return ndk::ScopedAStatus::ok();
}

View file

@ -1,120 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "radio_satellite_utils.h"
RadioSatelliteResponse::RadioSatelliteResponse(RadioServiceTest& parent)
: parent_satellite(parent) {}
ndk::ScopedAStatus RadioSatelliteResponse::acknowledgeRequest(int32_t /*serial*/) {
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getCapabilitiesResponse(
const RadioResponseInfo& info, const SatelliteCapabilities& /*capabilities*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::setPowerResponse(const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getPowerStateResponse(const RadioResponseInfo& info,
bool /*on*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::provisionServiceResponse(const RadioResponseInfo& info,
bool /*provisioned*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::addAllowedSatelliteContactsResponse(
const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::removeAllowedSatelliteContactsResponse(
const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::sendMessagesResponse(const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getPendingMessagesResponse(
const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getSatelliteModeResponse(
const RadioResponseInfo& info, SatelliteMode /*mode*/, NTRadioTechnology /*technology*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::setIndicationFilterResponse(
const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::startSendingSatellitePointingInfoResponse(
const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::stopSendingSatellitePointingInfoResponse(
const RadioResponseInfo& info) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getMaxCharactersPerTextMessageResponse(
const RadioResponseInfo& info, int32_t /*charLimit*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus RadioSatelliteResponse::getTimeForNextSatelliteVisibilityResponse(
const RadioResponseInfo& info, int32_t /*timeInSeconds*/) {
rspInfo = info;
parent_satellite.notify(info.serial);
return ndk::ScopedAStatus::ok();
}

View file

@ -1,626 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_satellite_utils.h"
#define ASSERT_OK(ret) ASSERT_TRUE(((ret).isOk()))
void RadioSatelliteTest::SetUp() {
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
ALOGI("Skipped the radio satellite tests due to device configuration.");
GTEST_SKIP();
}
satellite = IRadioSatellite::fromBinder(
ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
ASSERT_NE(nullptr, satellite.get());
rsp_satellite = ndk::SharedRefBase::make<RadioSatelliteResponse>(*this);
ASSERT_NE(nullptr, rsp_satellite.get());
count_ = 0;
ind_satellite = ndk::SharedRefBase::make<RadioSatelliteIndication>(*this);
ASSERT_NE(nullptr, ind_satellite.get());
satellite->setResponseFunctions(rsp_satellite, ind_satellite);
// Assert IRadioConfig exists before testing
radio_config = config::IRadioConfig::fromBinder(ndk::SpAIBinder(
AServiceManager_waitForService("android.hardware.radio.config.IRadioConfig/default")));
ASSERT_NE(nullptr, radio_config.get());
}
/*
* Test IRadioSatellite.getCapabilities() for the response returned.
*/
TEST_P(RadioSatelliteTest, getCapabilities) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getCapabilities because satellite is not supported in device");
return;
} else {
ALOGI("Running getCapabilities because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getCapabilities(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getCapabilities, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.setPower() for the response returned.
*/
TEST_P(RadioSatelliteTest, setPower) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping setPower because satellite is not supported in device");
return;
} else {
ALOGI("Running setPower because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->setPower(serial, true);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("setPower, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.getPowerSate() for the response returned.
*/
TEST_P(RadioSatelliteTest, getPowerSate) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getPowerSate because satellite is not supported in device");
return;
} else {
ALOGI("Running getPowerSate because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getPowerState(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getPowerSate, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.provisionService() for the response returned.
*/
TEST_P(RadioSatelliteTest, provisionService) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping provisionService because satellite is not supported in device");
return;
} else {
ALOGI("Running provisionService because satellite is supported in device");
}
serial = GetRandomSerialNumber();
std::string imei = "imei";
std::string msisdn = "msisdn";
std::string imsi = "imsi";
const std::vector<SatelliteFeature> features{
SatelliteFeature::SOS_SMS, SatelliteFeature::EMERGENCY_SMS, SatelliteFeature::SMS};
ndk::ScopedAStatus res = satellite->provisionService(serial, imei, msisdn, imsi, features);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("provisionService, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
{RadioError::NONE,
RadioError::ABORTED,
RadioError::ACCESS_BARRED,
RadioError::CANCELLED,
RadioError::FEATURE_NOT_SUPPORTED,
RadioError::INTERNAL_ERR,
RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE,
RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE,
RadioError::MODEM_ERR,
RadioError::MODEM_INCOMPATIBLE,
RadioError::NETWORK_ERR,
RadioError::NETWORK_NOT_READY,
RadioError::NETWORK_REJECT,
RadioError::NETWORK_TIMEOUT,
RadioError::NO_MEMORY,
RadioError::NO_NETWORK_FOUND,
RadioError::NO_RESOURCES,
RadioError::NO_SATELLITE_SIGNAL,
RadioError::NO_SUBSCRIPTION,
RadioError::OPERATION_NOT_ALLOWED,
RadioError::RADIO_NOT_AVAILABLE,
RadioError::RADIO_TECHNOLOGY_NOT_SUPPORTED,
RadioError::REQUEST_NOT_SUPPORTED,
RadioError::REQUEST_RATE_LIMITED,
RadioError::SIM_ABSENT,
RadioError::SIM_BUSY,
RadioError::SIM_ERR,
RadioError::SIM_FULL,
RadioError::SUBSCRIBER_NOT_AUTHORIZED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.addAllowedSatelliteContacts() for the response returned.
*/
TEST_P(RadioSatelliteTest, addAllowedSatelliteContacts) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping addAllowedSatelliteContacts because satellite is not supported in device");
return;
} else {
ALOGI("Running addAllowedSatelliteContacts because satellite is supported in device");
}
serial = GetRandomSerialNumber();
const std::vector<std::string> contacts = {"contact 1", "contact 2"};
ndk::ScopedAStatus res = satellite->addAllowedSatelliteContacts(serial, contacts);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("addAllowedSatelliteContacts, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
{RadioError::NONE,
RadioError::ABORTED,
RadioError::ACCESS_BARRED,
RadioError::CANCELLED,
RadioError::INTERNAL_ERR,
RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_CONTACT,
RadioError::INVALID_MODEM_STATE,
RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE,
RadioError::MODEM_ERR,
RadioError::NETWORK_ERR,
RadioError::NETWORK_NOT_READY,
RadioError::NETWORK_REJECT,
RadioError::NETWORK_TIMEOUT,
RadioError::NO_MEMORY,
RadioError::NO_NETWORK_FOUND,
RadioError::NO_RESOURCES,
RadioError::NO_SATELLITE_SIGNAL,
RadioError::NO_SUBSCRIPTION,
RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
RadioError::OPERATION_NOT_ALLOWED,
RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED,
RadioError::REQUEST_RATE_LIMITED,
RadioError::SIM_ABSENT,
RadioError::SIM_BUSY,
RadioError::SIM_ERR,
RadioError::SIM_FULL,
RadioError::SYSTEM_ERR,
RadioError::UNIDENTIFIED_SUBSCRIBER}));
}
/*
* Test IRadioSatellite.removeAllowedSatelliteContacts() for the response returned.
*/
TEST_P(RadioSatelliteTest, removeAllowedSatelliteContacts) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping removeAllowedSatelliteContacts because satellite is not supported in "
"device");
return;
} else {
ALOGI("Running removeAllowedSatelliteContacts because satellite is supported in device");
}
serial = GetRandomSerialNumber();
const std::vector<std::string> contacts = {"contact 1", "contact 2"};
ndk::ScopedAStatus res = satellite->removeAllowedSatelliteContacts(serial, contacts);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("removeAllowedSatelliteContacts, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
{RadioError::NONE,
RadioError::ABORTED,
RadioError::ACCESS_BARRED,
RadioError::CANCELLED,
RadioError::INTERNAL_ERR,
RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_CONTACT,
RadioError::INVALID_MODEM_STATE,
RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE,
RadioError::MODEM_ERR,
RadioError::NETWORK_ERR,
RadioError::NETWORK_NOT_READY,
RadioError::NETWORK_REJECT,
RadioError::NETWORK_TIMEOUT,
RadioError::NO_MEMORY,
RadioError::NO_NETWORK_FOUND,
RadioError::NO_RESOURCES,
RadioError::NO_SATELLITE_SIGNAL,
RadioError::NO_SUBSCRIPTION,
RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
RadioError::OPERATION_NOT_ALLOWED,
RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED,
RadioError::REQUEST_RATE_LIMITED,
RadioError::SIM_ABSENT,
RadioError::SIM_BUSY,
RadioError::SIM_ERR,
RadioError::SIM_FULL,
RadioError::SYSTEM_ERR,
RadioError::UNIDENTIFIED_SUBSCRIBER}));
}
/*
* Test IRadioSatellite.sendMessages() for the response returned.
*/
TEST_P(RadioSatelliteTest, sendMessages) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping sendMessages because satellite is not supported in device");
return;
} else {
ALOGI("Running sendMessages because satellite is supported in device");
}
serial = GetRandomSerialNumber();
const std::vector<std::string> messages = {"message 1", "message 2"};
std::string destination = "0123456789";
ndk::ScopedAStatus res = satellite->sendMessages(serial, messages, destination, 1.0, 2.0);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("sendMessages, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
{RadioError::NONE,
RadioError::ABORTED,
RadioError::ACCESS_BARRED,
RadioError::BLOCKED_DUE_TO_CALL,
RadioError::CANCELLED,
RadioError::ENCODING_ERR,
RadioError::ENCODING_NOT_SUPPORTED,
RadioError::INTERNAL_ERR,
RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE,
RadioError::INVALID_SIM_STATE,
RadioError::INVALID_SMS_FORMAT,
RadioError::INVALID_STATE,
RadioError::MODEM_ERR,
RadioError::NETWORK_ERR,
RadioError::NETWORK_NOT_READY,
RadioError::NETWORK_REJECT,
RadioError::NETWORK_TIMEOUT,
RadioError::NO_MEMORY,
RadioError::NO_NETWORK_FOUND,
RadioError::NO_RESOURCES,
RadioError::NO_SMS_TO_ACK,
RadioError::NO_SATELLITE_SIGNAL,
RadioError::NO_SUBSCRIPTION,
RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
RadioError::OPERATION_NOT_ALLOWED,
RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED,
RadioError::REQUEST_RATE_LIMITED,
RadioError::SIM_ABSENT,
RadioError::SIM_BUSY,
RadioError::SIM_ERR,
RadioError::SIM_FULL,
RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
RadioError::SMS_SEND_FAIL_RETRY,
RadioError::SYSTEM_ERR,
RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL,
RadioError::UNIDENTIFIED_SUBSCRIBER}));
}
/*
* Test IRadioSatellite.getPendingMessages() for the response returned.
*/
TEST_P(RadioSatelliteTest, getPendingMessages) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getPendingMessages because satellite is not supported in device");
return;
} else {
ALOGI("Running getPendingMessages because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getPendingMessages(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getPendingMessages, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
{RadioError::NONE,
RadioError::ABORTED,
RadioError::ACCESS_BARRED,
RadioError::BLOCKED_DUE_TO_CALL,
RadioError::CANCELLED,
RadioError::ENCODING_ERR,
RadioError::ENCODING_NOT_SUPPORTED,
RadioError::INTERNAL_ERR,
RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE,
RadioError::INVALID_SIM_STATE,
RadioError::INVALID_SMS_FORMAT,
RadioError::INVALID_STATE,
RadioError::MODEM_ERR,
RadioError::NETWORK_ERR,
RadioError::NETWORK_NOT_READY,
RadioError::NETWORK_REJECT,
RadioError::NETWORK_TIMEOUT,
RadioError::NO_MEMORY,
RadioError::NO_NETWORK_FOUND,
RadioError::NO_RESOURCES,
RadioError::NO_SMS_TO_ACK,
RadioError::NO_SATELLITE_SIGNAL,
RadioError::NO_SUBSCRIPTION,
RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
RadioError::OPERATION_NOT_ALLOWED,
RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED,
RadioError::REQUEST_RATE_LIMITED,
RadioError::SIM_ABSENT,
RadioError::SIM_BUSY,
RadioError::SIM_ERR,
RadioError::SIM_FULL,
RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
RadioError::SYSTEM_ERR,
RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL}));
}
/*
* Test IRadioSatellite.getSatelliteMode() for the response returned.
*/
TEST_P(RadioSatelliteTest, getSatelliteMode) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getSatelliteMode because satellite is not supported in device");
return;
} else {
ALOGI("Running getSatelliteMode because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getSatelliteMode(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getSatelliteMode, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.setIndicationFilter() for the response returned.
*/
TEST_P(RadioSatelliteTest, setIndicationFilter) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping setIndicationFilter because satellite is not supported in device");
return;
} else {
ALOGI("Running setIndicationFilter because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->setIndicationFilter(serial, 0);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("setIndicationFilter, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.startSendingSatellitePointingInfo() for the response returned.
*/
TEST_P(RadioSatelliteTest, startSendingSatellitePointingInfo) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping startSendingSatellitePointingInfo because satellite is not supported in "
"device");
return;
} else {
ALOGI("Running startSendingSatellitePointingInfo because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->startSendingSatellitePointingInfo(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("startSendingSatellitePointingInfo, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.stopSatelliteLocationUpdate() for the response returned.
*/
TEST_P(RadioSatelliteTest, stopSatelliteLocationUpdate) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping stopSendingSatellitePointingInfo because satellite is not supported in "
"device");
return;
} else {
ALOGI("Running stopSendingSatellitePointingInfo because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->stopSendingSatellitePointingInfo(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("stopSendingSatellitePointingInfo, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.getMaxCharactersPerTextMessage() for the response returned.
*/
TEST_P(RadioSatelliteTest, getMaxCharactersPerTextMessage) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getMaxCharactersPerTextMessage because satellite is not supported in "
"device");
return;
} else {
ALOGI("Running getMaxCharactersPerTextMessage because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getMaxCharactersPerTextMessage(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getMaxCharactersPerTextMessage, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}
/*
* Test IRadioSatellite.getTimeForNextSatelliteVisibility() for the response returned.
*/
TEST_P(RadioSatelliteTest, getTimeForNextSatelliteVisibility) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
ALOGI("Skipping getTimeForNextSatelliteVisibility because satellite is not supported in "
"device");
return;
} else {
ALOGI("Running getTimeForNextSatelliteVisibility because satellite is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = satellite->getTimeForNextSatelliteVisibility(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
ALOGI("getTimeForNextSatelliteVisibility, rspInfo.error = %s\n",
toString(rsp_satellite->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
rsp_satellite->rspInfo.error,
{RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
RadioError::SYSTEM_ERR}));
}

View file

@ -1,126 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <aidl/android/hardware/radio/satellite/BnRadioSatelliteIndication.h>
#include <aidl/android/hardware/radio/satellite/BnRadioSatelliteResponse.h>
#include <aidl/android/hardware/radio/satellite/IRadioSatellite.h>
#include "radio_aidl_hal_utils.h"
using namespace aidl::android::hardware::radio::satellite;
class RadioSatelliteTest;
/* Callback class for Satellite response */
class RadioSatelliteResponse : public BnRadioSatelliteResponse {
protected:
RadioServiceTest& parent_satellite;
public:
RadioSatelliteResponse(RadioServiceTest& parent_satellite);
virtual ~RadioSatelliteResponse() = default;
RadioResponseInfo rspInfo;
virtual ndk::ScopedAStatus acknowledgeRequest(int32_t serial) override;
virtual ndk::ScopedAStatus getCapabilitiesResponse(
const RadioResponseInfo& info, const SatelliteCapabilities& capabilities) override;
virtual ndk::ScopedAStatus setPowerResponse(const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus getPowerStateResponse(const RadioResponseInfo& info,
bool on) override;
virtual ndk::ScopedAStatus provisionServiceResponse(const RadioResponseInfo& info,
bool provisioned) override;
virtual ndk::ScopedAStatus addAllowedSatelliteContactsResponse(
const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus removeAllowedSatelliteContactsResponse(
const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus sendMessagesResponse(const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus getPendingMessagesResponse(
const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) override;
virtual ndk::ScopedAStatus getSatelliteModeResponse(
const RadioResponseInfo& info, SatelliteMode mode,
satellite::NTRadioTechnology technology) override;
virtual ndk::ScopedAStatus setIndicationFilterResponse(const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus startSendingSatellitePointingInfoResponse(
const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus stopSendingSatellitePointingInfoResponse(
const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus getMaxCharactersPerTextMessageResponse(const RadioResponseInfo& info,
int32_t charLimit) override;
virtual ndk::ScopedAStatus getTimeForNextSatelliteVisibilityResponse(
const RadioResponseInfo& info, int32_t timeInSeconds) override;
};
/* Callback class for Satellite indication */
class RadioSatelliteIndication : public BnRadioSatelliteIndication {
protected:
RadioServiceTest& parent_satellite;
public:
RadioSatelliteIndication(RadioServiceTest& parent_satellite);
virtual ~RadioSatelliteIndication() = default;
virtual ndk::ScopedAStatus onPendingMessageCount(RadioIndicationType type,
int32_t count) override;
virtual ndk::ScopedAStatus onNewMessages(RadioIndicationType type,
const std::vector<std::string>& messages) override;
virtual ndk::ScopedAStatus onMessagesTransferComplete(RadioIndicationType type,
bool complete) override;
virtual ndk::ScopedAStatus onSatellitePointingInfoChanged(
RadioIndicationType type, const PointingInfo& pointingInfo) override;
virtual ndk::ScopedAStatus onSatelliteModeChanged(RadioIndicationType type,
SatelliteMode mode) override;
virtual ndk::ScopedAStatus onSatelliteRadioTechnologyChanged(
RadioIndicationType type, satellite::NTRadioTechnology technology) override;
virtual ndk::ScopedAStatus onProvisionStateChanged(
RadioIndicationType type, bool provisioned,
const std::vector<SatelliteFeature>& features) override;
};
// The main test class for AIDL Satellite.
class RadioSatelliteTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
public:
virtual void SetUp() override;
/* Radio Satellite service handle */
std::shared_ptr<IRadioSatellite> satellite;
/* Radio Satellite response handle */
std::shared_ptr<RadioSatelliteResponse> rsp_satellite;
/* Radio Satellite indication handle */
std::shared_ptr<RadioSatelliteIndication> ind_satellite;
};