mirror of
https://github.com/zxing/zxing.git
synced 2025-02-21 02:55:27 -08:00
Swallow weird RuntimeException on cancelling auto focus
git-svn-id: https://zxing.googlecode.com/svn/trunk@2340 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
cd25a521a4
commit
99011addb3
|
@ -87,7 +87,12 @@ final class AutoFocusManager implements Camera.AutoFocusCallback {
|
|||
|
||||
synchronized void stop() {
|
||||
if (useAutoFocus) {
|
||||
camera.cancelAutoFocus();
|
||||
try {
|
||||
camera.cancelAutoFocus();
|
||||
} catch (RuntimeException re) {
|
||||
// Have heard RuntimeException reported in Android 4.0.x+; continue?
|
||||
Log.w(TAG, "Unexpected exception while cancelling focusing", re);
|
||||
}
|
||||
}
|
||||
if (outstandingTask != null) {
|
||||
outstandingTask.cancel();
|
||||
|
|
Loading…
Reference in a new issue