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

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 Bartosz' 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
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 96b19d40f3e3dbe9d46e5dc28fe8e0f42bdac035..9fa90ee75f986c26fe4f8699f67d5cd3d7d17f9d 100644
--- a/ui/base/l10n/l10n_util_android.cc
+++ b/ui/base/l10n/l10n_util_android.cc
@@ -93,7 +93,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();
}

Powered by Google App Engine
This is Rietveld 408576698