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
Applies standard PDroid 4.1.2 patches with paths fixed
Following mateorod, moved some of the surrogates from the framework core to the telephony library where they are used
Fixed build problems
Modified PrivacyPhoneProxy to take PhoneBase rather than Phone as its constructor argument, to fix build problem
Moved PrivacyActivityManagerService.java to frameworks/base
Remove tab/space causing problems

One of millions. These two were generating their own hunks in the patches.
and then failing. I will write something to clean all these up soon.

Change-Id: I7255631af4532844dcb28ade8143cac893bc3225
Move imports around to enable a wider patch

It needs to be up top because CM/AOKP add a constructor immediately before
the 'hide' and was breaking wide patching.

Change-Id: I3353a9f8da26e09f04ee3f04b6caecd4a0499f85
GPLv3 Headers

As an extension of PDroid (licensed under GNU GPLv3) these fall under the GPL
license. This is to affirm that fact and preserve attribution before too many
copies are let loose.

Change-Id: I254cfa62bb33959a56b1f72d7648b5bf3b97cf29
Add CollegeDev's preferred credit

Another rewritten commit, due to merge conflicts I just dont have the time to
deal with any other way. Inconsequential, really.

Change-Id: I18ed9fc9cb9ecc85b7e47feb363e4f926dc50ddc
Merge branch 'jb-mr1-release-openpdroid' into cm-10.1-openpdroid

Conflicts:
	src/java/android/privacy/surrogate/PrivacyCDMALTEPhone.java
	src/java/android/privacy/surrogate/PrivacyCDMAPhone.java
	src/java/android/privacy/surrogate/PrivacyGSMPhone.java
	src/java/android/privacy/surrogate/PrivacyPhoneProxy.java
	src/java/android/privacy/surrogate/PrivacySipPhone.java
	src/java/com/android/internal/telephony/PhoneFactory.java
LGEQualcommUiccRIL: New subclass to deal with the latest qcom RIL

Yet another generation of CAF RIL, this one is necessary to support
multi-RAT (GSM/LTE) radios...

Change-Id: I87b5126ffbc16f3ccc7caaf227354edf95543c35

LGEQualcommUiccRIL: Fix LTE support

Change-Id: Ifab51550113926d6d1b6c421e805f456d95faca8

LGEQualcommUiccRIL: Fix multi-PDP support

Multiple concurrent PDPs are now functional, allowing the back-compat
singlepdp flag to be disabled

Change-Id: I8ef55e96b9f05d4a4dd8dbbaeddf6d48ded7fc67

Update to 4.2 APIs