summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/MenuHelper.java
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2009-06-09 13:39:00 -0700
committerOwen Lin <owenlin@google.com>2009-06-11 10:40:50 -0700
commit6795ff166eea7205e33fe2f160e639c39365f373 (patch)
treedce201c9446ff0a43868eb7a58eec5c92c7c212e /src/com/android/camera/MenuHelper.java
parent6cc6daff9d7cb02805cd9ce71176c7b49655f8a8 (diff)
downloadLegacyCamera-6795ff166eea7205e33fe2f160e639c39365f373.zip
LegacyCamera-6795ff166eea7205e33fe2f160e639c39365f373.tar.gz
LegacyCamera-6795ff166eea7205e33fe2f160e639c39365f373.tar.bz2
Extract MovieViewControl from MovieView. The first step to integrate
movie view into ViewImage.
Diffstat (limited to 'src/com/android/camera/MenuHelper.java')
-rw-r--r--src/com/android/camera/MenuHelper.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java
index 1a92057..35f0028 100644
--- a/src/com/android/camera/MenuHelper.java
+++ b/src/com/android/camera/MenuHelper.java
@@ -21,6 +21,7 @@ import com.android.camera.gallery.IImage;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.location.Address;
@@ -970,7 +971,7 @@ public class MenuHelper {
addCaptureVideoMenuItems(menu, activity);
}
- public static String formatDuration(final Activity activity,
+ public static String formatDuration(final Context context,
int durationMs) {
int duration = durationMs / 1000;
int h = duration / 3600;
@@ -979,10 +980,10 @@ public class MenuHelper {
String durationValue;
if (h == 0) {
durationValue = String.format(
- activity.getString(R.string.details_ms), m, s);
+ context.getString(R.string.details_ms), m, s);
} else {
durationValue = String.format(
- activity.getString(R.string.details_hms), h, m, s);
+ context.getString(R.string.details_hms), h, m, s);
}
return durationValue;
}