Add import for SEND_TO_VOICEMAIL.
+ Add utility class for async import functions.
+ Move check for contacts with SEND_TO_VOICEMAIl to util.
+ Add function for adding phone numbers of contacts with
SEND_TO_VOICEMAIL to the block list, then clearing the
SEND_TO_VOICEMAIL flag.
+ Fixed bug where the import text would not be shown for an empty
block list. Rearranged layouts slightly to facilitate this.
+ Protect against null listeners in FilteredNumberAsyncQueryHandler.
Bug: 23351616
Change-Id: Id526e16f20a3d28966bbc5e458cecfcd03ecb20f
diff --git a/res/layout/blocked_number_fragment.xml b/res/layout/blocked_number_fragment.xml
index e86ccb5..bb4b7f2 100644
--- a/res/layout/blocked_number_fragment.xml
+++ b/res/layout/blocked_number_fragment.xml
@@ -27,23 +27,22 @@
android:layout_height="wrap_content"
card_view:cardCornerRadius="0dp">
- <ListView android:id="@id/android:list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/background_dialer_white"
- android:layout_weight="1"
- android:drawSelectorOnTop="false"
- android:headerDividersEnabled="false" />
-
<LinearLayout
- android:id="@android:id/empty"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/background_dialer_white">
<include layout="@layout/blocked_number_header" />
- <TextView android:id="@id/android:empty"
+ <ListView android:id="@id/android:list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:drawSelectorOnTop="false"
+ android:headerDividersEnabled="false" />
+
+ <TextView android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/blocked_number_horizontal_margin"