IMS-VT: Update phone account's capabilities.
Updates phone account's video capabilities based on
the event received from Phone object.

IMS: Add support for video quality
- Add UI for adding IMS settings
- Add video call quality preference
  Enable user to control video call quality from UI

Change-Id: I308e6d106d853d8242b2e324467edc7ce739850f

IMS-VT: Do not allow changing the TTY mode during a Video call
When the device is already in a video call, the user SHOULD NOT
be allowed to change the TTY mode. If the user tries to change,
then an UI alert message will be displayed explaining it cannot
be changed during video calls.

Propagate the call substate changed message to the UI

Enhance log message in handleVideoCapabilitesChanged
- Add the video capability value to the log message

IMS-VT: Call Modify capability
-Add modify call capability only if call is in active or holding
 state

Change-Id: I8d75f65ce4ddb4b684478260995ec6cad74d46c0

IMS-VT: Enable Video conferencing.
Enable Video conferencing.

Ims: Update conferenceHostConnection state for a conference call
TelephonyConnection that backed the original connection is
cleaned up after making a clone this TelephonyConnection that
is eventually treated as conferenceHostConnection. Update
conferenceHostConnection state too

Change-Id: I962d11068d136a39527dd0720200c42fbd49681b
diff --git a/res/values/array.xml b/res/values/array.xml
new file mode 100644
index 0000000..79b6034
--- /dev/null
+++ b/res/values/array.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Array resources for the Phone app. -->
+<resources>
+    <!-- Array resource for IMS VT call quality entries-->
+    <string-array translatable="true" name="ims_vt_call_quality_entries">
+        <item>@string/ims_vt_call_quality_low</item>
+        <item>@string/ims_vt_call_quality_high</item>
+    </string-array>
+
+    <!-- Array resource for IMS VT call quality values-->
+    <string-array translatable="false" name="ims_vt_call_quality_values">
+        <item>0</item>
+        <item>1</item>
+    </string-array>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index abeeee0..4118e0a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -753,7 +753,8 @@
     <string name="tty_mode_option_summary">Set TTY mode</string>
     <string name="auto_retry_mode_title">Auto-retry</string>
     <string name="auto_retry_mode_summary">Enable Auto-retry mode</string>
-
+    <!-- TTY Mode change is NOT allowed during a video call -->
+    <string name="tty_mode_not_allowed_video_call">TTY Mode change is not allowed during a video call</string>
     <!-- FDN list screen: menu item label -->
     <string name="menu_add">Add contact</string>
     <!-- FDN list screen: menu item label -->
@@ -1298,4 +1299,17 @@
     <!-- DO NOT TRANSLATE. Internal key for a voicemail notification preference. -->
     <string name="wifi_calling_settings_key">button_wifi_calling_settings_key</string>
 
+    <!-- IMS settings related strings -->
+    <!-- Title of the ims editor screen. [CHAR LIMIT=NONE] -->
+    <string name="ims_edit_title">IMS account details</string>
+    <!-- Title displayed IMS account settings in the sip settings category. [CHAR LIMIT=NONE] -->
+    <string name="ims_accounts_title">IMS Account</string>
+
+    <!-- VT call quality settings. -->
+    <string translatable="false" name="ims_vt_call_quality">VtCallQuality</string>
+    <string name="ims_vt_call_quality_title">VT Call Quality</string>
+    <string name="ims_vt_call_quality_low">Low</string>
+    <string name="ims_vt_call_quality_high">High</string>
+    <string name="ims_vt_call_quality_unknown">Unknown</string>
+    <string name="ims_vt_call_quality_set_failed">Failed to set video quality</string>
 </resources>
diff --git a/res/xml/call_feature_setting.xml b/res/xml/call_feature_setting.xml
index 543fae5..4af9736 100644
--- a/res/xml/call_feature_setting.xml
+++ b/res/xml/call_feature_setting.xml
@@ -149,4 +149,14 @@
 
     </PreferenceScreen>
 
+    <PreferenceScreen
+        android:key="ims_account_settings_key"
+        android:title="@string/ims_accounts_title"
+        android:persistent="false">
+
+        <intent android:action="android.intent.action.MAIN"
+            android:targetPackage="com.android.phone"
+            android:targetClass="com.android.phone.ImsEditor" />
+    </PreferenceScreen>
+
 </PreferenceScreen>
diff --git a/res/xml/ims_edit.xml b/res/xml/ims_edit.xml
new file mode 100644
index 0000000..f16e2f5
--- /dev/null
+++ b/res/xml/ims_edit.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+        android:title="@string/ims_edit_title"
+        android:persistent="false">
+
+    <ListPreference
+        android:key="@string/ims_vt_call_quality"
+        android:title="@string/ims_vt_call_quality_title"
+        android:entries="@array/ims_vt_call_quality_entries"
+        android:entryValues="@array/ims_vt_call_quality_values"
+        android:summary="@string/ims_vt_call_quality_unknown"
+        android:persistent="false"
+        android:enabled="true"
+        android:dialogTitle="@string/ims_vt_call_quality_title"/>
+
+</PreferenceScreen>