Rename PhoneAccount to PhoneAccountHandle

Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index db67513..51cc95b 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -27,7 +27,7 @@
 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 @@
 
     @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 @@
         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 @@
         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 70d545e..b5b063c 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 @@
      * 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 c52dff8..0bf7084 100644
--- a/src/com/android/dialer/calllog/IntentProvider.java
+++ b/src/com/android/dialer/calllog/IntentProvider.java
@@ -21,7 +21,7 @@
 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 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 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 5580960..b8333cc 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.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 @@
         }
     }
 
-    private PhoneAccount getManualAccount() {
+    private PhoneAccountHandle getManualAccount() {
         TelecommManager telecommManager = TelecommManager.from(this);
-        List <PhoneAccount> accounts = telecommManager.getEnabledPhoneAccounts();
+        List <PhoneAccountHandle> accounts = telecommManager.getEnabledPhoneAccounts();
         if (mAccount0.isChecked()) {
             return accounts.get(0);
         } else if (mAccount1.isChecked()){