summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-20 14:03:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-20 14:03:59 -0800
commit33e3e0b3f4f1f54e067bbc54c9b8b5a26660f9f0 (patch)
tree24da2ab4834f8e29e8c7f74ecedd6b803c6b9cbf /src
parent9c061072c8f4ec16acf25e0af7ca3d8317d1026f (diff)
downloadLegacyCamera-33e3e0b3f4f1f54e067bbc54c9b8b5a26660f9f0.zip
LegacyCamera-33e3e0b3f4f1f54e067bbc54c9b8b5a26660f9f0.tar.gz
LegacyCamera-33e3e0b3f4f1f54e067bbc54c9b8b5a26660f9f0.tar.bz2
auto import from //branches/cupcake/...@127101
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java8
-rw-r--r--src/com/android/camera/VideoCamera.java12
-rw-r--r--src/com/android/camera/ViewImage.java24
3 files changed, 31 insertions, 13 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index ed2f7a4..c06f5e5 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -608,8 +608,12 @@ public class Camera extends Activity implements View.OnClickListener, SurfaceHol
parameters.set("gps-longitude", String.valueOf(lon));
if (loc.hasAltitude())
parameters.set("gps-altitude", String.valueOf(loc.getAltitude()));
- if (loc.getTime() != 0)
- parameters.set("gps-timestamp", String.valueOf(loc.getTime()));
+ if (loc.getTime() != 0) {
+ // Location.getTime() is UTC in milliseconds.
+ // gps-timestamp is UTC in seconds.
+ long utcTimeSeconds = loc.getTime() / 1000;
+ parameters.set("gps-timestamp", String.valueOf(utcTimeSeconds));
+ }
} else {
loc = null;
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 9bfb860..2880ec1 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -234,7 +234,7 @@ public class VideoCamera extends Activity implements View.OnClickListener, Surfa
mPostPictureAlert = findViewById(R.id.post_picture_panel);
int[] ids = new int[]{R.id.play, R.id.share, R.id.discard,
- R.id.capture, R.id.cancel, R.id.accept, R.id.mode_indicator,
+ R.id.cancel, R.id.attach, R.id.mode_indicator,
R.id.recording_indicator};
for (int id : ids) {
findViewById(id).setOnClickListener(this);
@@ -293,11 +293,8 @@ public class VideoCamera extends Activity implements View.OnClickListener, Surfa
public void onClick(View v) {
switch (v.getId()) {
- case R.id.capture:
- doStartCaptureMode();
- break;
- case R.id.accept:
+ case R.id.attach:
doReturnToPicker(true);
break;
@@ -332,8 +329,9 @@ public class VideoCamera extends Activity implements View.OnClickListener, Surfa
case R.id.mode_indicator:
if (mVideoFrame.getVisibility() == View.VISIBLE) {
doStartCaptureMode();
+ } else {
+ startVideoRecording();
}
- startVideoRecording();
break;
case R.id.recording_indicator:
@@ -804,7 +802,7 @@ public class VideoCamera extends Activity implements View.OnClickListener, Surfa
int normalVisible = ! isPick ? View.VISIBLE : View.GONE;
mPostPictureAlert.findViewById(R.id.share).setVisibility(normalVisible);
mPostPictureAlert.findViewById(R.id.discard).setVisibility(normalVisible);
- mPostPictureAlert.findViewById(R.id.accept).setVisibility(pickVisible);
+ mPostPictureAlert.findViewById(R.id.attach).setVisibility(pickVisible);
mPostPictureAlert.findViewById(R.id.cancel).setVisibility(pickVisible);
mPostPictureAlert.setVisibility(View.VISIBLE);
}
diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java
index d1ef142..9760562 100644
--- a/src/com/android/camera/ViewImage.java
+++ b/src/com/android/camera/ViewImage.java
@@ -1072,9 +1072,25 @@ public class ViewImage extends Activity implements View.OnClickListener
}
mActionIconPanel = findViewById(R.id.action_icon_panel);
- int[] ids = {R.id.capture, R.id.gallery, R.id.discard, R.id.share, R.id.setas};
- for(int id : ids) {
- findViewById(id).setOnClickListener(this);
+ {
+ int[] pickIds = {R.id.attach, R.id.cancel};
+ int[] normalIds = {R.id.gallery, R.id.setas, R.id.share, R.id.discard};
+ int[] alwaysOnIds = {R.id.mode_indicator };
+ int[] hideIds = pickIds;
+ int[] connectIds = normalIds;
+ if (isPickIntent()) {
+ hideIds = normalIds;
+ connectIds = pickIds;
+ }
+ for(int id : hideIds) {
+ findViewById(id).setVisibility(View.GONE);
+ }
+ for(int id : connectIds) {
+ findViewById(id).setOnClickListener(this);
+ }
+ for(int id : alwaysOnIds) {
+ findViewById(id).setOnClickListener(this);
+ }
}
Uri uri = getIntent().getData();
@@ -1480,7 +1496,7 @@ public class ViewImage extends Activity implements View.OnClickListener
public void onClick(View v) {
switch (v.getId()) {
- case R.id.capture: {
+ case R.id.mode_indicator: {
MenuHelper.gotoStillImageCapture(this);
}
break;