Loading location/java/com/android/internal/location/GpsNetInitiatedHandler.java +1 −2 Original line number Diff line number Diff line Loading @@ -242,8 +242,7 @@ public class GpsNetInitiatedHandler { } public boolean getInEmergency() { boolean isInEmergencyCallback = Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)); boolean isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode(); return mIsInEmergency || isInEmergencyCallback; } Loading telephony/java/android/telephony/TelephonyManager.java +28 −0 Original line number Diff line number Diff line Loading @@ -6478,5 +6478,33 @@ public class TelephonyManager { return null; } /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @hide */ public boolean getEmergencyCallbackMode() { return getEmergencyCallbackMode(getSubId()); } /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @param subId the subscription ID that this action applies to. * @hide */ public boolean getEmergencyCallbackMode(int subId) { try { ITelephony telephony = getITelephony(); if (telephony == null) { return false; } return telephony.getEmergencyCallbackMode(subId); } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getEmergencyCallbackMode", e); } return false; } } telephony/java/com/android/internal/telephony/ITelephony.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -1316,4 +1316,12 @@ interface ITelephony { * @param appType the icc application type, like {@link #APPTYPE_USIM} */ String[] getForbiddenPlmns(int subId, int appType); /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @param subId the subscription ID that this action applies to. * @hide */ boolean getEmergencyCallbackMode(int subId); } Loading
location/java/com/android/internal/location/GpsNetInitiatedHandler.java +1 −2 Original line number Diff line number Diff line Loading @@ -242,8 +242,7 @@ public class GpsNetInitiatedHandler { } public boolean getInEmergency() { boolean isInEmergencyCallback = Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)); boolean isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode(); return mIsInEmergency || isInEmergencyCallback; } Loading
telephony/java/android/telephony/TelephonyManager.java +28 −0 Original line number Diff line number Diff line Loading @@ -6478,5 +6478,33 @@ public class TelephonyManager { return null; } /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @hide */ public boolean getEmergencyCallbackMode() { return getEmergencyCallbackMode(getSubId()); } /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @param subId the subscription ID that this action applies to. * @hide */ public boolean getEmergencyCallbackMode(int subId) { try { ITelephony telephony = getITelephony(); if (telephony == null) { return false; } return telephony.getEmergencyCallbackMode(subId); } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#getEmergencyCallbackMode", e); } return false; } }
telephony/java/com/android/internal/telephony/ITelephony.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -1316,4 +1316,12 @@ interface ITelephony { * @param appType the icc application type, like {@link #APPTYPE_USIM} */ String[] getForbiddenPlmns(int subId, int appType); /** * Check if phone is in emergency callback mode * @return true if phone is in emergency callback mode * @param subId the subscription ID that this action applies to. * @hide */ boolean getEmergencyCallbackMode(int subId); }