summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/DialtactsActivity.java4
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java5
-rw-r--r--tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java6
3 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 9e6ce01ce..4965647e7 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -47,9 +47,9 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewTreeObserver;
import android.view.View.OnDragListener;
import android.view.View.OnTouchListener;
+import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
@@ -76,11 +76,11 @@ import com.android.dialer.list.DragDropController;
import com.android.dialer.list.ListsFragment;
import com.android.dialer.list.OnDragDropListener;
import com.android.dialer.list.OnListFragmentScrolledListener;
-import com.android.dialer.list.SpeedDialFragment;
import com.android.dialer.list.PhoneFavoriteSquareTileView;
import com.android.dialer.list.RegularSearchFragment;
import com.android.dialer.list.SearchFragment;
import com.android.dialer.list.SmartDialSearchFragment;
+import com.android.dialer.list.SpeedDialFragment;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.widget.ActionBarController;
import com.android.dialer.widget.SearchEditTextLayout;
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 2987c9e4e..5bebd4030 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -28,6 +28,7 @@ import android.os.Message;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.PhoneLookup;
import android.telecomm.PhoneAccount;
+import android.telecomm.TelecommManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -632,8 +633,8 @@ public class CallLogAdapter extends GroupingListAdapter
final long duration = c.getLong(CallLogQuery.DURATION);
final int callType = c.getInt(CallLogQuery.CALL_TYPE);
final PhoneAccount account = getAccount(c);
- final Drawable accountIcon = account != null?
- account.getIcon(mContext) : null;
+ final Drawable accountIcon = account == null ? null :
+ TelecommManager.from(mContext).getPhoneAccountMetadata(account).getIcon(mContext);
final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO);
final long rowId = c.getLong(CallLogQuery.ID);
views.rowId = rowId;
diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
index ea3485338..5580960c7 100644
--- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
+++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
@@ -32,7 +32,7 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.provider.CallLog.Calls;
import android.telecomm.PhoneAccount;
-import android.telephony.TelephonyManager;
+import android.telecomm.TelecommManager;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.View;
@@ -398,8 +398,8 @@ public class FillCallLogTestActivity extends Activity {
}
private PhoneAccount getManualAccount() {
- TelephonyManager telephonyManager = new TelephonyManager(this);
- List <PhoneAccount> accounts = telephonyManager.getAccounts();
+ TelecommManager telecommManager = TelecommManager.from(this);
+ List <PhoneAccount> accounts = telecommManager.getEnabledPhoneAccounts();
if (mAccount0.isChecked()) {
return accounts.get(0);
} else if (mAccount1.isChecked()){