Add Wi-Fi calling options to Call Settings

Change-Id: Id2b7e0acfb5804d34afa4cdd02dba38aad87de69
diff --git a/res/values/array.xml b/res/values/array.xml
index 245c09b..5a360f2 100644
--- a/res/values/array.xml
+++ b/res/values/array.xml
@@ -39,6 +39,19 @@
         <item>@string/sip_ask_me_each_time</item>
     </string-array>
 
+    <string-array translatable="true" name="wifi_calling_choice_entries">
+        <item>@string/wifi_calling_choice_entry_always_use</item>
+        <item>@string/wifi_calling_choice_entry_ask_every_time</item>
+        <item>@string/wifi_calling_choice_entry_never_use</item>
+    </string-array>
+
+    <!-- android.telephony.TelephonyManager.WifiCallingChoices -->
+    <string-array name="wifi_calling_choice_values">
+        <item>@string/wifi_calling_choices_always_use</item>
+        <item>@string/wifi_calling_choices_never_use</item>
+        <item>@string/wifi_calling_choices_ask_every_time</item>
+    </string-array>
+
     <string-array translatable="false" name="phone_type_values">
         <item>@string/pstn_phone</item>
         <item>@string/internet_phone</item>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8e92006..40b8198 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1149,6 +1149,27 @@
     <!-- Item of the Internet call (Wi-Fi only) option dialog: for routing all outgoing calls via SIP. [CHAR LIMIT=NONE] -->
     <string name="sip_call_options_wifi_only_entry_1">For all calls</string>
 
+    <!-- Start of Wi-Fi calling related strings. -->
+
+    <!-- Title of the Wi-Fi settings section [CHAR LIMIT=NONE] -->
+    <string name="wifi_settings">Wi-Fi call settings</string>
+    <!-- Title of option allowing user to pick when to make Wi-Fi calls [CHAR LIMIT=NONE] -->
+    <string name="when_to_make_wifi_calls_title">When to make Wi-Fi calls</string>
+    <!-- Item of Wi-Fi settings: For always using Wi-Fi to make calls. [CHAR LIMIT=NONE] -->
+    <string name="wifi_calling_choice_entry_always_use">Always use Wi-Fi to make calls</string>
+    <!-- Item of Wi-Fi settings: For never using Wi-Fi to make calls. [CHAR LIMIT=NONE] -->
+    <string name="wifi_calling_choice_entry_never_use">Never use Wi-Fi to make calls</string>
+    <!-- Item of Wi-Fi settings: For asking each time whether to use Wi-Fi. [CHAR LIMIT=NONE] -->
+    <string name="wifi_calling_choice_entry_ask_every_time">Always ask</string>
+
+    <!-- Keep values in sync with android.telephony.TelephonyManager.WifiCallingChoices -->
+    <!-- android.telephony.TelephonyManager.WifiCallingChoices.ALWAYS_USE -->
+    <string translatable="false" name="wifi_calling_choices_always_use">0</string>
+    <!-- android.telephony.TelephonyManager.WifiCallingChoices.NEVER_USE -->
+    <string translatable="false" name="wifi_calling_choices_never_use">1</string>
+    <!-- android.telephony.TelephonyManager.WifiCallingChoices.ASK_EVERY_TIME -->
+    <string translatable="false" name="wifi_calling_choices_ask_every_time">2</string>
+
     <!-- Title of the dialog to select the phone type for the outgoing call. [CHAR LIMIT=NONE] -->
     <string name ="pick_outgoing_call_phone_type">Place call</string>
 
diff --git a/res/xml/wifi_settings_category.xml b/res/xml/wifi_settings_category.xml
new file mode 100644
index 0000000..91041fd
--- /dev/null
+++ b/res/xml/wifi_settings_category.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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"
+    xmlns:phone="http://schemas.android.com/apk/res/com.android.phone">
+    <PreferenceCategory
+            android:key="wifi_settings_category_key"
+            android:title="@string/wifi_settings"
+            android:persistent="false">
+
+        <ListPreference
+                android:key="when_to_make_wifi_calls_key"
+                android:title="@string/when_to_make_wifi_calls_title"
+                android:persistent="true"
+                android:entries="@array/wifi_calling_choice_entries"
+                android:entryValues="@array/wifi_calling_choice_values"/>
+
+    </PreferenceCategory>
+</PreferenceScreen>