Loading app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java +11 −3 Original line number Diff line number Diff line Loading @@ -1958,8 +1958,17 @@ public class CameraController2 extends CameraController { // need to communicate the problem to the application // n.b., as this is potentially serious error, we always log even if MyDebug.LOG is false Log.e(TAG, "error occurred after camera was opened"); // important to run on UI thread to avoid synchronisation issues in the Preview final Activity activity = (Activity)context; activity.runOnUiThread(new Runnable() { @Override public void run() { if( MyDebug.LOG ) Log.d(TAG, "onError: call camera_error_cb.onError() on UI thread"); camera_error_cb.onError(); } }); } } /** Opens the camera device. Loading Loading @@ -2258,8 +2267,7 @@ public class CameraController2 extends CameraController { Log.d(TAG, "camera now opened: " + camera); /*{ // test error handling final Handler handler = new Handler(); // test error handling on background thread handler.postDelayed(new Runnable() { @Override public void run() { Loading Loading
app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java +11 −3 Original line number Diff line number Diff line Loading @@ -1958,8 +1958,17 @@ public class CameraController2 extends CameraController { // need to communicate the problem to the application // n.b., as this is potentially serious error, we always log even if MyDebug.LOG is false Log.e(TAG, "error occurred after camera was opened"); // important to run on UI thread to avoid synchronisation issues in the Preview final Activity activity = (Activity)context; activity.runOnUiThread(new Runnable() { @Override public void run() { if( MyDebug.LOG ) Log.d(TAG, "onError: call camera_error_cb.onError() on UI thread"); camera_error_cb.onError(); } }); } } /** Opens the camera device. Loading Loading @@ -2258,8 +2267,7 @@ public class CameraController2 extends CameraController { Log.d(TAG, "camera now opened: " + camera); /*{ // test error handling final Handler handler = new Handler(); // test error handling on background thread handler.postDelayed(new Runnable() { @Override public void run() { Loading