-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autofocus as parameter #64
Conversation
mCameraManager.setAutofocusInterval(autofocusIntervalInMs); | ||
} | ||
|
||
public void enableTorch(boolean isEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`setTorchEnabled(boolean enabled)``
@@ -72,6 +72,12 @@ | |||
autoFocusAgainLater(); | |||
} | |||
|
|||
public void setAutofocusInterval(long autofocusIntervalMs) { | |||
if (autofocusIntervalMs > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (autofocusIntervalMs <= 0) {
throw new IllegalArgumentException("AutoFocusInterval must be greater than 0.");
}
@@ -71,6 +72,10 @@ public void setDisplayOrientation(int degrees) { | |||
} | |||
} | |||
|
|||
public void setAutofocusInterval(long autofocusIntervalInMs) { | |||
this.autofocusIntervalInMs = autofocusIntervalInMs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (autoFocusManager != null) {
autoFocusManager.setAutofocusInterval(autofocusIntervalInMs);
}
@@ -97,6 +97,14 @@ public void stopCamera() { | |||
mCameraManager.stopPreview(); | |||
} | |||
|
|||
public void setAutofocusInterval(long autofocusIntervalInMs) { | |||
mCameraManager.setAutofocusInterval(autofocusIntervalInMs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could mCameraManager ever be null at this point?
fixes #23