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
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
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
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
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
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
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
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
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
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
* commit '3f6a7d1ee961a4544563932b7499535dc1cac1ec':
Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix." This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
1. Revert "Fix drm flag setting missed in false drm recognition fix."
This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
2. Revert "Fixed the false drm recognition."
This reverts commit aadbd80b307c817698ce5110ff8e002804d1b230.
3. Revert "Fix drm enumeration order, resolves failure to play forward lock ringtones"
This reverts commit a5cbf023e349f2394ba6fc58d73b4375cfec4369.
4. Revert "Fix ANRs due to Widevine DRM plugin sniff taking too long."
This reverts commit d0d19db1ca1c289b069db33f4665bcb9386064e9.
As a result of the reverting, many ANRs from WV sniffing are back.
related-to-bug: 5739618