GraphicsTracker: re-calculate dequeueable during surface switching

During switching surfaces queued buffers to the old surface might not
be released. So the current dequeueable count may not be correct.
re-calculate dequeueable count during surface switching.

Bug: 337320151
Test: atest android.mediav2.cts.CodecDecoderSurfaceTest#testDetachAndReattachSurface
Test: atest android.media.decoder.cts.AdaptivePlaybackTest
Change-Id: I16ce140cfee807014ff8fdd309b48bcf4f29f060
2 files changed