Revert "Merge latest oemcrypto-v17 change"

This reverts commit 642965c678.

Reason for revert: Droidfood Blocking Bug: 217145027

Change-Id: I669b72fcd91c62e28883b5f55eb36af274d85806
(cherry picked from commit 8dbea15e5da05b371572297041454569dc166c90)
Merged-In:I669b72fcd91c62e28883b5f55eb36af274d85806
This commit is contained in:
Daniel Chapin
2022-01-31 19:21:18 +00:00
committed by Android Build Coastguard Worker
parent 1397b61f87
commit d69b488be1
176 changed files with 296842 additions and 301106 deletions

View File

@@ -11,8 +11,17 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------
// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
// DEPENDING ON IT IN YOUR PROJECT. ***
package {
// See: http://go/android-license-faq
// legacy_by_exception_only (by exception only)
default_applicable_licenses: ["vendor_widevine_license"],
}
// Builds libwvdrmdrmplugin_hidl
//
cc_library_static {

View File

@@ -272,7 +272,7 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin, IDrmPluginListener,
// List this field first so it is destructed last; ensure logging uid
// is cleared right before plugin is destructed.
wvutil::LoggingUidSetter mLoggingUidSetter;
wvcdm::LoggingUidSetter mLoggingUidSetter;
struct CryptoSession {
public:
@@ -487,7 +487,6 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin, IDrmPluginListener,
void DoTerminate() {
Mutex::Autolock lock(mLock);
for_each(mPlugins.begin(), mPlugins.end(), [] (WVDrmPlugin* plugin) {
ALOGI("WVDrmPlugin::Terminating plugin %p", (void*)plugin);
plugin->Close();
});
exit(0);

View File

@@ -24,7 +24,7 @@ class WVGenericCryptoInterface {
const uint8_t* key_id,
size_t key_id_length) {
return OEMCrypto_SelectKey(session, key_id, key_id_length,
OEMCrypto_CipherMode_CBCS);
OEMCrypto_CipherMode_CBC);
}
virtual OEMCryptoResult encrypt(OEMCrypto_SESSION session,

View File

@@ -202,7 +202,7 @@ WVDrmPlugin::WVDrmPlugin(const sp<WvContentDecryptionModule>& cdm,
}
WVDrmPlugin::~WVDrmPlugin() {
wvutil::SetLoggingUid(mCdmIdentifierBuilder.user_id());
wvcdm::SetLoggingUid(mCdmIdentifierBuilder.user_id());
Terminator::Forget(this);
Close();
}
@@ -1975,7 +1975,7 @@ Return<void> WVDrmPlugin::sendSessionLostState(
}
Return<void> WVDrmPlugin::getLogMessages(getLogMessages_cb _hidl_cb) {
const std::vector<wvutil::LogMessage> &logs(wvutil::g_logbuf.getLogs());
const std::vector<wvcdm::LogMessage> &logs(wvcdm::g_logbuf.getLogs());
_hidl_cb(::drm::V1_4::Status::OK, toHidlVec<::drm::V1_4::LogMessage>(logs));
return Void();
}
@@ -2236,7 +2236,7 @@ WVDrmPlugin::CdmIdentifierBuilder::CdmIdentifierBuilder(
mParent(parent) {
mCdmIdentifier.app_package_name = mAppPackageName;
mCdmIdentifier.unique_id = getNextUniqueId();
mCdmIdentifier.user_id = wvutil::GetIpcCallingUid();
mCdmIdentifier.user_id = wvcdm::GetIpcCallingUid();
}
Status WVDrmPlugin::CdmIdentifierBuilder::getCdmIdentifier(

View File

@@ -68,7 +68,7 @@ using wvcdm::kLicenseTypeRelease;
using wvcdm::kLicenseTypeStreaming;
using wvcdm::kSecurityLevelL1;
using wvcdm::kSecurityLevelL3;
using wvutil::Base64Encode;
using wvcdm::Base64Encode;
using wvcdm::CdmAppParameterMap;
using wvcdm::CdmCertificateType;
using wvcdm::CdmClientPropertySet;
@@ -1281,7 +1281,7 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
static const std::string oemCryptoPartnerDefinedHash = "2";
static const std::string decryptHashErrorBadHashAndFrameNumber = "53, 1";
drm_metrics::WvCdmMetrics expected_metrics;
std::string serialized_metrics = wvutil::a2bs_hex(kSerializedMetricsHex);
std::string serialized_metrics = wvcdm::a2bs_hex(kSerializedMetricsHex);
ASSERT_TRUE(expected_metrics.ParseFromString(serialized_metrics));
EXPECT_CALL(*cdm, QueryStatus(_, QUERY_KEY_SECURITY_LEVEL, _))
@@ -3227,7 +3227,7 @@ TEST_F(WVDrmPluginTest, CanSetDecryptHashProperties) {
const std::vector<uint8_t> hashVector(
reinterpret_cast<uint8_t*>(&hash),
reinterpret_cast<uint8_t*>(&hash) + sizeof(uint32_t));
const std::string base64EncodedHash = wvutil::Base64Encode(hashVector);
const std::string base64EncodedHash = Base64Encode(hashVector);
std::string computedHash(sessionId.begin(), sessionId.end());
computedHash.append(frameNumber.c_str());
computedHash.append(base64EncodedHash.c_str());