summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllogutils
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-03-24 09:31:16 -0700
committerEric Erfanian <erfanian@google.com>2017-03-27 08:56:19 -0700
commit9050823ccf6f512e06ad65c8a741cb17cbc4a833 (patch)
treee454c9e0fa20b8384fa87d4e6309bb8b9e3aa2a4 /java/com/android/dialer/calllogutils
parentdd9d50805f1b49dff1fe3787740393d726124cdb (diff)
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
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r--java/com/android/dialer/calllogutils/CallTypeIconsView.java40
-rw-r--r--java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml2
-rw-r--r--java/com/android/dialer/calllogutils/res/values-eu/strings.xml2
-rw-r--r--java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml4
4 files changed, 37 insertions, 11 deletions
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<Integer> 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 @@
<string name="description_via_number" msgid="7682575124846343076">"por medio de <xliff:g id="NUMBER">%1$s</xliff:g>"</string>
<string name="description_via_number_phone_account" msgid="4345445677508018830">"en <xliff:g id="PHONEACCOUNT">%1$s</xliff:g> por medio de <xliff:g id="NUMBER">%2$s</xliff:g>"</string>
<string name="voicemail_string" msgid="6029775151483803006">"Buzón de voz"</string>
- <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min. y <xliff:g id="SECONDS">%s</xliff:g> s"</string>
+ <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> s"</string>
<string name="call_details_short_duration_format" msgid="8079910850626312453">"<xliff:g id="SECONDS">%s</xliff:g> s"</string>
</resources>
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 @@
<string name="description_via_number" msgid="7682575124846343076">"<xliff:g id="NUMBER">%1$s</xliff:g> bidez"</string>
<string name="description_via_number_phone_account" msgid="4345445677508018830">"<xliff:g id="PHONEACCOUNT">%1$s</xliff:g> kontuan, <xliff:g id="NUMBER">%2$s</xliff:g> bidez"</string>
<string name="voicemail_string" msgid="6029775151483803006">"Erantzungailua"</string>
- <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min, <xliff:g id="SECONDS">%s</xliff:g> s"</string>
+ <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min eta <xliff:g id="SECONDS">%s</xliff:g> s"</string>
<string name="call_details_short_duration_format" msgid="8079910850626312453">"<xliff:g id="SECONDS">%s</xliff:g> s"</string>
</resources>
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 @@
<string name="description_via_number" msgid="7682575124846343076">"através do número <xliff:g id="NUMBER">%1$s</xliff:g>"</string>
<string name="description_via_number_phone_account" msgid="4345445677508018830">"em <xliff:g id="PHONEACCOUNT">%1$s</xliff:g>, através do número <xliff:g id="NUMBER">%2$s</xliff:g>"</string>
<string name="voicemail_string" msgid="6029775151483803006">"Correio de voz"</string>
- <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> seg"</string>
- <string name="call_details_short_duration_format" msgid="8079910850626312453">"<xliff:g id="SECONDS">%s</xliff:g> seg"</string>
+ <string name="call_details_duration_format" msgid="296780245582838089">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> s"</string>
+ <string name="call_details_short_duration_format" msgid="8079910850626312453">"<xliff:g id="SECONDS">%s</xliff:g> s"</string>
</resources>