mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Ignores exception when trying to stop auto-focus to handle devices that don't support this
git-svn-id: https://zxing.googlecode.com/svn/trunk@168 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
77ce643b61
commit
a9f8293724
|
@ -37,6 +37,7 @@ final class AdvancedMultimediaManager {
|
|||
|
||||
private static final int NO_ZOOM = 100;
|
||||
private static final int MAX_ZOOM = 200;
|
||||
private static final long FOCUS_TIME_MS = 1000L;
|
||||
|
||||
private AdvancedMultimediaManager() {
|
||||
// do nothing
|
||||
|
@ -51,8 +52,12 @@ final class AdvancedMultimediaManager {
|
|||
}
|
||||
if (focusControl.isAutoFocusSupported()) {
|
||||
focusControl.setFocus(FocusControl.AUTO);
|
||||
Thread.sleep(1000L); // let it focus...
|
||||
focusControl.setFocus(FocusControl.AUTO_LOCK);
|
||||
Thread.sleep(FOCUS_TIME_MS); // let it focus...
|
||||
try {
|
||||
focusControl.setFocus(FocusControl.AUTO_LOCK);
|
||||
} catch (MediaException me) {
|
||||
// continue; some phones like the SE K850 don't support this?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue