summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java14
-rwxr-xr-xsrc/com/android/camera/SettingsActivity.java11
-rwxr-xr-xsrc/com/android/camera/SettingsManager.java48
-rwxr-xr-xsrc/com/android/camera/ui/FlashToggleButton.java7
-rwxr-xr-xversion.mk2
5 files changed, 54 insertions, 28 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index d4db0b7..d16f9ca 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -833,6 +833,8 @@ public class CaptureModule implements CameraModule, PhotoController,
SettingsManager.KEY_STATS_VISUALIZER_VALUE);
if (stats_visualizer != null) {
updateStatsView(stats_visualizer,result);
+ } else {
+ mUI.updateAWBInfoVisibility(View.GONE);
}
}
};
@@ -2501,6 +2503,7 @@ public class CaptureModule implements CameraModule, PhotoController,
} else {
enableShutterAndVideoOnUiThread(id);
}
+ Log.d(TAG,"onShutterButtonRelease");
if (mSettingsManager.getSavePictureFormat() == SettingsManager.HEIF_FORMAT) {
if (mHeifImage != null) {
try {
@@ -3118,7 +3121,7 @@ public class CaptureModule implements CameraModule, PhotoController,
} catch (InterruptedException e) {
mCameraOpenCloseLock.release();
throw new RuntimeException("Interrupted while trying to lock camera closing.", e);
- } catch (CameraAccessException e) {
+ } catch (CameraAccessException | IllegalStateException e) {
e.printStackTrace();
} finally {
mCameraOpenCloseLock.release();
@@ -5180,7 +5183,13 @@ public class CaptureModule implements CameraModule, PhotoController,
boolean noNeedEndOfStreamInHFR = mHighSpeedCapture &&
((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS);
if (noNeedEndofStreamWhenPause || noNeedEndOfStreamInHFR) {
- mMediaRecorder.pause();
+ try{
+ mMediaRecorder.pause();
+ } catch (IllegalStateException e){
+ e.printStackTrace();
+ mMediaRecorderPausing = false;
+ }
+
} else {
setEndOfStream(false, false);
}
@@ -5702,6 +5711,7 @@ public class CaptureModule implements CameraModule, PhotoController,
+ mActivity.getStorageSpaceBytes());
return;
}
+ Log.d(TAG,"onShutterButtonClick");
if (mIsRecordingVideo) {
if (mUI.isShutterEnabled()) {
diff --git a/src/com/android/camera/SettingsActivity.java b/src/com/android/camera/SettingsActivity.java
index 3fef924..45878e2 100755
--- a/src/com/android/camera/SettingsActivity.java
+++ b/src/com/android/camera/SettingsActivity.java
@@ -160,11 +160,12 @@ public class SettingsActivity extends PreferenceActivity {
updateManualWBSettings();
}
- if (pref.getKey().equals(SettingsManager.KEY_VIDEO_QUALITY) ||
- pref.getKey().equals(SettingsManager.KEY_DIS) ||
+ if (pref.getKey().equals(SettingsManager.KEY_DIS) ||
pref.getKey().equals(SettingsManager.KEY_EIS_VALUE)) {
- updatePreference(SettingsManager.KEY_VIDEO_ENCODER);
+ mSettingsManager.filterEISVideQualityOptions();
+ updatePreference(SettingsManager.KEY_VIDEO_QUALITY);
}
+
}
}
};
@@ -804,14 +805,14 @@ public class SettingsActivity extends PreferenceActivity {
pref.setEntries(mSettingsManager.getEntries(key));
pref.setEntryValues(mSettingsManager.getEntryValues(key));
String values = mSettingsManager.getValue(key);
+ Set<String> valueSet = new HashSet<String>();
if (values != null) {
- Set<String> valueSet = new HashSet<String>();
String[] splitValues = values.split(";");
for (String str : splitValues) {
valueSet.add(str);
}
- pref.setValues(valueSet);
}
+ pref.setValues(valueSet);
}
}
}
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 532eae8..8e55459 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -1091,9 +1091,6 @@ public class SettingsManager implements ListMenu.SettingsListener {
filterVideoEncoderProfileOptions();
} else if (pref.getKey().equals(KEY_PICTURE_FORMAT)) {
filterHeifSizeOptions();
- } else if (pref.getKey().equals(KEY_DIS) ||
- pref.getKey().equals(KEY_EIS_VALUE)) {
- filterVideoEncoderOptions();
}
}
@@ -1264,6 +1261,27 @@ public class SettingsManager implements ListMenu.SettingsListener {
}
}
+ private boolean getEISEnabled() {
+ boolean result = false;
+ ListPreference disPref = mPreferenceGroup.findPreference(KEY_DIS);
+ ListPreference eisPref = mPreferenceGroup.findPreference(KEY_EIS_VALUE);
+ if (disPref != null && eisPref != null) {
+ result = ("on".equals(disPref.getValue()) &&
+ !("disable".equals(eisPref.getValue())));
+ }
+ return result;
+ }
+
+ public void filterEISVideQualityOptions() {
+ ListPreference videoQualityPref = mPreferenceGroup.findPreference(KEY_VIDEO_QUALITY);
+ if (videoQualityPref == null) return;
+ videoQualityPref.reloadInitialEntriesAndEntryValues();
+ if (filterUnsupportedOptions(videoQualityPref, getSupportedVideoSize(
+ getCurrentCameraId()))) {
+ mFilteredKeys.add(videoQualityPref.getKey());
+ }
+ }
+
private void filterChromaflashPictureSizeOptions() {
String scene = getValue(SettingsManager.KEY_SCENE_MODE);
ListPreference picturePref = mPreferenceGroup.findPreference(KEY_PICTURE_SIZE);
@@ -1765,6 +1783,7 @@ public class SettingsManager implements ListMenu.SettingsListener {
StreamConfigurationMap map = mCharacteristics.get(cameraId).get(
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
Size[] sizes = map.getOutputSizes(MediaRecorder.class);
+ boolean eisEnabled = getEISEnabled();
boolean isHeifEnabled = getSavePictureFormat() == HEIF_FORMAT;
VideoCapabilities heifCap = null;
if (isHeifEnabled) {
@@ -1786,6 +1805,13 @@ public class SettingsManager implements ListMenu.SettingsListener {
continue;
}
}
+ if (eisEnabled) {
+ // eis didn`t support less than 720P
+ if (Math.min(sizes[i].getWidth(),sizes[i].getHeight()) < 720 ||
+ Math.max(sizes[i].getWidth(),sizes[i].getHeight()) < 1280) {
+ continue;
+ }
+ }
if (CameraSettings.VIDEO_QUALITY_TABLE.containsKey(sizes[i].toString())) {
Integer profile = CameraSettings.VIDEO_QUALITY_TABLE.get(sizes[i].toString());
if (profile != null) {
@@ -1988,22 +2014,6 @@ public class SettingsManager implements ListMenu.SettingsListener {
}
}
- ListPreference videoQuality = mPreferenceGroup.findPreference(KEY_VIDEO_QUALITY);
- String videoSize = videoQuality.getValue();
- int indexX = videoSize.indexOf('x');
- int width = Integer.parseInt(videoSize.substring(0, indexX));
- int height = Integer.parseInt(videoSize.substring(indexX + 1));
- // Video quality less than 720P
- boolean isLess720P = width < 1280 && height < 720;
-
- ListPreference disPref = mPreferenceGroup.findPreference(KEY_DIS);
- ListPreference eisPref = mPreferenceGroup.findPreference(KEY_EIS_VALUE);
- if (isLess720P &&
- "on".equals(disPref.getValue()) &&
- !("disable".equals(eisPref.getValue()))) {
- supported.remove("mpeg-4-sp");
- }
-
return supported;
}
diff --git a/src/com/android/camera/ui/FlashToggleButton.java b/src/com/android/camera/ui/FlashToggleButton.java
index fca76b7..abeedef 100755
--- a/src/com/android/camera/ui/FlashToggleButton.java
+++ b/src/com/android/camera/ui/FlashToggleButton.java
@@ -72,6 +72,11 @@ public class FlashToggleButton extends RotateImageView {
R.string.pref_camera_manual_exp_value_user_setting);
String manualExposureMode = mSettingsManager.getValue(SettingsManager.KEY_MANUAL_EXPOSURE);
String scene = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
+ boolean mfnrEnable = false;
+ String mfnrValue = mSettingsManager.getValue(SettingsManager.KEY_CAPTURE_MFNR_VALUE);
+ if (mfnrValue != null) {
+ mfnrEnable = mfnrValue.equals("1");
+ }
boolean promode = false;
if (scene != null) {
int mode = Integer.parseInt(scene);
@@ -80,7 +85,7 @@ public class FlashToggleButton extends RotateImageView {
}
}
if (mIndex == -1 || (redeye != null && redeye.equals("on")) ||
- manualExposureMode.equals(userSetting) || promode) {
+ manualExposureMode.equals(userSetting) || promode || mfnrEnable) {
setVisibility(GONE);
return;
} else {
diff --git a/version.mk b/version.mk
index 548001e..7ec39db 100755
--- a/version.mk
+++ b/version.mk
@@ -40,7 +40,7 @@
# base_version_build is 3 digits and auto-increment for fixing CR.
base_version_major := 2
base_version_minor := 02
-base_version_build := 035
+base_version_build := 036
#####################################################
#####################################################