Clean up camera flipping, handle having missing cameras.

Did a refactor to better organize the camera flipping code. Also, I
wanted to make sure we handle the cases where the user doesn't have two
cameras (or no cameras, for that matter). In these cases, we just don't
show the appropriate buttons.
This commit is contained in:
Greyson Parrelli
2018-04-25 11:00:03 -07:00
parent f1c79eaebf
commit ca8fecea9c
11 changed files with 372 additions and 258 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="5dp"
android:left="5dp"
android:right="5dp"
android:bottom="5dp"
android:drawable="@drawable/quick_camera_front"/>
</layer-list>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/webrtc_control_background"/>
<item android:top="5dp"
android:left="5dp"
android:right="5dp"

View File

@@ -41,6 +41,7 @@
android:id="@+id/camera_flip_button"
style="@style/WebRtcCallCompoundButton"
android:contentDescription="@string/redphone_call_controls__flip_camera_rear"
android:background="@drawable/webrtc_camera_flip_button"/>
android:background="@drawable/webrtc_camera_rear_button"
android:visibility="gone"/>
</merge>

View File

@@ -995,7 +995,7 @@
<!--- redphone_call_controls -->
<string name="redphone_call_card__signal_call">Signal Call</string>
<string name="redphone_call_controls__mute">Mute</string>
<string name="redphone_call_controls__flip_camera_rear">Use rear camera</string>
<string name="redphone_call_controls__flip_camera_rear">Switch Cameras</string>
<string name="redphone_call_controls__signal_call">Signal Call</string>
<!-- registration_activity -->