From b01a89385d984c8a0136515785759aff9a885855 Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 1 Mar 2018 16:25:21 -0800 Subject: Update RTT icon on ringing screen. Bug: 67596257 Test: manual PiperOrigin-RevId: 187551861 Change-Id: I38facbaaa48ba4afe29e382de9c8241d8936c3ab --- .../android/incallui/answer/impl/answermethod/FlingUpDownMethod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/com') diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java index b5dbc0c20..2eeecc341 100644 --- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java +++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java @@ -336,7 +336,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged if (getParent().isVideoCall() || getParent().isVideoUpgradeRequest()) { contactPuckIcon.setImageResource(R.drawable.quantum_ic_videocam_white_24); } else if (getParent().isRttCall()) { - contactPuckIcon.setImageResource(R.drawable.quantum_ic_call_white_24); + contactPuckIcon.setImageResource(R.drawable.quantum_ic_rtt_vd_theme_24); } else { contactPuckIcon.setImageResource(R.drawable.quantum_ic_call_white_24); } -- cgit v1.2.3 From 1e04880221a772aa1705f0e549cc1c6c848c4eb9 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Thu, 1 Mar 2018 16:33:32 -0800 Subject: Instead of just cancelling loaders, reset them as well. Bug: 71385186 Test: manual PiperOrigin-RevId: 187552834 Change-Id: If4e1f7c18d5f5aae2a152762189948c3543ba321 --- java/com/android/dialer/app/list/PhoneFavoriteTileView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'java/com') diff --git a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java index 3739588ea..30b8464ed 100644 --- a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java +++ b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java @@ -199,9 +199,12 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { */ private void sendViewNotification(Context context, Uri contactUri) { if (loader != null) { - loader.cancelLoad(); + // Cancels the current load if it's running and clears up any memory if it's using any. + loader.reset(); } loader = new ContactLoader(context, contactUri, true /* postViewNotification */); + // Immediately release anything we're holding in memory + loader.registerListener(0, (loader1, contact) -> loader.reset()); loader.startLoading(); } } -- cgit v1.2.3 From 164ddd192af70ff07a4ad733180599e081a59046 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Thu, 1 Mar 2018 16:59:22 -0800 Subject: Implemented DialerFloatingActionButton Implemented wrapper class for FloatingActionButton to resolve some of FloatingActinButton's many issues. One of which is alllowing clicks while animating that was causing a crash in NUI. This change also fixes an issue with the dialpad exit animation. Bug: 73995512 Test: Robolectric and Espresso don't support these kinds of tests very well PiperOrigin-RevId: 187556390 Change-Id: I4cb7c2346a0ef09f2f3d8b48e7e14d01460cd1a7 --- .../dialer/main/impl/MainSearchController.java | 5 ++ .../dialer/main/impl/res/layout/main_activity.xml | 2 +- .../dialer/widget/DialerFloatingActionButton.java | 79 ++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 java/com/android/dialer/widget/DialerFloatingActionButton.java (limited to 'java/com') diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index a6bdec5eb..993ed3d8c 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -136,6 +136,11 @@ public class MainSearchController implements SearchBarListener { } searchFragment.setQuery("", CallInitiationType.Type.DIALPAD); + // Split the transactions so that the dialpad fragment isn't popped off the stack when we exit + // search. We do this so that the dialpad actually animates down instead of just disappearing. + transaction.commit(); + transaction = mainActivity.getFragmentManager().beginTransaction(); + // Show Dialpad if (getDialpadFragment() == null) { DialpadFragment dialpadFragment = new DialpadFragment(); diff --git a/java/com/android/dialer/main/impl/res/layout/main_activity.xml b/java/com/android/dialer/main/impl/res/layout/main_activity.xml index b69625e63..0883acebc 100644 --- a/java/com/android/dialer/main/impl/res/layout/main_activity.xml +++ b/java/com/android/dialer/main/impl/res/layout/main_activity.xml @@ -37,7 +37,7 @@ android:layout_height="match_parent" android:layout_above="@+id/bottom_nav_bar"/> - Current fixes: + * + *
    + *
  • Being able to trigger click events twice. + *
  • Banning setVisibility since 9 times out of 10, it just causes bad state. + *
+ * + * Planned fixes: + * + *
    + *
  • Animating on first show/hide + *
  • Being able to call show/hide rapidly and being in the proper state + *
  • Having a proper 48x48 touch target in mini mode + *
+ */ +public class DialerFloatingActionButton extends FloatingActionButton { + + public DialerFloatingActionButton(Context context, AttributeSet attributeSet) { + super(context, attributeSet); + } + + @Override + public void show() { + super.show(); + setClickable(true); + } + + @Override + public void show(@Nullable OnVisibilityChangedListener onVisibilityChangedListener) { + super.show(onVisibilityChangedListener); + setClickable(true); + } + + @Override + public void hide() { + super.hide(); + setClickable(false); + } + + @Override + public void hide(@Nullable OnVisibilityChangedListener onVisibilityChangedListener) { + super.hide(onVisibilityChangedListener); + setClickable(false); + } + + @Override + public void setVisibility(int i) { + throw Assert.createUnsupportedOperationFailException( + "Do not call setVisibility, call show/hide instead"); + } +} -- cgit v1.2.3 From 6c81c662a38ed448722fe5251375fef4d4e1a59a Mon Sep 17 00:00:00 2001 From: uabdullah Date: Thu, 1 Mar 2018 17:09:45 -0800 Subject: Use voicemail image for empty voicemail tab and update color This CL updates the icon for the empty voicemail tab and updates the tint of it as well. It also updates the size of the voicemail icon when in landscape mode. Bug: 25661977,74085541 Test: N/A PiperOrigin-RevId: 187557890 Change-Id: Ic19643f4e63e3ce70ba6b029ce45a570404f28e7 --- .../dialer/voicemail/listui/NewVoicemailFragment.java | 3 ++- java/com/android/dialer/widget/EmptyContentView.java | 9 +++++++++ .../dialer/widget/res/layout-land/empty_content_view.xml | 2 +- java/com/android/dialer/widget/res/values/colors.xml | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) (limited to 'java/com') diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java index 6d71dade9..3a5e72b6b 100644 --- a/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java +++ b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java @@ -210,7 +210,8 @@ public final class NewVoicemailFragment extends Fragment implements LoaderCallba showView(emptyContentView); emptyContentView.setDescription((R.string.empty_voicemail_tab_text)); - emptyContentView.setImage(R.drawable.quantum_ic_schedule_vd_theme_24); + emptyContentView.setImage(R.drawable.quantum_ic_voicemail_vd_theme_24); + emptyContentView.setImageTint(R.color.empty_voicemail_icon_tint_color, null); } private void showView(View view) { diff --git a/java/com/android/dialer/widget/EmptyContentView.java b/java/com/android/dialer/widget/EmptyContentView.java index 5c2e4d501..b99657a10 100644 --- a/java/com/android/dialer/widget/EmptyContentView.java +++ b/java/com/android/dialer/widget/EmptyContentView.java @@ -17,6 +17,10 @@ package com.android.dialer.widget; import android.content.Context; +import android.content.res.ColorStateList; +import android.content.res.Resources.Theme; +import android.support.annotation.ColorRes; +import android.support.annotation.Nullable; import android.support.annotation.StringRes; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -86,6 +90,11 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen } } + public void setImageTint(@ColorRes int color, @Nullable Theme theme) { + imageView.setImageTintList( + (ColorStateList.valueOf(getContext().getResources().getColor(color, theme)))); + } + public void setActionLabel(@StringRes int resourceId) { actionLabel = resourceId; if (resourceId == NO_LABEL) { diff --git a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml index 00344bf44..3a7574f53 100644 --- a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml +++ b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml @@ -18,7 +18,7 @@ diff --git a/java/com/android/dialer/widget/res/values/colors.xml b/java/com/android/dialer/widget/res/values/colors.xml index c974609ef..12a5cb999 100644 --- a/java/com/android/dialer/widget/res/values/colors.xml +++ b/java/com/android/dialer/widget/res/values/colors.xml @@ -1,4 +1,20 @@ + #b2b2b2 + #E1E1E1 \ No newline at end of file -- cgit v1.2.3