diff options
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
| -rwxr-xr-x | src/com/android/camera/CaptureModule.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 41aab2d3a..2434130de 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -30,6 +30,7 @@ import android.content.SharedPreferences; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Configuration; +import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.ImageFormat; import android.graphics.Matrix; @@ -4944,6 +4945,9 @@ public class CaptureModule implements CameraModule, PhotoController, return; } Log.d(TAG, "onSingleTapUp " + x + " " + y); + + mUI.closeModeSwitcher(true); + int currentId = mCurrentSceneMode.getCurrentId(); if(mLockAFAE) { mLockAFAE = false; @@ -6814,6 +6818,8 @@ public class CaptureModule implements CameraModule, PhotoController, Log.d(TAG,"onShutterButtonClick"); + mUI.closeModeSwitcher(true); + if (mCurrentSceneMode.mode == CameraMode.HFR || mCurrentSceneMode.mode == CameraMode.VIDEO) { if (mSettingsManager.isLiveshotSupported(mVideoSize,mSettingsManager.getVideoFPS())){ @@ -8987,12 +8993,16 @@ public class CaptureModule implements CameraModule, PhotoController, nextSceneMode.mode == CameraMode.SAT || nextSceneMode.mode == CameraMode.PRO_MODE)) { mSettingsManager.setValue(SettingsManager.KEY_FRONT_REAR_SWITCHER_VALUE, "rear"); + mUI.setFrontBackSwitcherDrawable(); } else { restartAll(); } updateZoomSeekBarVisible(); mUI.updateZoomSeekBar(1.0f); updateZoom(); + mUI.closeModeSwitcher(true); + mUI.setCurrentModeIcon(mode); + mUI.setSwitcherAnimationNeeded(true); return 1; } @@ -9030,6 +9040,16 @@ public class CaptureModule implements CameraModule, PhotoController, return mSelectableModes; } + public List<Integer> getCameraModeIconList() { + ArrayList<Integer> cameraModeIcons = new ArrayList<>(); + TypedArray ic = mActivity.getResources() + .obtainTypedArray(R.array.camera_modes_back); + for (SceneModule sceneModule : mSceneCameraIds) { + cameraModeIcons.add(ic.getResourceId(sceneModule.mode.ordinal(), 0)); + } + return cameraModeIcons; + } + private class SceneModule { CameraMode mode = CameraMode.DEFAULT; public int rearCameraId; |
