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

Commit 67fc8178 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

Change-Id: Iacee46f1fb04e30b8395fc3f0132b9ce08eab823
parents a2e6e575 621faa7c
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;
                }