diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumberAdapter.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumbersFragment.java | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java index 6cd99c6b8..7777aeb71 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java +++ b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java @@ -64,7 +64,7 @@ public class BlockedNumberAdapter extends NumberAdapter { normalizedNumber, number, countryIso, - null, + number, R.id.blocked_number_fragment, getFragmentManager(), null /* callback */); @@ -73,4 +73,10 @@ public class BlockedNumberAdapter extends NumberAdapter { updateView(view, number, countryIso); } + + @Override + public boolean isEmpty() { + // Always return false, so that the header with blocking-related options always shows. + return false; + } } diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java index 2f7b2f169..c478b8301 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java @@ -57,6 +57,10 @@ public class BlockedNumbersFragment extends ListFragment public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); + LayoutInflater inflater = + (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + getListView().addHeaderView(inflater.inflate(R.layout.blocked_number_header, null)); + if (mAdapter == null) { mAdapter = BlockedNumberAdapter.newBlockedNumberAdapter( getContext(), getActivity().getFragmentManager()); |