summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-07-21 20:23:09 -0700
committerSantos Cordon <santoscordon@google.com>2014-07-23 10:41:29 +0000
commit434efb0c931927bb2f7d1229396208531a3b3fff (patch)
treecc1630cb657709f5364b6452443b8fca40c6ef8a
parentaf0fb5b8fde6676f92361d89a319eb5bf1b9af4b (diff)
Change display Strings to CharSequence (3/3)
Bug: 16416927 Change-Id: Id8b6e5029a8a1f61bbbf71661abe4d487c01002a
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 5a1605090..694eb9839 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -20,7 +20,6 @@ import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
-
import android.net.Uri;
import android.os.Bundle;
import android.telecomm.CallCapabilities;
@@ -199,7 +198,6 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
getUi().setCallState(callState, mPrimary.getDisconnectCause(), getConnectionLabel(),
getConnectionIcon(), getGatewayNumber());
- Uri handle = mPrimary.getHandle();
String currentNumber = getNumberFromHandle(mPrimary.getHandle());
if (PhoneNumberUtils.isEmergencyNumber(currentNumber)) {
String callbackNumber = getSubscriptionNumber();
@@ -520,7 +518,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
if (accountHandle != null) {
PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle);
if (account != null) {
- return account.getLabel();
+ return getAccountLabel(account);
}
}
return null;
@@ -531,7 +529,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
if (accountHandle != null) {
PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle);
if (account != null) {
- return account.getLabel();
+ return getAccountLabel(account);
}
}
return null;
@@ -606,6 +604,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
return handle == null ? "" : handle.getSchemeSpecificPart();
}
+ private String getAccountLabel(PhoneAccount account) {
+ return account.getLabel() == null ? null : account.getLabel().toString();
+ }
+
public interface CallCardUi extends Ui {
void setVisible(boolean on);
void setPrimary(String number, String name, boolean nameIsNumber, String label,