ECBM SystemProperty cleanup
- Add getEmergencyCallbackMode() method to get the boolean
value for ECBM callback mode from the phone, in the
PhoneInterfaceManager.java
- Replace the 'get' of PROPERTY_INECM_MODE system property
in the packages/services/Telephony
Change-Id: Ide35e28b3339f58523bfe92be3c2fdfce111d45e
Test: Manual
Bug: 30361624
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 6fdff14..d92d349 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -2175,16 +2175,7 @@
*/
/* package */ static boolean isPhoneInEcm(Phone phone) {
if ((phone != null) && TelephonyCapabilities.supportsEcm(phone)) {
- // For phones that support ECM, return true iff PROPERTY_INECM_MODE == "true".
- // TODO: There ought to be a better API for this than just
- // exposing a system property all the way up to the app layer,
- // probably a method like "inEcm()" provided by the telephony
- // layer.
- String ecmMode =
- SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE);
- if (ecmMode != null) {
- return ecmMode.equals("true");
- }
+ return phone.isInEcm();
}
return false;
}