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

Commit 82c77179 authored by Nancy Chen's avatar Nancy Chen
Browse files

Make secondary info visible for multi-window InCallUI.

Secondary info was previously hidden after the layout refactoring to
support resizing in multi-window mode. Make it visible and also keep it
at the bottom of the screen because the vertical screen real estate is
limited.

Bug: 26253432

Change-Id: I8e7f3b462784c7af62ccdb95e637595f7d382edd
parent bace43b4
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -44,21 +44,22 @@
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal" />

        <!-- Secondary "Call info" block, for the background ("on hold") call. -->
        <include layout="@layout/secondary_call_info"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="bottom" />

    </LinearLayout>

    <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. -->
    <FrameLayout
        android:id="@+id/answer_and_dialpad_container"
        android:layout_width="match_parent"
        android:elevation="7dp"
        android:elevation="@dimen/dialpad_elevation"
        android:layout_height="match_parent" />

    <!-- Secondary "Call info" block, for the background ("on hold") call. -->
    <include layout="@layout/secondary_call_info"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:elevation="4dp"
             android:layout_alignParentBottom="true" />

    <FrameLayout
        android:id="@+id/floating_end_call_action_button_container"
        android:layout_width="@dimen/end_call_floating_action_button_diameter"
+5 −0
Original line number Diff line number Diff line
@@ -16,9 +16,14 @@
  -->

<resources>
    <!-- Whether or not this layout displays a large photo. -->
    <bool name="has_large_photo">true</bool>

    <dimen name="call_banner_height">90dp</dimen>

    <dimen name="end_call_button_margin_bottom">15dp</dimen>

    <dimen name="floating_action_button_vertical_offset">-24dp</dimen>

    <dimen name="dialpad_elevation">2dp</dimen>
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
  -->

<resources>
    <!-- Whether or not this layout displays a large photo. -->
    <bool name="has_large_photo">true</bool>

    <!-- Whether or not the landscape mode layout is currently being used -->
    <bool name="is_layout_landscape">true</bool>
    <!-- Height and width of the in-call buttons. -->
@@ -23,4 +26,6 @@
    <!-- Margin underneath the call buttons. This is used only in landscape mode and is sized
         so that the call buttons are center aligned with the end call button. -->
    <dimen name="call_buttons_bottom_margin">30dp</dimen>

    <dimen name="dialpad_elevation">2dp</dimen>
</resources>
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
  -->

<resources>
    <!-- Whether or not this layout displays a large photo. -->
    <bool name="has_large_photo">false</bool>

    <!-- Whether or not the landscape mode layout is currently being used -->
    <bool name="is_layout_landscape">false</bool>

@@ -57,8 +60,8 @@
    <!-- Height and width of the in-call buttons. -->
    <dimen name="in_call_button_dimension">48dp</dimen>

    <dimen name="primary_call_elevation">5dp</dimen>
    <dimen name="dialpad_elevation">2dp</dimen>
    <dimen name="primary_call_elevation">0dp</dimen>
    <dimen name="dialpad_elevation">5dp</dimen>

    <!-- The InCallUI dialpad will sometimes want digits sizes that are different from dialer.
         Note: These are the default sizes for small (<600dp height) devices: larger screen sizes
+3 −1
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
    private int mFabNormalDiameter;
    private int mFabSmallDiameter;
    private boolean mIsLandscape;
    private boolean mHasLargePhoto;
    private boolean mIsDialpadShowing;

    // Primary caller info
@@ -1333,7 +1334,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
        int offsetY = 0;
        if (!mIsDialpadShowing) {
            offsetY = mFloatingActionButtonVerticalOffset;
            if (mSecondaryCallInfo.isShown()) {
            if (mSecondaryCallInfo.isShown() && mHasLargePhoto) {
                offsetY -= mSecondaryCallInfo.getHeight();
            }
        }
@@ -1363,6 +1364,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
        }

        mIsLandscape = getResources().getBoolean(R.bool.is_layout_landscape);
        mHasLargePhoto = getResources().getBoolean(R.bool.has_large_photo);

        final ViewGroup parent = ((ViewGroup) mPrimaryCallCardContainer.getParent());
        final ViewTreeObserver observer = parent.getViewTreeObserver();