Ran clang-format on android/cdm/ files.

[ Merge of http://go/wvgerrit/87123 ]

Certain android files have yet to be formated since we introduced
clang-formatting.

Test: built for android
Bug: 134365840
Change-Id: Ia316b039e7469f7cf803464ee95a919fe7966450
This commit is contained in:
Alex Dale
2019-10-02 11:55:27 -07:00
parent 78e84dcd3b
commit bdcb79a442
13 changed files with 1023 additions and 1081 deletions

View File

@@ -43,17 +43,16 @@ struct CdmIdentifier {
// 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;
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;
return lhs.spoid == rhs.spoid && lhs.origin == rhs.origin &&
lhs.app_package_name == rhs.app_package_name &&
lhs.unique_id == rhs.unique_id;
}
inline bool operator!=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
@@ -61,13 +60,13 @@ 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
|| (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)))));
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 ||
(lhs.app_package_name == rhs.app_package_name &&
lhs.unique_id < rhs.unique_id)))));
}
inline bool operator>(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
@@ -83,12 +82,8 @@ inline bool operator>=(const CdmIdentifier& lhs, const CdmIdentifier& rhs) {
}
// Provide default
static const CdmIdentifier kDefaultCdmIdentifier = {
EMPTY_SPOID,
EMPTY_ORIGIN,
EMPTY_APP_PACKAGE_NAME,
0
};
static const CdmIdentifier kDefaultCdmIdentifier = {EMPTY_SPOID, EMPTY_ORIGIN,
EMPTY_APP_PACKAGE_NAME, 0};
} // namespace wvcdm