From c329bfb6d47f20237d22e13297d5bbb72e612919 Mon Sep 17 00:00:00 2001 From: Evan Charlton Date: Sat, 19 Jul 2014 18:22:45 -0700 Subject: Rename PhoneAccount to PhoneAccountHandle Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889 --- src/com/android/dialer/calllog/CallLogAdapter.java | 8 ++++---- src/com/android/dialer/calllog/CallLogListItemViews.java | 4 ++-- src/com/android/dialer/calllog/IntentProvider.java | 6 +++--- .../com/android/dialer/tests/calllog/FillCallLogTestActivity.java | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index db67513da..51cc95b0a 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -27,7 +27,7 @@ import android.os.Handler; import android.os.Message; import android.provider.CallLog.Calls; import android.provider.ContactsContract.PhoneLookup; -import android.telecomm.PhoneAccount; +import android.telecomm.PhoneAccountHandle; import android.telecomm.TelecommManager; import android.text.TextUtils; import android.view.LayoutInflater; @@ -592,7 +592,7 @@ public class CallLogAdapter extends GroupingListAdapter @Override protected View newChildView(Context context, ViewGroup parent) { - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + LayoutInflater inflater = LayoutInflater.from(context); View view = inflater.inflate(R.layout.call_log_list_item, parent, false); // Get the views to bind to and cache them. @@ -644,7 +644,7 @@ public class CallLogAdapter extends GroupingListAdapter final long date = c.getLong(CallLogQuery.DATE); final long duration = c.getLong(CallLogQuery.DURATION); final int callType = c.getInt(CallLogQuery.CALL_TYPE); - final PhoneAccount account = getAccount(c); + final PhoneAccountHandle account = getAccount(c); final Drawable accountIcon = account == null ? null : TelecommManager.from(mContext).getPhoneAccountMetadata(account).getIcon(mContext); final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO); @@ -1262,7 +1262,7 @@ public class CallLogAdapter extends GroupingListAdapter return features; } - private PhoneAccount getAccount(Cursor c) { + private PhoneAccountHandle getAccount(Cursor c) { final String component_name = c.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME); final String account_id = c.getString(CallLogQuery.ACCOUNT_ID); diff --git a/src/com/android/dialer/calllog/CallLogListItemViews.java b/src/com/android/dialer/calllog/CallLogListItemViews.java index 70d545e89..b5b063c0b 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViews.java +++ b/src/com/android/dialer/calllog/CallLogListItemViews.java @@ -17,7 +17,7 @@ package com.android.dialer.calllog; import android.content.Context; -import android.telecomm.PhoneAccount; +import android.telecomm.PhoneAccountHandle; import android.view.View; import android.widget.QuickContactBadge; import android.widget.TextView; @@ -87,7 +87,7 @@ public final class CallLogListItemViews { * The account for the current call log entry. Cached here as the call back * intent is set only when the actions ViewStub is inflated. */ - public PhoneAccount mAccount; + public PhoneAccountHandle mAccount; /** * If the call has an associated voicemail message, the URI of the voicemail message for diff --git a/src/com/android/dialer/calllog/IntentProvider.java b/src/com/android/dialer/calllog/IntentProvider.java index c52dff87f..0bf7084dc 100644 --- a/src/com/android/dialer/calllog/IntentProvider.java +++ b/src/com/android/dialer/calllog/IntentProvider.java @@ -21,7 +21,7 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.provider.CallLog.Calls; -import android.telecomm.PhoneAccount; +import android.telecomm.PhoneAccountHandle; import com.android.contacts.common.CallUtil; import com.android.dialer.CallDetailActivity; @@ -38,7 +38,7 @@ public abstract class IntentProvider { public abstract Intent getIntent(Context context); public static IntentProvider getReturnCallIntentProvider(final String number, - final PhoneAccount account) { + final PhoneAccountHandle account) { return new IntentProvider() { @Override public Intent getIntent(Context context) { @@ -48,7 +48,7 @@ public abstract class IntentProvider { } public static IntentProvider getReturnVideoCallIntentProvider(final String number, - final PhoneAccount account) { + final PhoneAccountHandle account) { return new IntentProvider() { @Override public Intent getIntent(Context context) { diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java index 5580960c7..b8333cc12 100644 --- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java +++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java @@ -31,7 +31,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.RemoteException; import android.provider.CallLog.Calls; -import android.telecomm.PhoneAccount; +import android.telecomm.PhoneAccountHandle; import android.telecomm.TelecommManager; import android.text.format.DateFormat; import android.util.Log; @@ -397,9 +397,9 @@ public class FillCallLogTestActivity extends Activity { } } - private PhoneAccount getManualAccount() { + private PhoneAccountHandle getManualAccount() { TelecommManager telecommManager = TelecommManager.from(this); - List accounts = telecommManager.getEnabledPhoneAccounts(); + List accounts = telecommManager.getEnabledPhoneAccounts(); if (mAccount0.isChecked()) { return accounts.get(0); } else if (mAccount1.isChecked()){ -- cgit v1.2.3