Skip to content

Commit

Permalink
disable long exposure noise reduction
Browse files Browse the repository at this point in the history
display bulb mode name
  • Loading branch information
obs committed Aug 15, 2016
1 parent e057573 commit 878f2fb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/build
/local.properties
/*.iml
/keystore.jks
/keystore.jks
/app/*.apk
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.obsidium.bettermanual"
minSdkVersion 10
targetSdkVersion 10
versionCode 4
versionName "1.3"
versionCode 5
versionName "1.4"
}
buildTypes {
release {
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/com/obsidium/bettermanual/CameraUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ public static String formatShutterSpeed(int n, int d)
if (n == 1 && d != 2)
return String.format("%d/%d", n, d);
else if (d == 1)
return String.format("%d\"", n);
{
if (n == 65535)
return "BULB";
else
return String.format("%d\"", n);
}
else
return String.format("%.1f\"", (float) n / (float) d);
}
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/obsidium/bettermanual/ManualActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,17 @@ private void saveDefaults()
// TODO: Dial mode
}

private void disableLENR()
{
// Disable long exposure noise reduction
final Camera.Parameters params = m_camera.createEmptyParameters();
final CameraEx.ParametersModifier paramsModifier = m_camera.createParametersModifier(m_camera.getNormalCamera().getParameters());
final CameraEx.ParametersModifier modifier = m_camera.createParametersModifier(params);
if (paramsModifier.isSupportedLongExposureNR())
modifier.setLongExposureNR(false);
m_camera.getNormalCamera().setParameters(params);
}

private void loadDefaults()
{
final Camera.Parameters params = m_camera.createEmptyParameters();
Expand Down Expand Up @@ -799,6 +810,8 @@ private void loadDefaults()
m_viewFlags = m_prefs.getViewFlags(VIEW_FLAG_GRID | VIEW_FLAG_HISTOGRAM);
// TODO: Dial mode?
setDialMode(DialMode.shutter);

disableLENR();
}

private void setMinShutterSpeed(int speed)
Expand Down

0 comments on commit 878f2fb

Please sign in to comment.