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
(cherry picked from commit a495a7b18da20807d96b60b59a48097ba4d031bb)
1 file changed