TeleService: Do not save an empty quick respond message

Can save the quick respond message when it is empty.

When the new quick respond message is empty, do not save it.

CRs-Fixed: 654604

Change-Id: Ifffde3c0ec2272deff5d684509620528ab503992
Fix crash when call to voicemail with no number.

Initialize dialed number to empty string if it is null,
to avoid NullPointerException in Uri.fromParts().

Change-Id: Ic4c68eaa40b2d2c23199619b15a7277e2a8e77bc
CRs-Fixed: 627677
TeleService: Remove the option menu of the restore defaults

This issue is the Android original bug, Google has delete restore defaults
function in Android 4.4, but they don't delete the menu item in quick
response settings.

Remove the option menu item of the restore defaults.

CRs-Fixed: 655895

Change-Id: I66c90f38f3e499cf8ae07b5c93f9cff8136d754d
TeleService: Return to previous activity when click back icon in Dual SIM settings

Return to the CallFeaturesSetting directly no matter
the Multi Sim is enabled or not.

Return to previous activity when the Multi Sim is enabled.

CRs-Fixed: 657329

Change-Id: Ia8bf403b81fb050be565fc2a123341bbb58db05d
Fix to mute/unmute properly while adding a call

Call setMuteInternal instead of setMute while adding
call to an existing active call.

Change-Id: I245f966c6929b5d1a92b2b7dff1f9e79e2a8d04a
CRs-Fixed: 650135
Fix issue that phone would crash when PLMN search

NetworkSetting apk is only installed on debug build, before calling it,
check it whether exists in the system; if true, use the intent of the
NetworkSetting activity instead.

Change-Id: Ib139874e5f2ffbc20ceaba4f83491f5ce0939353
CRs-Fixed: 659685
Fix crash during back to back emergency calls.

Phone process crashes with RuntimeException while
unregister receiver because the receiver is not
registered.

Move code of register receiver at onCreate() to be
sure that receiver will register when call through
bindService() and startService() both the cases.

Add null checks to avoid null pointer exception in
onDestroy() of EmergencyCallbackModeService.

Change-Id: If73bffe251b9f8f64973bcac7399a903bc2183e6
CRs-Fixed: 641312
Delay setting of active subscription

In case of MT call, delay setting of active subscription till we send
onIncoming to InCallUI. Until onIncoming comes, there is no MT call
in IncallUI call map, hence active sub shouldn't be set much earlier than
sending onIncoming() in order to avoid timing issues.

Change-Id: I7a6ff5bed017d51e540f207093565310e6e9e511
CRs-Fixed: 655859
TeleService: Update mute state accordingly after adding call

The mute state of sub1 that is stored in the mute table isn't restored to
the previous state when the second call(on sub2) is connected.

Restore the mute state for sub1 in CallButtonPresenter#refreshMuteState().

CRs-Fixed: 660470

Change-Id: Id9e0bf9c7e41ccb7cf210f8adfa0938ead650f74
Fix FC when phone type switched from GSM to CDMA.

Don't set the view as null after it is removed, otherwise
it would cause exception when trying to update it.

Change-Id: I62aeef7796cd197d7ebc61b290ed48924f5905f1
MSIM(DSDA): Use conversation sub to maintain LCH properly

Use conversation sub to maintain LCH properly

Change-Id: I2307d04a9e32a43234a5e56d995e20db464a6187
CRs-Fixed: 659123
MSIM(DSDA): Start the LCH reminder tone properly

During sub switch, lCH reminder tone is stopped but not restarted
properly.

Change-Id: Ia801b205c196c28e9fff9214548d3138a4154e79
CRs-Fixed: 665424
MSIM: Dial emergency call on activated sub

Check if subscription activation status is activated, even if the
sim state is ready before choosing the subscription for making
emergency call. As sim ready state also comes when there is illegal
card event from network.

Change-Id: I1775619201d7cfe39362802b2b59193a67a9a1a7
CRs-Fixed: 662770
Telephony: Set the default uri for Ringer according to different sim cards

When the phone ringtone is set as "None", getActualRingtoneUriBySubId()
in framework return null.But null won't be set to Ringer, so the uri
is still the value which was set in the last time.

Set the default uri in Settings.System to the Ringer instead of
the uri returned from the method before.

CRs-Fixed: 661216

Change-Id: I82dd48a8946eebdca477dfae0e09b4ed640e481c
MSIM: Update persist.radio.airplane_mode_on property during APM change.

RIL uses persist.radio.airplane_mode_on property to check if sim
cards need to be powered down when telephony requests RADIO_POWER
OFF during boot up. So telephony needs to update this property
whenever there is a change in airplane mode.
Add the missing code to update the property in MSimPhoneGlobals.

Change-Id: Id5c6b8315ad8329b348a4e527e38e1d7c889bb03
CRs-Fixed: 661325
MSIM: Use DDS data sub if no sub is passed

On a multi-sim device, getDataNetworkType will return data
radio technology value of designated data subscription(DDS).

Change-Id: I6b40431a88a5e17589e1b1d1b759838ff61475ee
CRs-Fixed: 661835
Stop call waiting timers after waiting call accepted

After user accepted CDMA waiting call, remove call waiting timers.

Change-Id: I1b9f3036c07aee2e14528e05573bd1b106f9a31f
CRs-Fixed: 673246
CSVT: fix cannot end videocall issues after NFC read contact and lauch another call
      when CSVT call is active back ground
      CRs-Fixed: 678578

Change-Id: I1b0aff348a6d01d7648d1a754ae6168af270f3c4
MSIM(DSDA): if any sub is active dont disconnect BT

Don't disconnect BT, when call is active in any of the
subscriptions.

Change-Id: I9b0ab528ded4a1c8e7ef67a81217a6f8aade0613
CRs-Fixed: 679187
TeleService: Add FDN seting for CDMA network type

FDN Setting is removed when network type is CDMA. Do not remove
it directly, but add resource config for it. Default status is false
which means to enable FDN settings.

CRs-Fixed: 680615

Change-Id: Ib578495a50efff7fc0df54f517c67679e2f5da69