diff options
author | wangqi <wangqi@google.com> | 2017-11-29 14:29:31 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-29 16:32:46 -0800 |
commit | 1d62ab209130bdacdb64b2cd824b5ff35817b89f (patch) | |
tree | 04e535956686bb2a8ddc98977fb305faa19bb77f /java/com/android/incallui/incall/impl | |
parent | b33463c7cdf3a4d481767452d3a21c09527ffcb1 (diff) | |
download | android_packages_apps_Dialer-1d62ab209130bdacdb64b2cd824b5ff35817b89f.tar.gz android_packages_apps_Dialer-1d62ab209130bdacdb64b2cd824b5ff35817b89f.tar.bz2 android_packages_apps_Dialer-1d62ab209130bdacdb64b2cd824b5ff35817b89f.zip |
Enable timer in emergency call.
"This phone's number: xxx" is shown for emergency call which replaces in call
timer. This change move it to under emergency location service so timer could
be shown again.
Bug: 69810801
Test: manual
PiperOrigin-RevId: 177363955
Change-Id: I543fbbee869923800ffd92a5799819b712f0b953
Diffstat (limited to 'java/com/android/incallui/incall/impl')
-rw-r--r-- | java/com/android/incallui/incall/impl/InCallFragment.java | 14 | ||||
-rw-r--r-- | java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml | 21 |
2 files changed, 19 insertions, 16 deletions
diff --git a/java/com/android/incallui/incall/impl/InCallFragment.java b/java/com/android/incallui/incall/impl/InCallFragment.java index 73b414d46..a4dcd72a8 100644 --- a/java/com/android/incallui/incall/impl/InCallFragment.java +++ b/java/com/android/incallui/incall/impl/InCallFragment.java @@ -42,6 +42,7 @@ import android.widget.Toast; import com.android.dialer.common.Assert; import com.android.dialer.common.FragmentUtils; import com.android.dialer.common.LogUtil; +import com.android.dialer.compat.ActivityCompat; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.multimedia.MultimediaData; @@ -153,6 +154,7 @@ public class InCallFragment extends Fragment (ImageView) view.findViewById(R.id.contactgrid_avatar), getResources().getDimensionPixelSize(R.dimen.incall_avatar_size), true /* showAnonymousAvatar */); + contactGridManager.onMultiWindowModeChanged(ActivityCompat.isInMultiWindowMode(getActivity())); paginator = (InCallPaginator) view.findViewById(R.id.incall_paginator); pager = (LockableViewPager) view.findViewById(R.id.incall_pager); @@ -258,18 +260,9 @@ public class InCallFragment extends Fragment // Hide the avatar to make room for location contactGridManager.setAvatarHidden(true); - // Need to widen the contact grid to fit location information - View contactGridView = getView().findViewById(R.id.incall_contact_grid); - ViewGroup.LayoutParams params = contactGridView.getLayoutParams(); - if (params instanceof ViewGroup.MarginLayoutParams) { - ((ViewGroup.MarginLayoutParams) params).setMarginStart(0); - ((ViewGroup.MarginLayoutParams) params).setMarginEnd(0); - } - contactGridView.setLayoutParams(params); - // Need to let the dialpad move up a little further when location info is being shown View dialpadView = getView().findViewById(R.id.incall_dialpad_container); - params = dialpadView.getLayoutParams(); + ViewGroup.LayoutParams params = dialpadView.getLayoutParams(); if (params instanceof RelativeLayout.LayoutParams) { ((RelativeLayout.LayoutParams) params).removeRule(RelativeLayout.BELOW); } @@ -560,6 +553,7 @@ public class InCallFragment extends Fragment // Need to show or hide location showLocationUi(isInMultiWindowMode ? null : getLocationFragment()); } + contactGridManager.onMultiWindowModeChanged(isInMultiWindowMode); } private Fragment getLocationFragment() { diff --git a/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml b/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml index 73b9c267e..ccec8a4a4 100644 --- a/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml +++ b/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml @@ -36,8 +36,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" - android:layout_marginStart="@dimen/incall_window_margin_horizontal" - android:layout_marginEnd="@dimen/incall_window_margin_horizontal" android:gravity="center_horizontal" android:orientation="vertical"> @@ -51,7 +49,9 @@ <include layout="@layout/incall_contactgrid_top_row" android:layout_width="wrap_content" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/incall_window_margin_horizontal" + android:layout_marginEnd="@dimen/incall_window_margin_horizontal"/> <!-- We have to keep deprecated singleLine to allow long text being truncated with ellipses. a bug --> @@ -60,6 +60,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="4dp" + android:layout_marginStart="@dimen/incall_window_margin_horizontal" + android:layout_marginEnd="@dimen/incall_window_margin_horizontal" android:singleLine="true" android:textAppearance="@style/Dialer.Incall.TextAppearance.Large" app:autoResizeText_minTextSize="28sp" @@ -69,12 +71,19 @@ <include layout="@layout/incall_contactgrid_bottom_row" android:layout_width="wrap_content" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/incall_window_margin_horizontal" + android:layout_marginEnd="@dimen/incall_window_margin_horizontal"/> <FrameLayout android:id="@+id/incall_location_holder" android:layout_width="match_parent" android:layout_height="match_parent"/> + + <include + layout="@layout/device_number_row" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> </LinearLayout> <com.android.dialer.widget.LockableViewPager @@ -123,6 +132,6 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_gravity="bottom" - android:visibility="gone" - android:background="@android:color/background_dark"/> + android:background="@android:color/background_dark" + android:visibility="gone"/> </FrameLayout> |