%p is not a valid conversion in format strings. It is also superfluous,
as it is already known that location is null.
Bug: 19797138
Change-Id: I5784e28b05b4ca9aac57e0fc9da4a7f01d9b3247
The comparator's equal implementation doesn't satisfy the constraints
of an equals method, namely being reflexive. Use the standard Object
implementation instead.
Bug: 19797138
Change-Id: I74f888e99533e1945aab7ab10fe8ee3ded6388f4
Kernel will reuse process id, when wrap-around happens,
there may be just after a pid is freed, a new thread/process
uses the pid immediately.
For examples, there may be a process with pid 1234 killed
by lowmemorykiller or itself (app.killed=false).
Before the death recipient enters AMS, a new thread/process
is started with pid 1234, then when appDiedLocked executes,
this new pid 1234 will be killed again.
It is especially easy happens to zygote:
During zygote starting process, it will stop 5 daemons threads.
And restart the 5 threads after fork is called, so it has
larger pid range to hit the resue case.
https://code.google.com/p/android/issues/detail?id=160661
Solution:
If the dead event is from binder, it is not necessary
to call killProcessQuiet again, because it should really
be dead.
Keep no checking for killProcessGroup because zygote does
not have record under /acct/, and also the parameter uid
has restriction that will not kill another application
which reuses the pid.
Change-Id: Iec4a4884ae641c4d036f4d024ce463f7a351a17b
New ShadowTask with the ShadowDescription key that already
exists in the shadow LruCache will leak as it is not being
added.
Fix adds check for the existing key that is common in the hwui
code but missing for the TessellationCache::precacheShadow
function.
Change-Id: I37fd5ec82f8b8da5d1ec0f2ab9fd04c5f8534367
The constructor was public API, doh. Gotta do this differently.
This reverts commit 33c5b2a62f3e62382c41e24c6b527119978816a0.
Change-Id: Iadca87fe6a8866a8bd9d6f2a91578ec0d4c44691
According to the if below, ains == null is potentially valid. But
the foreach loop would throw a NullPointerException.
Change-Id: I4460fb1357eaa3abfe0ab9a21effb608f474ab51
Integer == is dangerous, as equal objects may not be identical
objects. In fact, MediaFormat.setInteger was creating a new object
every time.
Change MediaFormat.setInteger and setLong to use valueOf, which
may reuse returned objects.
Change-Id: Iedcc6003adbf05c0c870aa4b3ada7f181a5b870e
Equals uses Arrays.equals. That means two responses are equal if
the content of the data arrays is equal. By convention, the hash
code of those objects should agree. In that case one cannot use
hashCode on the array (which is the identity hash code).
Change-Id: Icce8e2e71e9142421f5dac8a0ee8a211623fb704
setSELinuxEnforce is not allowed by policy.
get/setBooleanValue and getBooleanNames are moot since SELinux
policy booleans are forbidden by CTS.
Change-Id: I512953edd1c38828efce698ae8475603775c32e8
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
logd reads /data/system/packages.xml (because it also contains
shared UIDs) and is sensitive to line break and tag name issues.
Bug: 19608965
Change-Id: I2a4a6bcfb10529e4b29c9664cbbf12842e689dd1