Add DataConnection#isEmergency and use in trySetupData.

If an emergency is occurring we may not want to allow data calls.

An emergency is defined as in an Emergency call or in the
emergency call back mode. I've added isInEcm and isEmergencyCall
to PhoneBase and CDMAPhone. And in DataConnectionTracker added
isEmergency which is the or of isInEcm, isEmergencyCall.

Also, removed some optimization code in DataConnectionTracker
onSetInternalDataEnabled because mInternalDataEnabled defaults to true
when a DCT is constructed and without this change trySetupData will
not be called leaving ECM if the DCT was just created. Which is what
is currently happening on the ICS lead device.

Also see b/5471660 as there is similar optimizations in
onSetUserDataEnabled and onSetPolicyDataEnabled.


Bug: 5437885
Change-Id: Iba81366300fe46eaa9aa6e457d6659b42d6fe927
5 files changed