fix possible buffer overrun and memory leak

Use snprintf instead of sprintf and fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
Fix a variety of small publicly-reported bugs.

Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a

Conflicts:
	libs/androidfw/AssetManager.cpp

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
Remove duplicate code in Editor.java

Eliminate duplicates by calling resumeBlink()/suspendBlink().

Change-Id: Ia19ae1bf1a5c981700aa20be67ed9d557e2bfc56
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Memory leak: parseObbFile.footer

Change-Id: Ia9e005e63fad7ab364f6c2c80cb98ec98f89b470
Signed-off-by: You Kim <you.kim72@gmail.com>
Revert "Mokee frameworks"

This reverts commit df3e3ead2e80160800dbe6a586ec3f0a32f55ba2.
Delete media tests

Media files take up a lot of spce. Deleting them cuts the size of frameworks
almost in half.

Change-Id: I3fd1019df8b41404909b7b4df8ad709526ceff36
Signed-off-by: Evan Anderson <evan1124@gmail.com>

Conflicts:
	media/tests/contents/media_api/goldenThumbnail.png
	media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay1.png
	media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay2.png
	media/tests/contents/media_api/videoeditor/IMG_640x480.png
	media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay1.png
	media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay2.png
allow wallpaper cropper to read sdcard

Signed-off-by: ChampionSwimmer <championswimmer@aokp.co>
Active Display: Add some synchronization

Change-Id: I713ab506307efed10f1e1045f0fc2f975fba91cc

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Active Display: Sort notifications by newest to oldest

Change-Id: I08aad7743b9c2f793d48266d7e6f648a78432d78

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Fix Derp
ExpandedTile : Add long press action to switch mode (statusbar hide or not)