Merge "Handle secret codes without pressing dial button" into atel.lnx.2.0-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 715722b..70493df 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -325,7 +325,7 @@
                   android:label=""
                   android:excludeFromRecents="true"
                   android:launchMode="singleInstance"
-                  android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboardHidden"
+                  android:configChanges="smallestScreenSize|screenLayout|keyboardHidden"
                   android:exported="false"
                   android:screenOrientation="nosensor"
                   android:directBootAware="true"
diff --git a/InCallUI/res/layout-w500dp-land/call_card_fragment.xml b/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
index 1efe527..049f41f 100644
--- a/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
+++ b/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
@@ -16,47 +16,13 @@
   ~ limitations under the License
   -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="horizontal">
-
-    <LinearLayout
-        android:id="@+id/primary_call_info_container"
-        android:layout_centerVertical="true"
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:elevation="@dimen/primary_call_elevation"
-        android:background="@drawable/rounded_call_card_background"
-        android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
-        android:clipChildren="false"
-        android:clipToPadding="false"
-        android:alpha="0.9"
-        android:layout_margin="10dp">
-
-        <include layout="@layout/primary_call_info" />
-
-        <fragment android:name="com.android.incallui.CallButtonFragment"
-            android:id="@+id/callButtonFragment"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom|center_horizontal"
-            android:layout_marginBottom="@dimen/call_buttons_bottom_margin" />
-
-        <!-- Secondary "Call info" block, for the background ("on hold") call. -->
-        <include layout="@layout/secondary_call_info"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom" />
-
-    </LinearLayout>
+    android:layout_height="match_parent">
 
     <FrameLayout
         android:layout_height="match_parent"
-        android:layout_width="0dp"
-        android:layout_weight="1">
+        android:layout_width="match_parent">
 
         <FrameLayout
             android:layout_height="match_parent"
@@ -116,90 +82,127 @@
 
         </FrameLayout>
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:layout_centerHorizontal="true"
-            android:layout_below="@id/primary_call_info_container">
-
-            <include layout="@layout/manage_conference_call_button"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:elevation="5dp"
-                android:layout_alignParentBottom="true"/>
-
-            <!-- Volume boost and Volume enhancements in-call UI -->
-            <ImageButton android:id="@+id/volumeBoost"
-                android:layout_width="80dp"
-                android:layout_height="80dp"
-                android:visibility="gone"
-                android:soundEffectsEnabled="false"
-                android:background="@drawable/vb_normal"/>
-
-        </LinearLayout>
-
-        <!-- Call recorder infor -->
-        <RelativeLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
-            android:layout_alignParentLeft="true">
-
-            <TextView android:id="@+id/recordingIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentLeft="true"
-                android:layout_marginLeft="24dp"
-                android:drawableRight="@drawable/ic_recording_indicator"
-                android:paddingBottom="119dp"
-                android:visibility="invisible"/>
-
-            <TextView android:id="@+id/recordingTime"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="5dp"
-                android:layout_toRightOf="@id/recordingIcon"
-                android:paddingBottom="120dp"
-                android:singleLine="true"
-                android:text="@string/recording_time_text"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:textColor="@color/incall_call_banner_text_color"
-                android:visibility="invisible"/>
-        </RelativeLayout>
-
         <fragment android:name="com.android.incallui.VideoCallFragment"
             android:layout_alignParentStart="true"
             android:layout_gravity="start|center_vertical"
             android:id="@+id/videoCallFragment"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
+    </FrameLayout>
 
-        <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. -->
-        <FrameLayout
-            android:id="@+id/answer_and_dialpad_container"
-            android:layout_gravity="bottom"
+    <!-- Call recorder infor -->
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true">
+
+        <TextView android:id="@+id/recordingIcon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_marginLeft="24dp"
+            android:drawableRight="@drawable/ic_recording_indicator"
+            android:paddingBottom="119dp"
+            android:visibility="invisible"/>
+
+        <TextView android:id="@+id/recordingTime"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="5dp"
+            android:layout_toRightOf="@id/recordingIcon"
+            android:paddingBottom="120dp"
+            android:singleLine="true"
+            android:text="@string/recording_time_text"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="@color/incall_call_banner_text_color"
+            android:visibility="invisible"/>
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_centerHorizontal="true">
+
+        <include layout="@layout/manage_conference_call_button"
             android:layout_width="match_parent"
-            android:layout_height="match_parent" />
+            android:layout_height="wrap_content"
+            android:elevation="5dp"
+            android:layout_alignParentBottom="true"/>
+
+        <!-- Volume boost and Volume enhancements in-call UI -->
+        <ImageButton android:id="@+id/volumeBoost"
+            android:layout_width="80dp"
+            android:layout_height="80dp"
+            android:visibility="gone"
+            android:soundEffectsEnabled="false"
+            android:background="@drawable/vb_normal"/>
+    </LinearLayout>
+
+    <!-- Secondary "Call info" block, for the background ("on hold") call. -->
+    <include layout="@layout/secondary_call_info"
+             android:id="@+id/secondary_call_info"
+             android:layout_width="match_parent"
+             android:layout_height="wrap_content"
+             android:layout_alignParentBottom="true" />
+
+    <LinearLayout
+        android:id="@+id/primary_call_info_container"
+        android:layout_alignParentStart="true"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_above="@id/secondary_call_info"
+        android:orientation="vertical"
+        android:elevation="@dimen/primary_call_elevation"
+        android:background="@drawable/rounded_call_card_background"
+        android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
+        android:clipChildren="false"
+        android:clipToPadding="false"
+        android:alpha="0.9"
+        android:layout_margin="10dp">
+
+        <include layout="@layout/primary_call_info" />
 
         <FrameLayout
-            android:id="@+id/floating_end_call_action_button_container"
-            android:layout_width="@dimen/end_call_floating_action_button_diameter"
-            android:layout_height="@dimen/end_call_floating_action_button_diameter"
-            android:background="@drawable/fab_red"
-            android:layout_gravity="bottom|center_horizontal"
-            android:layout_marginBottom="@dimen/end_call_button_margin_bottom">
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent" >
 
-            <ImageButton android:id="@+id/floating_end_call_action_button"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@drawable/end_call_background"
-                android:src="@drawable/fab_ic_end_call"
-                android:scaleType="center"
-                android:contentDescription="@string/onscreenEndCallText" />
+            <fragment android:name="com.android.incallui.CallButtonFragment"
+                android:id="@+id/callButtonFragment"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="bottom" />
 
         </FrameLayout>
 
-    </FrameLayout>
+    </LinearLayout>
 
-</LinearLayout>
+    <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. -->
+    <FrameLayout
+        android:id="@+id/answer_and_dialpad_container"
+        android:layout_toEndOf="@id/primary_call_info_container"
+        android:layout_gravity="end|center_vertical"
+        android:layout_alignParentEnd="true"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+     <FrameLayout
+        android:id="@+id/floating_end_call_action_button_container"
+        android:layout_width="@dimen/end_call_floating_action_button_diameter"
+        android:layout_height="@dimen/end_call_floating_action_button_diameter"
+        android:background="@drawable/fab_red"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginRight="@dimen/end_call_button_margin_right"
+        android:layout_marginBottom="@dimen/end_call_button_margin_bottom">
+        <ImageButton android:id="@+id/floating_end_call_action_button"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/end_call_background"
+            android:src="@drawable/fab_ic_end_call"
+            android:scaleType="center"
+            android:contentDescription="@string/onscreenEndCallText" />
+     </FrameLayout>
+
+</RelativeLayout>
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index a9ef075..2fa3b94 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -23,7 +23,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/primary_call_banner"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:orientation="vertical"
         android:paddingStart="@dimen/call_banner_side_padding"
         android:paddingEnd="@dimen/call_banner_side_padding"
diff --git a/InCallUI/res/layout/qti_video_call_picture_mode_menu.xml b/InCallUI/res/layout/qti_video_call_picture_mode_menu.xml
new file mode 100644
index 0000000..bcb15d5
--- /dev/null
+++ b/InCallUI/res/layout/qti_video_call_picture_mode_menu.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+  ~
+  ~ Redistribution and use in source and binary forms, with or without
+  ~ modification, are permitted provided that the following conditions are
+  ~ met:
+  ~      Redistributions of source code must retain the above copyright
+  ~       notice, this list of conditions and the following disclaimer.
+  ~      Redistributions in binary form must reproduce the above
+  ~       copyright notice, this list of conditions and the following
+  ~       disclaimer in the documentation and/or other materials provided
+  ~       with the distribution.
+  ~      Neither the name of The Linux Foundation nor the names of its
+  ~       contributors may be used to endorse or promote products derived
+  ~       from this software without specific prior written permission.
+  ~
+  ~ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+  ~ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+  ~ ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+  ~ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  ~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  ~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+  ~ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+  ~ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+  ~ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+  ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  ~
+  -->
+
+<!-- Video Call Picture mode menu for InCall UI -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+      android:layout_width="100dp"
+      android:layout_height="wrap_content"
+      android:theme="@style/Theme.InCallScreen"
+      android:orientation="vertical">
+
+    <CheckBox android:id="@+id/preview_video"
+        android:text="@string/video_call_picture_mode_preview_video"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:layout_marginLeft="10dp"
+    />
+
+    <CheckBox android:id="@+id/incoming_video"
+        android:text="@string/video_call_picture_mode_incoming_video"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/preview_video"
+        android:layout_marginTop="10dp"
+        android:layout_marginLeft="10dp"
+    />
+</LinearLayout>
diff --git a/InCallUI/res/values-mcc405-mnc840/qticonfig.xml b/InCallUI/res/values-mcc405-mnc840/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc840/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc854/qticonfig.xml b/InCallUI/res/values-mcc405-mnc854/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc854/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc855/qticonfig.xml b/InCallUI/res/values-mcc405-mnc855/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc855/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc856/qticonfig.xml b/InCallUI/res/values-mcc405-mnc856/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc856/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc857/qticonfig.xml b/InCallUI/res/values-mcc405-mnc857/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc857/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc858/qticonfig.xml b/InCallUI/res/values-mcc405-mnc858/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc858/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc859/qticonfig.xml b/InCallUI/res/values-mcc405-mnc859/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc859/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc860/qticonfig.xml b/InCallUI/res/values-mcc405-mnc860/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc860/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc861/qticonfig.xml b/InCallUI/res/values-mcc405-mnc861/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc861/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc862/qticonfig.xml b/InCallUI/res/values-mcc405-mnc862/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc862/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc863/qticonfig.xml b/InCallUI/res/values-mcc405-mnc863/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc863/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc864/qticonfig.xml b/InCallUI/res/values-mcc405-mnc864/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc864/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc865/qticonfig.xml b/InCallUI/res/values-mcc405-mnc865/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc865/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc866/qticonfig.xml b/InCallUI/res/values-mcc405-mnc866/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc866/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc867/qticonfig.xml b/InCallUI/res/values-mcc405-mnc867/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc867/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc868/qticonfig.xml b/InCallUI/res/values-mcc405-mnc868/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc868/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc869/qticonfig.xml b/InCallUI/res/values-mcc405-mnc869/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc869/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc870/qticonfig.xml b/InCallUI/res/values-mcc405-mnc870/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc870/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc871/qticonfig.xml b/InCallUI/res/values-mcc405-mnc871/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc871/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc872/qticonfig.xml b/InCallUI/res/values-mcc405-mnc872/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc872/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc873/qticonfig.xml b/InCallUI/res/values-mcc405-mnc873/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc873/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc405-mnc874/qticonfig.xml b/InCallUI/res/values-mcc405-mnc874/qticonfig.xml
deleted file mode 100644
index 978755b..0000000
--- a/InCallUI/res/values-mcc405-mnc874/qticonfig.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-       * Redistributions of source code must retain the above copyright
-         notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-         copyright notice, this list of conditions and the following
-         disclaimer in the documentation and/or other materials provided
-         with the distribution.
-       * Neither the name of The Linux Foundation nor the names of its
-         contributors may be used to endorse or promote products derived
-         from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<resources>
-
-    <!-- RJIL specific settings -->
-
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
-
-</resources>
diff --git a/InCallUI/res/values-mcc460-mnc00/qticonfig.xml b/InCallUI/res/values-mcc460-mnc00/qticonfig.xml
index e7389a3..de8962c 100644
--- a/InCallUI/res/values-mcc460-mnc00/qticonfig.xml
+++ b/InCallUI/res/values-mcc460-mnc00/qticonfig.xml
@@ -27,12 +27,6 @@
   ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -->
 <resources>
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
     <!-- Config to show/hide call duration in call detail -->
     <bool name="call_duration_enabled">false</bool>
     <!-- Config to enable/disable ims call log -->
diff --git a/InCallUI/res/values-mcc460-mnc02/qticonfig.xml b/InCallUI/res/values-mcc460-mnc02/qticonfig.xml
index 5c88553..9613155 100644
--- a/InCallUI/res/values-mcc460-mnc02/qticonfig.xml
+++ b/InCallUI/res/values-mcc460-mnc02/qticonfig.xml
@@ -27,12 +27,6 @@
   ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -->
 <resources>
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
     <!-- Config to show/hide call duration in call detail -->
     <bool name="call_duration_enabled">false</bool>
     <!-- Config to enable/disable ims call log -->
diff --git a/InCallUI/res/values-mcc460-mnc07/qticonfig.xml b/InCallUI/res/values-mcc460-mnc07/qticonfig.xml
index e7389a3..de8962c 100644
--- a/InCallUI/res/values-mcc460-mnc07/qticonfig.xml
+++ b/InCallUI/res/values-mcc460-mnc07/qticonfig.xml
@@ -27,12 +27,6 @@
   ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -->
 <resources>
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
     <!-- Config to show/hide call duration in call detail -->
     <bool name="call_duration_enabled">false</bool>
     <!-- Config to enable/disable ims call log -->
diff --git a/InCallUI/res/values-mcc460-mnc08/qticonfig.xml b/InCallUI/res/values-mcc460-mnc08/qticonfig.xml
index e7389a3..de8962c 100644
--- a/InCallUI/res/values-mcc460-mnc08/qticonfig.xml
+++ b/InCallUI/res/values-mcc460-mnc08/qticonfig.xml
@@ -27,12 +27,6 @@
   ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -->
 <resources>
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">false</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">false</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">false</bool>
     <!-- Config to show/hide call duration in call detail -->
     <bool name="call_duration_enabled">false</bool>
     <!-- Config to enable/disable ims call log -->
diff --git a/InCallUI/res/values-w500dp-land/dimens.xml b/InCallUI/res/values-w500dp-land/dimens.xml
index 112ec5f..01cf165 100644
--- a/InCallUI/res/values-w500dp-land/dimens.xml
+++ b/InCallUI/res/values-w500dp-land/dimens.xml
@@ -32,4 +32,6 @@
     <dimen name="dialpad_elevation">2dp</dimen>
 
     <dimen name="video_preview_margin">20dp</dimen>
+
+    <dimen name="end_call_button_margin_right">80dp</dimen>
 </resources>
diff --git a/InCallUI/res/values/qticonfig.xml b/InCallUI/res/values/qticonfig.xml
index 0e65f94..7cf7410 100644
--- a/InCallUI/res/values/qticonfig.xml
+++ b/InCallUI/res/values/qticonfig.xml
@@ -27,12 +27,6 @@
   ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -->
 <resources>
-    <!-- Config to show/hide Video quality toast -->
-    <bool name="config_display_video_quality_toast">true</bool>
-    <!-- Config to show/hide call session event toast like player start/stop -->
-    <bool name="config_call_session_event_toast">true</bool>
-    <!-- Config to show/hide data usage toast -->
-    <bool name="config_display_data_usage_toast">true</bool>
     <!--
     customize the default value to control Clear-Code feature,
     default value is false, true is for LatamOpenAMX
diff --git a/InCallUI/res/values/qtistrings.xml b/InCallUI/res/values/qtistrings.xml
index ea8a952..eba800a 100644
--- a/InCallUI/res/values/qtistrings.xml
+++ b/InCallUI/res/values/qtistrings.xml
@@ -180,4 +180,11 @@
     <string name="video_call_downgrade_without_lte_toast">Move out of LTE coverage area downgrade the call.</string>
     <string name="video_call">Video Calling</string>
     <string name="video_call_cannot_upgrade">cannot accept video calls at this time</string>
+
+    <!-- Pop up menu options for picture mode -->
+    <string name="video_call_picture_mode_menu_title">Choose Picture Mode</string>
+    <string name="video_call_picture_mode_preview_video">Camera Preview</string>
+    <string name="video_call_picture_mode_incoming_video">Incoming Video</string>
+    <string name="video_call_picture_mode_cancel_option">Cancel</string>
+    <string name="video_call_picture_mode_save_option">Save</string>
 </resources>
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index ceae8c0..510e035 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -525,7 +525,7 @@
         boolean showRx = false;
         boolean showVolte = false;
 
-        if (mEnhanceEnable && showUpgradeToVideo) {
+        if (mEnhanceEnable && hasVideoCallCapabilities(call)) {
             boolean isAudioAndVtCap = (VideoProfile.isAudioOnly(mCall.getVideoState()) &&
                     PresenceHelper.getVTCapability(call.getNumber()));
             showRxTx = (VideoProfile.isReceptionEnabled(mCall.getVideoState()) || isAudioAndVtCap);
@@ -544,7 +544,8 @@
         ui.showButton(BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo && !mEnhanceEnable);
         ui.showButton(BUTTON_DOWNGRADE_TO_AUDIO, showDowngradeToAudio && !useExt);
         ui.showButton(BUTTON_SWITCH_CAMERA, isVideo);
-        ui.showButton(BUTTON_PAUSE_VIDEO, isVideo && !useExt && !useCustomVideoUi);
+        ui.showButton(BUTTON_PAUSE_VIDEO, isVideo && !useExt && !useCustomVideoUi &&
+                !mEnhanceEnable);
         ui.showButton(BUTTON_DIALPAD, true);
         ui.showButton(BUTTON_MERGE, showMerge);
         ui.showButton(BUTTON_ADD_PARTICIPANT, showAddParticipant && !mEnhanceEnable);
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 69446a9..1c4890b 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -1688,6 +1688,11 @@
         }
     }
 
+    @Override
+    public void showVbButton(boolean show) {
+        mVbButton.setVisibility(show ? View.VISIBLE : View.GONE);
+    }
+
     private void showVbNotify() {
         Toast vbnotify;
         int resId = R.string.volume_boost_notify_unavailable;
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index af5a7d9..315b57f 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -1147,6 +1147,11 @@
         }
         ui.setCallCardVisible(!isFullscreenMode);
         ui.setSecondaryInfoVisible(!isFullscreenMode);
+        final int callState = (mPrimary != null) ? mPrimary.getState() : Call.State.INVALID;
+        ui.setEndCallButtonEnabled(!isFullscreenMode &&
+                shouldShowEndCallButton(mPrimary, callState),
+                callState != Call.State.INCOMING /* animate */);
+        ui.showVbButton(!isFullscreenMode);
         maybeShowManageConferenceCallButton();
     }
 
@@ -1285,5 +1290,6 @@
         void animateForNewOutgoingCall();
         void sendAccessibilityAnnouncement();
         void showNoteSentToast();
+        void showVbButton(boolean show);
     }
 }
diff --git a/InCallUI/src/com/android/incallui/CircularRevealFragment.java b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
index 01bd253..f9816de 100644
--- a/InCallUI/src/com/android/incallui/CircularRevealFragment.java
+++ b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
@@ -24,6 +24,7 @@
 import android.graphics.Outline;
 import android.graphics.Point;
 import android.os.Bundle;
+import android.os.Handler;
 import android.view.Display;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -39,9 +40,16 @@
 public class CircularRevealFragment extends Fragment {
     static final String TAG = "CircularRevealFragment";
 
+    // This is used to extend the expiration time of Circular reveal
+    // animation. So over all time the handler waits is Animation
+    // duration + REVEAL_ADDITIONAL_EXPIRATION_TIME and notifies
+    // the Circular reveal completion to listeners.
+    private static final int REVEAL_ADDITIONAL_EXPIRATION_TIME = 200;
+
     private Point mTouchPoint;
     private OnCircularRevealCompleteListener mListener;
     private boolean mAnimationStarted;
+    private boolean mAnimationFinished;
 
     interface OnCircularRevealCompleteListener {
         public void onCircularRevealComplete(FragmentManager fm);
@@ -123,6 +131,7 @@
         view.getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() {
             @Override
             public boolean onPreDraw() {
+                mAnimationFinished = false;
                 final ViewTreeObserver vto = view.getViewTreeObserver();
                 if (vto.isAlive()) {
                     vto.removeOnPreDrawListener(this);
@@ -132,13 +141,31 @@
                     animator.addListener(new AnimatorListenerAdapter() {
                         @Override
                         public void onAnimationEnd(Animator animation) {
+                            Log.w(TAG, " CircularRevealFragment - onAnimationEnd");
                             view.setClipToOutline(false);
-                            if (mListener != null) {
+                            if (mListener != null && mAnimationFinished == false) {
                                 mListener.onCircularRevealComplete(getFragmentManager());
+                                mAnimationFinished = true;
                             }
                         }
                     });
                     animator.start();
+                    // If somehow the animator is failed to run from lower layers,
+                    // need to wait for certain expiration time and inform the
+                    // listeners with OnCircularComplete callback so that rest of
+                    // the things will not be blocked.
+                    Handler handler = new Handler();
+                    handler.postDelayed(new Runnable() {
+                         @Override
+                         public void run() {
+                             Log.w(TAG, " Failed to complete animation");
+                             if (mListener != null && mAnimationFinished == false) {
+                                 mListener.onCircularRevealComplete(getFragmentManager());
+                                 mAnimationFinished = true;
+                             }
+                         }
+                    }, getResources().getInteger(R.integer.reveal_animation_duration) +
+                            REVEAL_ADDITIONAL_EXPIRATION_TIME);
                 }
                 return false;
             }
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 3956f04..dd2af36 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -214,6 +214,10 @@
         // TODO(klp): Do we need to add this back when prox sensor is not available?
         // lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
 
+        // Since activity is created newly, clear full screen flag. This will ensure that
+        // the flag is in sync with actual UI when UI is recreated due to orientation change.
+        InCallPresenter.getInstance().clearFullscreen();
+
         setContentView(R.layout.incall_screen);
 
         internalResolveIntent(getIntent());
diff --git a/InCallUI/src/com/android/incallui/InCallLowBatteryListener.java b/InCallUI/src/com/android/incallui/InCallLowBatteryListener.java
index 95da595..bdc46e1 100644
--- a/InCallUI/src/com/android/incallui/InCallLowBatteryListener.java
+++ b/InCallUI/src/com/android/incallui/InCallLowBatteryListener.java
@@ -205,10 +205,6 @@
             return;
         }
 
-        if (InCallPresenter.getInstance().isChangingConfigurations()) {
-            onConfigurationChanging(call);
-        }
-
         maybeProcessLowBatteryIndication(call);
     }
 
@@ -298,26 +294,6 @@
     }
 
     /**
-     * This API handles configuration changes done on low battery video call
-     *
-     * @param call The call on which configuration changes happened
-     */
-    private void onConfigurationChanging(Call call) {
-        if (call == null || !mPrimaryCallTracker.isPrimaryCall(call)) {
-           return;
-        }
-
-        Log.d(this, "onConfigurationChanging call = " + call);
-        /* If UE orientation changes with low battery dialog showing, then we need to
-           re-process the low battery indication to ensure that the low battery dialog
-           will be shown to user when the InCallActivity is recreated */
-        if (isLowBatteryDialogShowing()) {
-            dismissPendingDialogs();
-            mLowBatteryMap.replace(call, PROCESS_LOW_BATTERY);
-        }
-    }
-
-    /**
      * Handles changes to the details of the call.
      *
      * @param call The call for which the details changed.
@@ -421,8 +397,6 @@
         alertDialog.setOnDismissListener(new OnDismissListener() {
             @Override
             public void onDismiss(final DialogInterface dialog) {
-                Log.i(this, "displayLowBatteryAlert onDismiss");
-                mAlert = null;
             }
         });
 
diff --git a/InCallUI/src/com/android/incallui/InCallMessageController.java b/InCallUI/src/com/android/incallui/InCallMessageController.java
index e8611b4..d019f6b 100644
--- a/InCallUI/src/com/android/incallui/InCallMessageController.java
+++ b/InCallUI/src/com/android/incallui/InCallMessageController.java
@@ -36,7 +36,9 @@
 import com.android.incallui.InCallVideoCallCallbackNotifier.VideoEventListener;
 import com.android.incallui.InCallVideoCallCallbackNotifier.SessionModificationListener;
 import org.codeaurora.ims.QtiCallConstants;
+import org.codeaurora.ims.QtiCarrierConfigs;
 import org.codeaurora.ims.QtiVideoCallDataUsage;
+import org.codeaurora.ims.utils.QtiImsExtUtils;
 
 /**
  * This class listens to incoming events for the listener classes it implements. It should
@@ -165,8 +167,9 @@
             Log.e(this, "onVideoQualityChanged - Context is null/not primary call.");
             return;
         }
-        final Resources resources = mContext.getResources();
-        if (resources.getBoolean(R.bool.config_display_video_quality_toast)) {
+        if (QtiImsExtUtils.isCarrierConfigEnabled(mContext,
+                QtiCarrierConfigs.SHOW_VIDEO_QUALITY_TOAST)) {
+            final Resources resources = mContext.getResources();
             final String videoQualityChangedText = resources.getString(
                     R.string.video_quality_changed) + resources.getString(
                     QtiCallUtils.getVideoQualityResourceId(videoQuality));
@@ -186,8 +189,8 @@
             Log.e(this, "onCallSessionEvent - Context is null.");
             return;
         }
-        final Resources resources = mContext.getResources();
-        if (resources.getBoolean(R.bool.config_call_session_event_toast)) {
+        if (QtiImsExtUtils.isCarrierConfigEnabled(mContext,
+                QtiCarrierConfigs.SHOW_CALL_SESSION_EVENT_TOAST)) {
             QtiCallUtils.displayToast(mContext, QtiCallUtils.getCallSessionResourceId(event));
         }
     }
@@ -220,9 +223,9 @@
         Log.i(this, "onDetailsChanged LTE data value = " + lteUsage + " WiFi data value = " +
                 wlanUsage);
 
-        final Resources resources = mContext.getResources();
-        if (resources.getBoolean(R.bool.config_display_data_usage_toast)) {
-            final String dataUsageChangedText = resources.getString(
+        if (QtiImsExtUtils.isCarrierConfigEnabled(mContext,
+                QtiCarrierConfigs.SHOW_DATA_USAGE_TOAST)) {
+            final String dataUsageChangedText = mContext.getResources().getString(
                     R.string.wlan_data_usage_label) + wlanUsage;
             QtiCallUtils.displayToast(mContext, dataUsageChangedText);
         }
@@ -235,9 +238,9 @@
     @Override
     public void onCallDataUsageChange(final long dataUsage) {
         Log.d(this, "onCallDataUsageChange: dataUsage = " + dataUsage);
-        final Resources resources = mContext.getResources();
-        if (resources.getBoolean(R.bool.config_display_data_usage_toast)) {
-            final String dataUsageChangedText = resources.getString(
+        if (QtiImsExtUtils.isCarrierConfigEnabled(mContext,
+                QtiCarrierConfigs.SHOW_DATA_USAGE_TOAST)) {
+            final String dataUsageChangedText = mContext.getResources().getString(
                     R.string.lte_data_usage_label) + dataUsage;
             QtiCallUtils.displayToast(mContext, dataUsageChangedText);
         }
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 729bd33..c92151b 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -963,7 +963,7 @@
             InCallAudioManager.getInstance().onAnswerIncomingCall(call, videoState);
         }
 
-        if (call != null && VideoUtils.isVideoCall(videoState)) {
+        if (call != null) {
             showInCall(false, false/* newOutgoingCall */);
         }
     }
diff --git a/InCallUI/src/com/android/incallui/PictureModeHelper.java b/InCallUI/src/com/android/incallui/PictureModeHelper.java
new file mode 100644
index 0000000..d73ef3b
--- /dev/null
+++ b/InCallUI/src/com/android/incallui/PictureModeHelper.java
@@ -0,0 +1,335 @@
+/**
+ * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.android.incallui;
+
+import android.content.Context;
+import android.content.res.Resources;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.CheckBox;
+import android.widget.ListView;
+
+import com.android.incallui.InCallPresenter.InCallDetailsListener;
+import com.android.incallui.InCallPresenter.InCallStateListener;
+
+import java.util.ArrayList;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.List;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * This class displays the picture mode alert dialog and registers listener who wish to listen to
+ * user selection for the preview video and the incoming video.
+ */
+public class PictureModeHelper extends AlertDialog implements InCallDetailsListener,
+        InCallStateListener, CallList.Listener {
+
+    private AlertDialog mAlertDialog;
+
+    /**
+     * Indicates whether we should display camera preview video view
+     */
+    private static boolean mShowPreviewVideoView = true;
+
+    /**
+     * Indicates whether we should display incoming video view
+     */
+    private static boolean mShowIncomingVideoView = true;
+
+    public PictureModeHelper(Context context) {
+        super(context);
+    }
+
+    public void setUp(VideoCallPresenter videoCallPresenter) {
+        InCallPresenter.getInstance().addDetailsListener(this);
+        InCallPresenter.getInstance().addListener(this);
+        CallList.getInstance().addListener(this);
+        addListener(videoCallPresenter);
+    }
+
+    public void tearDown(VideoCallPresenter videoCallPresenter) {
+        InCallPresenter.getInstance().removeDetailsListener(this);
+        InCallPresenter.getInstance().removeListener(this);
+        CallList.getInstance().removeListener(this);
+        removeListener(videoCallPresenter);
+        mAlertDialog = null;
+    }
+
+    /**
+     * Displays the alert dialog
+     */
+    public void show() {
+        if (mAlertDialog != null) {
+            mAlertDialog.show();
+        }
+    }
+
+    /**
+     * Listener interface to implement if any class is interested in listening to preview
+     * video or incoming video selection changed
+     */
+    public interface Listener {
+        public void onPreviewVideoSelectionChanged();
+        public void onIncomingVideoSelectionChanged();
+    }
+
+    private final List<Listener> mListeners = new CopyOnWriteArrayList<>();
+
+    /**
+     * This method adds a new Listener. Users interested in listening to preview video selection
+     * and incoming video selection changes must register to this class
+     * @param Listener listener - the listener to be registered
+     */
+    public void addListener(Listener listener) {
+        Preconditions.checkNotNull(listener);
+        mListeners.add(listener);
+    }
+
+    /**
+     * This method unregisters the listener listening to preview video selection and incoming
+     * video selection
+     * @param Listener listener - the listener to be un-registered
+     */
+    public void removeListener(Listener listener) {
+        Preconditions.checkNotNull(listener);
+        mListeners.remove(listener);
+    }
+
+    /**
+     * Creates and displays the picture mode alert dialog to enable the user to switch
+     * between picture modes - Picture in picture, Incoming mode or Camera preview mode
+     * Once users makes their choice, they can save or cancel. Saving will apply the
+     * new picture mode to the video call by notifying video call presenter of the change.
+     * Cancel will dismiss the alert dialog without making any changes. Alert dialog is
+     * cancelable so pressing home/back key will dismiss the dialog.
+     * @param Context context - The application context.
+     */
+    public void create(Context context) {
+        final ArrayList<CharSequence> items = new ArrayList<CharSequence>();
+        final Resources res = context.getResources();
+
+        final InCallActivity inCallActivity = InCallPresenter.getInstance().getActivity();
+        if (inCallActivity == null) {
+            return;
+        }
+
+        final View checkboxView = inCallActivity.getLayoutInflater().
+                inflate(R.layout.qti_video_call_picture_mode_menu, null);
+
+        AlertDialog.Builder builder = new AlertDialog.Builder(context);
+        builder.setTitle(R.string.video_call_picture_mode_menu_title);
+        builder.setView(checkboxView);
+        builder.setCancelable(true);
+
+        CheckBox previewVideo = (CheckBox) checkboxView.findViewById(R.id.preview_video);
+        CheckBox incomingVideo = (CheckBox) checkboxView.findViewById(R.id.incoming_video);
+
+        if (previewVideo == null || incomingVideo == null) {
+            return;
+        }
+
+        // Intialize the checkboxes with the proper checked values
+        previewVideo.setChecked(mShowPreviewVideoView);
+        incomingVideo.setChecked(mShowIncomingVideoView);
+
+        // Ensure that at least one of the check boxes is enabled. Disable the other checkbox
+        // if checkbox is un-checked and vice versa. Say for e.g: if preview video was unchecked,
+        // disble incoming video and make it unclickable
+        enable(previewVideo, mShowIncomingVideoView);
+        enable(incomingVideo, mShowPreviewVideoView);
+
+        previewVideo.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                enable(incomingVideo, ((CheckBox) view).isChecked());
+            }
+        });
+
+        incomingVideo.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                enable(previewVideo, ((CheckBox) view).isChecked());
+            }
+        });
+
+        builder.setPositiveButton(res.getText(R.string.video_call_picture_mode_save_option),
+                new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int item) {
+                    mShowPreviewVideoView = previewVideo.isChecked();
+                    mShowIncomingVideoView = incomingVideo.isChecked();
+                    notifyOnSelectionChanged();
+                }
+        });
+
+        builder.setNegativeButton(res.getText(R.string.video_call_picture_mode_cancel_option),
+                new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int item) {
+                }
+        });
+
+        mAlertDialog = builder.create();
+        setDismissListener();
+    }
+
+    private void setDismissListener() {
+        mAlertDialog.setOnDismissListener(new OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    mAlertDialog = null;
+                }
+        });
+    }
+
+    /**
+     * This method enables or disables the checkbox passed in based on whether the flag enable
+     * is set to true or false. Also toggle the checkbox being clickable.
+     * @param CheckBox checkBox - the check Box to enable/disable
+     * @param boolean enable - Flag to enable/disable checkbox (true/false)
+     */
+    private void enable(CheckBox checkBox, boolean enable) {
+        checkBox.setEnabled(enable);
+        checkBox.setClickable(enable);
+    }
+
+    /**
+     * Determines if we can show the preview video view
+     */
+    public boolean canShowPreviewVideoView() {
+        return mShowPreviewVideoView;
+    }
+
+    /**
+     * Determines if we can show the incoming video view
+     */
+    public boolean canShowIncomingVideoView() {
+        return mShowIncomingVideoView;
+    }
+
+    /**
+     * Determines whether we are in Picture in Picture mode
+     */
+    public boolean isPipMode() {
+        return canShowPreviewVideoView() && canShowIncomingVideoView();
+    }
+
+    /**
+     * Notifies all registered classes of preview video or incoming video selection changed
+     */
+    public void notifyOnSelectionChanged() {
+        Preconditions.checkNotNull(mListeners);
+        for (Listener listener : mListeners) {
+            listener.onPreviewVideoSelectionChanged();
+            listener.onIncomingVideoSelectionChanged();
+        }
+    }
+
+    /**
+     * Listens to call details changed and dismisses the dialog if call has been downgraded to
+     * voice
+     * @param Call call - The call for which details changed
+     * @param android.telecom.Call.Details details - The changed details
+     */
+    @Override
+    public void onDetailsChanged(Call call, android.telecom.Call.Details details) {
+        if (call == null) {
+            return;
+        }
+        if (!VideoUtils.isVideoCall(call) && mAlertDialog != null) {
+            mAlertDialog.dismiss();
+        }
+    }
+
+    /**
+     * Handles call state changes
+     *
+     * @param InCallPresenter.InCallState oldState - The old call state
+     * @param InCallPresenter.InCallState newState - The new call state
+     * @param CallList callList - The call list.
+     */
+    @Override
+    public void onStateChange(InCallPresenter.InCallState oldState,
+            InCallPresenter.InCallState newState, CallList callList) {
+        Log.d(this, "onStateChange oldState" + oldState + " newState=" + newState);
+
+        if (newState == InCallPresenter.InCallState.NO_CALLS) {
+            // Set both display preview video and incoming video to true as default display mode is
+            // to show picture in picture.
+            mShowPreviewVideoView = true;
+            mShowIncomingVideoView = true;
+        }
+    }
+
+    /**
+     * Overrides onIncomingCall method of {@interface CallList.Listener}
+     * @param Call call - The incoming call
+     */
+    @Override
+    public void onIncomingCall(Call call) {
+        if (mAlertDialog != null) {
+            mAlertDialog.dismiss();
+        }
+    }
+
+    /**
+     * Overrides onCallListChange method of {@interface CallList.Listener}
+     * Added for completeness
+     */
+    @Override
+    public void onCallListChange(CallList list) {
+        // no-op
+    }
+
+    /**
+     * Overrides onUpgradeToVideo method of {@interface CallList.Listener}
+     * @param Call call - The call to be upgraded
+     */
+    @Override
+    public void onUpgradeToVideo(Call call) {
+        if (mAlertDialog != null) {
+            mAlertDialog.dismiss();
+        }
+    }
+
+    /**
+     * Overrides onDisconnect method of {@interface CallList.Listener}
+     * @param Call call - The call to be disconnected
+     */
+    @Override
+    public void onDisconnect(Call call) {
+        // no-op
+    }
+}
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java
index 63a0310..cea9c4d 100644
--- a/InCallUI/src/com/android/incallui/VideoCallFragment.java
+++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java
@@ -21,6 +21,7 @@
 import android.graphics.SurfaceTexture;
 import android.os.Bundle;
 import android.view.Display;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.Surface;
 import android.view.TextureView;
@@ -115,7 +116,7 @@
      * changes.
      */
     private static class VideoCallSurface implements TextureView.SurfaceTextureListener,
-            View.OnClickListener, View.OnAttachStateChangeListener {
+            View.OnClickListener, View.OnAttachStateChangeListener, View.OnLongClickListener {
         private int mSurfaceId;
         private VideoCallPresenter mPresenter;
         private TextureView mTextureView;
@@ -174,6 +175,7 @@
             mTextureView = view;
             mTextureView.setSurfaceTextureListener(this);
             mTextureView.setOnClickListener(this);
+            mTextureView.setOnLongClickListener(this);
 
             final boolean areSameSurfaces =
                     Objects.equal(mSavedSurfaceTexture, mTextureView.getSurfaceTexture());
@@ -412,6 +414,18 @@
         }
 
         /**
+         * Handles a user long pressing on the surface, which is the trigger to show the
+         * picture mode pop up alert dialog
+         *
+         * @param View The view receiving the long press.
+         */
+        @Override
+        public boolean onLongClick(View v) {
+            Log.d(this, "onLongClick:");
+            return mPresenter.onLongClick();
+        }
+
+        /**
          * Returns the dimensions of the surface.
          *
          * @return The dimensions of the surface.
@@ -690,9 +704,15 @@
             preview.setLayoutParams(params);
 
             if (mPreviewVideoContainer != null) {
-                ViewGroup.LayoutParams containerParams = mPreviewVideoContainer.getLayoutParams();
+                FrameLayout.LayoutParams containerParams = (FrameLayout.LayoutParams)
+                        mPreviewVideoContainer.getLayoutParams();
                 containerParams.width = width;
                 containerParams.height = height;
+                if (getPresenter().isCameraPreviewMode()) {
+                    containerParams.gravity = Gravity.CENTER;
+                } else {
+                    containerParams.gravity = Gravity.BOTTOM | Gravity.RIGHT;
+                }
                 mPreviewVideoContainer.setLayoutParams(containerParams);
             }
 
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index 5b7adcd..9b72c17 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -23,6 +23,7 @@
 import android.os.AsyncTask;
 import android.os.Handler;
 import android.os.Looper;
+import android.os.SystemProperties;
 import android.provider.ContactsContract;
 import android.content.pm.ActivityInfo;
 import android.telecom.Connection;
@@ -72,7 +73,7 @@
         IncomingCallListener, InCallOrientationListener, InCallStateListener,
         InCallDetailsListener, SurfaceChangeListener, VideoEventListener,
         InCallPresenter.InCallEventListener, InCallUiStateNotifierListener,
-        CallList.CallUpdateListener {
+        CallList.CallUpdateListener, PictureModeHelper.Listener {
     public static final String TAG = "VideoCallPresenter";
 
     public static final boolean DEBUG = false;
@@ -216,12 +217,36 @@
     private static boolean mIsIncomingVideoAvailable = false;
 
     /**
+     * Property when set will disable PIP mode.
+     * Default value is 0 (disable). To enable, set to 1 (enable)
+     */
+    private static final String PROP_DISABLE_VIDEOCALL_PIP_MODE =
+            "persist.disable.pip.mode";
+
+    /**
+     * Property set to specify the camera preview size when the picture mode is selected as
+     * camera preview mode only. Format is widthxheight (e.g 320x240)
+     */
+    private static final String PROP_CAMERA_PREVIEW_SIZE =
+            "persist.camera.preview.size";
+
+    private static final String CAMERA_PREVIEW_SIZE_DELIM = "x";
+
+    /**
+     * Cache the aspect ratio of the preview window.
+     */
+    private float mPreviewAspectRatio = 1.0f;
+
+    private PictureModeHelper mPictureModeHelper;
+
+    /**
      * Initializes the presenter.
      *
      * @param context The current context.
      */
     public void init(Context context) {
         mContext = context;
+        mPictureModeHelper = new PictureModeHelper(mContext);
         mMinimumVideoDimension = mContext.getResources().getDimension(
                 R.dimen.video_preview_small_dimension);
         mHandler = new Handler(Looper.getMainLooper());
@@ -255,6 +280,7 @@
         // To get updates of video call details changes
         InCallPresenter.getInstance().addDetailsListener(this);
         InCallPresenter.getInstance().addInCallEventListener(this);
+        mPictureModeHelper.setUp(this);
 
         // Register for surface and video events from {@link InCallVideoCallListener}s.
         InCallVideoCallCallbackNotifier.getInstance().addSurfaceChangeListener(this);
@@ -295,6 +321,8 @@
         if(mPrimaryCall != null) {
             CallList.getInstance().removeCallUpdateListener(mPrimaryCall.getId(), this);
         }
+        mPictureModeHelper.tearDown(this);
+        cancelAutoFullScreen();
     }
 
     /**
@@ -330,9 +358,7 @@
             // whether PLAYER_START event has been received or not. Since we
             // start with showing incoming video by default for surface creation,
             // we need to make sure we hide it once surface is available.
-            boolean isConf = (mPrimaryCall != null ? mPrimaryCall.isConferenceCall() :
-                    false);
-            showVideoUi(mCurrentVideoState, mCurrentCallState, isConf);
+            showVideoUi(mCurrentVideoState, mCurrentCallState, isConfCall());
         }
     }
 
@@ -414,10 +440,16 @@
         switch (surfaceId) {
             case VideoCallFragment.SURFACE_DISPLAY:
                 boolean isFullscreen = InCallPresenter.getInstance().toggleFullscreenMode();
-                Log.d(this, "toggleFullScreen = " + isFullscreen);
+                Log.d(this, "toggleFullScreen = " + isFullscreen + "surfaceId =" + surfaceId);
                 break;
             case VideoCallFragment.SURFACE_PREVIEW:
-                InCallZoomController.getInstance().onPreviewSurfaceClicked(mVideoCall);
+                if (mPictureModeHelper.canShowPreviewVideoView() &&
+                        mPictureModeHelper.canShowIncomingVideoView()) {
+                    InCallZoomController.getInstance().onPreviewSurfaceClicked(mVideoCall);
+                } else {
+                    isFullscreen = InCallPresenter.getInstance().toggleFullscreenMode();
+                    Log.d(this, "toggleFullScreen = " + isFullscreen + "surfaceId =" + surfaceId);
+                }
                 break;
             default:
                 break;
@@ -454,7 +486,6 @@
             if (isVideoMode()) {
                 exitVideoMode();
             }
-
             cleanupSurfaces();
         }
 
@@ -827,9 +858,11 @@
 
         final boolean isDisplaySurfaceCreated = ui.isDisplayVideoSurfaceCreated();
         final boolean isVideoReceptionEnabled = VideoProfile.isReceptionEnabled(videoState);
-        boolean showIncomingVideo = showIncomingVideo(videoState, callState) ||
+        boolean showIncomingVideo = (showIncomingVideo(videoState, callState) &&
+                mPictureModeHelper.canShowIncomingVideoView()) ||
                 (!isDisplaySurfaceCreated && isVideoReceptionEnabled);
-        boolean showOutgoingVideo = showOutgoingVideo(videoState);
+        boolean showOutgoingVideo = showOutgoingVideo(videoState) &&
+                mPictureModeHelper.canShowPreviewVideoView();
 
         Log.v(this, "showVideoUi : showIncoming = " + showIncomingVideo + " showOutgoing = "
                 + showOutgoingVideo);
@@ -838,7 +871,13 @@
 
             boolean hidePreview = shallHidePreview(isConf, videoState);
             Log.v(this, "showVideoUi, hidePreview = " + hidePreview);
-            ui.showOutgoingVideoView(!hidePreview);
+            if (hidePreview) {
+                ui.showOutgoingVideoView(!hidePreview);
+            }
+
+            if (showOutgoingVideo) {
+                setPreviewSize(mDeviceOrientation, mPreviewAspectRatio);
+            }
 
             if (isVideoReceptionEnabled) {
                 loadProfilePhotoAsync();
@@ -1034,9 +1073,11 @@
             aspectRatio = (float) width / (float) height;
         }
 
+        mPreviewAspectRatio = aspectRatio;
+
         // Resize the textureview housing the preview video and rotate it appropriately based on
         // the device orientation
-        setPreviewSize(mDeviceOrientation, aspectRatio);
+        setPreviewSize(mDeviceOrientation, mPreviewAspectRatio);
     }
 
     /**
@@ -1054,9 +1095,7 @@
             case Connection.VideoProvider.SESSION_EVENT_RX_RESUME:
                 mIsIncomingVideoAvailable =
                     event == Connection.VideoProvider.SESSION_EVENT_RX_RESUME;
-                boolean isConf = (mPrimaryCall != null ? mPrimaryCall.isConferenceCall() :
-                        false);
-                showVideoUi(mCurrentVideoState, mCurrentCallState, isConf);
+                showVideoUi(mCurrentVideoState, mCurrentCallState, isConfCall());
                 sb.append(mIsIncomingVideoAvailable ? "rx_resume" : "rx_pause");
                 break;
             case Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE:
@@ -1110,6 +1149,9 @@
         changePreviewDimensions(previewDimensions.x, previewDimensions.y);
 
         ui.setPreviewRotation(mDeviceOrientation);
+        // Notify picture mode changed so that if camera preview is showing in non PIP
+        // mode, we can correctly resize the camera preview by swapping width and height.
+        showVideoUi(mCurrentVideoState, mCurrentCallState, isConfCall());
     }
 
     /**
@@ -1123,24 +1165,45 @@
      * @param aspectRatio The aspect ratio of the camera (width / height).
      */
     private void setPreviewSize(int orientation, float aspectRatio) {
+        Log.d(this, "setPreviewSize: orientation = " + orientation +
+                " aspectRatio = " + aspectRatio);
         VideoCallUi ui = getUi();
         if (ui == null) {
             return;
         }
 
-        int height;
-        int width;
+        float height = 0.0f;
+        float width = 0.0f;
+        final boolean isPipMode = mPictureModeHelper.isPipMode();
 
-        if (orientation == InCallOrientationEventListener.SCREEN_ORIENTATION_90 ||
-                orientation == InCallOrientationEventListener.SCREEN_ORIENTATION_270) {
-            width = (int) (mMinimumVideoDimension * aspectRatio);
-            height = (int) mMinimumVideoDimension;
+        if (isPipMode) {
+            width = mMinimumVideoDimension;
+            height = mMinimumVideoDimension;
         } else {
-            // Portrait or reverse portrait orientation.
-            width = (int) mMinimumVideoDimension;
-            height = (int) (mMinimumVideoDimension * aspectRatio);
+            Point size = getPreviewVideoSize();
+            // Swap width and height if landscape
+            final boolean isLayoutLandscape = mContext.getResources().getBoolean(
+                R.bool.is_layout_landscape);
+            width = isLayoutLandscape ? size.y : size.x;
+            height = isLayoutLandscape ? size.x : size.y;
         }
-        ui.setPreviewSize(width, height);
+
+        final boolean hasNoPreviewSizeInProp = ((SystemProperties.get(
+                PROP_CAMERA_PREVIEW_SIZE, "")).isEmpty());
+
+        // Do not apply aspect ratio if camera preview is set in the adb property -
+        // "persist.camera.preview.size". Aspect ratio is applied to full screen size for
+        // camera preview and for Pip mode
+        if (hasNoPreviewSizeInProp || isPipMode) {
+            if (orientation == InCallOrientationEventListener.SCREEN_ORIENTATION_90 ||
+                    orientation == InCallOrientationEventListener.SCREEN_ORIENTATION_270) {
+                width = (aspectRatio > 1.0) ? width * aspectRatio : width / aspectRatio;
+            } else {
+                // Portrait or reverse portrait orientation.
+                height = (aspectRatio > 1.0) ? height * aspectRatio : height / aspectRatio;
+            }
+        }
+        ui.setPreviewSize((int) width, (int) height);
     }
 
     /**
@@ -1228,6 +1291,9 @@
         }
         Log.v(this, "cancelAutoFullScreen : cancelling pending");
         mAutoFullScreenPending = false;
+        if (mHandler != null) {
+            mHandler.removeCallbacks(mAutoFullscreenRunnable);
+        }
     }
 
     private static boolean isAudioRouteEnabled(int audioRoute, int audioRouteMask) {
@@ -1324,6 +1390,83 @@
     }
 
     /**
+     * The function is called to create and display picture mode alert dialog when user long
+     * presses on the video call screen
+     */
+     public boolean onLongClick() {
+        // Don't show the alert if either the adb property "persist.disable.pip.mode" is not set
+        // or if we are supposed to hide preview for conference calls
+        if ((SystemProperties.getInt(PROP_DISABLE_VIDEOCALL_PIP_MODE, 0) == 0) ||
+            shallHidePreview(isConfCall(), mCurrentVideoState)) {
+            return false;
+        }
+        mPictureModeHelper.create(mContext);
+        mPictureModeHelper.show();
+        return true;
+    }
+
+    /**
+     * Gets the preview video size either from the property - "persist.camera.preview.size" if it
+     * is set or return the full screen size
+     */
+    private Point getPreviewVideoSize() {
+        VideoCallUi ui = getUi();
+        if (ui == null) {
+            Log.e(this, "getPreviewVideoSize, VideoCallUi is null returning");
+            return null;
+        }
+
+        Point previewSize = getPreviewVideoSizeFromProp();
+
+        if (previewSize == null) {
+            previewSize = ui.getScreenSize();
+        }
+
+        return previewSize;
+    }
+
+    /**
+     * Gets the preview video size from the property - "persist.camera.preview.size"
+     * @return Point point - Size of the preview (width and height)
+     */
+    private static Point getPreviewVideoSizeFromProp() {
+        final String cameraPreviewSize = SystemProperties.get(
+                PROP_CAMERA_PREVIEW_SIZE, "");
+        if (!cameraPreviewSize.isEmpty()) {
+            final String[] sizeDimensions = cameraPreviewSize.split(CAMERA_PREVIEW_SIZE_DELIM);
+            final int width = Integer.parseInt(sizeDimensions[0]);
+            final int height = Integer.parseInt(sizeDimensions[1]);
+            return new Point(width, height);
+        }
+        return null;
+    }
+
+    /**
+     * Gets called when preview video selection changes
+     * @param boolean previewVideoSelection - New value for preview video selection
+     */
+    @Override
+    public void onPreviewVideoSelectionChanged() {
+        VideoCallUi ui = getUi();
+        if (ui == null) {
+            Log.e(this, "onPreviewVideoSelectionChanged, VideoCallUi is null returning");
+            return;
+        }
+
+        ui.showOutgoingVideoView(showOutgoingVideo(mCurrentVideoState) &&
+                mPictureModeHelper.canShowPreviewVideoView());
+    }
+
+    /**
+     * Gets called when incoming video selection changes
+     * @param boolean incomingVideoSelection - New value for incoming video selection
+     */
+    @Override
+    public void onIncomingVideoSelectionChanged() {
+        showVideoUi(mCurrentVideoState, mCurrentCallState, isConfCall());
+    }
+
+    /**
      * Starts an asynchronous load of the user's profile photo.
      */
     public void loadProfilePhotoAsync() {
@@ -1411,6 +1554,15 @@
                 && QtiImsExtUtils.shallHidePreviewInVtConference(mContext);
     }
 
+    private boolean isConfCall() {
+        return mPrimaryCall != null ? mPrimaryCall.isConferenceCall() : false;
+    }
+
+    public boolean isCameraPreviewMode() {
+        return mPictureModeHelper.canShowPreviewVideoView() &&
+                !(mPictureModeHelper.canShowIncomingVideoView());
+    }
+
     /**
      * Defines the VideoCallUI interactions.
      */
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6d94d8e..48d49af 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1161,4 +1161,6 @@
     <string name="alert_call_over_wifi">Calls will be made over Wi-Fi.</string>
     <string name="alert_call_no_cellular_coverage">No cellular network available. Connect to available Wi-Fi to make calls.</string>
     <string name="alert_user_connect_to_wifi_for_call">Connect to Wi-Fi to make calls.</string>
+    <string name="missing_account_type">(No type)</string>
+    <string name="missing_account_name">(No name)</string>
 </resources>
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java
index f0c1ce6..d661018 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -150,6 +150,18 @@
         }
 
         @Override
+        public Object instantiateItem(ViewGroup container, int position) {
+            final MSimCallLogFragment fragment =
+                    (MSimCallLogFragment) super.instantiateItem(container, position);
+            switch (position) {
+                case TAB_INDEX_MSIM:
+                    mMSimCallsFragment = fragment;
+                    break;
+            }
+            return fragment;
+        }
+
+        @Override
         public int getCount() {
             return TAB_INDEX_COUNT_MSIM;
         }
diff --git a/src/com/android/dialer/database/DialerDatabaseHelper.java b/src/com/android/dialer/database/DialerDatabaseHelper.java
index 1d3de31..2d9b8aa 100644
--- a/src/com/android/dialer/database/DialerDatabaseHelper.java
+++ b/src/com/android/dialer/database/DialerDatabaseHelper.java
@@ -943,10 +943,24 @@
                 insert.bindLong(12, updatedContactCursor.getInt(PhoneQuery.PHONE_IS_PRIMARY));
                 insert.bindLong(13, updatedContactCursor.getInt(PhoneQuery.PHONE_CARRIER_PRESENCE));
                 insert.bindLong(14, currentMillis);
-                insert.bindString(15, updatedContactCursor
-                        .getString(PhoneQuery.PHONE_ACCOUNT_TYPE));
-                insert.bindString(16, updatedContactCursor
-                        .getString(PhoneQuery.PHONE_ACCOUNT_NAME));
+
+                final String accountType = updatedContactCursor.getString(
+                        PhoneQuery.PHONE_ACCOUNT_TYPE);
+                if (accountType == null) {
+                    insert.bindString(15, mContext.getResources().getString(
+                            R.string.missing_account_type));
+                } else {
+                    insert.bindString(15, accountType);
+                }
+
+                final String accountName = updatedContactCursor.getString(
+                        PhoneQuery.PHONE_ACCOUNT_NAME);
+                if (accountName == null) {
+                    insert.bindString(16, mContext.getResources().getString(
+                            R.string.missing_account_name));
+                } else {
+                    insert.bindString(16, accountName);
+                }
                 insert.executeInsert();
                 final String contactPhoneNumber =
                         updatedContactCursor.getString(PhoneQuery.PHONE_NUMBER);