Loading telephony/java/android/telephony/TelephonyManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
telephony/java/android/telephony/TelephonyManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -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); }