Camera2/3: Don't allow recording and callbacks to coexist.

- Tear down conflicting streams when necessary.

- Shut down callbacks if recording starts

- Do not allow callbacks to start if recording is active

Per the current camera API, recording and preview callbacks cannot be
active simultaneously. However, the framework did not explicitly
disallow this, and in fact left the streams configured once they were
created, even if switching between the two operational modes.

In addition, no guards existed for trying to enable both recording and
callbacks at the same time.

Bug: 9423825

Change-Id: I7d6e6114c2e14fcfb5299b4c72ad557895cbf4b8
2 files changed