Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: ui/base/l10n/l10n_util_android.cc

Issue 147443007: Add support for localized time strings with two units, eg. "2 hours 17 minutes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tony's comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/l10n/formatter.cc ('k') | ui/base/l10n/time_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_android.cc
diff --git a/ui/base/l10n/l10n_util_android.cc b/ui/base/l10n/l10n_util_android.cc
index 09a0eb4f2222f4b7760abf7fd0fec7504b41e471..154b675971112015431887d3958e0d380951523d 100644
--- a/ui/base/l10n/l10n_util_android.cc
+++ b/ui/base/l10n/l10n_util_android.cc
@@ -103,7 +103,8 @@ jstring GetDurationString(JNIEnv* env, jclass clazz, jlong timeInMillis) {
ScopedJavaLocalRef<jstring> jtime_remaining =
base::android::ConvertUTF16ToJavaString(
env,
- ui::TimeFormat::TimeRemaining(
+ ui::TimeFormat::Simple(
+ ui::TimeFormat::FORMAT_REMAINING, ui::TimeFormat::LENGTH_SHORT,
base::TimeDelta::FromMilliseconds(timeInMillis)));
return jtime_remaining.Release();
}
« no previous file with comments | « ui/base/l10n/formatter.cc ('k') | ui/base/l10n/time_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698