merge in jb-mr1-factory-release history after reset to jb-mr1-dev
When retrying disassociate an ApnContext from a DC only when failed or idle.

Disassociating, is setting an ApnContext DataConnection to null. When its
null the DataConnectionTracker will not find the DataConnection when the
next RIL_UNSOL_DATA_CALL_LIST_CHANGED arrives and it sends a notification
that the connection has been disconnected. When the notification is
received by the ConnectivityService it will reset the connection and now
there will truly be no connection.

Typically, when the DataConnectionTracker sees that the default connection
is been removed, it will automatically retry the connection. But this won't
happen in this case, because there was no error to cause the retry.

Bug: 6884995
Bug: 7343098
Change-Id: Ia36316151bc5ae9a0ef9b48b1841816198862127
Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge

Change-Id: I178d3a86d8c71bca722ca5bfda136462b820c85e
am 2bc7f2e1: Use proper check for spn for operator name display

* commit '2bc7f2e1da139e183519af01f50940327ca9765e':
  Use proper check for spn for operator name display
Reconcile with jb-mr1-release - do not merge

Change-Id: Ic0cad6c664001b47eee72ed7bb3034626bfeae76
Raise threshold for detecting excessive SMS usage.

Raise threshold for detecting excessive SMS usage so that the user
is warned when an app tries to send 30 or more messages in 1 minute,
rather than 30 messages in 30 minutes. This will be much less likely
to trigger for legitimate SMS usage, while still protecting against
buggy or malicious SMS apps that try to send SMS's continuously.

Bug: 7212322
Change-Id: I97078f96fdb8584cdb3ccc830000de9a534044c0
Assume LTE location info is base 10 but allow 16 or 8.

Previously it was base 16 but somewhere along the line it changed
to base 10. The code is now changed to use the decode method which
assumes base 10 but also accepts base 16 (prefix 0x, 0X, #) or
base 8 (prefix 0).

Bug:  7651566
Change-Id: Icae05dcbee9c1092fce2f594a1e179bbd3e1426a
simcard: With Kazakh Beeline SIM card, there isn't STK menu

IccFileHandler.java is modified to fix an erroneous EF_IMG file path
information. The other is CommandParamsFactory.java file, which is modified
to ignore the result of reading EF_IMG file.

This Beeline SIM card returned an error status word when the mobile device
accessed the EF_IMG file in this SIM card.
(I think this Beeline SIM card does not support EF_IMG file.)
As a result, This error result stoped processing the setup menu proactive
command, and there was no STK menu.

So, I modified the CommandParamsFactory.java file to ignore the result of
EF_IMG file read operation.
After applying this modification,  The STK menu was successfully displayed.
(This issue was resolved by these modified files.)

I think there will be no critical problem even if the EF_IMG(Icon image) file
is ignored.

Bug: 7585989

Change-Id: I16e3c077779811e3d4c46cd6e003771f3e1efde2
Set audio mode after accepting the call

Set the audio mode to incall immediately after accepting the call and not wait
till call is reported as ACTIVE by RIL. This is done to speed up time taken for audio
to set up the voice path

Bug: 7612431
Change-Id: I8008edc64928016ab94aa6d770de248b5d85dc93
Turn auto attach on/off when we attach/detach.

Some network operators will detach after a timeout period, isDataAllowed()
will not allow a data connection because mAutoAttachOnCreation is false
and gprsState is not STATE_IN_SERVICE.  This change toggles
mAutoAttachOnCreation based on attach/detach events and data will be
allowed if gprsState == STATE_IN_SERVICE or mAutoAttachOnCreation.

Bug: 7491805
Change-Id: If41c2514ebdb9cd2fba88eef692f2c7160c04b0f
merging

Change-Id: I4cf98a980231fc2934b88b8e06e4bad0966ab3c2