Extract logic from PhoneCallDetailsViews.

Instead of having the logic in the views object, use a helper class. The
advantage is that we can have a single instance of this class and I will
do some optimizations in a follow-up changelist.

Change-Id: I6258e947aa33a2a3b6e72d7273a3b7e080c5d7e5
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index f3f7073..c45d2d2 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -57,7 +57,8 @@
     private static final String TAG = "CallDetail";
 
     /** The views representing the details of a phone call. */
-    PhoneCallDetailsViews mPhoneCallDetailsViews;
+    private PhoneCallDetailsViews mPhoneCallDetailsViews;
+    private PhoneCallDetailsHelper mPhoneCallDetailsHelper;
     private TextView mCallTimeView;
     private TextView mCallDurationView;
     private View mCallActionView;
@@ -114,6 +115,7 @@
         mResources = getResources();
 
         mPhoneCallDetailsViews = new PhoneCallDetailsViews(getWindow().getDecorView());
+        mPhoneCallDetailsHelper = new PhoneCallDetailsHelper();
         mCallActionView = findViewById(R.id.call);
         mContactPhotoView = (ImageView) findViewById(R.id.contact_photo);
         mContactBackgroundView = (ImageView) findViewById(R.id.contact_background);
@@ -255,8 +257,8 @@
                     ViewAdapter adapter = new ViewAdapter(this, actions);
                     setListAdapter(adapter);
                 }
-                mPhoneCallDetailsViews.setPhoneCallDetails(getResources(), date, callType, nameText,
-                        numberText, numberType, numberLabel);
+                mPhoneCallDetailsHelper.setPhoneCallDetails(mPhoneCallDetailsViews, getResources(),
+                        date, callType, nameText, numberText, numberType, numberLabel);
 
                 loadContactPhotos(photoId);
             } else {