Fix for native leaks in YuvToJpegEncoder.cpp

Objects allocated by Get<object>ArrayElements function,
should be released. Add a fix to release this objects
in error cases.

Change-Id: Idf834523d93bb2dfd6b872e3b2179b7f1bba38f3
Cast CallVoidMethod's size_t parameters to jint

offset and size variables are passed to set method
of MediaCodec.BufferInfo java class. The corresponding
actual parameters of set method are of int type in java.

These variables are expected to fit in jint as they
indicate the offset and size of data in a media codec
buffer.

The variables are cast to jint, prior to passing to
java method, to avoid problems caused by automatic
type promotion of parameters when passed to a
variadic function, CallVoidMethod.

Change-Id: I39e202306f1b7122448c947f6d275f00251bb33a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
NULL previous background bitmap upon changing wallpaper

Step to reproduce it on Nexus 10 with 4.4.2(KOT49H):
1. Long press on home screen.
2. Choose wallpaper from Wallpapers.
3. Select new wallpaper and set it.
4. Repeat step 1-3 several times.
See black background instead of the wallpaper.

There are two binder objects who hold reference to the
ImageWallpaper$DrawableEngine, which keeps the big chunk
bitmap from being recycled.
One is WallpaperService$IWallpaperEngineWrapper. The client
references went away slowly, maybe several minutes after
changing wallpaper. Then the finalizer has to been executed
to GC it.
The other one is WallpaperService$Engine$BaseIWindow. Don't
know who still held reference to it even after the window
was removed.
Anyway, let the bitmap be GCed first.

Change-Id: I27f6971a3edd26472b69e59b542b27fd7c8e7b90
Signed-off-by: jshe32X<jianchunx.shen@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
MetadataRetriever: Check null pointer to avoid tombstone crash.

When the app's vm-heap is not enough, memory allocation for big
object like bitmap may failed.

This patch add protection for bitmap creating to avoid segment
fault error in the following GetIntField function.

Change-Id: I63977dc602f4ed395afd11004a0ed027173fb685
Signed-off-by: wang, biao <biao.wang@intel.com>
Signed-off-by: TingX Li <tingx.li@intel.com>
Signed-off-by: Wang LiangX <liangx.wang@intel.com>
Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::isTrustedOverlay()

This fixes a bug where a View with filterTouchesWhenObscured will have
all touches filtered when in magnification accessibility mode. This is
due to magnification being a separate Window over top of the running
Activity. The method onFilterTouchEventForSecurity in View will then
always return false when filterTouchesWhenObscured is enabled on the
View. By adding the magnification Window to the list of Trusted Overlays
we can ensure that touches will work properly with this property enabled.

Change-Id: I07706588a625682d05da5cb19f401139eb08a54c
Use Runtime.gc instead of System.gc for DDMS.

System.gc doesn't always do a GC unless to attempt to run the
finalizers after you call System.gc.

Bug: 14325353
Change-Id: Iebed7fad5576d610cea13a86e7d3d46652c67478
Merge "Use Runtime.gc instead of System.gc for DDMS."
Track libcore.os' move to android.system.

(This is partial, but should cover everything in AOSP master except
for the zygote.)

Change-Id: I1042c99245765746a744c44e714095cb2c6cb75d
Merge "Track libcore.os' move to android.system."
Fix build.

Change-Id: I0bd6e1aac19276bf664accd8d38f86d2cc7450cc
Merge "Fix build."
Move the Zygote off libcore.os and onto android.system.

Change-Id: Iaa20e50b05fad355bdf15bcfdc58efc9941c400c
Merge "Move the Zygote off libcore.os and onto android.system."
Remove unused import.

Change-Id: I3f6a035cda55859a7a521f3117da72ee962beb63
Merge "Remove unused import."
Fix two zygote imports.

Change-Id: I5eea2d9f48479c33e1594aaa259274e5e787a1df
Merge "Fix two zygote imports."
Add missing character combinations for international layouts

Czech: add missing capslock for numbers and shift+ralt
mappings.
Slovak: fix wrong ralt mappings, add missing ralt mappings
and fixed wrong PLUS key character.
US intl: add missing capslock+ralt support.
Swiss French and Swiss German: add missing ralt mapping for key
numbers 4 and 5, and add missing capslock and capslock+
shift for SEMICOLON and APOSTROPHE.

Change-Id: I02c94bf13d5268d5d1e648c96b7251cb7564f233
Signed-off-by: Olivier Gay <ogay@logitech.com>
Signed-off-by: Manuel Carthoblaz <mcarthob@logitech.com>
Signed-off-by: Mathieu Meisser <mmeisser@logitech.com>
DO NOT MERGE Add invokeFunctor stub

Change-Id: Ib7637d68c4f63065b909075a8f5d8cd1dd0674bd
Merge "DO NOT MERGE Add invokeFunctor stub"