Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.
(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)
Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
The main bug was that the AutoJavaFloatArray autoSrc was not passing in
read only. This meant that the destructor overwrote the data which
the autoDst AutoJavaFloatArray had written in it's destructor.
This case only happened if src == dest and the arrays were copies.
Also improved performance by passing in read only a few other places.
Bug: 12570144
Change-Id: Idc8764087dc165433c584b87a0f9d4ed0ec795e8
This is going to be used by pagecycler tests.
Bug: b/10629847
(cherry picked from commit 54daaf1cffddad6366fac2ccfceb1e042dd8e90e)
Change-Id: Ie16a94baa15f868d60f3837290dcc8045aea31a9
Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.
Bug: 12640283
Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
It is not possible to send a broadcast before the system
boot is completed. If you do it anyway you will get an
IllegalStateException: Cannot broadcast before boot completed.
If a memory card is inserted or removed while the phone is
booting up, there is a risk that the MountService will try to
broadcast a storage intent too early, and cause the device
to crash.
Use FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to avoid
problems with too early broadcasts.
Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
mBitmap and mTexture is not initialized to NULL which causes
illegal address access when it fails to be created from
oversized bitmap.
Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c
mmap returns MAP_FAILED on failures, not 0 (NULL).
Also, convert some C style casts to C++ since they
make intent clearer.
Change-Id: I367993c73e9ee576f11ebe76e530d2c2f27c662d
* changes:
AArch64: Use long for pointers in BitmapRegionDecoder
AArch64: Use long for pointers in Movie class
AArch64: Add AssetInputStream.getNativeAsset
For storing pointers, long is used in speech/srec classes,
as native pointers can be 64-bit.
Note corresponding JNI files are in the external/srec project
under srec_jni directory.
Change-Id: Iacd10840e81f5acc3eb202424f83b49ae4eb23ab
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
For storing pointers, long is used in BitmapRegionDecoder
class, 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)
In addition, Graphics.cpp has been changed to work
with modified BitmapRegionDecoder.
Change-Id: Id54087dd3bfb29577e8b762e70946793369dc701
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
For storing pointers, long is used in Movie class,
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: I946325e4af6cb9282012bebdaee89e1117d8797b
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
This patch adds AssetInputStream.getNativeAsset. This function
returns asset pointer, which can then be passed to JNI functions.
Note that this function is hidden and not part of Android API.
This function will eventually replace getAssetInt,
once all the classes that use getAssetInt are changed
to use getNativeAsset instead.
Change-Id: I2a2b2e6864f1f57ae2b3a10c45559b3635266ed5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
For storing pointers, long is used in media 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: Idc4ca0124d03df7f9cef412488abafd020e5e774
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
It returns a pointer to a private data structure, so there's
no sensible use for it. Also, the emergence of 64 bit processors
means that the return value isn't wide enough to represent
values in the native heap.
(cherry picked from commit f8f09a15a409f373f22aa475bb0defd264088e4f)
Change-Id: I9c9b5bae6db8638e65dda60f924aa3dddd06813a