Fix wrong wording of a notification and dialog in IMS ECM
Mobile data is not allowed during CDMA ECM. So, the device notifies the
restriction with a notification and dialog like "Data connection
disabled". But there is no such restriction in IMS ECM. However, the
same wording as CDMA ECM is used in IMS ECM.
There are three UI to display wrong wording.
1. Notification during ECM
2. Confirmation dialog to exit ECM
3. Notification during an emergency call
To resolve the issue.
Fix the wording for IMS ECM.
Test: manual - Checked correct wording is displayed in the notification
and dialog.
Bug: 141287026
Change-Id: Ibdda36993d974fba15aba249d52c7a83909d8b6a
diff --git a/src/com/android/phone/EmergencyCallbackModeService.java b/src/com/android/phone/EmergencyCallbackModeService.java
index 41d83c4..012a670 100644
--- a/src/com/android/phone/EmergencyCallbackModeService.java
+++ b/src/com/android/phone/EmergencyCallbackModeService.java
@@ -194,7 +194,11 @@
// Format notification string
String text = null;
if(mInEmergencyCall) {
- text = getText(R.string.phone_in_ecm_call_notification_text).toString();
+ text = getText(
+ // During IMS ECM, data restriction hint should be removed.
+ (imsPhone != null && imsPhone.isInImsEcm())
+ ? R.string.phone_in_ecm_call_notification_text_without_data_restriction_hint
+ : R.string.phone_in_ecm_call_notification_text).toString();
} else {
// Calculate the time in ms when the notification will be finished.
long finishedCountMs = millisUntilFinished + System.currentTimeMillis();
@@ -205,7 +209,11 @@
String completeTime = SimpleDateFormat.getTimeInstance(SimpleDateFormat.SHORT).format(
finishedCountMs);
- text = getResources().getString(R.string.phone_in_ecm_notification_complete_time,
+ text = getResources().getString(
+ // During IMS ECM, data restriction hint should be removed.
+ (imsPhone != null && imsPhone.isInImsEcm())
+ ? R.string.phone_in_ecm_notification_complete_time_without_data_restriction_hint
+ : R.string.phone_in_ecm_notification_complete_time,
completeTime);
}
builder.setContentText(text);