summaryrefslogtreecommitdiff
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorTimi <timi.rautamaki@gmail.com>2021-03-28 21:47:43 +0200
committerTimi <timi.rautamaki@gmail.com>2021-04-04 10:47:30 +0200
commit1ca5caaefa55a1d40dec2e3ced366cc227d62f2b (patch)
treeef87b6390348177ed563d359b4dc49bf65e6e891 /src/com/android/camera/CaptureModule.java
parent113ebcf0421e06c23557f1a8b6911432e5739af4 (diff)
Snap: reorganize api2 layout
* added icons from https://material.io/resources/icons/ except ic_switch_{hfr,sat} are self made Change-Id: I9ffc276915297f0cbb31258d325b2459bf20dc1e
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java20
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;