Fix support for app package name.
The app package name was not being reported to the media stats. This change adds the package name as part of the report to media stats. This is one of two parts to this change. The other part is in frameworks/av. Bug: 64584568 Test: Unit tests, GTS tests, tried with Google Play Movies. Change-Id: I1ca09db3a59d9a0950f424d977f8774dffd09c2b
This commit is contained in:
@@ -25,11 +25,17 @@ struct CdmIdentifier {
|
||||
// The origin. May be blank if the app does not set an origin, which is
|
||||
// the likely behavior of most non-web-browser apps.
|
||||
std::string origin;
|
||||
|
||||
// The application package name provided by the application. This is used to
|
||||
// provide a friendly name of the application package for the purposes of
|
||||
// logging and metrics.
|
||||
std::string app_package_name;
|
||||
};
|
||||
|
||||
// Provide comparison operators
|
||||
inline bool operator==(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
return lhs.spoid == rhs.spoid && lhs.origin == rhs.origin;
|
||||
return lhs.spoid == rhs.spoid && lhs.origin == rhs.origin
|
||||
&& lhs.app_package_name == rhs.app_package_name;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
@@ -37,8 +43,11 @@ inline bool operator!=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
}
|
||||
|
||||
inline bool operator<(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
return (lhs.spoid < rhs.spoid) ||
|
||||
((lhs.spoid == rhs.spoid) && lhs.origin < rhs.origin);
|
||||
return (lhs.spoid < rhs.spoid)
|
||||
|| ((lhs.spoid == rhs.spoid)
|
||||
&& (lhs.origin < rhs.origin
|
||||
|| (lhs.origin == rhs.origin
|
||||
&& lhs.app_package_name < rhs.app_package_name)));
|
||||
}
|
||||
|
||||
inline bool operator>(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
@@ -56,7 +65,8 @@ inline bool operator>=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
// Provide default
|
||||
static const CdmIdentifier kDefaultCdmIdentifier = {
|
||||
EMPTY_SPOID,
|
||||
EMPTY_ORIGIN
|
||||
EMPTY_ORIGIN,
|
||||
EMPTY_APP_PACKAGE_NAME
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
Reference in New Issue
Block a user