mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Catch strange RuntimeExceptino from inside autoFocus() in Android 4.0.x+
git-svn-id: https://zxing.googlecode.com/svn/trunk@2107 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
5cc9295451
commit
ccf169425f
|
@ -165,7 +165,12 @@ public final class CameraManager {
|
|||
public void requestAutoFocus(Handler handler, int message) {
|
||||
if (camera != null && previewing) {
|
||||
autoFocusCallback.setHandler(handler, message);
|
||||
try {
|
||||
camera.autoFocus(autoFocusCallback);
|
||||
} catch (RuntimeException re) {
|
||||
// Have heard RuntimeException reported in Android 4.0.x+; continue?
|
||||
Log.w(TAG, "Unexpected exception while focusing", re);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue