Bug 890427: use camera API's onPreviewStateChange callback to avoid deadlock