Re-added Paolo's Android autofocus crash fix (see 633b5f7
)
This commit is contained in:
parent
bc944fea99
commit
ff4c716e46
@ -238,7 +238,11 @@ implements SurfaceHolder.Callback {
|
|||||||
private AutoFocusCallback autoFocusCb = new AutoFocusCallback()
|
private AutoFocusCallback autoFocusCb = new AutoFocusCallback()
|
||||||
{
|
{
|
||||||
public void onAutoFocus(boolean success, Camera camera) {
|
public void onAutoFocus(boolean success, Camera camera) {
|
||||||
autoFocusHandler.postDelayed(doAutoFocus, autoFocusInterval);
|
// some devices crash without this try/catch and cancelAutoFocus()... (#9)
|
||||||
|
try {
|
||||||
|
camera.cancelAutoFocus();
|
||||||
|
autoFocusHandler.postDelayed(doAutoFocus, autoFocusInterval);
|
||||||
|
} catch (Exception e) {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user