diff options
author | Ihab Awad <ihab@google.com> | 2014-07-09 12:32:52 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2014-07-14 18:19:48 +0000 |
commit | 9134e25d7ab8eb687a36ce7ba199e66f44550fdd (patch) | |
tree | 114bc6f4eb505cdfe2721723853855955b8e0c64 | |
parent | 2a103c177a04a88e5bb5a40e4fb51608137151a8 (diff) |
Implement multi-SIM capabilities (3/6) [DO NOT MERGE]
Bug:16292368
Change-Id: I367f838a08bd478aca86e2d75b221250ebd8a82e
(cherry picked from commit 0e8a870afc9de3063a652256e81f9bf2043914e0)
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()){ |