Original symptom: Cuttlefish devices would crash when the "recent apps"
tray was swiped up from the bottom.
Root cause: Raising the "recent apps" tray triggers a vibration. Close
to the bottom of the call stack responsible for this action in
VibratorService is the native function vibratorPerformEffect(). The
Java Language signature for this function has a long as the type of the
second parameter, as does the JNI signature that is registered with the
environment. The native function, however, uses an int type for this
parameter. As a result, when the arguments are passed via the stack on
x86 devices the high bits of the second long argument are read as the
contents of the third argument, which is a jobject reference. When the
code attempts to convert this NULL local reference into a global
reference the JNI code aborts the runtime for the process. Because the
VibratorService is part of the SystemServer, when it crashes the Zygote
is notified and restarts the entire shell.
Why this wasn't an issue on ARM devices: ARMs calling conventions pass
many of a function's arguments via registers instead of via the stack.
This means that the long argument is passed in a register, preventing it
from stomping on any other arguments. When the native function uses the
argument it simply reads the lower bits from the register and ignores
the higher bits.
Why this wasn't previously an issue on X86 hosts: ag/9158254 introduced
a new parameter to the vibratorPerformEffect() function. This new
parameter is located after the mis-typed parameter and will be aliased
to the high bits of the mis-typed long argument.
Fix: Correct the type signature of the native vibratorPerformEffect()
function.
Bug: 143082450
Test: Build -> start cuttlefish -> raise recent apps tray -> no crash
[adelva: port to AOSP to close potential ASAN issues]
Change-Id: If50f68df9579f84bddc9d70a0a30cd73f4485e96
Merged-In: If50f68df9579f84bddc9d70a0a30cd73f4485e96
to be configurable.
Bug: 143372960
Test: manual - took before and after videos
Merged-In: Ia0b6a56859889d538e21f807a88bc5217d89e64a
Change-Id: Ia0b6a56859889d538e21f807a88bc5217d89e64a
ACTION_MULTI_SIM_CONFIG_CHANGED will be sent when multi-SIM
variants change.
Bug: 141388730
Test: test app
Change-Id: I717482ea05571afdfe6b04318d3f1fbda0c177ed
Merged-In: I717482ea05571afdfe6b04318d3f1fbda0c177ed
am: 766c011ff0 -s ours
am skip reason: change_id I1307d1d7aacef0bbd33bfc73700ee774e12e64c1 with SHA1 fff052067c is in history
Change-Id: I13827dfef005720035ae9ea58c82bfc55e905100
This prevents metalava from generating stubs that reference classes
which are provided on the classpath. That ensures that removing hidden
classes from the sources does not result in references to those removed
classes from being added to the generated stubs, e.g. in the imports.
Specifically needed to prevent the StrictMode stubs class from
referencing dalvik.system.CloseGuard when that is removed from the
sourcepath as a result of switching the stub generation from using
libcore implementation classes (which contain CloseGuard) to
generated stubs (which does not contain CloseGuard).
Bug: 142113521
Test: m checkbuild
Change-Id: Ib4b87fec6549b69cc69820bc8d8b33f8c4e8535c
Previously, ApnSetting compared two APNs using String with 'XorEqual' method
and the result of it used for 'dedupeApnSettings' for DcTracker.
For instance, a MMS APN for the specific operator shall be merged with
the default(Internet) APN of the same operator's(mccmnc) APN once the result of 'similar' is true.
But recently, it didn't merge two similar APNs properly due to 'UNSPECIFIED_STRING' case.
So we've added XorEquals for String(XorEqualsString) case.
The Issue will happen in the circumstance below.
1.A network operator's similar APNs are saved separately at the APN database(apns-conf.xml)
For instance, Add two APNs like below and check the result of merging APNs at DcTracker.
<apn carrier="SKT LTE INTERNET"
mcc="450"
mnc="05"
apn="lte.sktelecom.com"
type="default,supl,fota,cbs"
protocol="IPV4V6"
/>
<apn carrier="SKT LTE INTERNET"
mcc="450"
mnc="05"
apn="lte.sktelecom.com"
type="mms"
mmsc="http://omms.nate.com:9082/oma_mms"
mmsproxy="smart.nate.com"
mmsport="9093"
protocol="IPV4V6"
/>:q
2. Two similar APNs shall be merged on the result of ApnSetting's 'similar' method.
P => merged
Q => not merged
Test: Manual
Change-Id: I0584310765e246ef16163201282d7db48c44e451
Signed-off-by: yoonjeong Jang <yjeong.jang@samsung.com>