146 Commits

Author SHA1 Message Date
Andreas Gampe
318365e869 Frameworks/base: Wall Werror in drm
Turn on -Wall -Werror in drm/jni. Fix warnings.

Change-Id: If24fec45fbb737af593ddadfa473548dfa583e0b
2014-11-10 17:23:02 -08:00
Adam Lesinski
3cfe720a0d am 5fed49f7: am 4d9fcae2: Merge "Allow for a NoOp implementation of DrmManagerClientImpl" into klp-modular-dev
* commit '5fed49f7d614ae9e83db04703484b31c8077b78c':
  Allow for a NoOp implementation of DrmManagerClientImpl
2014-06-10 01:30:05 +00:00
Adam Lesinski
510ef1b537 Allow for a NoOp implementation of DrmManagerClientImpl
Change-Id: I150b95790d5e6d3c0160637149f18f2194318de8
2014-06-04 15:05:56 -07:00
Elliott Hughes
c1858228df Fix a few more stray libcore.io references.
Change-Id: Id328544bd3a382fec16507d0ae5b699fef44ebd7
2014-04-28 20:49:24 -07:00
Elliott Hughes
f97c63350a Move internal libcore.os users over to android.system.
Change-Id: I84e1ace19ba3b4e58d7bb24f3ecda1bdf5dc75a5
2014-04-28 16:38:43 -07:00
Jeff Sharkey
ebf8ad5d91 Update DrmOutputStream to use raw FileDescriptor.
This allows DownloadManager to use FDs, paving the way for downloading
directly to content:// Uris.

Also return flag indicating if deleteOlderFiles() actually deleted
anything.  Update tests to verify.

Bug: 5287571
Change-Id: I2579e5e2113f31b2860d7b021bd61c91b6310963
2014-02-06 09:47:38 -08:00
Narayan Kamath
38885b63fc am 38638b2f: am eaae9906: am 672f3ee3: am 95ba1eb6: am dd6de16a: Merge "AArch64: Use long for pointers in DRM classes"
* commit '38638b2fcc4aba428889d521d83762d716e32332':
  AArch64: Use long for pointers in DRM classes
2014-01-29 12:50:09 +00:00
Ashok Bhat
33d603877a AArch64: Use long for pointers in DRM classes
For storing pointers, long is used in DRM classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: I101b0ea19ed93651c6ad1a9fa55e14e8be117469
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-01-17 14:38:25 +00:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Jeff Tinker
490dd056bd Revert "Enhancement for OnInfo callback on DRM Framework"
This reverts commit 6fd97b7d93c5eeaefb2695786b35d1672c88b0cf.

Fixes Fatal signal 6 (SIGABRT)" when playing or downloading a video
bug: 10542864

Change-Id: I85b84d6b602079571be1a7237c907716db9cdf54
2013-09-03 10:13:17 -07:00
Takeshi Aimi
6fd97b7d93 Enhancement for OnInfo callback on DRM Framework
In DRM framework, plugins can transmit DrmInfoEvent to Java layer.
Although DrmInfoEvent has several entries, current implementation
can only convey integer and String. This change enables plugins
uto propagate a hashmap to Java layer. The hashmap can have
one or more Strings and one byte array as value.

Changes are made by Sony Corporation.

bug: 10459159

Change-Id: I5f2bfb43b676863ef4d220fd4ef1e48777e92752
(cherry picked from commit 84a5b5cab40711e20ba70c5ed4dfeab6b558b53b)
2013-08-23 18:02:40 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jeff Sharkey
7ccc90955f Move stream creation outside of DrmOutputStream.
More closely matches the object ownership pattern used by other
stream APIs. Callers must now explicitly finish(). Also fixes
write(int) bug by switching to Streams API.

Change-Id: I64f9c5887ef02496b1ce4e97ce6af5dad93b4be2
2012-12-17 17:04:16 -08:00
Jeff Sharkey
f67c8a9685 Move DRM to CloseGuard, add DrmOutputStream.
Switch DrmManagerClient to using CloseGuard to better track leaked
resources.  Add DrmOutputStream which applies DRM transformation as
data is written, similar to FilterOutputStream.  Also writes DRM
headers before closing.

Change-Id: Ic106a3e6f6ff666e4dda484fbd234a0849eec8c0
2012-12-13 13:51:40 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
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
0113855087 Fix an issue where the message queue fails to queue in the looper threads because they are not created.
o related-to-bug: 6293875

Change-Id: I03dbb2782bd90f88d1f8df086b8a529730afe5dc
2012-05-07 14:49:00 -07:00
James Dong
ba4d043331 frameworks base Android.mk file changes
Change-Id: I7459b9e959a60751b8fa6e0d893cb2c820c064ce
2012-03-28 11:03:25 -07:00
James Dong
d927a1d996 Deleted the media, camera, drm related files since they are relocated
Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
2012-03-28 10:42:44 -07:00
James Dong
89ea4ca9c2 Merge "make sure that lower-case mime and file suffix is used to check against the supported ones" 2012-03-14 10:43:22 -07:00
James Dong
8e3fac28a0 Merge "Fixed a buffer overflow bug in DrmPassthruPlugin" 2012-03-14 10:43:18 -07:00
James Dong
32d8fc8d6d Fixed a buffer overflow bug in DrmPassthruPlugin
Change-Id: I8df2a90409c9266a094a1a0904a5ff76ec483d16
2012-03-13 19:23:23 -07:00
James Dong
c3259471c6 Turned off log spamming from DrmPassthruPlugin
Change-Id: I2cecdba49cf044d2aafd8aa404d27df311cad401
2012-03-13 18:54:16 -07:00
James Dong
29cdbc80bb make sure that lower-case mime and file suffix is used to check against the supported ones
Change-Id: I6a20832f6a2dfb8554dbddef0dee87cc21c05c80
2012-03-13 14:54:02 -07:00
James Dong
1a22cbd113 Merge "Avoid checking supported mime types or file suffixes in multiple places" 2012-03-12 10:33:38 -07:00
James Dong
4f1ed0e84e Avoid checking supported mime types or file suffixes in multiple places
Change-Id: I47d24070c7bda385cd1d7fa1f6a75dbb1f82b476
2012-03-09 17:44:11 -08:00
James Dong
862339039a Added an failure log message when the fwdlock engine fails to open a given file.
Change-Id: I0e7f60b61f03fde046fc1ad668b28cdee635898b
2012-03-09 13:21:31 -08: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
James Dong
e43dadffb8 Merge "Fixes to DrmConvertedStatus, DrmInfoStatus, and DrmSupportInfo classes" 2012-03-02 11:01:27 -08:00
Jean-Baptiste Queru
7edb9a9490 am f73222a3: am 964955e0: am 8a9b14d8: am 5aeb8587: Merge "DRM framwork bug fix: add an API to release resources"
* commit 'f73222a39e0fa294d9105fd7464943aed6e77cd7':
  DRM framwork bug fix: add an API to release resources
2012-03-01 15:35:39 -08:00
James Dong
52cb1e5988 Fixes to DrmConvertedStatus, DrmInfoStatus, and DrmSupportInfo classes
o added missing javadoc comment for some public fields
o added checks for arguments
o DrmSupportInfo should have not been exposed as public.
  A default package access modifier appears to be more proper but we may
  not be able to change the modifier.

Change-Id: I5b284c17219c5121f241ee2934fb3e859ce7c827
2012-03-01 12:23:46 -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
James Dong
5df6280557 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
2f16d7eae1 Merge "Fix API issues in DrmRights class." 2012-02-28 14:34:02 -08:00
James Dong
e512ad5089 Merge "Deprecate default constructor for classes that should have been meant to be interfaces" 2012-02-28 14:33:19 -08:00
James Dong
31db8b9f6b Merge "Remove unnecessary header file includes for drmserver" 2012-02-28 13:09:44 -08:00
James Dong
da5ac93b00 Merge "Added missing javadoc comment for public API in DrmUtils class" 2012-02-28 13:09:24 -08:00
James Dong
f7a68fc985 Added missing javadoc comment for public API in DrmUtils class
o also fixed mis-spelled private method name (quiteDispose => quietlyDispose)

Change-Id: I692cd7471eac547b849dd53853f60843b3915750
2012-02-27 22:46:02 -08:00
James Dong
a3a9d6e746 Remove unnecessary header file includes for drmserver
Change-Id: I14033861e74d20f9d4897b651c4eeee126d4d610
2012-02-27 22:26:48 -08:00
James Dong
5cb68c86cc Fix API issues in DrmRights class.
o account id and subscription id are not mandatory, and thus can be anything
  such as null or an empty string.
o removed unnecessary or thus inconsistent checks for account id and subscription id
o updated the javadoc to specify that mimeType could not be null or an empty string.

Change-Id: I704f1dd7fc5d33060da908aae0469d560c7db036
2012-02-27 18:34:04 -08:00
James Dong
c4a9976aa1 Deprecated a mis-spelled method and replaced it with a new method
Change-Id: Id049a4effab120c3f837cde60a87efcd89a64ec6
2012-02-27 18:25:31 -08:00
James Dong
060526f985 Deprecate default constructor for classes that should have been meant to be interfaces
o We should have not exposed these default constructors in the first place.

Change-Id: Ia8bcfe77e9730021ad8870ece67c6d0eed8146ad
2012-02-27 18:00:12 -08:00
James Dong
b7956de3a9 Merge "Improved comment about DrmStore.ConstraintsColumns" 2012-02-24 16:36:34 -08:00
James Dong
e82f055e3e Only allow valid types to be used in DrmErrorEvent and DrmInfoEvent
o This patch will prevent applications from abusing the API by using
  arbitrary int value for DrmErrorEvent or DrmInfoEvent types.
o We should have not defined some type constants in the super/base
  class, DrmEvent.

Change-Id: Id0bb12caa8ce471cb6951cc2b5d37ea408f90063
2012-02-24 15:50:41 -08:00
James Dong
365ce1db33 Improved comment about DrmStore.ConstraintsColumns
Change-Id: I89c588759dd409ac0252d686af12bfe4e105f3d5
2012-02-23 10:58:55 -08:00
James Dong
6c95d4ff16 Added checks for illegal arguments
Change-Id: Ib386c33b7e2cab12cabbb9dc023d54df05472960
2012-02-15 11:30:51 -08:00