diff options
author | Nancy Chen <nancychen@google.com> | 2014-09-11 17:21:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-11 17:21:16 +0000 |
commit | 450865b4fa1aa9f392dc494c6acbb4e160f00a35 (patch) | |
tree | 9c9a05429b71f94fda77f1e9dfb41ddcc061aaab | |
parent | 57adbfca3086f8106c350f8b654dae83ce03d156 (diff) | |
parent | 6b0e56bc3524a5daf2f499cc8365beda05004a29 (diff) |
am a3960e75: Merge "API changes in GatewayInfo, Response, and PropertyPresentation (2/4)" into lmp-dev
* commit 'a3960e75e2bbb8589e51a77668265cc1b6a3739a':
API changes in GatewayInfo, Response, and PropertyPresentation (2/4)
4 files changed, 16 insertions, 16 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index dd899b46d..36dd16291 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -248,7 +248,7 @@ public final class Call { public String getNumber() { if (mTelecommCall.getDetails().getGatewayInfo() != null) { return mTelecommCall.getDetails().getGatewayInfo() - .getOriginalHandle().getSchemeSpecificPart(); + .getOriginalAddress().getSchemeSpecificPart(); } return getHandle() == null ? null : getHandle().getSchemeSpecificPart(); } diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index ea324ba66..60a12730c 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -518,7 +518,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> */ private String getGatewayNumber() { if (hasOutgoingGatewayCall()) { - return getNumberFromHandle(mPrimary.getGatewayInfo().getGatewayHandle()); + return getNumberFromHandle(mPrimary.getGatewayInfo().getGatewayAddress()); } return null; } diff --git a/InCallUI/src/com/android/incallui/CallerInfoUtils.java b/InCallUI/src/com/android/incallui/CallerInfoUtils.java index b060d6697..cc38a0e96 100644 --- a/InCallUI/src/com/android/incallui/CallerInfoUtils.java +++ b/InCallUI/src/com/android/incallui/CallerInfoUtils.java @@ -5,7 +5,7 @@ import android.content.Loader; import android.content.Loader.OnLoadCompleteListener; import android.net.Uri; import android.telecomm.PhoneAccount; -import android.telecomm.PropertyPresentation; +import android.telecomm.TelecommManager; import android.text.TextUtils; import android.util.Log; @@ -41,7 +41,7 @@ public class CallerInfoUtils { // TODO: Have phoneapp send a Uri when it knows the contact that triggered this call. - if (info.numberPresentation == PropertyPresentation.ALLOWED) { + if (info.numberPresentation == TelecommManager.PRESENTATION_ALLOWED) { // Start the query with the number provided from the call. Log.d(TAG, "==> Actually starting CallerInfoAsyncQuery.startQuery()..."); CallerInfoAsyncQuery.startQuery(QUERY_TOKEN, context, info, listener, call); @@ -107,9 +107,9 @@ public class CallerInfoUtils { final String[] absentNumberValues = context.getResources().getStringArray(R.array.absent_num); if (Arrays.asList(absentNumberValues).contains(number) - && presentation == PropertyPresentation.ALLOWED) { + && presentation == TelecommManager.PRESENTATION_ALLOWED) { number = context.getString(R.string.unknown); - ci.numberPresentation = PropertyPresentation.UNKNOWN; + ci.numberPresentation = TelecommManager.PRESENTATION_UNKNOWN; } // Check for other special "corner cases" for CNAP and fix them similarly. Corner @@ -117,16 +117,16 @@ public class CallerInfoUtils { // if we think we have an allowed presentation, or if the CallerInfo presentation doesn't // match the presentation passed in for verification (meaning we changed it previously // because it's a corner case and we're being called from a different entry point). - if (ci.numberPresentation == PropertyPresentation.ALLOWED + if (ci.numberPresentation == TelecommManager.PRESENTATION_ALLOWED || (ci.numberPresentation != presentation - && presentation == PropertyPresentation.ALLOWED)) { + && presentation == TelecommManager.PRESENTATION_ALLOWED)) { // For all special strings, change number & numberPrentation. if (isCnapSpecialCaseRestricted(number)) { number = context.getString(R.string.private_num); - ci.numberPresentation = PropertyPresentation.RESTRICTED; + ci.numberPresentation = TelecommManager.PRESENTATION_RESTRICTED; } else if (isCnapSpecialCaseUnknown(number)) { number = context.getString(R.string.unknown); - ci.numberPresentation = PropertyPresentation.UNKNOWN; + ci.numberPresentation = TelecommManager.PRESENTATION_UNKNOWN; } Log.d(TAG, "SpecialCnap: number=" + toLogSafePhoneNumber(number) + "; presentation now=" + ci.numberPresentation); diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java index d0d093940..570b2de4f 100644 --- a/InCallUI/src/com/android/incallui/ContactInfoCache.java +++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java @@ -24,7 +24,7 @@ import android.net.Uri; import android.os.Looper; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.CommonDataKinds.Phone; -import android.telecomm.PropertyPresentation; +import android.telecomm.TelecommManager; import android.text.TextUtils; import com.android.contacts.common.util.PhoneNumberHelper; @@ -153,7 +153,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete int presentationMode = call.getNumberPresentation(); if (callerInfo.contactExists || callerInfo.isEmergencyNumber() || callerInfo.isVoiceMailNumber()) { - presentationMode = PropertyPresentation.ALLOWED; + presentationMode = TelecommManager.PRESENTATION_ALLOWED; } final ContactCacheEntry cacheEntry = buildEntry(mContext, callId, @@ -389,7 +389,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete // (or potentially some other default based on the presentation.) displayName = getPresentationString(context, presentation); Log.d(TAG, " ==> no name *or* number! displayName = " + displayName); - } else if (presentation != PropertyPresentation.ALLOWED) { + } else if (presentation != TelecommManager.PRESENTATION_ALLOWED) { // This case should never happen since the network should never send a phone # // AND a restricted presentation. However we leave it here in case of weird // network behavior @@ -426,7 +426,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete } else { // We do have a valid "name" in the CallerInfo. Display that // in the "name" slot, and the phone number in the "number" slot. - if (presentation != PropertyPresentation.ALLOWED) { + if (presentation != TelecommManager.PRESENTATION_ALLOWED) { // This case should never happen since the network should never send a name // AND a restricted presentation. However we leave it here in case of weird // network behavior @@ -479,9 +479,9 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete */ private static String getPresentationString(Context context, int presentation) { String name = context.getString(R.string.unknown); - if (presentation == PropertyPresentation.RESTRICTED) { + if (presentation == TelecommManager.PRESENTATION_RESTRICTED) { name = context.getString(R.string.private_num); - } else if (presentation == PropertyPresentation.PAYPHONE) { + } else if (presentation == TelecommManager.PRESENTATION_PAYPHONE) { name = context.getString(R.string.payphone); } return name; |