summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/android/incallui/StatusBarNotifier.java17
-rw-r--r--java/com/android/incallui/res/values/strings.xml27
2 files changed, 26 insertions, 18 deletions
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 03e119efe..07f179edc 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -155,10 +155,6 @@ public class StatusBarNotifier
private static int getWorkStringFromPersonalString(int resId) {
if (resId == R.string.notification_ongoing_call) {
return R.string.notification_ongoing_work_call;
- } else if (resId == R.string.notification_ongoing_call_wifi) {
- return R.string.notification_ongoing_work_call_wifi;
- } else if (resId == R.string.notification_incoming_call_wifi) {
- return R.string.notification_incoming_work_call_wifi;
} else if (resId == R.string.notification_incoming_call) {
return R.string.notification_incoming_work_call;
} else {
@@ -696,8 +692,9 @@ public class StatusBarNotifier
}
int resId = R.string.notification_ongoing_call;
+ String wifiBrand = mContext.getString(R.string.notification_call_wifi_brand);
if (call.hasProperty(Details.PROPERTY_WIFI)) {
- resId = R.string.notification_ongoing_call_wifi;
+ resId = R.string.notification_ongoing_call_wifi_template;
}
if (isIncomingOrWaiting) {
@@ -706,7 +703,8 @@ public class StatusBarNotifier
} else if (shouldShowEnrichedCallNotification(call.getEnrichedCallSession())) {
resId = getECIncomingCallText(call.getEnrichedCallSession());
} else if (call.hasProperty(Details.PROPERTY_WIFI)) {
- resId = R.string.notification_incoming_call_wifi;
+ resId = R.string.notification_incoming_call_wifi_template;
+
} else {
resId = R.string.notification_incoming_call;
}
@@ -723,6 +721,13 @@ public class StatusBarNotifier
boolean isWorkCall = call.hasProperty(PROPERTY_ENTERPRISE_CALL);
if (userType == ContactsUtils.USER_TYPE_WORK || isWorkCall) {
resId = getWorkStringFromPersonalString(resId);
+ wifiBrand = mContext.getString(R.string.notification_call_wifi_work_brand);
+ }
+
+ if (resId == R.string.notification_incoming_call_wifi_template
+ || resId == R.string.notification_ongoing_call_wifi_template) {
+ // TODO(b/64525903): Potentially apply this template logic everywhere.
+ return mContext.getString(resId, wifiBrand);
}
return mContext.getString(resId);
diff --git a/java/com/android/incallui/res/values/strings.xml b/java/com/android/incallui/res/values/strings.xml
index 4113313df..22c3c23cc 100644
--- a/java/com/android/incallui/res/values/strings.xml
+++ b/java/com/android/incallui/res/values/strings.xml
@@ -76,12 +76,21 @@
<string name="notification_ongoing_call">Ongoing call</string>
<!-- The "label" of the in-call Notification for an ongoing work call. [CHAR LIMIT=60] -->
<string name="notification_ongoing_work_call">Ongoing work call</string>
- <!-- The "label" of the in-call Notification for an ongoing call, which is being made over
- Wi-Fi. [CHAR LIMIT=60] -->
- <string name="notification_ongoing_call_wifi">Ongoing Wi\u2011Fi call</string>
- <!-- The "label" of the in-call Notification for an ongoing work call, which is being made
- over Wi-Fi. [CHAR LIMIT=60] -->
- <string name="notification_ongoing_work_call_wifi">Ongoing Wi\u2011Fi work call</string>
+
+ <!-- Template for the label on the in-call Notification for an ongoing call, which is being made
+ over Wi-Fi. The format argument is @string/notification_call_wifi_brand [CHAR LIMIT=20]-->
+ <string name="notification_ongoing_call_wifi_template">Ongoing <xliff:g id="brand_name">%1$s</xliff:g></string>
+
+ <!-- Template for the label of the in-call Notification for an incoming call, which is being made
+ over Wi-Fi. The format argument is @string/notification_call_wifi_brand [CHAR LIMIT=20] -->
+ <string name="notification_incoming_call_wifi_template">Incoming <xliff:g id="brand_name">%1$s</xliff:g></string>
+
+ <!-- "Brand name" for WiFi calls. Will be overridden for specific mcc-mnc combinations [CHAR LIMIT=40]-->
+ <string name="notification_call_wifi_brand">Wi\u2011Fi call</string>
+
+ <!-- "Brand name" for WiFi work calls. Will be overridden for specific mcc-mnc combinations [CHAR LIMIT=40] -->
+ <string name="notification_call_wifi_work_brand">Wi\u2011Fi work call</string>
+
<!-- The "label" of the in-call Notification for a call that's on hold -->
<string name="notification_on_hold">On hold</string>
<!-- The "label" of the in-call Notification for an incoming ringing call. [CHAR LIMIT=60] -->
@@ -124,12 +133,6 @@
<!-- The "label" of the in-call Notification for an incoming ringing call. [CHAR LIMIT=60] -->
<string name="notification_incoming_work_call">Incoming work call</string>
- <!-- The "label" of the in-call Notification for an incoming ringing call,
- which is being made over Wi-Fi. [CHAR LIMIT=60] -->
- <string name="notification_incoming_call_wifi">Incoming Wi\u2011Fi call</string>
- <!-- The "label" of the in-call Notification for an incoming ringing work call,
- which is being made over Wi-Fi. [CHAR LIMIT=60] -->
- <string name="notification_incoming_work_call_wifi">Incoming Wi\u2011Fi work call</string>
<!-- The "label" of the in-call Notification for an incoming ringing spam call. -->
<string name="notification_incoming_spam_call">Incoming suspected spam call</string>
<!-- The "label" of the in-call Notification for upgrading an existing call to a video call. -->