summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-12-02 18:48:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-02 18:48:12 +0000
commit18a751de2d073e95ec506d01d5070dd818ad2ddc (patch)
tree8346d8ecf225b0f04679cb31e88481875a868a4c /src
parent8b8ce26a63bd7bf6c82116b76757510e9a9bc777 (diff)
parentc718fb6a29e80b01de26147b40e0d5e5e7732063 (diff)
am c718fb6a: am 8e05055f: am 5dee1ce6: Merge "On MSIM devices, include account from call log in talkback." into lmp-mr1-dev
* commit 'c718fb6a29e80b01de26147b40e0d5e5e7732063': On MSIM devices, include account from call log in talkback.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemHelper.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java
index 1eb25fbfa..4ebfb4b88 100644
--- a/src/com/android/dialer/calllog/CallLogListItemHelper.java
+++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java
@@ -105,7 +105,7 @@ import com.android.dialer.R;
* Returns the accessibility description of the "return call/call" action for a call log
* entry.
* Accessibility text is a combination of:
- * {Voicemail Prefix}. {Number of Calls}. {Caller information}.
+ * {Voicemail Prefix}. {Number of Calls}. {Caller information} {Phone Account}.
* If most recent call is a voicemail, {Voicemail Prefix} is "New Voicemail.", otherwise "".
*
* If more than one call for the caller, {Number of Calls} is:
@@ -124,9 +124,13 @@ import com.android.dialer.R;
* {Call type} is the contact phone number type (eg mobile) or location.
* {Call Time} is the time since the last call for the contact occurred.
*
+ * The {Phone Account} refers to the account/SIM through which the call was placed or received
+ * in multi-SIM devices.
+ *
* Examples:
- * 3 calls. New Voicemail. Missed call from Joe Smith mobile 2 hours ago.
- * 2 calls. Answered call from John Doe mobile. Last called 1 hour ago.
+ * 3 calls. New Voicemail. Missed call from Joe Smith mobile 2 hours ago on SIM 1.
+ *
+ * 2 calls. Answered call from John Doe mobile 1 hour ago.
*
* @param context The application context.
* @param details Details of call.
@@ -165,13 +169,16 @@ import com.android.dialer.R;
}
int stringID = getCallDescriptionStringID(details);
+ String accountLabel = PhoneAccountUtils.getAccountLabel(context, details.accountHandle);
// Use chosen string resource to build up the message.
callDescription.append(mResources.getString(stringID,
nameOrNumber,
// If no type or location can be determined, sub in empty string.
typeOrLocation == null ? "" : typeOrLocation,
- timeOfCall));
+ timeOfCall,
+ accountLabel == null ? "" :
+ mResources.getString(R.string.description_phone_account, accountLabel)));
return callDescription;
}
@@ -187,13 +194,15 @@ import com.android.dialer.R;
int stringID;
if (lastCallType == Calls.VOICEMAIL_TYPE || lastCallType == Calls.MISSED_TYPE) {
- //Message: Missed call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>.
+ //Message: Missed call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>,
+ //<PhoneAccount>.
stringID = R.string.description_incoming_missed_call;
} else if (lastCallType == Calls.INCOMING_TYPE) {
- //Message: Answered call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>.
+ //Message: Answered call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>,
+ //<PhoneAccount>.
stringID = R.string.description_incoming_answered_call;
} else {
- //Message: Call to <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>.
+ //Message: Call to <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, <PhoneAccount>.
stringID = R.string.description_outgoing_call;
}
return stringID;