13 Commits

Author SHA1 Message Date
James Dong
d78fc5b94d Merge "Let getOriginalMimeType() take a fd passed from drm java applications" into jb-mr1-dev 2012-08-22 14:50:27 -07:00
James Dong
0889fdae87 Let getOriginalMimeType() take a fd passed from drm java applications
At present, we did not actually pass the fd. This patch allows us to
make the changes necessary in the future without worrying too much
about broken build.

related-to-bug: 6426185

Change-Id: I125decff9be621a72f2631fd439994a94a526606
2012-08-22 13:47:19 -07:00
Henrik B Andersson
057b086e0e Release JNI local references as soon as possible.
The JNI layer has a fix amount (512) of jni references.
They should be released as soon as possible. In for
and while loops they can quickly reach the limit.

Change-Id: Id984345e1cc4f7aa6eb31a263b796c3da9edf773
2012-08-17 15:59:35 -07:00
James Dong
9864b25bd8 There was copy and paste code in JNI to create a DrmConvertedStatus object.
o This patch removed duplicated code.

Change-Id: Ic3d3461fb8da6fab1b4d19d28b8d9d4abc8a53b1
2012-03-05 18:52:32 -08:00
James Dong
f16a2724e0 Fix some JNI issues in the drm framework
o allocated array using new must be deleted using delete[]
o removed duplicated code

Change-Id: Ifa8e2e1cd46568c5266717eb1ad340b61a843adc
2012-03-02 16:54:19 -08:00
Kei Takahashi
6225df0103 DRM framwork bug fix: add an API to release resources
When DrmManagerClient object is created and released many times,
the process suddenly crashes.
The case can happen when we make many thumbnails of
DRM-encrypted contents.

The problem is caused by shortage of file descriptors.
DrmManagerClient releases references of file descriptors
only when GC runs. So file descriptors are kept long time
even after the reference of DrmManagerClient are released.

By introducing DrmManagerClient#release() API,
the problem is solved. An application call this API
when we no longer need to use DrmManagerClient object.

Changes are made by SEMC and Sony.

Change-Id: Ie0bbc29cc33872449824285a8d67b1c3cdd8082b
2012-02-29 12:59:53 +09:00
Steve Block
c6aacce371 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
2012-01-19 14:45:03 -08:00
Steve Block
06ade6ae1b Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
2012-01-19 14:44:31 -08:00
Gloria Wang
a17d454fd0 Fix for bug 4371230.
- Generate unique ID for each DrmManagerClient in native side
- Fix the bug where multiple clients could use the same ID
- Return the correct unique ID back to Java
- Add a flag in the unique ID to separate native client and Java client

Change-Id: Ia4574b6b0a526f2335a65380975dc62f9a6e7f9b
2011-07-25 16:09:58 -07:00
Takeshi Aimi
dc91865622 Update of DRM Framework.
-Access permission handling
  Introduce an internal function which allows the desired process to
  access decryption flow. This new function is just for reference and
  each OEM manufacturer should implement/replace with their solutions.
-New API, getMetadata()
  This API is for retrieving media metadata from container-based DRM,
  such as OMA forward-lock content. This API asks DRM agent to retrieve
  media metadata hiddein inside of DRM special container.
-New API, acquireRights()
  This API wraps acquireDrmInfo() and processDrmInfo().
  If DRM agent has valid implementation of both APIs,
  Application can acquire DrmRights only by calling this API.
-Bug fix in event loop of OnInfoListener.
  Separate OnInfo event loop from mail thread loop so as to avoid
  the issue that message is not dispatched when mail thread is busy.

Changes are made by SEMC and Sony.

Change-Id: I04ee3e0988152a71e221f2256d83253749a29da0
2010-11-19 22:02:51 +09:00
Takeshi Aimi
c7b3ccc564 Update of DRM framework
- Overload openDecryptSession() with uri parameter
   in order to accept URI of DRM content,
   Following API is added,
       DecryptHandle*openDecryptSession(const char* uri);.
 - Unify texisting three event types of processDrmInfo()
   so that caller of DRM framework does not have to handle many event types.
 - Let DrmManagerService call load/unload plugins API so that
   client of DRM framework does not have to manage plug-in load/unload.
 - Trivial fix in DrmManagerClient.java is also incorporated.

Changes are made by Sony Corporation.

Change-Id: If62b47fa0360718fdc943e6e6143671d7db26adc
2010-11-02 08:06:06 +09:00
Takeshi Aimi
dc549d60f9 Update of DRM framework.
- Change "void" type of return value to "int" for returning status.
  - Add some of overloaded Java APIs which accept database Uri as input.
  - Add asynchronous APIs
  - Add OnEventListener and OnErrorListener for asynchronous APIs
  - Disable debug log
  - Change decrypt() API to accept an optional buffer needed by some of DRM schemes

Changes are incorporated by Sony Corporation.

Change-Id: I414a165e22cc79be6ea7cd28041788aa2b6b8f7c
2010-10-04 22:14:53 +09:00
aimitakeshi
d074e30ce4 Initial contribution from Sony Corporation.
Add DRM Framework to support DRM content playback
  together with StageFright.

  - DRM Framework code is added
     - include/drm
     - drm
  - api/current.xml is updated to include DRM Framework Java APIs
  - cmds/servicemanager/service_manager.c is modified
    to add drmManager and drmIOService.

Change-Id: I6d7bc9c7067362b500e530988a9ce241761866fb
2010-09-01 15:40:00 +09:00