From fcb5a03fbd4392ca9e159fcb7debf457cb2e739d Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 7 Apr 2015 14:01:53 -0700 Subject: Remove footer view. This depends on ListView footer functions, but the Call Log is being migrated to the RecyclerView. This view will be added back later, with that work tracked in b/20108202 in scope of M. Bug: 20108202 Bug: 19372817 Change-Id: I55201e068362083bf5c18ebd08c2e57c97c1b827 --- .../android/dialer/calllog/CallLogFragment.java | 46 ---------------------- src/com/android/dialer/list/ListsFragment.java | 1 - 2 files changed, 47 deletions(-) (limited to 'src') diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 904b9c542..d69c2ed7e 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -75,7 +75,6 @@ public class CallLogFragment extends ListFragment private static final String KEY_FILTER_TYPE = "filter_type"; private static final String KEY_LOG_LIMIT = "log_limit"; private static final String KEY_DATE_LIMIT = "date_limit"; - private static final String KEY_SHOW_FOOTER = "show_footer"; private CallLogAdapter mAdapter; private CallLogQueryHandler mCallLogQueryHandler; @@ -90,7 +89,6 @@ public class CallLogFragment extends ListFragment private TextView mStatusMessageText; private TextView mStatusMessageAction; private KeyguardManager mKeyguardManager; - private View mFooterView; private boolean mEmptyLoaderRunning; private boolean mCallLogFetched; @@ -128,9 +126,6 @@ public class CallLogFragment extends ListFragment // the date filter are included. If zero, no date-based filtering occurs. private long mDateLimit = 0; - // Whether or not to show the Show call history footer view - private boolean mHasFooterView = false; - public CallLogFragment() { this(CallLogQueryHandler.CALL_TYPE_ALL, -1); } @@ -174,7 +169,6 @@ public class CallLogFragment extends ListFragment mCallTypeFilter = state.getInt(KEY_FILTER_TYPE, mCallTypeFilter); mLogLimit = state.getInt(KEY_LOG_LIMIT, mLogLimit); mDateLimit = state.getLong(KEY_DATE_LIMIT, mDateLimit); - mHasFooterView = state.getBoolean(KEY_SHOW_FOOTER, mHasFooterView); } String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity()); @@ -287,7 +281,6 @@ public class CallLogFragment extends ListFragment super.onViewCreated(view, savedInstanceState); mEmptyListView = view.findViewById(R.id.empty_list_view); getListView().setItemsCanFocus(true); - maybeAddFooterView(); updateEmptyMessage(mCallTypeFilter); } @@ -380,7 +373,6 @@ public class CallLogFragment extends ListFragment outState.putInt(KEY_FILTER_TYPE, mCallTypeFilter); outState.putInt(KEY_LOG_LIMIT, mLogLimit); outState.putLong(KEY_DATE_LIMIT, mDateLimit); - outState.putBoolean(KEY_SHOW_FOOTER, mHasFooterView); } @Override @@ -468,44 +460,6 @@ public class CallLogFragment extends ListFragment } } - /** - * Enables/disables the showing of the view full call history footer - * - * @param hasFooterView Whether or not to show the footer - */ - public void setHasFooterView(boolean hasFooterView) { - mHasFooterView = hasFooterView; - maybeAddFooterView(); - } - - /** - * Determine whether or not the footer view should be added to the listview. If getView() - * is null, which means onCreateView hasn't been called yet, defer the addition of the footer - * until onViewCreated has been called. - */ - private void maybeAddFooterView() { - if (!mHasFooterView || getView() == null) { - return; - } - - if (mFooterView == null) { - mFooterView = getActivity().getLayoutInflater().inflate( - R.layout.recents_list_footer, getListView(), false); - mFooterView.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - ((HostInterface) getActivity()).showCallHistory(); - } - }); - } - - final ListView listView = getListView(); - listView.removeFooterView(mFooterView); - listView.addFooterView(mFooterView); - - ViewUtil.addBottomPaddingToListViewForFab(listView, getResources()); - } - public void onBadDataReported(String number) { if (number == null) { return; diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 0e558bfa4..f22a5d19c 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -109,7 +109,6 @@ public class ListsFragment extends Fragment implements ViewPager.OnPageChangeLis case TAB_INDEX_RECENTS: mRecentsFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL, MAX_RECENTS_ENTRIES, System.currentTimeMillis() - OLDEST_RECENTS_DATE); - mRecentsFragment.setHasFooterView(true); return mRecentsFragment; case TAB_INDEX_ALL_CONTACTS: mAllContactsFragment = new AllContactsFragment(); -- cgit v1.2.3