Fix libril.so crash issue caused by wrong switch logic of onRequest in reference-ril.c

If the tech is not CDMA, it will fall-through to the default case.
But the new added RIL_REQUEST_GET_CELL_INFO_LIST and RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
cases will intercept it and cause the request call into wrong request functions.
Move these two new requests before the CDMA cases to fix the logic issue.

Bug: 9193696
Change-Id: I2cb03cbdb6be8eb1afd92c01c764e87b6aa62796

Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Panfeng Chang <panfengx.chang@intel.com>
Signed-off-by: Yanglin Zhu <yanglinx.zhu@intel.com>
Signed-off-by: Jackie Wu <jackie.wu@intel.com>
Restart, cleanup or retry inactve connections.

Instead of retrying all inactive connections, restart radio on very bad
errors, clean up those that are permanent failures and retry
the others.

Bug: 10131736
Change-Id: I2527b18d6cda52c55fb94be58fbb1a7a86818ef9
Signed-off-by: Wink Saville <wink@google.com>
libril: allow board to provide libril

Change-Id: If0033865ab179854c27c56eaaf078fcc30ea102a
libril: Provide support for legacy ril

With change Icc620fd191f8542f61bd38e365813753bfedefdf, RIL_VERSION_MIN was
increased from 2 to 6, but this causes problems for a number of devices
using ril blobs older than that.

  E/RILC    (  140): RIL_register: version 3 is to old, min version is 6

Consequently causing the ril system unable to connect to the rild socket.

Conflicts:
	include/telephony/ril.h
	libril/Android.mk

Change-Id: I82c1cc4dab8fcaa4ccaa099132133b0f3b1d8029
Handle newer libhtc_ril.so releases

Querying available networks returns five strings per network instead of
four which breaks that functionality in RILJ. This fix most likely
appiles to every library since Hero.

Disabled per default, define BOARD_USE_NEW_LIBRIL_HTC if you are
building with libhtc_ril.so libraries version 2 and above.

Conflicts:

	libril/ril.cpp

Change-Id: If14c6d9253a50b35461fcc8aed587cc89af18ee2
Merge https://github.com/omnirom/android_hardware_ril