Code example for Writer

Methods: close, write

0
        }); 
        if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) {
            fail("Failed to run the command on the looper.");
        } 
    } 
 
    private final class CameraErrorCallback implements android.hardware.Camera.ErrorCallback {
        public void onError(int error, android.hardware.Camera camera) {
            if (error == android.hardware.Camera.CAMERA_ERROR_SERVER_DIED) {
                assertTrue("Camera test mediaserver died", false);
            } 
        } 
    } 
 
    private ShutterCallback shutterCallback = new ShutterCallback() {
        @Override 
        public void onShutter() { 
            Log.v(TAG, "Shutter"); 
        } 
    };