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

Commit 7c491100 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Android (Google) Code Review
Browse files

Merge "Add @hide API to return whether a modem stack is enabled or not."

parents 0d609de6 afd0087a
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -10702,6 +10702,25 @@ public class TelephonyManager {
        return ret;
    }

    /**
     * It indicates whether modem is enabled or not per slot.
     * It's the corresponding status of {@link #enableModemForSlot}.
     *
     * @param slotIndex which slot it's checking.
     * @hide
     */
    public boolean isModemEnabledForSlot(int slotIndex) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.isModemEnabledForSlot(slotIndex, mContext.getOpPackageName());
            }
        } catch (RemoteException ex) {
            Log.e(TAG, "enableModem RemoteException", ex);
        }
        return false;
    }

    /**
     * Broadcast intent action for network country code changes.
     *
+3 −1
Original line number Diff line number Diff line
@@ -1959,4 +1959,6 @@ interface ITelephony {
     * Get the IRadio HAL Version encoded as 100 * MAJOR_VERSION + MINOR_VERSION or -1 if unknown
     */
    int getRadioHalVersion();

    boolean isModemEnabledForSlot(int slotIndex, String callingPackage);
}