Camera: Use separate result listener when releasing shared outputs

'checkForLastFrameInSequence' expects that the last frame number
received during 'onCaptureSequenceCompleted' will also be the last
frame number received in all remaining capture results from the
given 'resultListener'.
Use a separate result listener when removing all shared outputs
in order to avoid unrelated results appearing from the new
capture sequence.

Bug: 161147859
Test:
atest
cts/tests/camera/src/android/hardware/camera2/cts/MultiViewTest.java#testSharedSurfaceLimit
--iterations=10
atest
cts/tests/camera/src/android/hardware/camera2/cts/MultiViewTest.java#testSharedSurfaceSwitch
--iterations=10

Change-Id: Ie932d5ca31d97df99bad75c2aabbbea39746c2c3
1 file changed