Merge "Enable 64-bit Android Builds"

This commit is contained in:
John Bruce
2017-03-02 04:33:31 +00:00
committed by Android (Google) Code Review
12 changed files with 10 additions and 27 deletions

View File

@@ -47,6 +47,5 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := libcdm
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
include $(BUILD_STATIC_LIBRARY)

View File

@@ -393,8 +393,8 @@ int64_t PolicyEngine::GetLicenseOrRentalDurationRemaining(
const int64_t license_expiry_time = GetRentalExpiryTime();
if (license_expiry_time == NEVER_EXPIRES) return LLONG_MAX;
if (license_expiry_time < current_time) return 0;
return std::min(license_expiry_time - current_time,
policy_.license_duration_seconds());
const int64_t policy_license_duration = policy_.license_duration_seconds();
return std::min(license_expiry_time - current_time, policy_license_duration);
}
int64_t PolicyEngine::GetPlaybackDurationRemaining(int64_t current_time) {
@@ -406,8 +406,9 @@ int64_t PolicyEngine::GetPlaybackDurationRemaining(int64_t current_time) {
const int64_t playback_expiry_time = playback_duration + playback_start_time_;
if (playback_expiry_time < current_time) return 0;
const int64_t policy_playback_duration = policy_.playback_duration_seconds();
return std::min(playback_expiry_time - current_time,
policy_.playback_duration_seconds());
policy_playback_duration);
}
bool PolicyEngine::HasRenewalDelayExpired(int64_t current_time) {

View File

@@ -98,8 +98,13 @@ class WvCdmEngineTest : public testing::Test {
std::string message;
bool ok = url_request.GetResponse(&message);
EXPECT_TRUE(ok);
// One of many reasons a device might fail to provision is that the server
// rejects its keybox. In that case, we usually see an error of
// CERT_PROVISIONING_RESPONSE_ERROR_1. The error response may help
// somebody look through the server logs for more clues.
ASSERT_EQ(NO_ERROR, cdm_engine_.HandleProvisioningResponse(message, &cert,
&wrapped_key));
&wrapped_key))
<< "Error response: " << message;
}
void GenerateKeyRequest(const std::string& key_id,

View File

@@ -50,7 +50,4 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_CFLAGS += -DUNIT_TEST
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
include $(BUILD_EXECUTABLE)