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

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

Adding video call icon in secondary call info.

- Icon indicates that a call is a video call.  Per mocks.

Bug: 20119995
Change-Id: Ibccfccaa3f2762659282bbde433796fe20da361c
parent da9a49ce
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -40,6 +40,13 @@
        android:paddingBottom="@dimen/secondary_call_info_vertical_padding"
        android:background="?android:attr/selectableItemBackground">

        <ImageView android:id="@+id/secondaryCallVideoCallIcon"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:src="@drawable/ic_toolbar_video"
                   android:tint="@color/incall_banner_secondary_text_color"
                   android:paddingEnd="16dp"/>

        <ImageView android:id="@+id/secondaryCallConferenceCallIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
+5 −1
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
    private View mSecondaryCallProviderInfo;
    private TextView mSecondaryCallProviderLabel;
    private View mSecondaryCallConferenceCallIcon;
    private View mSecondaryCallVideoCallIcon;
    private View mProgressSpinner;

    private View mManageConferenceCallButton;
@@ -451,7 +452,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr

    @Override
    public void setSecondary(boolean show, String name, boolean nameIsNumber, String label,
            String providerLabel, boolean isConference) {
            String providerLabel, boolean isConference, boolean isVideoCall) {

        if (show != mSecondaryCallInfo.isShown()) {
            updateFabPositionForSecondaryCallInfo();
@@ -462,6 +463,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
            showAndInitializeSecondaryCallInfo(hasProvider);

            mSecondaryCallConferenceCallIcon.setVisibility(isConference ? View.VISIBLE : View.GONE);
            mSecondaryCallVideoCallIcon.setVisibility(isVideoCall ? View.VISIBLE : View.GONE);

            mSecondaryCallName.setText(nameIsNumber
                    ? PhoneNumberUtils.ttsSpanAsPhoneNumber(name)
@@ -749,6 +751,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
            mSecondaryCallName = (TextView) getView().findViewById(R.id.secondaryCallName);
            mSecondaryCallConferenceCallIcon =
                    getView().findViewById(R.id.secondaryCallConferenceCallIcon);
            mSecondaryCallVideoCallIcon =
                    getView().findViewById(R.id.secondaryCallVideoCallIcon);
        }

        if (mSecondaryCallProviderLabel == null && hasProvider) {
+9 −5
Original line number Diff line number Diff line
@@ -525,7 +525,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>

        if (mSecondary == null) {
            // Clear the secondary display info.
            ui.setSecondary(false, null, false, null, null, false /* isConference */);
            ui.setSecondary(false, null, false, null, null, false /* isConference */,
                    false /* isVideoCall */);
            return;
        }

@@ -536,7 +537,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
                    false /* nameIsNumber */,
                    null /* label */,
                    getCallProviderLabel(mSecondary),
                    true /* isConference */);
                    true /* isConference */,
                    mSecondary.isVideoCall(mContext));
        } else if (mSecondaryContactInfo != null) {
            Log.d(TAG, "updateSecondaryDisplayInfo() " + mSecondaryContactInfo);
            String name = getNameForCall(mSecondaryContactInfo);
@@ -547,10 +549,12 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
                    nameIsNumber,
                    mSecondaryContactInfo.label,
                    getCallProviderLabel(mSecondary),
                    false /* isConference */);
                    false /* isConference */,
                    mSecondary.isVideoCall(mContext));
        } else {
            // Clear the secondary display info.
            ui.setSecondary(false, null, false, null, null, false /* isConference */);
            ui.setSecondary(false, null, false, null, null, false /* isConference */,
                    false /* isVideoCall */);
        }
    }

@@ -735,7 +739,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
        void setPrimary(String number, String name, boolean nameIsNumber, String label,
                Drawable photo, boolean isSipCall);
        void setSecondary(boolean show, String name, boolean nameIsNumber, String label,
                String providerLabel, boolean isConference);
                String providerLabel, boolean isConference, boolean isVideoCall);
        void setCallState(int state, int videoState, int sessionModificationState,
                DisconnectCause disconnectCause, String connectionLabel,
                Drawable connectionIcon, String gatewayNumber, boolean isWifi);