diff options
19 files changed, 5 insertions, 181 deletions
diff --git a/res/drawable-hdpi/ic_timelapse_none.png b/res/drawable-hdpi/ic_timelapse_none.png Binary files differdeleted file mode 100644 index 6283f57f4..000000000 --- a/res/drawable-hdpi/ic_timelapse_none.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_timelapse_none_large.png b/res/drawable-hdpi/ic_timelapse_none_large.png Binary files differdeleted file mode 100644 index 33e462f7b..000000000 --- a/res/drawable-hdpi/ic_timelapse_none_large.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_timelapse_none_xlarge.png b/res/drawable-hdpi/ic_timelapse_none_xlarge.png Binary files differdeleted file mode 100644 index 33e462f7b..000000000 --- a/res/drawable-hdpi/ic_timelapse_none_xlarge.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_timelapse_normal.png b/res/drawable-hdpi/ic_timelapse_normal.png Binary files differdeleted file mode 100644 index 6303033dd..000000000 --- a/res/drawable-hdpi/ic_timelapse_normal.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_timelapse_none.png b/res/drawable-mdpi/ic_timelapse_none.png Binary files differdeleted file mode 100644 index 122e6faec..000000000 --- a/res/drawable-mdpi/ic_timelapse_none.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_timelapse_none_xlarge.png b/res/drawable-mdpi/ic_timelapse_none_xlarge.png Binary files differdeleted file mode 100644 index 67e36a69b..000000000 --- a/res/drawable-mdpi/ic_timelapse_none_xlarge.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_timelapse_normal.png b/res/drawable-mdpi/ic_timelapse_normal.png Binary files differdeleted file mode 100644 index 44b02c2cf..000000000 --- a/res/drawable-mdpi/ic_timelapse_normal.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_timelapse_none.png b/res/drawable-xhdpi/ic_timelapse_none.png Binary files differdeleted file mode 100644 index 265f59b51..000000000 --- a/res/drawable-xhdpi/ic_timelapse_none.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_timelapse_none_xlarge.png b/res/drawable-xhdpi/ic_timelapse_none_xlarge.png Binary files differdeleted file mode 100644 index ace6b3666..000000000 --- a/res/drawable-xhdpi/ic_timelapse_none_xlarge.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_timelapse_normal.png b/res/drawable-xhdpi/ic_timelapse_normal.png Binary files differdeleted file mode 100644 index f9a160420..000000000 --- a/res/drawable-xhdpi/ic_timelapse_normal.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_timelapse_normal.png b/res/drawable-xxhdpi/ic_timelapse_normal.png Binary files differdeleted file mode 100644 index aaade0436..000000000 --- a/res/drawable-xxhdpi/ic_timelapse_normal.png +++ /dev/null diff --git a/res/values-large-hdpi/drawable.xml b/res/values-large-hdpi/drawable.xml index b810347b4..38b4a9086 100644 --- a/res/values-large-hdpi/drawable.xml +++ b/res/values-large-hdpi/drawable.xml @@ -27,6 +27,5 @@ <item name="ic_snapshot_border" type="drawable">@drawable/ic_snapshot_border_large</item> <item name="ic_switch_photo_facing_holo_light" type="drawable">@drawable/ic_switch_photo_facing_holo_light_large</item> <item name="ic_switch_video_facing_holo_light" type="drawable">@drawable/ic_switch_video_facing_holo_light_large</item> - <item name="ic_timelapse_none" type="drawable">@drawable/ic_timelapse_none_large</item> <item name="list_divider" type="drawable">@drawable/list_divider_large</item> </resources> diff --git a/res/values-sw600dp-hdpi/drawable.xml b/res/values-sw600dp-hdpi/drawable.xml index b810347b4..38b4a9086 100644 --- a/res/values-sw600dp-hdpi/drawable.xml +++ b/res/values-sw600dp-hdpi/drawable.xml @@ -27,6 +27,5 @@ <item name="ic_snapshot_border" type="drawable">@drawable/ic_snapshot_border_large</item> <item name="ic_switch_photo_facing_holo_light" type="drawable">@drawable/ic_switch_photo_facing_holo_light_large</item> <item name="ic_switch_video_facing_holo_light" type="drawable">@drawable/ic_switch_video_facing_holo_light_large</item> - <item name="ic_timelapse_none" type="drawable">@drawable/ic_timelapse_none_large</item> <item name="list_divider" type="drawable">@drawable/list_divider_large</item> </resources> diff --git a/res/values-sw640dp/drawable.xml b/res/values-sw640dp/drawable.xml index 6a6e71192..33026fe9c 100644 --- a/res/values-sw640dp/drawable.xml +++ b/res/values-sw640dp/drawable.xml @@ -27,5 +27,4 @@ <item name="ic_snapshot_border" type="drawable">@drawable/ic_snapshot_border_xlarge</item> <item name="ic_switch_photo_facing_holo_light" type="drawable">@drawable/ic_switch_photo_facing_holo_light_xlarge</item> <item name="ic_switch_video_facing_holo_light" type="drawable">@drawable/ic_switch_video_facing_holo_light_xlarge</item> - <item name="ic_timelapse_none" type="drawable">@drawable/ic_timelapse_none_xlarge</item> </resources> diff --git a/res/values-xlarge/drawable.xml b/res/values-xlarge/drawable.xml index 648f1d7fd..43e57218d 100644 --- a/res/values-xlarge/drawable.xml +++ b/res/values-xlarge/drawable.xml @@ -25,5 +25,4 @@ <item name="ic_snapshot_border" type="drawable">@drawable/ic_snapshot_border_xlarge</item> <item name="ic_switch_photo_facing_holo_light" type="drawable">@drawable/ic_switch_photo_facing_holo_light_xlarge</item> <item name="ic_switch_video_facing_holo_light" type="drawable">@drawable/ic_switch_video_facing_holo_light_xlarge</item> - <item name="ic_timelapse_none" type="drawable">@drawable/ic_timelapse_none_xlarge</item> </resources> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 5711f054d..db2565cf5 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -32,120 +32,6 @@ <item>small</item> </string-array> - <!-- These values correspond to the time interval between frame capture in millseconds - for time lapse recording --> - <string-array name="pref_video_time_lapse_frame_interval_entryvalues" translatable="false"> - <item>0</item> - <item>500</item> - <item>1000</item> - <item>1500</item> - <item>2000</item> - <item>2500</item> - <item>3000</item> - <item>4000</item> - <item>5000</item> - <item>6000</item> - <item>10000</item> - <item>12000</item> - <item>15000</item> - <item>24000</item> - <item>30000</item> - <item>60000</item> - <item>90000</item> - <item>120000</item> - <item>150000</item> - <item>180000</item> - <item>240000</item> - <item>300000</item> - <item>360000</item> - <item>600000</item> - <item>720000</item> - <item>900000</item> - <item>1440000</item> - <item>1800000</item> - <item>3600000</item> - <item>5400000</item> - <item>7200000</item> - <item>9000000</item> - <item>10800000</item> - <item>14400000</item> - <item>18000000</item> - <item>21600000</item> - <item>36000000</item> - <item>43200000</item> - <item>54000000</item> - <item>86400000</item> - </string-array> - - <!-- These values correspond to the time interval between frame capture in - different units (i.e. seconds, minutes, hours) for time lapse recording --> - <string-array name="pref_video_time_lapse_frame_interval_entries"> - <item>@string/pref_video_time_lapse_frame_interval_off</item> - <item>@string/pref_video_time_lapse_frame_interval_500</item> - <item>@string/pref_video_time_lapse_frame_interval_1000</item> - <item>@string/pref_video_time_lapse_frame_interval_1500</item> - <item>@string/pref_video_time_lapse_frame_interval_2000</item> - <item>@string/pref_video_time_lapse_frame_interval_2500</item> - <item>@string/pref_video_time_lapse_frame_interval_3000</item> - <item>@string/pref_video_time_lapse_frame_interval_4000</item> - <item>@string/pref_video_time_lapse_frame_interval_5000</item> - <item>@string/pref_video_time_lapse_frame_interval_6000</item> - <item>@string/pref_video_time_lapse_frame_interval_10000</item> - <item>@string/pref_video_time_lapse_frame_interval_12000</item> - <item>@string/pref_video_time_lapse_frame_interval_15000</item> - <item>@string/pref_video_time_lapse_frame_interval_24000</item> - <item>@string/pref_video_time_lapse_frame_interval_30000</item> - <item>@string/pref_video_time_lapse_frame_interval_60000</item> - <item>@string/pref_video_time_lapse_frame_interval_90000</item> - <item>@string/pref_video_time_lapse_frame_interval_120000</item> - <item>@string/pref_video_time_lapse_frame_interval_150000</item> - <item>@string/pref_video_time_lapse_frame_interval_180000</item> - <item>@string/pref_video_time_lapse_frame_interval_240000</item> - <item>@string/pref_video_time_lapse_frame_interval_300000</item> - <item>@string/pref_video_time_lapse_frame_interval_360000</item> - <item>@string/pref_video_time_lapse_frame_interval_600000</item> - <item>@string/pref_video_time_lapse_frame_interval_720000</item> - <item>@string/pref_video_time_lapse_frame_interval_900000</item> - <item>@string/pref_video_time_lapse_frame_interval_1440000</item> - <item>@string/pref_video_time_lapse_frame_interval_1800000</item> - <item>@string/pref_video_time_lapse_frame_interval_3600000</item> - <item>@string/pref_video_time_lapse_frame_interval_5400000</item> - <item>@string/pref_video_time_lapse_frame_interval_7200000</item> - <item>@string/pref_video_time_lapse_frame_interval_9000000</item> - <item>@string/pref_video_time_lapse_frame_interval_10800000</item> - <item>@string/pref_video_time_lapse_frame_interval_14400000</item> - <item>@string/pref_video_time_lapse_frame_interval_18000000</item> - <item>@string/pref_video_time_lapse_frame_interval_21600000</item> - <item>@string/pref_video_time_lapse_frame_interval_36000000</item> - <item>@string/pref_video_time_lapse_frame_interval_43200000</item> - <item>@string/pref_video_time_lapse_frame_interval_54000000</item> - <item>@string/pref_video_time_lapse_frame_interval_86400000</item> - </string-array> - - <!-- These values correspond to the time interval between frame capture - for time lapse recording --> - <string-array name="pref_video_time_lapse_frame_interval_duration_values" translatable="false"> - <item>0.5</item> - <item>1</item> - <item>1.5</item> - <item>2</item> - <item>2.5</item> - <item>3</item> - <item>4</item> - <item>5</item> - <item>6</item> - <item>10</item> - <item>12</item> - <item>15</item> - <item>24</item> - </string-array> - - <string-array name="pref_video_time_lapse_frame_interval_units"> - <item>@string/time_lapse_seconds</item> - <item>@string/time_lapse_minutes</item> - <item>@string/time_lapse_hours</item> - </string-array> - <!-- Camera Preferences Picture size dialog box entries --> <string-array name="pref_camera_picturesize_entries" translatable="false"> <item>@string/pref_camera_picturesize_entry_large</item> diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 3029bad8e..c04b47615 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -161,11 +161,6 @@ public class VideoModule extends CameraModule // The video duration limit. 0 means no limit. private int mMaxVideoDurationInMs; - // Time Lapse parameters. - private final boolean mCaptureTimeLapse = false; - // Default 0. If it is larger than 0, the camcorder is in time lapse mode. - private final int mTimeBetweenTimeLapseFrameCaptureMs = 0; - boolean mPreviewing = false; // True if preview is started. // The display rotation in degrees. This is only valid when mPreviewing is // true. @@ -369,7 +364,6 @@ public class VideoModule extends CameraModule mUI.setOrientationIndicator(0, false); setDisplayOrientation(); - mUI.showTimeLapseUI(mCaptureTimeLapse); mPendingSwitchCameraId = -1; mShutterIconId = CameraUtil.getCameraShutterIconId( @@ -768,17 +762,6 @@ public class VideoModule extends CameraModule .getAndroidContext()); } - // TODO: Uncomment this block to re-enable time-lapse. - /* // Read time lapse recording interval. - String frameIntervalStr = settingsManager.get( - SettingsManager.SETTING_VIDEO_TIME_LAPSE_FRAME_INTERVAL); - mTimeBetweenTimeLapseFrameCaptureMs = Integer.parseInt(frameIntervalStr); - mCaptureTimeLapse = (mTimeBetweenTimeLapseFrameCaptureMs != 0); - // TODO: This should be checked instead directly +1000. - if (mCaptureTimeLapse) { - quality += 1000; - } */ - // If quality is not supported, request QUALITY_HIGH which is always supported. if (CamcorderProfile.hasProfile(mCameraId, quality) == false) { quality = CamcorderProfile.QUALITY_HIGH; @@ -1119,17 +1102,10 @@ public class VideoModule extends CameraModule // Unlock the camera object before passing it to media recorder. mCameraDevice.unlock(); mMediaRecorder.setCamera(mCameraDevice.getCamera()); - if (!mCaptureTimeLapse) { - mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); - } mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setProfile(mProfile); mMediaRecorder.setVideoSize(mProfile.videoFrameWidth, mProfile.videoFrameHeight); mMediaRecorder.setMaxDuration(mMaxVideoDurationInMs); - if (mCaptureTimeLapse) { - double fps = 1000 / (double) mTimeBetweenTimeLapseFrameCaptureMs; - setCaptureRate(mMediaRecorder, fps); - } setRecordLocation(); @@ -1258,9 +1234,7 @@ public class VideoModule extends CameraModule if (mVideoFileDescriptor == null) { long duration = SystemClock.uptimeMillis() - mRecordingStartTime; if (duration > 0) { - if (mCaptureTimeLapse) { - duration = getTimeLapseVideoLength(duration); - } + // } else { Log.w(TAG, "Video duration <= 0 : " + duration); } @@ -1418,7 +1392,6 @@ public class VideoModule extends CameraModule mUI.showReviewImage(bitmap); } mUI.showReviewControls(); - mUI.showTimeLapseUI(false); } private boolean stopVideoRecording() { @@ -1541,13 +1514,6 @@ public class VideoModule extends CameraModule return timeStringBuilder.toString(); } - private long getTimeLapseVideoLength(long deltaMs) { - // For better approximation calculate fractional number of frames captured. - // This will update the video time at a higher resolution. - double numberOfFrames = (double) deltaMs / mTimeBetweenTimeLapseFrameCaptureMs; - return (long) (numberOfFrames / mProfile.videoFrameRate * 1000); - } - private void updateRecordingTime() { if (!mMediaRecorderRecording) { return; @@ -1567,16 +1533,9 @@ public class VideoModule extends CameraModule String text; long targetNextUpdateDelay; - if (!mCaptureTimeLapse) { - text = millisecondToTimeString(deltaAdjusted, false); - targetNextUpdateDelay = 1000; - } else { - // The length of time lapse video is different from the length - // of the actual wall clock time elapsed. Display the video length - // only in format hh:mm:ss.dd, where dd are the centi seconds. - text = millisecondToTimeString(getTimeLapseVideoLength(delta), true); - targetNextUpdateDelay = mTimeBetweenTimeLapseFrameCaptureMs; - } + + text = millisecondToTimeString(deltaAdjusted, false); + targetNextUpdateDelay = 1000; mUI.setRecordingTime(text); @@ -1585,9 +1544,7 @@ public class VideoModule extends CameraModule // when it needs changing. mRecordingTimeCountsDown = countdownRemainingTime; - int color = mActivity.getResources().getColor(countdownRemainingTime - ? R.color.recording_time_remaining_text - : R.color.recording_time_elapsed_text); + int color = mActivity.getResources().getColor(R.color.recording_time_remaining_text); mUI.setRecordingTimeTextColor(color); } diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 1ce025ec4..a91f03846 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -54,7 +54,6 @@ public class VideoUI implements PreviewStatusListener { private VideoRecordingHints mVideoHints; private TextView mRecordingTimeView; private LinearLayout mLabelsLinearLayout; - private View mTimeLapseLabel; private RotateLayout mRecordingTimeRect; private boolean mRecordingStarted = false; private final VideoController mController; @@ -162,7 +161,6 @@ public class VideoUI implements PreviewStatusListener { mReviewImage = (ImageView) mRootView.findViewById(R.id.review_image); mRecordingTimeView = (TextView) mRootView.findViewById(R.id.recording_time); mRecordingTimeRect = (RotateLayout) mRootView.findViewById(R.id.recording_time_rect); - mTimeLapseLabel = mRootView.findViewById(R.id.time_lapse_label); // The R.id.labels can only be found in phone layout. // That is, mLabelsLinearLayout should be null in tablet layout. mLabelsLinearLayout = (LinearLayout) mRootView.findViewById(R.id.labels); @@ -182,12 +180,6 @@ public class VideoUI implements PreviewStatusListener { } } - public void showTimeLapseUI(boolean enable) { - if (mTimeLapseLabel != null) { - mTimeLapseLabel.setVisibility(enable ? View.VISIBLE : View.GONE); - } - } - public void setSwipingEnabled(boolean enable) { mActivity.setSwipingEnabled(enable); } diff --git a/src/com/android/camera/settings/Keys.java b/src/com/android/camera/settings/Keys.java index 7e0ba703a..09ba3ed0a 100644 --- a/src/com/android/camera/settings/Keys.java +++ b/src/com/android/camera/settings/Keys.java @@ -35,8 +35,6 @@ public class Keys { public static final String KEY_RECORD_LOCATION = "pref_camera_recordlocation_key"; public static final String KEY_VIDEO_QUALITY_BACK = "pref_video_quality_back_key"; public static final String KEY_VIDEO_QUALITY_FRONT = "pref_video_quality_front_key"; - public static final String KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL = - "pref_video_time_lapse_frame_interval_key"; public static final String KEY_PICTURE_SIZE_BACK = "pref_camera_picturesize_back_key"; public static final String KEY_PICTURE_SIZE_FRONT = "pref_camera_picturesize_front_key"; public static final String KEY_JPEG_QUALITY = "pref_camera_jpegquality_key"; @@ -112,11 +110,6 @@ public class Keys { context.getString(R.string.pref_video_quality_default), context.getResources().getStringArray(R.array.pref_video_quality_entryvalues)); - settingsManager.setDefaults(KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL, - context.getString(R.string.pref_video_time_lapse_frame_interval_default), - context.getResources().getStringArray( - R.array.pref_video_time_lapse_frame_interval_entryvalues)); - settingsManager.setDefaults(KEY_JPEG_QUALITY, context.getString(R.string.pref_camera_jpeg_quality_normal), context.getResources().getStringArray( |