| Index: chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java
|
| index 6b75031f41257d14ce7b392e91fccbf46d5df958..ed34853c674c6a774b1fdbe39284ae77dde60539 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java
|
| @@ -11,6 +11,8 @@ import org.chromium.base.annotations.SuppressFBWarnings;
|
|
|
| import java.lang.annotation.Retention;
|
| import java.lang.annotation.RetentionPolicy;
|
| +import java.text.DateFormat;
|
| +import java.util.Date;
|
|
|
| /**
|
| * A class to keep track of the meta data associated with a an image in the photo picker.
|
| @@ -55,6 +57,24 @@ public class PickerBitmap implements Comparable<PickerBitmap> {
|
| return mFilePath;
|
| }
|
|
|
| + /**
|
| + * Accessor for the filename.
|
| + * @return The filename (without the extension and path).
|
| + */
|
| + public String getFilenameWithoutExtension() {
|
| + int index = mFilePath.lastIndexOf("/");
|
| + if (index == -1) return mFilePath;
|
| + return mFilePath.substring(index + 1, mFilePath.length());
|
| + }
|
| +
|
| + /**
|
| + * Accessor for the last modified date.
|
| + * @return The last modified date in string format.
|
| + */
|
| + public String getLastModifiedString() {
|
| + return DateFormat.getDateTimeInstance().format(new Date(mLastModified));
|
| + }
|
| +
|
| /**
|
| * Accessor for the tile type.
|
| * @return The type of tile involved for this bitmap object.
|
|
|