From e0d1987445a74bf7b3bd98c7483b810e6f1d8f98 Mon Sep 17 00:00:00 2001 From: Alan Evans Date: Mon, 29 Jul 2019 09:36:48 -0400 Subject: [PATCH] Accessible call answering/rejecting and content descriptions. --- res/drawable/webrtc_camera_flip_button.xml | 8 + res/layout/webrtc_answer_decline_button.xml | 164 ++++---- ...ebrtc_answer_decline_button_accessible.xml | 42 ++ res/layout/webrtc_call_activity.xml | 15 +- res/layout/webrtc_call_controls.xml | 92 +++-- res/layout/webrtc_call_screen.xml | 318 ++++++++------- res/values/strings.xml | 13 +- res/values/styles.xml | 25 +- .../webrtc/WebRtcAnswerDeclineButton.java | 369 ++++++++++-------- .../components/webrtc/WebRtcCallControls.java | 7 - .../components/webrtc/WebRtcCallScreen.java | 15 +- .../securesms/util/ServiceUtil.java | 5 + 12 files changed, 600 insertions(+), 473 deletions(-) create mode 100644 res/drawable/webrtc_camera_flip_button.xml create mode 100644 res/layout/webrtc_answer_decline_button_accessible.xml diff --git a/res/drawable/webrtc_camera_flip_button.xml b/res/drawable/webrtc_camera_flip_button.xml new file mode 100644 index 0000000000..9e9447f382 --- /dev/null +++ b/res/drawable/webrtc_camera_flip_button.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/res/layout/webrtc_answer_decline_button.xml b/res/layout/webrtc_answer_decline_button.xml index de80ede2b3..470b2906f1 100644 --- a/res/layout/webrtc_answer_decline_button.xml +++ b/res/layout/webrtc_answer_decline_button.xml @@ -1,87 +1,99 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipToPadding="false" + tools:background="#7f000000" + tools:orientation="vertical" + tools:parentTag="android.widget.LinearLayout"> - + - + - + - + - + - - - + + \ No newline at end of file diff --git a/res/layout/webrtc_answer_decline_button_accessible.xml b/res/layout/webrtc_answer_decline_button_accessible.xml new file mode 100644 index 0000000000..77a5862a0f --- /dev/null +++ b/res/layout/webrtc_answer_decline_button_accessible.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/webrtc_call_activity.xml b/res/layout/webrtc_call_activity.xml index 6611afd961..e0ea58bd81 100644 --- a/res/layout/webrtc_call_activity.xml +++ b/res/layout/webrtc_call_activity.xml @@ -1,12 +1,5 @@ - - - - - - - + diff --git a/res/layout/webrtc_call_controls.xml b/res/layout/webrtc_call_controls.xml index 410f488ce6..763ab58934 100644 --- a/res/layout/webrtc_call_controls.xml +++ b/res/layout/webrtc_call_controls.xml @@ -1,47 +1,63 @@ + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/inCallControls" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + tools:background="@color/textsecure_primary" + tools:showIn="@layout/webrtc_call_screen"> - + - + - + - + - + diff --git a/res/layout/webrtc_call_screen.xml b/res/layout/webrtc_call_screen.xml index 816f04e76d..3ed67b46c2 100644 --- a/res/layout/webrtc_call_screen.xml +++ b/res/layout/webrtc_call_screen.xml @@ -1,5 +1,4 @@ - - + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/incall_screen" + android:layout_width="match_parent" + android:layout_height="match_parent"> + android:id="@+id/remote_render_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:visibility="invisible" /> - + - + - + - + - + + +