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

Commit 385dbabf authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "new system API to getRadioAccessFamily" am: 2ab2f40b

am: 0a75a55b

Change-Id: I46a5b2339143bb5f512ed4554503724b32a6da07
parents c87f7a9b 0a75a55b
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -5356,7 +5356,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
            android.hardware.radio.V1_0.RadioCapability rcRil, RIL ril) {
            android.hardware.radio.V1_0.RadioCapability rcRil, RIL ril) {
        int session = rcRil.session;
        int session = rcRil.session;
        int phase = rcRil.phase;
        int phase = rcRil.phase;
        int rat = rcRil.raf;
        // convert to public bitmask {@link TelephonyManager.NetworkTypeBitMask}
        int rat = RadioAccessFamily.convertToNetworkTypeBitMask(rcRil.raf);
        String logicModemUuid = rcRil.logicalModemUuid;
        String logicModemUuid = rcRil.logicalModemUuid;
        int status = rcRil.status;
        int status = rcRil.status;


@@ -5364,7 +5365,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
                ", phase=" + phase +
                ", phase=" + phase +
                ", rat=" + rat +
                ", rat=" + rat +
                ", logicModemUuid=" + logicModemUuid +
                ", logicModemUuid=" + logicModemUuid +
                ", status=" + status);
                ", status=" + status + ", rcRil.raf=" + rcRil.raf);
        RadioCapability rc = new RadioCapability(
        RadioCapability rc = new RadioCapability(
                ril.mPhoneId, session, phase, rat, logicModemUuid, status);
                ril.mPhoneId, session, phase, rat, logicModemUuid, status);
        return rc;
        return rc;
+8 −4
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.internal.telephony;
package com.android.internal.telephony;


import android.telephony.TelephonyManager;

/**
/**
 * Object to indicate the phone radio capability.
 * Object to indicate the phone radio capability.
 *
 *
@@ -94,8 +96,9 @@ public class RadioCapability {
     * RadioAccessFamily is a bit field of radio access technologies the
     * RadioAccessFamily is a bit field of radio access technologies the
     * for the modem is currently supporting. The initial value returned
     * for the modem is currently supporting. The initial value returned
     * my the modem must the the set of bits that the modem currently supports.
     * my the modem must the the set of bits that the modem currently supports.
     * see RadioAccessFamily#RADIO_TECHNOLOGY_XXXX
     * see {@link android.telephony.TelephonyManager.NetworkTypeBitMask}
     */
     */
    @TelephonyManager.NetworkTypeBitMask
    private int mRadioAccessFamily;
    private int mRadioAccessFamily;


    /**
    /**
@@ -118,14 +121,15 @@ public class RadioCapability {
     * @param session the request transaction id
     * @param session the request transaction id
     * @param phase the request phase id
     * @param phase the request phase id
     * @param radioAccessFamily the phone radio access family defined in
     * @param radioAccessFamily the phone radio access family defined in
     *        RadioAccessFamily. It's a bit mask value to represent
     * {@link android.telephony.TelephonyManager.NetworkTypeBitMask}
     *        the support type.
     *                          It's a bit mask value to represent the support type.
     * @param logicalModemUuid the logicalModem UUID which phone connected to
     * @param logicalModemUuid the logicalModem UUID which phone connected to
     * @param status tell modem the action transaction of
     * @param status tell modem the action transaction of
     *        set radio capability is success or fail with RC_Phase_FINISH
     *        set radio capability is success or fail with RC_Phase_FINISH
     */
     */
    public RadioCapability(int phoneId, int session, int phase,
    public RadioCapability(int phoneId, int session, int phase,
            int radioAccessFamily, String logicalModemUuid, int status) {
                           @TelephonyManager.NetworkTypeBitMask int radioAccessFamily,
                           String logicalModemUuid, int status) {
        mPhoneId = phoneId;
        mPhoneId = phoneId;
        mSession = session;
        mSession = session;
        mPhase = phase;
        mPhase = phase;