diff options
author | Ray Chen <raychen@google.com> | 2010-01-04 14:44:51 -0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2010-01-05 15:20:26 -0800 |
commit | 2e862df90cac949a91634da5dce4b54d7c20d505 (patch) | |
tree | f7057ac716524433bf15b8ccaa99d6936dbddfd0 /src | |
parent | 6d08c5d4cb3925a11a1adbfdb0e463ca6f5dca5a (diff) | |
download | LegacyCamera-2e862df90cac949a91634da5dce4b54d7c20d505.zip LegacyCamera-2e862df90cac949a91634da5dce4b54d7c20d505.tar.gz LegacyCamera-2e862df90cac949a91634da5dce4b54d7c20d505.tar.bz2 |
Fix issue 2343916 Camera application does not obey date format setting.
http://b/2343916
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/MenuHelper.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java index 6592f5c..6518e62 100644 --- a/src/com/android/camera/MenuHelper.java +++ b/src/com/android/camera/MenuHelper.java @@ -48,6 +48,7 @@ import com.android.camera.gallery.IImage; import java.io.Closeable; import java.io.IOException; import java.lang.ref.WeakReference; +import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; @@ -532,8 +533,10 @@ public class MenuHelper { long dateTaken = image.getDateTaken(); if (dateTaken != 0) { Date date = new Date(image.getDateTaken()); - SimpleDateFormat dateFormat = new SimpleDateFormat(); - value = dateFormat.format(date); + // Date/Time preferences are stored differently so we query them separately. + DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(activity); + DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(activity); + value = dateFormat.format(date) + ' ' + timeFormat.format(date); } if (value != EMPTY_STRING) { setDetailsValue(d, value, R.id.details_date_taken_value); |