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

Commit d25bffff authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add a bitmap version for get/set PreferredNetworkType"

parents 9820845e 1ed39240
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,8 @@ hidl_interface {
        "LteVopsInfo",
        "LteVopsInfo",
        "NetworkScanResult",
        "NetworkScanResult",
        "PhysicalChannelConfig",
        "PhysicalChannelConfig",
        "RadioAccessFamily",
        "RadioCapability",
        "RadioFrequencyInfo",
        "RadioFrequencyInfo",
        "RadioTechnology",
        "RadioTechnology",
        "NrIndicators",
        "NrIndicators",
+21 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@ import @1.3::IRadio;
import @1.4::AccessNetwork;
import @1.4::AccessNetwork;
import @1.4::DataProfileInfo;
import @1.4::DataProfileInfo;
import @1.4::EmergencyServiceCategory;
import @1.4::EmergencyServiceCategory;
import @1.4::RadioAccessFamily;


/**
/**
 * This interface is used by telephony and telecom to talk to cellular radio.
 * This interface is used by telephony and telecom to talk to cellular radio.
@@ -122,4 +123,24 @@ interface IRadio extends @1.3::IRadio {
     */
     */
    oneway emergencyDial(int32_t serial, Dial dialInfo,
    oneway emergencyDial(int32_t serial, Dial dialInfo,
            bitfield<EmergencyServiceCategory> categories);
            bitfield<EmergencyServiceCategory> categories);

    /**
     * Query the preferred network type bitmap.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getPreferredNetworkTypeBitmapResponse()
     */
    oneway getPreferredNetworkTypeBitmap(int32_t serial);

    /**
     * Requests to set the preferred network type for searching and registering.
     *
     * @param serial Serial number of request.
     * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
     *
     * Response callback is IRadioResponse.setPreferredNetworkTypeBitmapResponse()
     */
    oneway setPreferredNetworkTypeBitmap(
            int32_t serial, bitfield<RadioAccessFamily> networkTypeBitmap);
};
};
+41 −1
Original line number Original line Diff line number Diff line
@@ -87,4 +87,44 @@ interface IRadioResponse extends @1.3::IRadioResponse {
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
     */
    oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
    oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);

    /**
     * @param info Response info struct containing response type, serial no. and error
     * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:NO_MEMORY
     *   RadioError:INTERNAL_ERR
     *   RadioError:SYSTEM_ERR
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:MODEM_ERR
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:NO_RESOURCES
     *   RadioError:CANCELLED
     */
    oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
            bitfield<RadioAccessFamily> networkTypeBitmap);

    /**
     * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
     *
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:OPERATION_NOT_ALLOWED
     *   RadioError:MODE_NOT_SUPPORTED
     *   RadioError:NO_MEMORY
     *   RadioError:INTERNAL_ERR
     *   RadioError:SYSTEM_ERR
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:MODEM_ERR
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:NO_RESOURCES
     *   RadioError:CANCELLED
     */
    oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
};
};
+26 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@ import @1.0::CellInfoType;
import @1.0::DataProfileId;
import @1.0::DataProfileId;
import @1.0::DataProfileInfoType;
import @1.0::DataProfileInfoType;
import @1.0::RadioAccessFamily;
import @1.0::RadioAccessFamily;
import @1.0::RadioCapabilityPhase;
import @1.0::RadioCapabilityStatus ;
import @1.0::RadioError;
import @1.0::RadioError;
import @1.0::RadioTechnology;
import @1.0::RadioTechnology;
import @1.0::RegState;
import @1.0::RegState;
@@ -150,6 +152,11 @@ enum RadioTechnology : @1.0::RadioTechnology {
    NR = 20,
    NR = 20,
};
};


enum RadioAccessFamily : @1.0::RadioAccessFamily {
    /** 5G NR. */
    NR = 1 << RadioTechnology:NR,
};

/** Mapping the frequency to a rough range. */
/** Mapping the frequency to a rough range. */
enum FrequencyRange : int32_t {
enum FrequencyRange : int32_t {
    /** Indicates the frequency range is below 1GHz. */
    /** Indicates the frequency range is below 1GHz. */
@@ -420,3 +427,22 @@ struct CardStatus {
     */
     */
    string eid;
    string eid;
};
};

/** Overwritten from @1.0::RadioCapability in order to use the latest RadioAccessFamily. */
struct RadioCapability {
    /** Unique session value defined by fr amework returned in all "responses/unslo". */
    int32_t session;

    RadioCapabilityPhase phase;

    /** 32-bit bitmap of RadioAccessFamily. */
    bitfield<RadioAccessFamily> raf;

    /**
     * A UUID typically "com.xxxx.lmX" where X is the logical modem.
     * RadioConst:MAX_UUID_LENGTH is the max length.
     */
    string logicalModemUuid;

    RadioCapabilityStatus status;
};