Lines Matching refs:drm
364 sp<IDrm> drm = service->makeDrm(); in MakeDrm() local
365 if (drm == NULL || (drm->initCheck() != OK && drm->initCheck() != NO_INIT)) { in MakeDrm()
369 return drm; in MakeDrm()
374 sp<IDrm> drm = MakeDrm(); in MakeDrm() local
376 if (drm == NULL) { in MakeDrm()
380 status_t err = drm->createPlugin(uuid, appPackageName); in MakeDrm()
386 return drm; in MakeDrm()
417 sp<IDrm> drm = MakeDrm(); in IsCryptoSchemeSupported() local
419 if (drm == NULL) { in IsCryptoSchemeSupported()
423 return drm->isCryptoSchemeSupported(uuid, mimeType); in IsCryptoSchemeSupported()
555 JNIEnv *env, jobject thiz, const sp<JDrm> &drm) { in setDrm() argument
557 if (drm != NULL) { in setDrm()
558 drm->incStrong(thiz); in setDrm()
563 env->SetLongField(thiz, gFields.context, reinterpret_cast<jlong>(drm.get())); in setDrm()
568 static bool CheckSession(JNIEnv *env, const sp<IDrm> &drm, jbyteArray const &jsessionId) in CheckSession() argument
570 if (drm == NULL) { in CheckSession()
583 sp<JDrm> drm = setDrm(env, thiz, NULL); in android_media_MediaDrm_release() local
584 if (drm != NULL) { in android_media_MediaDrm_release()
585 drm->setListener(NULL); in android_media_MediaDrm_release()
586 drm->disconnect(); in android_media_MediaDrm_release()
710 sp<JDrm> drm = new JDrm(env, thiz, uuid.array(), packageName); in android_media_MediaDrm_native_setup() local
712 status_t err = drm->initCheck(); in android_media_MediaDrm_native_setup()
723 drm->setListener(listener); in android_media_MediaDrm_native_setup()
724 setDrm(env, thiz, drm); in android_media_MediaDrm_native_setup()
760 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_openSession() local
762 if (drm == NULL) { in android_media_MediaDrm_openSession()
769 status_t err = drm->openSession(sessionId); in android_media_MediaDrm_openSession()
780 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_closeSession() local
782 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_closeSession()
788 status_t err = drm->closeSession(sessionId); in android_media_MediaDrm_closeSession()
796 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getKeyRequest() local
798 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_getKeyRequest()
840 status_t err = drm->getKeyRequest(sessionId, initData, mimeType, in android_media_MediaDrm_getKeyRequest()
886 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_provideKeyResponse() local
888 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_provideKeyResponse()
902 status_t err = drm->provideKeyResponse(sessionId, response, keySetId); in android_media_MediaDrm_provideKeyResponse()
912 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_removeKeys() local
922 status_t err = drm->removeKeys(keySetId); in android_media_MediaDrm_removeKeys()
931 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_restoreKeys() local
933 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_restoreKeys()
945 status_t err = drm->restoreKeys(sessionId, keySetId); in android_media_MediaDrm_restoreKeys()
952 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_queryKeyStatus() local
954 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_queryKeyStatus()
961 status_t err = drm->queryKeyStatus(sessionId, infoMap); in android_media_MediaDrm_queryKeyStatus()
972 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getProvisionRequestNative() local
974 if (drm == NULL) { in android_media_MediaDrm_getProvisionRequestNative()
993 status_t err = drm->getProvisionRequest(certType, certAuthority, request, defaultUrl); in android_media_MediaDrm_getProvisionRequestNative()
1019 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_provideProvisionResponseNative() local
1021 if (drm == NULL) { in android_media_MediaDrm_provideProvisionResponseNative()
1036 status_t err = drm->provideProvisionResponse(response, certificate, wrappedKey); in android_media_MediaDrm_provideProvisionResponseNative()
1058 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getSecureStops() local
1060 if (drm == NULL) { in android_media_MediaDrm_getSecureStops()
1068 status_t err = drm->getSecureStops(secureStops); in android_media_MediaDrm_getSecureStops()
1079 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getSecureStop() local
1081 if (drm == NULL) { in android_media_MediaDrm_getSecureStop()
1089 status_t err = drm->getSecureStop(JByteArrayToVector(env, ssid), secureStop); in android_media_MediaDrm_getSecureStop()
1100 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_releaseSecureStops() local
1102 if (drm == NULL) { in android_media_MediaDrm_releaseSecureStops()
1110 status_t err = drm->releaseSecureStops(ssRelease); in android_media_MediaDrm_releaseSecureStops()
1117 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_releaseAllSecureStops() local
1119 if (drm == NULL) { in android_media_MediaDrm_releaseAllSecureStops()
1125 status_t err = drm->releaseAllSecureStops(); in android_media_MediaDrm_releaseAllSecureStops()
1132 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getPropertyString() local
1134 if (drm == NULL) { in android_media_MediaDrm_getPropertyString()
1149 status_t err = drm->getPropertyString(name, value); in android_media_MediaDrm_getPropertyString()
1160 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_getPropertyByteArray() local
1162 if (drm == NULL) { in android_media_MediaDrm_getPropertyByteArray()
1177 status_t err = drm->getPropertyByteArray(name, value); in android_media_MediaDrm_getPropertyByteArray()
1188 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_setPropertyString() local
1190 if (drm == NULL) { in android_media_MediaDrm_setPropertyString()
1211 status_t err = drm->setPropertyString(name, value); in android_media_MediaDrm_setPropertyString()
1218 sp<IDrm> drm = GetDrm(env, thiz); in android_media_MediaDrm_setPropertyByteArray() local
1220 if (drm == NULL) { in android_media_MediaDrm_setPropertyByteArray()
1241 status_t err = drm->setPropertyByteArray(name, value); in android_media_MediaDrm_setPropertyByteArray()
1250 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_setCipherAlgorithmNative() local
1252 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_setCipherAlgorithmNative()
1265 status_t err = drm->setCipherAlgorithm(sessionId, algorithm); in android_media_MediaDrm_setCipherAlgorithmNative()
1274 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_setMacAlgorithmNative() local
1276 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_setMacAlgorithmNative()
1289 status_t err = drm->setMacAlgorithm(sessionId, algorithm); in android_media_MediaDrm_setMacAlgorithmNative()
1299 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_encryptNative() local
1301 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_encryptNative()
1317 status_t err = drm->encrypt(sessionId, keyId, input, iv, output); in android_media_MediaDrm_encryptNative()
1330 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_decryptNative() local
1332 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_decryptNative()
1348 status_t err = drm->decrypt(sessionId, keyId, input, iv, output); in android_media_MediaDrm_decryptNative()
1360 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_signNative() local
1362 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_signNative()
1377 status_t err = drm->sign(sessionId, keyId, message, signature); in android_media_MediaDrm_signNative()
1390 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_verifyNative() local
1392 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_verifyNative()
1408 status_t err = drm->verify(sessionId, keyId, message, signature, match); in android_media_MediaDrm_verifyNative()
1419 sp<IDrm> drm = GetDrm(env, jdrm); in android_media_MediaDrm_signRSANative() local
1421 if (!CheckSession(env, drm, jsessionId)) { in android_media_MediaDrm_signRSANative()
1437 status_t err = drm->signRSA(sessionId, algorithm, message, wrappedKey, signature); in android_media_MediaDrm_signRSANative()