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

Commit 621faa7c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid empty mime type in media metrics records" into oc-mr1-dev

parents 0d3958f7 9c2480b1
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;
                }