Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f89acb8 authored by Ray Essick's avatar Ray Essick Committed by android-build-merger
Browse files

Merge "Avoid empty mime type in media metrics records" into oc-mr1-dev am: 621faa7c

am: 67fc8178

Change-Id: I877b6307a76b0b476b648b8a498ef8e904891479
parents 4b4b166f 67fc8178
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1576,6 +1576,19 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
                    }
                    setState(CONFIGURED);
                    (new AMessage)->postReply(mReplyID);

                    // augment our media metrics info, now that we know more things
                    if (mAnalyticsItem != NULL) {
                        sp<AMessage> format;
                        if (mConfigureMsg != NULL &&
                            mConfigureMsg->findMessage("format", &format)) {
                                // format includes: mime
                                AString mime;
                                if (format->findString("mime", &mime)) {
                                    mAnalyticsItem->setCString(kCodecMime, mime.c_str());
                                }
                            }
                    }
                    break;
                }