From 9050823ccf6f512e06ad65c8a741cb17cbc4a833 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Fri, 24 Mar 2017 09:31:16 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/151128062 Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/150756069 (3/21/2017) to cl/151128062 (3/24/2017). Notable this release: - Explicitly enumerate host and target dependencies. - Update proguard flag references. This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Bug: 33210202 36511925 Addresses 33210202 - Proguard support 36511925 - Compiler warnings when building against platform sdk Change-Id: I448ec3b3f2358886859cf7a4ef76a8fcef3244ae --- .../dialer/calllogutils/CallTypeIconsView.java | 40 ++++++++++++++++++---- .../calllogutils/res/values-es-rUS/strings.xml | 2 +- .../dialer/calllogutils/res/values-eu/strings.xml | 2 +- .../calllogutils/res/values-pt-rPT/strings.xml | 4 +-- 4 files changed, 37 insertions(+), 11 deletions(-) (limited to 'java/com/android/dialer/calllogutils') diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java index 5644dc865..8389a8027 100644 --- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java +++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java @@ -46,8 +46,9 @@ public class CallTypeIconsView extends View { private static Resources sResources; private static Resources sLargeResouces; private List mCallTypes = new ArrayList<>(3); - private boolean mShowVideo = false; - private boolean mShowHd = false; + private boolean mShowVideo; + private boolean mShowHd; + private boolean mShowWifi; private int mWidth; private int mHeight; @@ -93,7 +94,7 @@ public class CallTypeIconsView extends View { public void setShowVideo(boolean showVideo) { mShowVideo = showVideo; if (showVideo) { - mWidth += sResources.videoCall.getIntrinsicWidth(); + mWidth += sResources.videoCall.getIntrinsicWidth() + sResources.iconMargin; mHeight = Math.max(mHeight, sResources.videoCall.getIntrinsicHeight()); invalidate(); } @@ -111,12 +112,21 @@ public class CallTypeIconsView extends View { public void setShowHd(boolean showHd) { mShowHd = showHd; if (showHd) { - mWidth += sResources.hdCall.getIntrinsicWidth(); + mWidth += sResources.hdCall.getIntrinsicWidth() + sResources.iconMargin; mHeight = Math.max(mHeight, sResources.hdCall.getIntrinsicHeight()); invalidate(); } } + public void setShowWifi(boolean showWifi) { + mShowWifi = showWifi; + if (showWifi) { + mWidth += sResources.wifiCall.getIntrinsicWidth() + sResources.iconMargin; + mHeight = Math.max(mHeight, sResources.wifiCall.getIntrinsicHeight()); + invalidate(); + } + } + public int getCount() { return mCallTypes.size(); } @@ -175,6 +185,7 @@ public class CallTypeIconsView extends View { final int right = left + resources.videoCall.getIntrinsicWidth(); drawable.setBounds(left, 0, right, resources.videoCall.getIntrinsicHeight()); drawable.draw(canvas); + left = right + sResources.iconMargin; } // If showing HD call icon, draw it scaled appropriately. if (mShowHd) { @@ -182,6 +193,14 @@ public class CallTypeIconsView extends View { final int right = left + resources.hdCall.getIntrinsicWidth(); drawable.setBounds(left, 0, right, resources.hdCall.getIntrinsicHeight()); drawable.draw(canvas); + left = right + sResources.iconMargin; + } + // If showing HD call icon, draw it scaled appropriately. + if (mShowWifi) { + final Drawable drawable = sResources.wifiCall; + final int right = left + sResources.wifiCall.getIntrinsicWidth(); + drawable.setBounds(left, 0, right, sResources.wifiCall.getIntrinsicHeight()); + drawable.draw(canvas); } } @@ -203,13 +222,16 @@ public class CallTypeIconsView extends View { public final Drawable blocked; // Drawable repesenting a video call. - public final Drawable videoCall; + final Drawable videoCall; // Drawable represeting a hd call. - public final Drawable hdCall; + final Drawable hdCall; + + // Drawable representing a WiFi call. + final Drawable wifiCall; /** The margin to use for icons. */ - public final int iconMargin; + final int iconMargin; /** * Configures the call icon drawables. A single white call arrow which points down and left is @@ -254,6 +276,10 @@ public class CallTypeIconsView extends View { hdCall.setColorFilter( r.getColor(R.color.dialer_secondary_text_color), PorterDuff.Mode.MULTIPLY); + wifiCall = getScaledBitmap(context, R.drawable.quantum_ic_signal_wifi_4_bar_white_24); + wifiCall.setColorFilter( + r.getColor(R.color.dialer_secondary_text_color), PorterDuff.Mode.MULTIPLY); + iconMargin = largeIcons ? 0 : r.getDimensionPixelSize(R.dimen.call_log_icon_margin); } diff --git a/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml b/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml index 003cc5430..74906bd48 100644 --- a/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml @@ -35,6 +35,6 @@ "por medio de %1$s" "en %1$s por medio de %2$s" "Buzón de voz" - "%s min. y %s s" + "%s min %s s" "%s s" diff --git a/java/com/android/dialer/calllogutils/res/values-eu/strings.xml b/java/com/android/dialer/calllogutils/res/values-eu/strings.xml index 8dfe88e09..8c960bae6 100644 --- a/java/com/android/dialer/calllogutils/res/values-eu/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-eu/strings.xml @@ -35,6 +35,6 @@ "%1$s bidez" "%1$s kontuan, %2$s bidez" "Erantzungailua" - "%s min, %s s" + "%s min eta %s s" "%s s" diff --git a/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml b/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml index 1a2fa4c01..f24b83af2 100644 --- a/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml @@ -35,6 +35,6 @@ "através do número %1$s" "em %1$s, através do número %2$s" "Correio de voz" - "%s min %s seg" - "%s seg" + "%s min %s s" + "%s s" -- cgit v1.2.3