Loading telephony/java/android/telephony/TelephonyManager.java +18 −1 Original line number Diff line number Diff line Loading @@ -4848,4 +4848,21 @@ public class TelephonyManager { } return null; } /** * Returns the service state information on specified subscription. Callers require * either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information. * @hide */ public ServiceState getServiceStateForSubscriber(int subId) { try { ITelephony service = getITelephony(); if (service != null) { return service.getServiceStateForSubscriber(subId, getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getServiceStateForSubscriber", e); } return null; } } No newline at end of file telephony/java/com/android/internal/telephony/ITelephony.aidl +10 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,10 @@ import android.os.Bundle; import android.telecom.PhoneAccount; import android.telephony.CellInfo; import android.telephony.IccOpenLogicalChannelResponse; import android.telephony.ModemActivityInfo; import android.telephony.NeighboringCellInfo; import android.telephony.RadioAccessFamily; import android.telephony.ModemActivityInfo; import android.telephony.ServiceState; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.OperatorInfo; import java.util.List; Loading Loading @@ -1005,4 +1006,12 @@ interface ITelephony { * Return the modem activity info. */ ModemActivityInfo getModemActivityInfo(); /** * Get the service state on specified subscription * @param subId Subscription id * @param callingPackage The package making the call * @return Service state on specified subscription. */ ServiceState getServiceStateForSubscriber(int subId, String callingPackage); } Loading
telephony/java/android/telephony/TelephonyManager.java +18 −1 Original line number Diff line number Diff line Loading @@ -4848,4 +4848,21 @@ public class TelephonyManager { } return null; } /** * Returns the service state information on specified subscription. Callers require * either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information. * @hide */ public ServiceState getServiceStateForSubscriber(int subId) { try { ITelephony service = getITelephony(); if (service != null) { return service.getServiceStateForSubscriber(subId, getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getServiceStateForSubscriber", e); } return null; } } No newline at end of file
telephony/java/com/android/internal/telephony/ITelephony.aidl +10 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,10 @@ import android.os.Bundle; import android.telecom.PhoneAccount; import android.telephony.CellInfo; import android.telephony.IccOpenLogicalChannelResponse; import android.telephony.ModemActivityInfo; import android.telephony.NeighboringCellInfo; import android.telephony.RadioAccessFamily; import android.telephony.ModemActivityInfo; import android.telephony.ServiceState; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.OperatorInfo; import java.util.List; Loading Loading @@ -1005,4 +1006,12 @@ interface ITelephony { * Return the modem activity info. */ ModemActivityInfo getModemActivityInfo(); /** * Get the service state on specified subscription * @param subId Subscription id * @param callingPackage The package making the call * @return Service state on specified subscription. */ ServiceState getServiceStateForSubscriber(int subId, String callingPackage); }