summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-11-08 08:36:56 -0800
committerEvan Charlton <evanc@google.com>2014-11-10 10:52:47 -0800
commit972e8730b305c921e094690ae09abf2c44b0dc12 (patch)
treecc53b91271ad42dde695103394eb7046faee98f2 /src
parent3accf8639193a0fe7553e774940af6cef02c850b (diff)
downloadandroid_packages_apps_PhoneCommon-972e8730b305c921e094690ae09abf2c44b0dc12.tar.gz
android_packages_apps_PhoneCommon-972e8730b305c921e094690ae09abf2c44b0dc12.tar.bz2
android_packages_apps_PhoneCommon-972e8730b305c921e094690ae09abf2c44b0dc12.zip
Show ILD rate information if present
If Dialer populates ILD (international / long distance) rate information, populate a field above the dialed digits. Bug: 13334252 Change-Id: Ia366148ef1318a2dacc4971d51a3bd34ec3c39de
Diffstat (limited to 'src')
-rw-r--r--src/com/android/phone/common/dialpad/DialpadView.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/phone/common/dialpad/DialpadView.java b/src/com/android/phone/common/dialpad/DialpadView.java
index 3cdc30e..fdce6f7 100644
--- a/src/com/android/phone/common/dialpad/DialpadView.java
+++ b/src/com/android/phone/common/dialpad/DialpadView.java
@@ -28,6 +28,7 @@ import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
import android.widget.EditText;
import android.widget.ImageButton;
@@ -63,6 +64,10 @@ public class DialpadView extends LinearLayout {
private View mOverflowMenuButton;
private ColorStateList mRippleColor;
+ private ViewGroup mRateContainer;
+ private TextView mIldCountry;
+ private TextView mIldRate;
+
private boolean mCanDigitsBeEdited;
private final int[] mButtonIds = new int[] {R.id.zero, R.id.one, R.id.two, R.id.three,
@@ -104,6 +109,9 @@ public class DialpadView extends LinearLayout {
mDigits = (EditText) findViewById(R.id.digits);
mDelete = (ImageButton) findViewById(R.id.deleteButton);
mOverflowMenuButton = findViewById(R.id.dialpad_overflow);
+ mRateContainer = (ViewGroup) findViewById(R.id.rate_container);
+ mIldCountry = (TextView) mRateContainer.findViewById(R.id.ild_country);
+ mIldRate = (TextView) mRateContainer.findViewById(R.id.ild_rate);
}
private void setupKeypad() {
@@ -184,6 +192,16 @@ public class DialpadView extends LinearLayout {
mCanDigitsBeEdited = canBeEdited;
}
+ public void setCallRateInformation(String countryName, String displayRate) {
+ if (TextUtils.isEmpty(countryName) && TextUtils.isEmpty(displayRate)) {
+ mRateContainer.setVisibility(View.GONE);
+ return;
+ }
+ mRateContainer.setVisibility(View.VISIBLE);
+ mIldCountry.setText(countryName);
+ mIldRate.setText(displayRate);
+ }
+
public boolean canDigitsBeEdited() {
return mCanDigitsBeEdited;
}