diff options
author | Chiou-Hao Hsu <chsu@codeaurora.org> | 2014-06-11 20:05:11 -0700 |
---|---|---|
committer | Chiou-Hao Hsu <chsu@codeaurora.org> | 2014-06-11 20:05:11 -0700 |
commit | 8b9bdf4f613b75f56385043b36b3314fe160d9c1 (patch) | |
tree | 65cee77765cb658f7480b80307a98520a31e8008 /src/com | |
parent | 410c490c52b2313e00c9ab4eb5f9c0f67d1face3 (diff) | |
parent | 9d8187cbdb82e36eae9a42eefda138b6d0925b1f (diff) | |
download | android_packages_apps_Snap-8b9bdf4f613b75f56385043b36b3314fe160d9c1.tar.gz android_packages_apps_Snap-8b9bdf4f613b75f56385043b36b3314fe160d9c1.tar.bz2 android_packages_apps_Snap-8b9bdf4f613b75f56385043b36b3314fe160d9c1.zip |
Merge tag 'android-4.4.3_r1' into HEAD
Android 4.4.3 release 1
* tag 'android-4.4.3_r1':
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Remove TRIM support
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Fix samsung video recording
Fix WB indicator override
Revert fixed focus area in CAF mode
Add another HTC picture resolution
Always set focus mode first before applying scene mode
Reduce logging of flattened Preferences
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Import translations. DO NOT MERGE
Delay onResume tasks to speed up lockscreen onResume->onPause->onResume launch sequence.
Conflicts:
res/values/arrays.xml
src/com/android/camera/FocusOverlayManager.java
src/com/android/camera/PhotoModule.java
src/com/android/camera/VideoModule.java
Change-Id: I4be00366e24933c6504639776c711e1a874d1f2e
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/FocusOverlayManager.java | 17 | ||||
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 9 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 13 |
5 files changed, 29 insertions, 17 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 168c9064a..5ade3950a 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -671,8 +671,7 @@ public class CameraActivity extends Activity | SUPPORT_SHARE | SUPPORT_SHOW_ON_MAP; break; case LocalData.LOCAL_VIDEO: - supported |= SUPPORT_DELETE | SUPPORT_INFO | SUPPORT_TRIM - | SUPPORT_SHARE; + supported |= SUPPORT_DELETE | SUPPORT_INFO | SUPPORT_SHARE; break; case LocalData.LOCAL_PHOTO_SPHERE: supported |= SUPPORT_DELETE | SUPPORT_ROTATE | SUPPORT_INFO diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java index 51b8b78f5..602c31767 100644 --- a/src/com/android/camera/FocusOverlayManager.java +++ b/src/com/android/camera/FocusOverlayManager.java @@ -89,7 +89,6 @@ public class FocusOverlayManager { private Handler mHandler; Listener mListener; private boolean mPreviousMoving; - private boolean mFocusDefault; private boolean mZslEnabled = false; //QCom Parameter to disable focus for ZSL private boolean mTouchAFRunning = false; private boolean mIsAFRunning = false; @@ -144,7 +143,6 @@ public class FocusOverlayManager { setParameters(parameters); mListener = listener; setMirror(mirror); - mFocusDefault = true; mUI = ui; } @@ -294,7 +292,7 @@ public class FocusOverlayManager { updateFocusUI(); // If this is triggered by touch focus, cancel focus after a // while. - if (!mFocusDefault) { + if (mFocusArea != null) { mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, RESET_TOUCH_FOCUS_DELAY); } if (shutterButtonPressed) { @@ -371,12 +369,12 @@ public class FocusOverlayManager { UsageStatistics.ACTION_TOUCH_FOCUS, x + "," + y); // Let users be able to cancel previous touch focus. - if ((!mFocusDefault) && (mState == STATE_FOCUSING || + if ((mFocusArea != null) && (mState == STATE_FOCUSING || mState == STATE_SUCCESS || mState == STATE_FAIL)) { cancelAutoFocus(); } if (mPreviewRect.width() == 0 || mPreviewRect.height() == 0) return; - mFocusDefault = false; + // Initialize variables. // Initialize mFocusArea. if (mFocusAreaSupported) { initializeFocusAreas(x, y); @@ -461,7 +459,7 @@ public class FocusOverlayManager { if (mParameters == null) return Parameters.FOCUS_MODE_AUTO; List<String> supportedFocusModes = mParameters.getSupportedFocusModes(); - if (mFocusAreaSupported && !mFocusDefault) { + if (mFocusAreaSupported && mFocusArea != null) { // Always use autofocus in tap-to-focus. mFocusMode = Parameters.FOCUS_MODE_AUTO; } else { @@ -506,7 +504,7 @@ public class FocusOverlayManager { // Show only focus indicator or face indicator. if (mState == STATE_IDLE) { - if (mFocusDefault) { + if (mFocusArea == null) { mUI.clearFocus(); } else { // Users touch on the preview and the indicator represents the @@ -538,14 +536,11 @@ public class FocusOverlayManager { // Initialize mMeteringArea. mMeteringArea = null; - if (mFocusAreaSupported) { - initializeFocusAreas(mPreviewRect.centerX(), mPreviewRect.centerY()); - } // Reset metering area when no specific region is selected. if (mMeteringAreaSupported) { resetMeteringAreas(); } - mFocusDefault = true; + if (mTouchAFRunning && mZslEnabled) { mTouchAFRunning = false; mListener.setFocusParameters(); diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 9cef6fb1b..3d6218281 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -2717,6 +2717,10 @@ public class PhotoModule setFocusAreasIfSupported(); setMeteringAreasIfSupported(); + // initialize focus mode + mFocusManager.overrideFocusMode(null); + mParameters.setFocusMode(mFocusManager.getFocusMode()); + // Set picture size. String pictureSize = mPreferences.getString( CameraSettings.KEY_PICTURE_SIZE, null); diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 7a798bea3..b0c642a8b 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -558,12 +558,15 @@ public class PhotoUI implements PieListener, mOnScreenIndicators.updateExposureOnScreenIndicator(params, CameraSettings.readExposure(prefs)); mOnScreenIndicators.updateFlashOnScreenIndicator(params.getFlashMode()); - int wbIndex = 2; + int wbIndex = -1; + String wb = params.getWhiteBalance(); ListPreference pref = group.findPreference(CameraSettings.KEY_WHITE_BALANCE); if (pref != null) { - wbIndex = pref.getCurrentIndex(); + wbIndex = pref.findIndexOfValue(wb); } - mOnScreenIndicators.updateWBIndicator(wbIndex); + // make sure the correct value was found + // otherwise use auto index + mOnScreenIndicators.updateWBIndicator(wbIndex < 0 ? 2 : wbIndex); boolean location = RecordLocationPreference.get( prefs, mActivity.getContentResolver()); mOnScreenIndicators.updateLocationIndicator(location); diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 14296c75d..20b11d61e 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1246,7 +1246,6 @@ public class VideoModule implements CameraModule, } mMediaRecorder = new MediaRecorder(); - setupMediaRecorderPreviewDisplay(); // Unlock the camera object before passing it to media recorder. mCameraDevice.unlock(); mMediaRecorder.setCamera(mCameraDevice.getCamera()); @@ -1264,6 +1263,7 @@ public class VideoModule implements CameraModule, mProfile.duration = mMaxVideoDurationInMs; mMediaRecorder.setProfile(mProfile); + mMediaRecorder.setVideoSize(mProfile.videoFrameWidth, mProfile.videoFrameHeight); mMediaRecorder.setMaxDuration(mMaxVideoDurationInMs); if (mCaptureTimeLapse) { double fps = 1000 / (double) mTimeBetweenTimeLapseFrameCaptureMs; @@ -1312,6 +1312,7 @@ public class VideoModule implements CameraModule, } } mMediaRecorder.setOrientationHint(rotation); + setupMediaRecorderPreviewDisplay(); try { mMediaRecorder.prepare(); @@ -2079,6 +2080,7 @@ public class VideoModule implements CameraModule, private void setCameraParameters() { Log.d(TAG,"Preview dimension in App->"+mDesiredPreviewWidth+"X"+mDesiredPreviewHeight); mParameters.setPreviewSize(mDesiredPreviewWidth, mDesiredPreviewHeight); + mParameters.set("video-size", mProfile.videoFrameWidth+"x"+mProfile.videoFrameHeight); int[] fpsRange = CameraUtil.getMaxPreviewFpsRange(mParameters); if (fpsRange.length > 0) { mParameters.setPreviewFpsRange( @@ -2150,7 +2152,16 @@ public class VideoModule implements CameraModule, mParameters.setJpegQuality(jpegQuality); //Call Qcom related Camera Parameters qcomSetCameraParameters(); + + boolean flag = false; + if (mPreviewing) { + stopPreview(); + flag = true; + } mCameraDevice.setParameters(mParameters); + if (flag) { + startPreview(); + } // Keep preview size up to date. mParameters = mCameraDevice.getParameters(); |