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 have better names reflecting what getPhoneCount / getMaxPhoneCount
actually represent, we replace them with getActiveModemCount and
getSupportedModemCount. As getPhoneCount is public API, we mark
it as @Deprecated.
Bug: 141388730
Test: build
Change-Id: If086c50ae803b384691f709057bceeac2fc1d9d5
Merged-In: If086c50ae803b384691f709057bceeac2fc1d9d5
ACTION_MULTI_SIM_CONFIG_CHANGED will be sent when multi-SIM
variants change.
Bug: 141388730
Test: test app
Change-Id: I717482ea05571afdfe6b04318d3f1fbda0c177ed
Merged-In: I717482ea05571afdfe6b04318d3f1fbda0c177ed
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>
This class is hanging around for UnsupportedAppUsage. Adding additional
method to fix compilation, but it should never be called.
Bug: 135686713
Test: compilation fixed
Change-Id: I58022af86a53239990e057936826d0f1214acc6f
We call the virtual method setEnabled() from Visualizer's
destructor. In the destructor, the virtual binding is not used.
This isn't a problem for any current code, but to future-proof
against a possible future subclass of Visualizer, we declare
this method 'final'.
Test: TreeHugger
Change-Id: I703580b37cc1bf7f411caa723f95a691dff840a5
framework.jar is now a build-time only library which has private symbols
from framework-minus-apex.jar and public symbols from APEXes. Instead of
framework.jar, framework-minus-apex.jar is installed to the device.
framework-minus-apex is installed as framework.jar because the name is
pretty widespread throughout Android. Keeping the original file name for
the backwards compatibility.
Bug: 139391334
Test: m, inspect the build system.img and check that
system/framework/framework.jar exists
Merged-In: Ia12d5984b011a54bd8ef708d0f552298a6ddec8a
(cherry picked from commit 617a16478b0f5875084e339553b7b96f3a292e03)
Change-Id: I30d5c789c1d67cac7dfe6339f244e66af5114767
The characters 0 to 9, *, # and + are accepted in the digit only mode of
GET INPUT/INKEY commands according to the 3GPP/ETSI standard, but only
numeric charactrers 0 to 9 are used in some actual use-cases. It must be
confusing to display all the allowed characters including *, # and + as
the helper text on the input screen in that case, so whether to display
the allowed characters must be configurable.
Bug: 128890104
Test: Confirmed the expected behavior in manual test cases.
Change-Id: I97ed3dd538c55f48eb05dad96e4836a48a295675
(Merged-In tag to prevent merging to qt-r1-dev-plus-aosp and downstream)
Test: N/A
Bug: 142395610
Change-Id: Ib7b9aab429b59fa1fcd9638f4733147a17cbd4ef
Merged-In: Ia2345b03d54deef9bd2f5ed67ae9ce2216507b10
This removes libaudioeffect_jni's dependency on libmedia and removes
libmedia's dependency on libaudioutils.
Test: build
Change-Id: I23902cd1cc16b49200f41f79736683c89b9f86f8
Merged-In: I23902cd1cc16b49200f41f79736683c89b9f86f8