summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/CallLogFragment.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-21 16:27:14 -0700
committerYorke Lee <yorkelee@google.com>2014-04-22 10:45:34 -0700
commit6a1461a86ad861b0e04333452e47cb81675459d5 (patch)
tree535f0be5497b33487354b95cf6c36bdd9c9da3a3 /src/com/android/dialer/calllog/CallLogFragment.java
parentcd1fa3922c10f1951f845386cc43dabf69e31ccc (diff)
Add view call history at bottom of recents
Bug: 13936108 Change-Id: Ic688d65240dada75b014b6684d4bebed208551bd
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogFragment.java')
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 84d55d1d6..2ab613646 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -30,7 +30,6 @@ import android.provider.CallLog;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract;
import android.provider.VoicemailContract.Status;
-import android.telephony.TelephonyManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -75,6 +74,7 @@ public class CallLogFragment extends ListFragment
private TextView mStatusMessageText;
private TextView mStatusMessageAction;
private KeyguardManager mKeyguardManager;
+ private View mFooterView;
private boolean mEmptyLoaderRunning;
private boolean mCallLogFetched;
@@ -252,6 +252,7 @@ public class CallLogFragment extends ListFragment
mStatusMessageView = view.findViewById(R.id.voicemail_status);
mStatusMessageText = (TextView) view.findViewById(R.id.voicemail_status_message);
mStatusMessageAction = (TextView) view.findViewById(R.id.voicemail_status_action);
+
return view;
}
@@ -260,6 +261,7 @@ public class CallLogFragment extends ListFragment
super.onViewCreated(view, savedInstanceState);
updateEmptyMessage(mCallTypeFilter);
getListView().setItemsCanFocus(true);
+ assignFooterViewToListView();
}
/**
@@ -479,4 +481,27 @@ public class CallLogFragment extends ListFragment
CallLogNotificationsHelper.updateVoicemailNotifications(getActivity());
}
}
+
+ /**
+ * Assigns a view to be used as a footer view in the call log.
+ *
+ * @param view View to be used as the footer view.
+ */
+ public void setFooterView(View view) {
+ mFooterView = view;
+ // Content view not created yet, defer addition of the footerview to onCreate
+ if (getView() == null) {
+ return;
+ }
+ assignFooterViewToListView();
+ }
+
+ private void assignFooterViewToListView() {
+ if (mFooterView == null) {
+ return;
+ }
+ final ListView listView = getListView();
+ listView.removeFooterView(mFooterView);
+ listView.addFooterView(mFooterView);
+ }
}