Commit Graph

37 Commits

Author SHA1 Message Date
Jeff Tinker
5d49bef800 openDecryptSession() should consistently return sp<DecryptHandle>
Test:run cts-dev --module CtsDrmTestCases -t android.drm.cts.DRMTest

bug:79378662
Change-Id: Id46e63e3e0faf76ec98a77d7d439e5ccbc85e20f
2018-10-05 15:58:26 -07:00
Chih-hung Hsieh
f64686f3b8 Merge "Fix misc-macro-parentheses warnings." am: 64d4f64af0
am: 5405ce02c4

* commit '5405ce02c45b55c0ba12fd3131ae329506e91f94':
  Fix misc-macro-parentheses warnings.

Change-Id: I94cd974549d819d7a43733636ecd4a6e464b76eb
2016-05-19 19:12:38 +00:00
Chih-Hung Hsieh
92c6b825ad Fix misc-macro-parentheses warnings.
Bug: 28705665
Change-Id: I1ad468741c6f117817099d2ba87374dce2b776a9
2016-05-17 15:20:14 -07:00
Jeff Tinker
2b7561f802 Update how drm file descriptors are passed through framework
bug: 26422357
Change-Id: I1df2d08d432c17c703823617ee10dc181a9b9df7
2016-04-01 09:21:52 -07:00
Jeff Tinker
2151d8f9ae am 78f7932d: am 7b642b08: am 0af50080: am 8ba28c84: am d61dbb36: am 38281f1c: am d386c5be: Merge "Fix heap data leak vulnerability" into klp-dev
* commit '78f7932ddd8fed44a8fb421fcbf31f4ec1a82713':
  Fix heap data leak vulnerability
2015-09-21 21:30:09 +00:00
Jeff Tinker
78f7932ddd am 7b642b08: am 0af50080: am 8ba28c84: am d61dbb36: am 38281f1c: am d386c5be: Merge "Fix heap data leak vulnerability" into klp-dev
* commit '7b642b085413ffd92caa07933b21bc00b55f9905':
  Fix heap data leak vulnerability
2015-09-21 21:06:45 +00:00
Jeff Tinker
09ed70fab1 Fix heap data leak vulnerability
bug: 23600291
Change-Id: I7979e9e25ada01c13775be8580d433a8b4ce4ffe
2015-09-14 13:55:23 -07:00
Jeff Tinker
b408fa26c7 Harden drmserver process against fuzzing attacks
bug: 19572107
Change-Id: I5ba0a434b016e8dc376f7d0eef5cf76b99ab50fd
2015-04-29 16:26:19 -07:00
Marco Nelissen
f888020c6e Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a

Conflicts:
	media/libmedia/IAudioFlinger.cpp
	media/libmedia/IMediaPlayer.cpp
	media/libstagefright/CameraSource.cpp
2014-11-17 10:05:07 -08:00
Marco Nelissen
06b46062d2 Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
2014-11-14 14:01:03 -08:00
Dan Albert
1260451932 Check for NULL before calling asBinder().
The old asBinder() checked if this == NULL, which is undefined behavior.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
2014-09-16 17:36:55 -07:00
Jeff Tinker
f355f18aa2 Remove obsolete drm manager code
bug: 9545965
Change-Id: Ia6e09efa826b1349d027045e782980daeb7d7596
2013-07-23 11:32:15 -07:00
Hung Nguyen
0bf43848ad Fixed memory leakage in the DRM framework
Change-Id: Ib1276bec6cafb4e94f8f13b52e50e4987765eec4
2013-01-24 15:42:42 -08:00
Gene Morgan
0abeaca9d1 Allow DRM client to pass the FD of an open file to the DRM server.
Part of CL https://googleplex-android-review.googlesource.com/#/c/222797/
This modifies the marshall/unmarshall of IDrmManagerService::
acquireDrmInfo() to watch for DrmInfoRequest tag "FileDescriptorKey".
If tag is present convert string to binary FD, then back to string
after passage through the interface's Binder.

Relevant bug reports:
bug: 6426185

Change-Id: I63748b7c986ca0a89613ed3f1c81f24cffb7a9b2
2012-09-20 11:52:33 -07:00
James Dong
bf5b3b29e3 Let getOriginalMimeType() take a fd passed from drm java applications
This patch enables the drm framework to avoid opening files directly.
As a result, the drm framework no longer needs the sdcard read permision.

o related-to-bug: 6426185

Change-Id: Ib176c35ef4b1a1a405e8e954f19a7985266f2510
2012-08-10 17:38:19 -07:00
Kei Takahashi
cba7b32d8f Add a new API on DRM Framework for streaming
In case of DRM streaming, decrypt session can start just after
receiving the header, and it doesn't need to wait for the entire
content. However, current API of DRM framework only accepts file
handle or URI. With this new API, DRM session can start
without waiting for the entire content.

Changes are made by SEMC and Sony.

Change-Id: I74375fe127df636067f1c300ea91654ba3d1aa3c
2012-05-23 14:44:06 -07:00
James Dong
9d2f386dd2 Separate sniffing from session initialization
This avoid lengthy/duplicate sniffing for drm plugins when a decrypt session is opened

o The change is backward compatibile in that no update is required
  for existing drm plug-ins if they do not plan to provide separate
  sniffer/extractor

related-to-bug: 5725548

Change-Id: I7fc4caf82d77472da4e2bc7b5d31060fb54fd84c
2012-01-12 16:25:12 -08:00
Steve Block
3856b090cd Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2011-10-26 09:57:54 +01:00
Gloria Wang
197f047db2 Fix ordering assumption of argument evaluation.
No specific order is specified in the C++ standard, but the order of
the calls to Parcel read commands matters.  Move any calls with multiple
reads to local variables.

Fix for bug 5103507.

Change-Id: Ic23ad50ec5f443146f00324b66d5e2bd5b9ffd0d
2011-08-01 10:52:49 -07:00
Gloria Wang
8f00151cbe 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
Gloria Wang
ab00df4d85 - Add two sanity checks.
- Remove one unnecessary line.
- Clear the extendedData vector in DecryptHandle.

Change-Id: I2610c6d68f12d48cb69323a5eb2ae4b3b3e44dff
2011-06-22 16:36:24 -07:00
Gloria Wang
c10ce33302 -Fix some typo
-Remove one unnecessary memory allocation

Change-Id: Icea21f33d2c7891333e06429d2f382389e5bd27f
2011-06-15 17:32:06 -07:00
Gloria Wang
0b500c2e81 am fc4c13be: am 01240177: am 3cc797b9: Merge "Add one more field in DecryptHandle to support bug 4126624" into honeycomb-mr1
* commit 'fc4c13be8ce8c2d05432d855c2c61548abef3385':
  Add one more field in DecryptHandle to support bug 4126624
2011-03-22 11:43:09 -07:00
Gloria Wang
6b2a35bbec Add one more field in DecryptHandle to support bug 4126624
Change-Id: Ic7ea5fd211c4f8283de8fdf722f89b6a94e5750b
2011-03-21 19:08:18 -07:00
Gloria Wang
4dabc20fa2 do not merge: Cherry pick change I6529695c from master to partially fix bug 4126624.
Change-Id: If724de60bd6da1becdffc815d5358ffe78629469
2011-03-21 16:53:14 -07:00
Gloria Wang
1da9aa6060 Fix for 4084554.
DRM framework support for enabling/disabling copy control settings from a DRM plugin

Change-Id: I6529695cc4adbab2b9a63708bb459e3b77e07564
2011-03-21 13:50:04 -07:00
Gloria Wang
b5ce361d19 Fix for bug 3477330
This patch fixs a crash bug caused by using a NULL DecryptHandle pointer.
Fix by using sp<DecryptHandle> instead.

Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
2011-03-10 16:20:48 -08:00
Gloria Wang
6b610a3d31 - Change level of some LOGs from LOGE to LOGV because those logs
are not error logs from non-DRMed content's point of view.
- Add more mutex lock to avoid crash by multi-thread calls.
- Fix for bug 4050039

Change-Id: I52fed22069f0cda6c4ac6a5363469168c797a33b
2011-03-09 15:51:46 -08:00
Gloria Wang
2ed8a921ef More fix for 64 bit offset.
Change-Id: Ia05060113ca0f43a4362914dc99c89c89e30eb4a
2011-01-19 15:38:16 -08:00
Gloria Wang
6dc4726e7f am 24a90c26: am d9334934: Merge "Update of DRM Framework."
* commit '24a90c2674270fee0783bafa54fd5d845bdf0c18':
  Update of DRM Framework.
2010-11-22 21:29:08 -08:00
Gloria Wang
a2cd44cb50 64-bit file size/offset support for DRM framework
Change-Id: I0ba7147607825234df9fa28732e1bba344e82e79
2010-11-19 15:52:32 -08:00
Takeshi Aimi
3473846f64 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
Gloria Wang
b251f75d5c resolved conflicts for merge of a8d7b747 to master
Change-Id: I8a4b72c9f9a10de8bbc285e00e2dd5cb9f498349
2010-11-03 11:39:04 -07:00
Gloria Wang
5a6d148790 Disable some logs
Change-Id: I05fcf6869916504367814fd2abd2b1af88619f5b
2010-11-02 15:09:43 -07:00
Takeshi Aimi
e943f84129 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
2272ee27d9 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
27ed8ad2db 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