summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2014-09-06 10:20:43 -0700
committerJay Shrauner <shrauner@google.com>2014-09-06 10:23:11 -0700
commit9e5e89db136a2b35aeaaf4da47fc2b8b1b47d2ff (patch)
treed125727c71bb827e7d57cf31a87b3797383b5543
parent289d53ed1c879e983dcb021fa677212ab4566bbd (diff)
Use framework scheme definitions
Use PhoneAccount defined values for SCHEME_{TEL, SIP, VOICEMAIL}. Bug:17398074 Change-Id: Icd841240929a7531e3c7a93021fc19f7620f2cc6
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfoUtils.java4
-rw-r--r--InCallUI/src/com/android/incallui/Log.java3
-rw-r--r--InCallUI/src/com/android/incallui/StatusBarNotifier.java4
3 files changed, 7 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/CallerInfoUtils.java b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
index 0abeb6199..b060d6697 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoUtils.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
@@ -4,11 +4,11 @@ import android.content.Context;
import android.content.Loader;
import android.content.Loader.OnLoadCompleteListener;
import android.net.Uri;
+import android.telecomm.PhoneAccount;
import android.telecomm.PropertyPresentation;
import android.text.TextUtils;
import android.util.Log;
-import com.android.contacts.common.CallUtil;
import com.android.contacts.common.model.Contact;
import com.android.contacts.common.model.ContactLoader;
@@ -75,7 +75,7 @@ public class CallerInfoUtils {
// a voicemail call will be passed to InCallUI as a "voicemail:" URI without a number.
// This call should still be handled as a voicemail call.
if (call.getHandle() != null &&
- CallUtil.SCHEME_VOICEMAIL.equals(call.getHandle().getScheme())) {
+ PhoneAccount.SCHEME_VOICEMAIL.equals(call.getHandle().getScheme())) {
info.markAsVoiceMail(context);
}
diff --git a/InCallUI/src/com/android/incallui/Log.java b/InCallUI/src/com/android/incallui/Log.java
index a834919c5..f609c549c 100644
--- a/InCallUI/src/com/android/incallui/Log.java
+++ b/InCallUI/src/com/android/incallui/Log.java
@@ -17,6 +17,7 @@
package com.android.incallui;
import android.net.Uri;
+import android.telecomm.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import java.security.MessageDigest;
@@ -106,7 +107,7 @@ public class Log {
Uri uri = (Uri) pii;
// All Uri's which are not "tel" go through normal pii() method.
- if (!"tel".equals(uri.getScheme())) {
+ if (!PhoneAccount.SCHEME_TEL.equals(uri.getScheme())) {
return pii(pii);
} else {
pii = uri.getSchemeSpecificPart();
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index 20cc695ce..752283646 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -29,6 +29,7 @@ import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import android.os.Message;
+import android.telecomm.PhoneAccount;
import android.text.TextUtils;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
@@ -395,7 +396,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
if (contactInfo.lookupUri != null) {
builder.addPerson(contactInfo.lookupUri.toString());
} else if (!TextUtils.isEmpty(call.getNumber())) {
- builder.addPerson(Uri.fromParts("tel", call.getNumber(), null).toString());
+ builder.addPerson(Uri.fromParts(PhoneAccount.SCHEME_TEL,
+ call.getNumber(), null).toString());
}
}