Merge "ECBM SystemProperty cleanup"
This commit is contained in:
@@ -245,8 +245,7 @@ public class GpsNetInitiatedHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getInEmergency() {
|
public boolean getInEmergency() {
|
||||||
boolean isInEmergencyCallback = Boolean.parseBoolean(
|
boolean isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode();
|
||||||
SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
|
|
||||||
return mIsInEmergency || isInEmergencyCallback;
|
return mIsInEmergency || isInEmergencyCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6170,5 +6170,33 @@ public class TelephonyManager {
|
|||||||
|
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1257,4 +1257,12 @@ interface ITelephony {
|
|||||||
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
||||||
*/
|
*/
|
||||||
String[] getForbiddenPlmns(int subId, int appType);
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user