Camera: Disable surface usage caching for external surfaces

Calls to 'getEndpointUsageForSurface' may pass a reference
to a surface that is external (not equal to 'mConsumer').
Caching the usage value in this scenario must be avoided.

Bug: 332417443
Test: atest CtsCameraTestCases:android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing
Change-Id: Ie10dae67385560c7825b6a4e36171da683ceef2c
1 file changed