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

Commit 5d9175a1 authored by Chen Xu's avatar Chen Xu Committed by Android (Google) Code Review
Browse files

Merge "new system API to getRadioAccessFamily"

parents 7f6a473a 9d69aa9a
Loading
Loading
Loading
Loading
+3 −2
Original line number 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) {
        int session = rcRil.session;
        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;
        int status = rcRil.status;

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

package com.android.internal.telephony;

import android.telephony.TelephonyManager;

/**
 * Object to indicate the phone radio capability.
 *
@@ -94,8 +96,9 @@ public class RadioCapability {
     * RadioAccessFamily is a bit field of radio access technologies the
     * for the modem is currently supporting. The initial value returned
     * 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;

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