Upgrade / downgrade requests

- Remove unnecessary "change to voice" button.
- Remove "modify call option" dialog that showed up in the past when
pressing the "upgrade to video button".
- Cleaned up some unnecessary Toasts for call session events, data
usage, and video quality
- Implemented the camera on/off functionality.
- Change preview to show the user's profile photo when their camera is
turned off, as well as a "camera off" icon.

Bug: 20257400
Change-Id: I6b7bb3d2394467f1345a798557130b2a674337c4
diff --git a/InCallUI/res/drawable/btn_change_to_voice.xml b/InCallUI/res/drawable/btn_change_to_voice.xml
deleted file mode 100644
index 86a7f21..0000000
--- a/InCallUI/res/drawable/btn_change_to_voice.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  ~ Copyright (C) 2014 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:id="@+id/backgroundItem"
-          android:drawable="@drawable/btn_background" />
-
-    <item>
-        <bitmap android:src="@drawable/ic_toolbar_audio_phone"
-            android:gravity="center"
-            android:tint="@color/selectable_icon_tint"
-            android:autoMirrored="true" />
-    </item>
-
-</layer-list>
\ No newline at end of file
diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml
index 81c3f69..73d14eb 100644
--- a/InCallUI/res/layout/call_button_fragment.xml
+++ b/InCallUI/res/layout/call_button_fragment.xml
@@ -70,13 +70,6 @@
             android:background="@drawable/btn_compound_audio"
             android:contentDescription="@string/audio_mode_speaker" />
 
-        <!-- "Change to audio call" for video calls. -->
-        <ImageButton android:id="@+id/changeToVoiceButton"
-            style="@style/InCallButton"
-            android:background="@drawable/btn_change_to_voice"
-            android:contentDescription="@string/onscreenChangeToVoiceText"
-            android:visibility="gone" />
-
         <!-- MIDDLE LEFT SLOT ================================================================== -->
 
         <!-- "Mute" -->
@@ -146,7 +139,7 @@
             android:contentDescription="@string/onscreenMergeCallsText"
             android:visibility="gone" />
 
-        <!-- "Switch camera" for video calls. -->
+        <!-- "Turn off camera" for video calls. -->
         <ToggleButton android:id="@+id/pauseVideoButton"
             style="@style/InCallCompoundButton"
             android:background="@drawable/btn_compound_video_off"
diff --git a/InCallUI/res/layout/video_call_views.xml b/InCallUI/res/layout/video_call_views.xml
index 8961ea4..b0c6ce2 100644
--- a/InCallUI/res/layout/video_call_views.xml
+++ b/InCallUI/res/layout/video_call_views.xml
@@ -26,10 +26,41 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
     <!-- The width and height are replaced at runtime based on the selected camera. -->
-    <TextureView
-        android:id="@+id/previewVideo"
-        android:layout_gravity="bottom|right"
-        android:layout_margin="@dimen/video_preview_margin"
+    <FrameLayout
+        android:id="@+id/previewVideoContainer"
         android:layout_width="70dp"
-        android:layout_height="120dp" />
+        android:layout_height="120dp"
+        android:layout_gravity="bottom|right"
+        android:layout_margin="@dimen/video_preview_margin" >
+
+        <!-- The video preview surface, where the user's outgoing video is shown. -->
+        <TextureView
+            android:id="@+id/previewVideo"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+        <!-- The user's profile photo, shown when the user's camera is shut off. -->
+        <ImageView
+            android:id="@+id/previewProfilePhoto"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:scaleType="centerInside"
+            android:adjustViewBounds="false"
+            android:contentDescription="@string/profile_photo_description"
+            android:background="@android:color/black"
+            android:visibility="gone" />
+
+        <!-- The "camera off" icon, shown when the user's camera is shut off. -->
+        <ImageView
+            android:id="@+id/previewCameraOff"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom|right"
+            android:layout_marginEnd="10dp"
+            android:layout_marginBottom="10dp"
+            android:scaleType="centerCrop"
+            android:contentDescription="@string/camera_off_description"
+            android:src="@drawable/ic_toolbar_video_off"
+            android:visibility="gone" />
+    </FrameLayout>
 </FrameLayout>
diff --git a/InCallUI/res/values/strings.xml b/InCallUI/res/values/strings.xml
index 332576d..628d0bf 100644
--- a/InCallUI/res/values/strings.xml
+++ b/InCallUI/res/values/strings.xml
@@ -294,13 +294,6 @@
     <!-- Text for the onscreen overflow button, to see additional actions which can be done. -->
     <string name="onscreenOverflowText">More options</string>
 
-    <!-- STOPSHIP -  For test only - In-call screen: Modify Call Options for IMS call -->
-    <string name="modify_call_option_title" translatable="false">Which type of call?</string>
-    <string name="modify_call_option_vt" translatable="false">Video bidirectional</string>
-    <string name="modify_call_option_vt_tx" translatable="false">Video transmit</string>
-    <string name="modify_call_option_vt_rx" translatable="false">Video receive</string>
-    <string name="modify_call_option_voice" translatable="false">Voice Only</string>
-
     <!-- Message indicating that Video Started flowing for IMS-VT calls -->
     <string name="player_started">Player Started</string>
     <!-- Message indicating that Video Stopped flowing for IMS-VT calls -->
@@ -444,17 +437,6 @@
     <!-- This can be used in any application wanting to disable the text "Emergency number" -->
     <string name="emergency_call_dialog_number_for_display">Emergency number</string>
 
-    <!-- Video quality changed message -->
-    <string name="video_quality_changed" translatable="false">Video quality changed to \u0020</string>
-    <!-- Video quality High -->
-    <string name="video_quality_high" translatable="false">High</string>
-    <!-- Video quality Medium -->
-    <string name="video_quality_medium" translatable="false">Medium</string>
-    <!-- Video quality Low -->
-    <string name="video_quality_low" translatable="false">Low</string>
-    <!-- Video quality Unknown -->
-    <string name="video_quality_unknown" translatable="false">Unknown</string>
-
     <!-- Phrase describing a time duration using seconds [CHAR LIMIT=16] -->
     <plurals name="duration_seconds">
         <item quantity="one">1 second</item>
@@ -470,4 +452,12 @@
         <item quantity="one">1 hour</item>
         <item quantity="other"><xliff:g id="count">%d</xliff:g> hours</item>
     </plurals>
+
+    <!-- Description of the profile photo shown when the device's camera is disabled udring a video
+        call. [CHAR LIMIT=NONE] -->
+    <string name="profile_photo_description">Profile photo</string>
+
+    <!-- Description of the "camera off" icon displayed when the device's camera is disabled during
+         a video call. [CHAR LIMIT=NONE] -->
+    <string name="camera_off_description">Camera off</string>
 </resources>