From 5ac51484b293cc0ad08562b03c405721b0bdbc71 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Thu, 16 Feb 2017 15:52:33 -0800 Subject: Verbose logging when API_MEDIA is force-disconnected Media is seeing intermittent failures during CTS when mediaplayer connected to a surface successfully but subsequent dequeueBuffer fails. We suspect that media is getting force-disconnected. Adding a verbose log when this happens to help track down the failure. bug: 35364355 Change-Id: I0c48e3d141648a3d08c6abeb6793f8363e9502fc --- libs/gui/BufferQueueProducer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/gui/BufferQueueProducer.cpp') diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 3f69b1f602..0cbafcf864 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -1222,6 +1222,9 @@ status_t BufferQueueProducer::disconnect(int api, DisconnectMode mode) { } if (api == BufferQueueCore::CURRENTLY_CONNECTED_API) { + if (mCore->mConnectedApi == NATIVE_WINDOW_API_MEDIA) { + ALOGD("About to force-disconnect API_MEDIA, mode=%d", mode); + } api = mCore->mConnectedApi; // If we're asked to disconnect the currently connected api but // nobody is connected, it's not really an error. -- cgit v1.2.3-59-g8ed1b