Update usage of GraphicBuffer at buffer migration

When migrating buffers to the new surface, the consumer usage might be
changed. If the usage is mismatched, the attached buffer will be still
dropped when dequeueing from IGBP.

This CL updates the usage of GraphicBuffer with the consumer usage of
the new surface when buffer migration.

Bug: 174188958
Test: android.media.cts.MediaCodecPlayerTest#testPlaybackSwitchViews

Change-Id: Iabae61743891f8ff6a75b56eab7dc2f7b2ece8bd
diff --git a/media/codec2/vndk/include/C2BqBufferPriv.h b/media/codec2/vndk/include/C2BqBufferPriv.h
index 5c23d5d..066f1e1 100644
--- a/media/codec2/vndk/include/C2BqBufferPriv.h
+++ b/media/codec2/vndk/include/C2BqBufferPriv.h
@@ -104,8 +104,8 @@
     virtual type_t getType() const override;
 
     int migrate(const android::sp<HGraphicBufferProducer>& producer,
-                uint32_t toGeneration, uint64_t toBqId,
-                android::sp<android::GraphicBuffer> graphicBuffer, uint32_t oldGeneration);
+                uint32_t toGeneration, uint64_t toUsage, uint64_t toBqId,
+                android::sp<android::GraphicBuffer>& graphicBuffer, uint32_t oldGeneration);
 
 private:
     friend struct _C2BlockFactory;