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
Prevent MediaScanner infinite loop with invalid path

including double slash  "/storage/sdcard0/xx//xxx/xxxx"

Change-Id: I112a70c88b5ec662482b79c3151310b9b9b52e40
Memory leak: parseObbFile.footer

Change-Id: Ia9e005e63fad7ab364f6c2c80cb98ec98f89b470
Signed-off-by: You Kim <you.kim72@gmail.com>
fix possible buffer overrun and memory leak

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

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
telephony: Add same named operator configuration for some operators

Add same named operator configuration for 404, 405, and 520.
That is, show roaming icon though same named operators.

Bug: 12121959
Change-Id: I9148bab727170f670fd2679db69b123b0526bb32
CompoundButton: Let text can be changed by config

Because CompoundButton freezes text inside onSaveInstanceState, the text
can't be changed automatically after locale of device changed.
Bug from such a case reported via url below:
https://code.google.com/p/android/issues/detail?id=24013

It would be better to don't freeze text for default case and let users
to freeze text if they need manually.

Change-Id: I2d6a192b6ff05a95b21487c2362cbc14691c68cf
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Re-initialize error after attach

If flag for error after attach is not reinitialized, it may cause
NullPointerException on subsequent onAttachedWindow if error text
was reset to null.

Change-Id: I8976c28a6ca71017e5c4b3f29d4eeeb2eda48c38
Keyguard: smooth background change derp fixes

no idea how this could happened. Cleanup, fixes and updates (thanks kyril)

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Revert "SystemUI: update internal state right after hiding transient bars."

This reverts commit 0494668f6e4be73762271be87d1986f34d873bec.

Change-Id: Ic54a4ea259bb1fe691bd4986b8a9e53e005f050a
PhoneStatusBar: fix massive surface redraws due of animation race

the wifi/carrier label is animated from AOSP via an alpha animation. Problem
is that we quiet often call this on other animations and this will end in a
animation loop which forces massive surface redraws. Whatever to avoid this
do it like for notification shortcuts and set directly the alpha value which
look so or so better in the whole animation.

As well a small code cleanup

Change-Id: If620db28d9c38ce3adeeef59fdf65c6394d45f11
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Framework: Minimum Vibration Duration (1/2)

PS2: String description
PS3: Derp spacing
PS4: Derp hiding.

Change-Id: I4f2d4cce90a87016d0c02e67f1566e38dfbc7c37
StatusBarWindow: Fix collapse using Back button

Implements the missing dispatchWindowFocusChanged method to allow the StatusBarWindow (Notification/QuickSettings) to collapse when the user presses the back hardware key.

Change-Id: Id77955d6286d83ddf5e0e05779446c2e978ff4de
UsbDebuggingManager: Fix multiple NPEs toggling USB debugging

Change-Id: I7ac039fe51a32d35ef00eaa71accb85cd57d4d8a
Signed-off-by: atl4ntis <atl4ntis@gmail.com>
Don't rely on gcc extensions

Variable-length arrays of non-POD data types are a gcc extension
not currently supported by clang.

Change-Id: I9cd1aed742ac70e642771ff455582727fbafaec2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Fix memory leak in PatchCache

Patch object should be deleted when removing its corresponding
cache entry from PatchCache.

Change-Id: I8dfd7f557f6e5c6e9a9c04ba915372790e6f34f5
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Add explicit close of Scanner input

The UsbDeviceManager is using a Scanner to identify
the ALSA card/device numbers to use for USB Gadget
audio, with a FileInputStream as its input.

Since FileInputStream implements the Closeable interface
it provides a close() method that should be explictly
called in order to close the stream source and release
any system resources that it might hold.

Change-Id: Ia0ff86d1f3cdf8916becec9c8603915dcbf4d2c8
fb: fix multiuser bug in vibrator service

This value can be used by a 3rd party application. This would
result in a crash like it is now. Assign the correct userid
category to resolve that

Change-Id: Id42780ffe2f10f89788af4af0b887142de79fa34
SystemUI: add permission.CHANGE_NETWORK_STATE.

Fix:

E/AndroidRuntime( 7432): java.lang.SecurityException:
ConnectivityService: Neither user 10007 nor current process has
android.permission.CHANGE_NETWORK_STATE.

Change-Id: I9e1b097b16a47a41e97ebb8c7dfd32b0778f1490
Add Long-Click to Preference Tile

This will open the add tile activity like it was before in JB

Change-Id: Id1ac8f0fd18f7f2dffca56e7edf857536142a6ce
fix remaining blue dialog dividers

Change-Id: I0b4d2d0706f3393933e40d9c70b62aa3c9b68ed5