Commit Graph

22 Commits

Author SHA1 Message Date
Robert Shih
7bcf792dd8 DrmManager: locally aggregate API metrics
Aggregate DrmManager API invocation counts per plugin over at least
fixed period of time before sending metrics to mediametrics service.

The default period is 1 day; the period is configurable through the
property drmmanager.metrics.period.

Bug: 134789967
Test: dumpsys media.metrics
Change-Id: I2cf28f1dfaa485ca319360705b872eed995b3d7f
2020-02-19 06:20:14 +00:00
Steven Moreland
1a394d593e drmserver: use getCallingSid
Bug: 121035042
Test: `atest android.drm.cts`
    CtsDrmTestCases: Passed: 43, Failed: 0
Change-Id: Ia85f437da29821d08dd585f87ac096de5f85b980
2019-01-16 20:46:05 +00:00
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
Andy Hung
07b745e166 Add memory heap checks for mediaserver and audioserver
Memory heap check updated and restored to mediaserver,
added as new option to audioserver.

Requires properties to be set (example for audioserver):

$ adb shell setprop libc.debug.malloc.program audioserver
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell pkill audioserver

...

and to dump:

$ adb shell dumpsys media.audio_flinger -m

Bug: 28909124
Bug: 27500825
Change-Id: Ifa8c2c02b022daf1a799ee4a1d75282a3c921763
2016-05-23 16:55:08 -07:00
Aurimas Liutikas
c903684e9a Fix the last warnings in frameworks/av/ drm code.
- index is always positive so no need to check > 0
- args parameters are unused.

Bug: 27151704
Change-Id: Ia4c23e1fc4eaef47f38526574b35ccfea9c92177
2016-02-19 14:33:08 -08:00
Riley Spahn
f785f49756 Add SELinux MAC to DrmManagerService.
Add SELinux checks on all interfaces exposed by the
DrmManagerService.

Change-Id: Ib170d3229d88781b76e5fc1c557c8fed233df5d1
2014-07-25 13:25:51 -07:00
Jeff Tinker
6868e98604 Fix Externally reported security issue
bug: 12724697
Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
2014-07-11 09:18:11 -07:00
Jeff Tinker
f355f18aa2 Remove obsolete drm manager code
bug: 9545965
Change-Id: Ia6e09efa826b1349d027045e782980daeb7d7596
2013-07-23 11:32:15 -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
Andreas Huber
1608735ef4 Support widevine:// URLs in NuMediaExtractor / java MediaExtractor.
Allow anyone to talk to drm services.

Change-Id: I5c2f3c419d01de30c3d6e2bc85b1fe5c9c37b392
related-to-bug: 6276111
2012-04-17 11:22:11 -07:00
James Dong
328745b130 Added permission check for all sensitive drm API calls
o all drm calls using a DecryptHandle now check the permission before proceeding

Change-Id: Ic992a991357876c6e4bfbfab4f5eec1fa0634a13
2012-02-28 18:50:44 -08: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
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
James Dong
8635b7b095 Add memory leak tracking/debugging code to drm server
bug - 4099038

Change-Id: I6c048eaf3d7f34bc144b8daaa5fdef1ed474af66
2011-03-14 18:48:19 -07: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
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