Do not set camera preview display if the surface is null.

MediaRecorder.setPreviewDisplay() is not required if applications
use MediaRecorder.setCamera(). Besides, this causes a problem when
apps use Camera.setPreviewTexture. Camera service thinks the
surface texture from Camera.setPreviewTexture and the surface from
MediaRecorder.setPreviewDisplay are different.

bug:5988937

Change-Id: Ia345705b6679ef349db6e354feaa3cc0fe8bcd8c
1 file changed
tree: 941e6c4f15c24ce375ab3f4a191bbbc2a438c12f
  1. camera/
  2. cmds/
  3. drm/
  4. include/
  5. media/
  6. services/