Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b040158d authored by Tyler Gunn's avatar Tyler Gunn
Browse files

DO NOT MERGE Video call upgrade/dowgrade request changes.

- fixed potential NPE in VideoCallFragment when setting preview size.
- moved photo load into the postExecute for the async task -- it is
already threaded and I was seeing intermittent concurrency issues.

- Changed CallButtonFragment to retrieve max # of buttons from config.xml.
  - Added override for wider screens (e.g. N6 and wider) to show an extra
    button.
- Reorganized call buttons so that the "Camera on/off" button is adjacent
to the flip camera button.
- Changed answer Glowpad to pass correct video state so that accepting a
video request uses the correct state (important for accepting requests to
turn camera back on).
- added new Session modification state REQUEST_REJECTED for when the remote
user explicitly declines the request.  This is used to trigger a
"video request rejected" message when the remote party rejects the
request.

Bug: 20257400
Change-Id: Ibe25eb045ee868748f91bf411f285629d36ebcd2
parent 99e41441
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -122,6 +122,13 @@
        <!-- This slot is either "Add" or "Merge", depending on the state of the call.  One or the
             other of these must always be set to GONE. -->

        <!-- "Turn off camera" for video calls. -->
        <ToggleButton android:id="@+id/pauseVideoButton"
            style="@style/InCallCompoundButton"
            android:background="@drawable/btn_compound_video_off"
            android:contentDescription="@string/onscreenPauseVideoText"
            android:visibility="gone" />

        <!-- "Add Call" -->
        <ImageButton android:id="@+id/addButton"
            style="@style/InCallButton"
@@ -138,13 +145,6 @@
            android:contentDescription="@string/onscreenMergeCallsText"
            android:visibility="gone" />

        <!-- "Turn off camera" for video calls. -->
        <ToggleButton android:id="@+id/pauseVideoButton"
            style="@style/InCallCompoundButton"
            android:background="@drawable/btn_compound_video_off"
            android:contentDescription="@string/onscreenPauseVideoText"
            android:visibility="gone" />

        <!-- "Overflow" -->
        <ImageButton android:id="@+id/overflowButton"
            style="@style/InCallButton"
+7 −0
Original line number Diff line number Diff line
@@ -80,6 +80,13 @@

    </FrameLayout>

    <fragment android:name="com.android.incallui.VideoCallFragment"
        android:id="@+id/videoCallFragment"
        android:layout_alignParentTop="true"
        android:layout_gravity="top|center_horizontal"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. -->
    <FrameLayout
        android:id="@+id/progressSpinner"
+21 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 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
  -->

<resources>
    <!-- Determines the maximum number of buttons visible on the call card.  Any buttons over this
         count are put into the overflow menu. -->
    <integer name="call_card_max_buttons">6</integer>
</resources>
 No newline at end of file
+7 −44
Original line number Diff line number Diff line
@@ -112,61 +112,24 @@
        <item>@string/description_direction_down</item>
    </array>


    <!-- For upgrade to video from VOLTE to VT (Tx/Rx/Bidirectional) in an active video call.
    <!-- For accept/reject upgrade to video in active video call
         - Accept upgrade to video request (drag right)
         - Decline upgrade to video request (drag left)
         - Answer as audio call (drag down) -->
    <array name="incoming_call_widget_video_upgrade_request_targets">
         - Decline upgrade to video request (drag left)-->
    <array name="incoming_call_widget_video_request_targets">
        <item>@drawable/ic_lockscreen_answer_video</item>
        <item>@null</item>
        <item>@drawable/ic_lockscreen_decline</item>
        <item>@drawable/ic_lockscreen_answer</item>
        <item>@drawable/ic_lockscreen_decline_video</item>
    </array>
    <array name="incoming_call_widget_video_upgrade_request_target_descriptions">

    <array name="incoming_call_widget_video_request_target_descriptions">
        <item>@string/description_target_accept_upgrade_to_video_request</item>
        <item>@null</item>
        <item>@string/description_target_decline_upgrade_to_video_request</item>
        <item>@null</item>"
    </array>
    <array name="incoming_call_widget_video_upgrade_request_target_direction_descriptions">
    <array name="incoming_call_widget_video_request_target_direction_descriptions">
        <item>@string/description_direction_right</item>
        <item>@null</item>
        <item>@string/description_direction_left</item>
        <item>@null</item>
    </array>

    <!-- For accept/reject upgrade to video in active video call
         - Accept upgrade to video request (drag right)
         - Decline upgrade to video request (drag left)-->
    <array name="incoming_call_widget_bidirectional_video_accept_reject_request_targets">
        <item>@drawable/ic_lockscreen_answer_video</item>
        <item>@drawable/ic_lockscreen_decline</item>
    </array>

    <!-- For accept/reject upgrade to video transmit in active video call
         - Accept upgrade to video request (drag right)
         - Decline upgrade to video request (drag left)
         TODO: This should be automatically rejected in the lower layers -->
    <array name="incoming_call_widget_video_transmit_accept_reject_request_targets">
        <item>@drawable/ic_lockscreen_answer_video</item>
        <item>@drawable/ic_lockscreen_decline</item>
    </array>
    <array name="incoming_call_widget_video_transmit_request_target_descriptions">
        <item>@string/description_target_accept_upgrade_to_video_request</item>
        <item>@string/description_target_decline_upgrade_to_video_request</item>
    </array>

    <!-- For accept/reject upgrade to video receive in active video call
         - Accept upgrade to video request (drag right)
         - Decline upgrade to video request (drag left)-->
    <array name="incoming_call_widget_video_receive_accept_reject_request_targets">
        <item>@drawable/ic_lockscreen_answer_video</item>
        <item>@drawable/ic_lockscreen_decline</item>
    </array>
    <array name="incoming_call_widget_video_receive_request_target_descriptions">
        <item>@string/description_target_accept_upgrade_to_video_request</item>
        <item>@string/description_target_decline_upgrade_to_video_request</item>
    </array>

</resources>
+20 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 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
  -->
<resources>
    <!-- Determines the maximum number of buttons visible on the call card.  Any buttons over this
         count are put into the overflow menu. -->
    <integer name="call_card_max_buttons">5</integer>
</resources>
 No newline at end of file
Loading