diff options
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallDetailHistoryAdapter.java | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 213d340dd..c661e5818 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -390,6 +390,9 @@ <!-- String used to display calls from pay phone in the call log --> <string name="payphone">Payphone</string> + <!-- A nicely formatted call duration displayed when viewing call details for duration less than 1 minute. For example "28 sec" --> + <string name="callDetailsShortDurationFormat"><xliff:g id="seconds" example="28">%s</xliff:g> sec</string> + <!-- A nicely formatted call duration displayed when viewing call details. For example "42 min 28 sec" --> <string name="callDetailsDurationFormat"><xliff:g id="minutes" example="42">%s</xliff:g> min <xliff:g id="seconds" example="28">%s</xliff:g> sec</string> diff --git a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java index d53f77f8a..3b488a8ae 100644 --- a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java +++ b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java @@ -153,10 +153,12 @@ public class CallDetailHistoryAdapter extends BaseAdapter { if (elapsedSeconds >= 60) { minutes = elapsedSeconds / 60; elapsedSeconds -= minutes * 60; + seconds = elapsedSeconds; + return mContext.getString(R.string.callDetailsDurationFormat, minutes, seconds); + } else { + seconds = elapsedSeconds; + return mContext.getString(R.string.callDetailsShortDurationFormat, seconds); } - seconds = elapsedSeconds; - - return mContext.getString(R.string.callDetailsDurationFormat, minutes, seconds); } /** |