The JNI buffer in ImageReader_imageSetup is not released when
it fails to acquire graphics buffer. After all JNI buffers are
exhausted, ACQUIRE_MAX_IMAGES will be returned and leads to
error. The JNI buffer should be released when it fails to acquire
graphics buffer.
Change-Id: I3319a58ac44e36c8593b404672a685c4b589a735
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
Only one entry is allowed to be added to route table 60 for all
interface ipv6 link local addresses, so skip ipv6 link local
addresses on all interfaces when enabling NAT
Change-Id: Ibbe6c2bdae83586cdd38287089715f3433bbb91f
Signed-off-by: jiaguo <jiaguo@marvell.com>
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
setLightLocked() will update mColor. This will cause the led to not be
turned off after the pulse.
When notificationManager starts a attention pulse the led will be kept
on. Since attention is of highest prio nothing can turn it off.
This is fixed by resetting mColor back to 0 after the call.
Change-Id: Id60ef96e5c21b47c23002f0bcf2fae7fb3f2ca10
This is going to be used by pagecycler tests.
Bug: b/10629847
(cherry picked from commit 54daaf1cffddad6366fac2ccfceb1e042dd8e90e)
Change-Id: Ie16a94baa15f868d60f3837290dcc8045aea31a9
Changes include
[x] Long is used to store native pointers
[x] Added new method obtain(long obj) to Parcel. Binder
uses this method instead of obtain(int obj).
[x] obtain(int) has been changed to throw unsupported
operation exception.
Change-Id: I408e0f2a24deb28c9277d86670653a51eb314266
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
For positioning of glyphs within a bitmap, roundf(int + float) is used,
where the float is the glyph position and the int is the text position.
When the text position is varied, this may lead to the sum being rounded
in different directions, due to floating point rounding, caused by that
floating point numbers have different precision in different ranges.
This may therefore lead to slightly different positioning for glyphs and
therefore slightly different widths and heights for text strings,
depending on the position they are rendered at.
The solution in this patch is to use int + (int) roundf(float), which
has consistent rounding, and also enables us to use the full range of
ints.
Change-Id: Id1143cdfcbdfa9915ced878ae04df589a3e03cee
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
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>
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
For storing pointers, long is used in
android/graphics/Interpolator 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: I1e181476a4fe5273ff190cf34c4a7487aa1aecf4
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>
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
Long is used in SurfaceTexture class to store
pointers 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: I771aa62c42bc865e644c63fd48f309782dd03e73
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* 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>