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

Commit 7debcf9d authored by Eric Miao's avatar Eric Miao
Browse files

Get metadata description without creating MediaDescription

In MediaSession#setMetadata(), MediaMetadata#getDescription() is
called to get a MediaDescription object from the metadata, and
MediaDescription#toString() is implicitly called to get a string
description with title, subtitle and description.

This is unnecessary esp. because Bitmaps could be involved in
creating the temporary MediaDescription.

This change adds an API `MediaMetadata#getDescriptionString()`
with the same behavior without creating an intermediate object.

Bug: 400807118
Flag: EXEMPT refactor
Test: local test
Change-Id: I653fdd7a6fe087ccb4cfd47931b893c66a68fa40
parent c4e5377b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment