Loading telephony/java/android/telephony/TelephonyManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -6442,5 +6442,26 @@ public class TelephonyManager { } return false; } /** * Get the most recently available signal strength information. * * Get the most recent SignalStrength information reported by the modem. Due * to power saving this information may not always be current. * @return the most recent cached signal strength info from the modem * @hide */ @Nullable public SignalStrength getSignalStrength() { try { ITelephony service = getITelephony(); if (service != null) { return service.getSignalStrength(getSubId()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getSignalStrength", e); } return null; } } telephony/java/com/android/internal/telephony/ITelephony.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.telephony.ModemActivityInfo; import android.telephony.NeighboringCellInfo; import android.telephony.RadioAccessFamily; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyHistogram; import android.telephony.VisualVoicemailSmsFilterSettings; import com.android.ims.internal.IImsServiceController; Loading Loading @@ -1293,4 +1294,15 @@ interface ITelephony { * @hide */ boolean getEmergencyCallbackMode(int subId); /** * Get the most recently available signal strength information. * * Get the most recent SignalStrength information reported by the modem. Due * to power saving this information may not always be current. * @param subId Subscription index * @return the most recent cached signal strength info from the modem * @hide */ SignalStrength getSignalStrength(int subId); } Loading
telephony/java/android/telephony/TelephonyManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -6442,5 +6442,26 @@ public class TelephonyManager { } return false; } /** * Get the most recently available signal strength information. * * Get the most recent SignalStrength information reported by the modem. Due * to power saving this information may not always be current. * @return the most recent cached signal strength info from the modem * @hide */ @Nullable public SignalStrength getSignalStrength() { try { ITelephony service = getITelephony(); if (service != null) { return service.getSignalStrength(getSubId()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getSignalStrength", e); } return null; } }
telephony/java/com/android/internal/telephony/ITelephony.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.telephony.ModemActivityInfo; import android.telephony.NeighboringCellInfo; import android.telephony.RadioAccessFamily; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyHistogram; import android.telephony.VisualVoicemailSmsFilterSettings; import com.android.ims.internal.IImsServiceController; Loading Loading @@ -1293,4 +1294,15 @@ interface ITelephony { * @hide */ boolean getEmergencyCallbackMode(int subId); /** * Get the most recently available signal strength information. * * Get the most recent SignalStrength information reported by the modem. Due * to power saving this information may not always be current. * @param subId Subscription index * @return the most recent cached signal strength info from the modem * @hide */ SignalStrength getSignalStrength(int subId); }