OSDN Git Service

ril: Fix telephony under emulation.
authorDavid 'Digit' Turner <digit@google.com>
Fri, 4 Feb 2011 12:36:47 +0000 (13:36 +0100)
committerDavid 'Digit' Turner <digit@google.com>
Fri, 4 Feb 2011 21:44:25 +0000 (22:44 +0100)
commitaf1298d72fd6a8b2d5bed7db15f6d181240fce83
tree7514b08458d0d2e0075d836ea6280ca852474c49
parentc941961f4b2660f10352c0f715947a4d086f171d
ril: Fix telephony under emulation.

This patch fixes several regressions that were introduced in
a recent rewrite of the native RIL support code, and which
prevent networking from working under emulation.

- 'apn' and 'type' were incorrectly swapped in the
   AT+CGDCONT= command string, so the command was
   never executed properly by the emulated modem.

- The PDP context type was not properly written to the
  parcel in responseDataCallList() in libril/ril.cpp.
  Due to this the Java RIL code ignored the response.

- The dns list returned by requestOrSendDataCallList()
  was an empty string, which caused the Java RIL code to
  fail with a "unknown host" exception when trying to setup
  net.dns1

Change-Id: I7f4e6f6f45d197960ecb20e7e8592272921fe694
Note: You also need to apply this emulator patch to verify
      this one: http://review.source.android.com//#change,20965

      The code in requestOrSendDataCallList() assumes that
      AT+CGACT? and AT+CGDCONT? will have answers with exactly
      the same number of lines (this wasn't the case before
      the emulator fix).
libril/ril.cpp
reference-ril/reference-ril.c