camera2: Fix ordering issue between #onOpened and createCaptureSession

This resolves an issue where the CameraDevice.StateListener callbacks were
erroneously called before the CameraCaptureSession.StateListener ones,
preventing e.g. creating a capture session from the
CameraDevice.StateListener#onOpened() callback.
It also explicitly ignores CameraDevice.StateListener#onUnconfigured() calls
occurring before the first call to #close .

Bug: 15449190
Change-Id: Ic0094d53a65e42108201d7bb50734d17290fa9bf
2 files changed