See build/soong/README.md for more information.
Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
Start using ArrayUtils.throwsIfOutOfBounds instead. The Arrays method
is going to be removed.
Bug: 78447530
Test: cts-tradefed run cts-dev -m CtsOsTestCases (shows only unrelated failures: two user/userdebug mismatches and one from b/79471510)
Test: cts-tradefed run cts-dev -m CtsDrmTestCases
Test: adb shell am instrument -w -e class android.content.pm.LimitedLengthInputStreamTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e class android.os.FileBridgeTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ib3cd4f4ead61dbec1ccdc94b2ad4ad9c28574582
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
Fixes: 62304559
Test: the code compiles which mean polymorphism works. No additional
tests necessary
Change-Id: I3d366f12c1f176213979da6b050957bc2adb2938
CloseGuard instances are allocated in constructors and usually
assigned to final fields. This implies they're non-null in finalizers
except in the case where the constructor throws. We add a null check
to make sure we can continue cleaning up other state in the finalizer
(if applicable).
Also, this change decouples closeguard warnings in constructors
from other state based logic. This because the logic there is usually
duplicated with the call to close().
NOTE: This change is not a "complete" fix. Many of these finalizers
are broken in the case where <init> throws. The only objective of
this change is to make such errors more obvious.
Note that some of these classes don't have CTS tests.
Test: make, CtsMediaTestCases.
Bug: 35609098
Change-Id: I24d9e0215f80e44914dba8ab99b6312fd6ed1fc0
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