Fix incorrect usage of bool

A bool can't be < 0

Change-Id: Ie94ffadcb38c95214d1105c02610e59b4b2872b2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
(cherry picked from commit f821754a74b9052e0353e543c1db2bf79f36d0c3)
Fix check for PROC_QUOTES mode

Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check
is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code
intends.

Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
(cherry picked from commit 22bc13c851e88fbfbe4d5ed3c25504c82013546e)
Use fabsf() rather than abs()

abs() operates on integers -- to check floats accurately, fabsf
should be used.

Change-Id: I1a4e85f8f5e0d08ff38d307c5c31e2b6783ab7af
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
(cherry picked from commit fcf38973e5fbaa73d3fca39603a5ae2c1ac2e92c)
Use standard initializers

Use standard initializers rather than GNU extension initializers to
prevent clang from spewing warnings about nonstandard code.

BUG: 18193625

Change-Id: I19bf7fe9c401534af82d5a08e68fbd486bec8351
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
(cherry picked from commit 50830e1f2acb3ae3f14775e7f8ab29fc63d4c630)
Default icon is shown after uninstalling updated priv-app

If updated pre-installed app is moved from "/system/app" to
"/system/priv-app" at FOTA, PackageManager does not update its
resource path correctly. This patch fixes it.

Change-Id: Iac793bcb8fd7c5bfbafd1876640b534c6da5dddf
(cherry picked from commit 33cfc3d14c41588e33958e6872d06bbbcf024fc6)
Prevent resource leak in YuvToJpegEncoder

SkWStream is never deleted before going out of scope

Change-Id: Ifdb75c18336d095b012e73b64281ec6c2fc5c3fe
(cherry picked from commit cec840b0c55f9d7a2e9f557eea714b8928cfa6c5)
Skip receiver if failed linkToDeath to ILocationListener

linkToDeath may failed when app was dead immediately after
starting the call to requestLocationUpdates in Location
service. If receiver still record in maps, an exception
will occurred when try to remove receiver's update because
unlinkToDeath will failed.

Change-Id: Id9b00da3b17c1371d61ab4644a70cf9ee934cdcc
(cherry picked from commit 36e788555c6697da1ccec0346edfcfeb117e0fd4)
Frameworks/base: Fix AssetManager JNI

Register the right method.

Change-Id: Ib5f5c531b4c5863eed04fe3b13f8c2662055fa5e
(cherry picked from commit 51545835c67097ca02edb35da51d458921f41f57)
Frameworks/base: Fix FingerprintManager JNI

Register the right method.

Change-Id: I0806c2fa8f29ddef75caaf94092f72e644ae6d06
(cherry picked from commit b8ada90339910380c7e24e4077b8a2074261487f)
Frameworks/base: Right transform in DngCreator

Use the right calibrationTransform.

Change-Id: Ibc633ff1e02d1e48a27ae2a72585d3de2222a2c1
(cherry picked from commit c12dad23a9e41cd498b22e4c64f1b2e574dedf3b)
Frameworks/base: Wall Werror in native/android

Turn on -Wall -Werror in native/android.

Change-Id: I28bab9ebd2fe3f6935878816773a04531e26450f
(cherry picked from commit aba48bbf2b556a3f6425bcaa536bfb8cb981b8e4)
Fix memory leak where we close the descriptor instead of the file.

(cherry pick of 5cb769d99952ef9fb4f576abba70423fe157342b.)

bug: 17541634
Change-Id: I9968f9df249e4cba24383239ce6130dd16fcd532
(cherry picked from commit 208c0b4128fa4624340cf9bef5af85a0ce52a52a)
Fixing NULL pointer access causing segmentation fault in aapt

In cases where resource packages are generated which does
not have public resources for all resource types - NULL
pointers sneaks into the mOrderedConfigs vector causing
the aapt tool to crash. The solution in this fix simply
ignores the NULL elements when later processing the sorted
vector.

The NULL elements are inserted during applyPublicEntryOrder
function call

Change-Id: I8b7135932e2d235018da2e2f7e09f0d22f1b2f59
(cherry picked from commit 9886081c0a7e2786f03d0ce4664ec24bede4b015)
Fix for CharSequenceCreator test case

The test case testCharSequenceCreator() in TextUtilsTest fails
because the data position is not reset before calling
createFromParcel().

Change-Id: I6d5cc093ff65019ab0d2191bb0bd9c10ae49612b
(cherry picked from commit e58ca3d401a8129297d90bdc1bf9daffb5ef4680)
Fix android_media_AudioSystem_getMasterMute return type.

Caused FPU stack overflow on x86.

Bug: 18023418

(cherry picked from commit c1bcdbb75877d99972f1cd13a9c40126822621bc)

Change-Id: Ia1b5a1da52b20c2e0a84321e784cd795ec649e66
(cherry picked from commit 659ae63245bc18fd32196c7a83f397754259d9d9)
Fix an overflow found by ASAN.

Sometimes len is 0.

Change-Id: I031000188edc57663a5519b00cbbb751600d32f4
(cherry picked from commit b62432b1e382cd0a525475635ef7043d1552839e)