libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.
Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
frameworks/base/core/jni/android_text_StaticLayout.cpp does actually use
ScopedIcuLocale, so I've left that for now.
Change-Id: I6458cd133871281a747a9da2e304da10b445051a
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.
This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage. Older release()
methods are deprecated in favor of close().
Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation. Switch
MediaScanner and friends to use public API instead of raw AIDL calls.
Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
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
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>
This reverts commit 6fd97b7d93c5eeaefb2695786b35d1672c88b0cf.
Fixes Fatal signal 6 (SIGABRT)" when playing or downloading a video
bug: 10542864
Change-Id: I85b84d6b602079571be1a7237c907716db9cdf54
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)
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