Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a0470a1 authored by Edwin Wong's avatar Edwin Wong Committed by android-build-merger
Browse files

provideKeyResponse to send an event to test AMediaDrm_setOnEventListener.

am: 58a795ba

Change-Id: I36549dfe68546f0db60e841caa6c49c861095d9f
parents 03489bde 58a795ba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -75,6 +75,8 @@ status_t DrmPlugin::provideKeyResponse(
    }
    status_t res = session->provideKeyResponse(response);
    if (res == android::OK) {
        // This is for testing AMediaDrm_setOnEventListener only.
        sendEvent(kDrmPluginEventVendorDefined, 0, &scope, NULL);
        keySetId.clear();
    }
    return res;
@@ -90,6 +92,8 @@ status_t DrmPlugin::getPropertyString(
        value = "ClearKey CDM";
    } else if (name == "algorithms") {
        value = "";
    } else if (name == "listenerTestSupport") {
        value = "true";
    } else {
        ALOGE("App requested unknown string property %s", name.string());
        return android::ERROR_DRM_CANNOT_HANDLE;