Add an option to set the selected phone account as the default. (3/3)

Modify the phoneAccountSelected method to support the option to set the
selected phone account as the default for outgoing phone calls.
Add checkbox to the select account dialog for user interaction.

Bug: 18078232
Change-Id: I7e6af5238fe2ff95d7f1e0622f7fa24111147f4e
diff --git a/res-common/layout/default_account_checkbox.xml b/res-common/layout/default_account_checkbox.xml
new file mode 100644
index 0000000..1518076
--- /dev/null
+++ b/res-common/layout/default_account_checkbox.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/default_account_checkbox_layout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="8dip"
+    android:orientation="vertical">
+    <!--  Dummy to enable right-justification of checkbox -->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+    <CheckBox
+        android:id="@+id/default_account_checkbox_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="20dip"
+        android:layout_marginLeft="20dip"
+        android:layout_marginBottom="20dip"
+        android:gravity="center"
+        android:textSize="14sp"
+        android:textAlignment="viewStart"
+        android:text="@string/set_default_account"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res-common/values/strings.xml b/res-common/values/strings.xml
index 3444957..0f6cea0 100644
--- a/res-common/values/strings.xml
+++ b/res-common/values/strings.xml
@@ -768,4 +768,8 @@
 
     <!-- Title for Select Account Dialog [CHAR LIMIT=30] -->
     <string name="select_account_dialog_title">Select Account</string>
+
+    <!-- Label for the check box to toggle default sim card setting [CHAR LIMIT=35]-->
+    <string name="set_default_account">Always use this for calls</string>
+
 </resources>