Revert "Create unique cdm engines per WVDrmPlugin instance"
This change introduced b/77618383, need to revert. This reverts commit58234a69f2. Change-Id: Ie7d515bcd94f2dcee6fa9b885cd0441845c82c22 Bug: 77618383 (cherry picked from commit90441e24df) Change-Id: I114cb3cf5b69e2698d407ba4cf15cefcad2aaf3d
This commit is contained in:
committed by
android-build-team Robot
parent
94157fbfeb
commit
629e179f7c
@@ -30,28 +30,12 @@ struct CdmIdentifier {
|
||||
// provide a friendly name of the application package for the purposes of
|
||||
// logging and metrics.
|
||||
std::string app_package_name;
|
||||
|
||||
// The unique identifier guarantees that no two identifiers share the same
|
||||
// CdmEngine instance. We're moving to a model where a plugin maps 1 to 1
|
||||
// with a CdmEngine instance. This is a simple way to implement that.
|
||||
uint32_t unique_id;
|
||||
|
||||
// This method is needed to check to see if the identifier is equivalent
|
||||
// to the default cdm. E.g. no spoid, origin or app package name. Use this
|
||||
// comparison in lieu of the == operator when checking to see if the
|
||||
// identifier would cause the default provisioned certificate to be used.
|
||||
bool IsEquivalentToDefault() {
|
||||
return spoid == EMPTY_SPOID
|
||||
&& origin == EMPTY_ORIGIN
|
||||
&& app_package_name == EMPTY_APP_PACKAGE_NAME;
|
||||
}
|
||||
};
|
||||
|
||||
// Provide comparison operators
|
||||
inline bool operator==(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
return lhs.spoid == rhs.spoid && lhs.origin == rhs.origin
|
||||
&& lhs.app_package_name == rhs.app_package_name
|
||||
&& lhs.unique_id == rhs.unique_id;
|
||||
&& lhs.app_package_name == rhs.app_package_name;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
@@ -63,9 +47,7 @@ inline bool operator<(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
|| ((lhs.spoid == rhs.spoid)
|
||||
&& (lhs.origin < rhs.origin
|
||||
|| (lhs.origin == rhs.origin
|
||||
&& (lhs.app_package_name < rhs.app_package_name
|
||||
|| (lhs.app_package_name == rhs.app_package_name
|
||||
&& lhs.unique_id < rhs.unique_id)))));
|
||||
&& lhs.app_package_name < rhs.app_package_name)));
|
||||
}
|
||||
|
||||
inline bool operator>(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
@@ -84,8 +66,7 @@ inline bool operator>=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
|
||||
static const CdmIdentifier kDefaultCdmIdentifier = {
|
||||
EMPTY_SPOID,
|
||||
EMPTY_ORIGIN,
|
||||
EMPTY_APP_PACKAGE_NAME,
|
||||
0
|
||||
EMPTY_APP_PACKAGE_NAME
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
Reference in New Issue
Block a user