Merge "Change call blocking setting string." into ub-contactsdialer-a-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f85f25e..3e75b35 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer"
coreApp="true"
- android:versionCode="20300"
- android:versionName="2.3">
+ android:versionCode="20301"
+ android:versionName="2.3.01">
<uses-sdk
android:minSdkVersion="23"
diff --git a/res/drawable-hdpi/ab_stacked_opaque_dark_holo.9.png b/res/drawable-hdpi/ab_stacked_opaque_dark_holo.9.png
deleted file mode 100644
index 23320ea..0000000
--- a/res/drawable-hdpi/ab_stacked_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/divider.9.png b/res/drawable-hdpi/divider.9.png
deleted file mode 100644
index 88e5d91..0000000
--- a/res/drawable-hdpi/divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_ab_dialer_holo_light.png b/res/drawable-hdpi/ic_ab_dialer_holo_light.png
deleted file mode 100644
index 7e34576..0000000
--- a/res/drawable-hdpi/ic_ab_dialer_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_blue.png b/res/drawable-hdpi/ic_call_log_blue.png
deleted file mode 100644
index 92af15f..0000000
--- a/res/drawable-hdpi/ic_call_log_blue.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_cancel_holo_light.png b/res/drawable-hdpi/ic_cancel_holo_light.png
deleted file mode 100644
index d8cacb4..0000000
--- a/res/drawable-hdpi/ic_cancel_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_fav_undo_dk.png b/res/drawable-hdpi/ic_fav_undo_dk.png
deleted file mode 100644
index 8c1b451..0000000
--- a/res/drawable-hdpi/ic_fav_undo_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_all_contacts_dk.png b/res/drawable-hdpi/ic_menu_all_contacts_dk.png
deleted file mode 100644
index 88ba4f1..0000000
--- a/res/drawable-hdpi/ic_menu_all_contacts_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_history_dk.png b/res/drawable-hdpi/ic_menu_history_dk.png
deleted file mode 100644
index b64122f..0000000
--- a/res/drawable-hdpi/ic_menu_history_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_more_horiz_24dp.png b/res/drawable-hdpi/ic_more_horiz_24dp.png
deleted file mode 100644
index ebfcb6f..0000000
--- a/res/drawable-hdpi/ic_more_horiz_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_report_problem_24dp.png b/res/drawable-hdpi/ic_report_problem_24dp.png
deleted file mode 100644
index cebb1c2..0000000
--- a/res/drawable-hdpi/ic_report_problem_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_vm_bt_dk.png b/res/drawable-hdpi/ic_vm_bt_dk.png
deleted file mode 100644
index 2a4f4f6..0000000
--- a/res/drawable-hdpi/ic_vm_bt_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_vm_phone_broadcast_dk.png b/res/drawable-hdpi/ic_vm_phone_broadcast_dk.png
deleted file mode 100644
index 1e0b2ae..0000000
--- a/res/drawable-hdpi/ic_vm_phone_broadcast_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ill_onboard_default.png b/res/drawable-hdpi/ill_onboard_default.png
new file mode 100644
index 0000000..d16c1f4
--- /dev/null
+++ b/res/drawable-hdpi/ill_onboard_default.png
Binary files differ
diff --git a/res/drawable-hdpi/ill_onboard_permissions.png b/res/drawable-hdpi/ill_onboard_permissions.png
new file mode 100644
index 0000000..90ef14c
--- /dev/null
+++ b/res/drawable-hdpi/ill_onboard_permissions.png
Binary files differ
diff --git a/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png b/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png
deleted file mode 100644
index f6fd30d..0000000
--- a/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/rounded_corner_bg.9.png b/res/drawable-hdpi/rounded_corner_bg.9.png
deleted file mode 100644
index b5f50de..0000000
--- a/res/drawable-hdpi/rounded_corner_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_call_incoming_holo_dark.png b/res/drawable-ldrtl-hdpi/ic_call_incoming_holo_dark.png
deleted file mode 100644
index 3b3fb46..0000000
--- a/res/drawable-ldrtl-hdpi/ic_call_incoming_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_call_missed_holo_dark.png b/res/drawable-ldrtl-hdpi/ic_call_missed_holo_dark.png
deleted file mode 100644
index 844f351..0000000
--- a/res/drawable-ldrtl-hdpi/ic_call_missed_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_call_outgoing_holo_dark.png b/res/drawable-ldrtl-hdpi/ic_call_outgoing_holo_dark.png
deleted file mode 100644
index 7861986..0000000
--- a/res/drawable-ldrtl-hdpi/ic_call_outgoing_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_call_incoming_holo_dark.png b/res/drawable-ldrtl-mdpi/ic_call_incoming_holo_dark.png
deleted file mode 100644
index b48e0d6..0000000
--- a/res/drawable-ldrtl-mdpi/ic_call_incoming_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_call_missed_holo_dark.png b/res/drawable-ldrtl-mdpi/ic_call_missed_holo_dark.png
deleted file mode 100644
index 86bae10..0000000
--- a/res/drawable-ldrtl-mdpi/ic_call_missed_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_call_outgoing_holo_dark.png b/res/drawable-ldrtl-mdpi/ic_call_outgoing_holo_dark.png
deleted file mode 100644
index 1429593..0000000
--- a/res/drawable-ldrtl-mdpi/ic_call_outgoing_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_call_incoming_holo_dark.png b/res/drawable-ldrtl-xhdpi/ic_call_incoming_holo_dark.png
deleted file mode 100644
index dfb1792..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_call_incoming_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_call_missed_holo_dark.png b/res/drawable-ldrtl-xhdpi/ic_call_missed_holo_dark.png
deleted file mode 100644
index a1236ed..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_call_missed_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_call_outgoing_holo_dark.png b/res/drawable-ldrtl-xhdpi/ic_call_outgoing_holo_dark.png
deleted file mode 100644
index ec0e1d0..0000000
--- a/res/drawable-ldrtl-xhdpi/ic_call_outgoing_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ab_stacked_opaque_dark_holo.9.png b/res/drawable-mdpi/ab_stacked_opaque_dark_holo.9.png
deleted file mode 100644
index 3e912f5..0000000
--- a/res/drawable-mdpi/ab_stacked_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/divider.9.png b/res/drawable-mdpi/divider.9.png
deleted file mode 100644
index 88e5d91..0000000
--- a/res/drawable-mdpi/divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_blue.png b/res/drawable-mdpi/ic_call_log_blue.png
deleted file mode 100644
index b9209ad..0000000
--- a/res/drawable-mdpi/ic_call_log_blue.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_cancel_holo_light.png b/res/drawable-mdpi/ic_cancel_holo_light.png
deleted file mode 100644
index 56705c3..0000000
--- a/res/drawable-mdpi/ic_cancel_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_fav_undo_dk.png b/res/drawable-mdpi/ic_fav_undo_dk.png
deleted file mode 100644
index 9655590..0000000
--- a/res/drawable-mdpi/ic_fav_undo_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_all_contacts_dk.png b/res/drawable-mdpi/ic_menu_all_contacts_dk.png
deleted file mode 100644
index 03af9c4..0000000
--- a/res/drawable-mdpi/ic_menu_all_contacts_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_dialpad_dk.png b/res/drawable-mdpi/ic_menu_dialpad_dk.png
deleted file mode 100644
index a7dcd24..0000000
--- a/res/drawable-mdpi/ic_menu_dialpad_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_dialpad_lt.png b/res/drawable-mdpi/ic_menu_dialpad_lt.png
deleted file mode 100644
index 14674ed..0000000
--- a/res/drawable-mdpi/ic_menu_dialpad_lt.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_history_dk.png b/res/drawable-mdpi/ic_menu_history_dk.png
deleted file mode 100644
index 2203f3a..0000000
--- a/res/drawable-mdpi/ic_menu_history_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_more_horiz_24dp.png b/res/drawable-mdpi/ic_more_horiz_24dp.png
deleted file mode 100644
index 8c0be8a..0000000
--- a/res/drawable-mdpi/ic_more_horiz_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_report_problem_24dp.png b/res/drawable-mdpi/ic_report_problem_24dp.png
deleted file mode 100644
index 04365b9..0000000
--- a/res/drawable-mdpi/ic_report_problem_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_vm_bt_dk.png b/res/drawable-mdpi/ic_vm_bt_dk.png
deleted file mode 100644
index 3ae87b9..0000000
--- a/res/drawable-mdpi/ic_vm_bt_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_vm_phone_broadcast_dk.png b/res/drawable-mdpi/ic_vm_phone_broadcast_dk.png
deleted file mode 100644
index ed1d34d..0000000
--- a/res/drawable-mdpi/ic_vm_phone_broadcast_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ill_onboard_default.png b/res/drawable-mdpi/ill_onboard_default.png
new file mode 100644
index 0000000..41de467
--- /dev/null
+++ b/res/drawable-mdpi/ill_onboard_default.png
Binary files differ
diff --git a/res/drawable-mdpi/ill_onboard_permissions.png b/res/drawable-mdpi/ill_onboard_permissions.png
new file mode 100644
index 0000000..3ec39db
--- /dev/null
+++ b/res/drawable-mdpi/ill_onboard_permissions.png
Binary files differ
diff --git a/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png b/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png
deleted file mode 100644
index 92da2f0..0000000
--- a/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/rounded_corner_bg.9.png b/res/drawable-mdpi/rounded_corner_bg.9.png
deleted file mode 100644
index e43b3ef..0000000
--- a/res/drawable-mdpi/rounded_corner_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ab_stacked_opaque_dark_holo.9.png b/res/drawable-xhdpi/ab_stacked_opaque_dark_holo.9.png
deleted file mode 100644
index 71e4c23..0000000
--- a/res/drawable-xhdpi/ab_stacked_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/divider.9.png b/res/drawable-xhdpi/divider.9.png
deleted file mode 100644
index 88e5d91..0000000
--- a/res/drawable-xhdpi/divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_blue.png b/res/drawable-xhdpi/ic_call_log_blue.png
deleted file mode 100644
index 9d92573..0000000
--- a/res/drawable-xhdpi/ic_call_log_blue.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_cancel_holo_light.png b/res/drawable-xhdpi/ic_cancel_holo_light.png
deleted file mode 100644
index 630f3fd..0000000
--- a/res/drawable-xhdpi/ic_cancel_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fav_undo_dk.png b/res/drawable-xhdpi/ic_fav_undo_dk.png
deleted file mode 100644
index 4e1b651..0000000
--- a/res/drawable-xhdpi/ic_fav_undo_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_all_contacts_dk.png b/res/drawable-xhdpi/ic_menu_all_contacts_dk.png
deleted file mode 100644
index 11bd615..0000000
--- a/res/drawable-xhdpi/ic_menu_all_contacts_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_dialpad_dk.png b/res/drawable-xhdpi/ic_menu_dialpad_dk.png
deleted file mode 100644
index bd80859..0000000
--- a/res/drawable-xhdpi/ic_menu_dialpad_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_dialpad_lt.png b/res/drawable-xhdpi/ic_menu_dialpad_lt.png
deleted file mode 100644
index 345cf1a..0000000
--- a/res/drawable-xhdpi/ic_menu_dialpad_lt.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_history_dk.png b/res/drawable-xhdpi/ic_menu_history_dk.png
deleted file mode 100644
index 25b28e5..0000000
--- a/res/drawable-xhdpi/ic_menu_history_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_more_horiz_24dp.png b/res/drawable-xhdpi/ic_more_horiz_24dp.png
deleted file mode 100644
index dbb87ca..0000000
--- a/res/drawable-xhdpi/ic_more_horiz_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_report_problem_24dp.png b/res/drawable-xhdpi/ic_report_problem_24dp.png
deleted file mode 100644
index a43fa3c..0000000
--- a/res/drawable-xhdpi/ic_report_problem_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_vm_bt_dk.png b/res/drawable-xhdpi/ic_vm_bt_dk.png
deleted file mode 100644
index dc35a55..0000000
--- a/res/drawable-xhdpi/ic_vm_bt_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_vm_phone_broadcast_dk.png b/res/drawable-xhdpi/ic_vm_phone_broadcast_dk.png
deleted file mode 100644
index ca52cb1..0000000
--- a/res/drawable-xhdpi/ic_vm_phone_broadcast_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ill_onboard_default.png b/res/drawable-xhdpi/ill_onboard_default.png
new file mode 100644
index 0000000..1cf47df
--- /dev/null
+++ b/res/drawable-xhdpi/ill_onboard_default.png
Binary files differ
diff --git a/res/drawable-xhdpi/ill_onboard_permissions.png b/res/drawable-xhdpi/ill_onboard_permissions.png
new file mode 100644
index 0000000..ab52a58
--- /dev/null
+++ b/res/drawable-xhdpi/ill_onboard_permissions.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png b/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
deleted file mode 100644
index 88726b6..0000000
--- a/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/rounded_corner_bg.9.png b/res/drawable-xhdpi/rounded_corner_bg.9.png
deleted file mode 100644
index ebfe897..0000000
--- a/res/drawable-xhdpi/rounded_corner_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ab_stacked_opaque_dark_holo.9.png b/res/drawable-xxhdpi/ab_stacked_opaque_dark_holo.9.png
deleted file mode 100644
index 59e1bae..0000000
--- a/res/drawable-xxhdpi/ab_stacked_opaque_dark_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/divider.9.png b/res/drawable-xxhdpi/divider.9.png
deleted file mode 100644
index 88e5d91..0000000
--- a/res/drawable-xxhdpi/divider.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_call_log_blue.png b/res/drawable-xxhdpi/ic_call_log_blue.png
deleted file mode 100644
index 0a55a75..0000000
--- a/res/drawable-xxhdpi/ic_call_log_blue.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_cancel_holo_light.png b/res/drawable-xxhdpi/ic_cancel_holo_light.png
deleted file mode 100644
index c2f5b5e..0000000
--- a/res/drawable-xxhdpi/ic_cancel_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_fav_undo_dk.png b/res/drawable-xxhdpi/ic_fav_undo_dk.png
deleted file mode 100644
index 4b7dfc4..0000000
--- a/res/drawable-xxhdpi/ic_fav_undo_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_all_contacts_dk.png b/res/drawable-xxhdpi/ic_menu_all_contacts_dk.png
deleted file mode 100644
index ae4037e..0000000
--- a/res/drawable-xxhdpi/ic_menu_all_contacts_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_dialpad_dk.png b/res/drawable-xxhdpi/ic_menu_dialpad_dk.png
deleted file mode 100644
index 09cc2f8..0000000
--- a/res/drawable-xxhdpi/ic_menu_dialpad_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_dialpad_lt.png b/res/drawable-xxhdpi/ic_menu_dialpad_lt.png
deleted file mode 100644
index 45c1ab2..0000000
--- a/res/drawable-xxhdpi/ic_menu_dialpad_lt.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_history_dk.png b/res/drawable-xxhdpi/ic_menu_history_dk.png
deleted file mode 100644
index 3664705..0000000
--- a/res/drawable-xxhdpi/ic_menu_history_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_more_horiz_24dp.png b/res/drawable-xxhdpi/ic_more_horiz_24dp.png
deleted file mode 100644
index 2036a9c..0000000
--- a/res/drawable-xxhdpi/ic_more_horiz_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_report_problem_24dp.png b/res/drawable-xxhdpi/ic_report_problem_24dp.png
deleted file mode 100644
index 807b9fa..0000000
--- a/res/drawable-xxhdpi/ic_report_problem_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_vm_bt_dk.png b/res/drawable-xxhdpi/ic_vm_bt_dk.png
deleted file mode 100644
index 0cb69bd..0000000
--- a/res/drawable-xxhdpi/ic_vm_bt_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_vm_phone_broadcast_dk.png b/res/drawable-xxhdpi/ic_vm_phone_broadcast_dk.png
deleted file mode 100644
index ee12670..0000000
--- a/res/drawable-xxhdpi/ic_vm_phone_broadcast_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ill_onboard_default.png b/res/drawable-xxhdpi/ill_onboard_default.png
new file mode 100644
index 0000000..f243d44
--- /dev/null
+++ b/res/drawable-xxhdpi/ill_onboard_default.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ill_onboard_permissions.png b/res/drawable-xxhdpi/ill_onboard_permissions.png
new file mode 100644
index 0000000..4725bfd
--- /dev/null
+++ b/res/drawable-xxhdpi/ill_onboard_permissions.png
Binary files differ
diff --git a/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png b/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png
deleted file mode 100644
index 26234b1..0000000
--- a/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/rounded_corner_bg.9.png b/res/drawable-xxhdpi/rounded_corner_bg.9.png
deleted file mode 100644
index 0a99cdb..0000000
--- a/res/drawable-xxhdpi/rounded_corner_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/empty_speeddial.png b/res/drawable-xxxhdpi/empty_speeddial.png
deleted file mode 100644
index dc7f8ae..0000000
--- a/res/drawable-xxxhdpi/empty_speeddial.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_more_horiz_24dp.png b/res/drawable-xxxhdpi/ic_more_horiz_24dp.png
deleted file mode 100644
index 535f087..0000000
--- a/res/drawable-xxxhdpi/ic_more_horiz_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_report_problem_24dp.png b/res/drawable-xxxhdpi/ic_report_problem_24dp.png
deleted file mode 100644
index 8683a2e..0000000
--- a/res/drawable-xxxhdpi/ic_report_problem_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ill_onboard_default.png b/res/drawable-xxxhdpi/ill_onboard_default.png
new file mode 100644
index 0000000..53f858d
--- /dev/null
+++ b/res/drawable-xxxhdpi/ill_onboard_default.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ill_onboard_permissions.png b/res/drawable-xxxhdpi/ill_onboard_permissions.png
new file mode 100644
index 0000000..f406a95
--- /dev/null
+++ b/res/drawable-xxxhdpi/ill_onboard_permissions.png
Binary files differ
diff --git a/res/layout/blocked_number_fragment.xml b/res/layout/blocked_number_fragment.xml
index b98b58f..7aff06e 100644
--- a/res/layout/blocked_number_fragment.xml
+++ b/res/layout/blocked_number_fragment.xml
@@ -27,12 +27,4 @@
android:divider="@null"
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"
- android:paddingTop="@dimen/blocked_number_top_margin"
- android:paddingBottom="@dimen/blocked_number_bottom_margin"
- android:text="@string/listNoBlockedNumbers" />
-
</LinearLayout>
diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml
index 3fcdf39..ce1d4fe 100644
--- a/res/layout/blocked_number_header.xml
+++ b/res/layout/blocked_number_header.xml
@@ -19,6 +19,31 @@
android:layout_height="wrap_content"
android:orientation="vertical">
+ <LinearLayout android:id="@+id/blocked_numbers_disabled_for_emergency"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginBottom="8dp"
+ android:padding="16dp"
+ android:visibility="gone">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blocked_numbers_disabled_emergency_header_label"
+ android:textStyle="bold"
+ android:textColor="@color/blocked_number_disabled_emergency_header_color"
+ style="@style/BlockedNumbersDescriptionTextStyle" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blocked_numbers_disabled_emergency_desc"
+ style="@style/BlockedNumbersDescriptionTextStyle" />
+
+ </LinearLayout>
+
+
<android.support.v7.widget.CardView
android:id="@+id/hide_blocked_calls_setting"
android:layout_width="match_parent"
diff --git a/res/layout/onboarding_screen_fragment.xml b/res/layout/onboarding_screen_fragment.xml
index f4136ae..f60225d 100644
--- a/res/layout/onboarding_screen_fragment.xml
+++ b/res/layout/onboarding_screen_fragment.xml
@@ -17,7 +17,14 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:padding="20dp" >
+ android:paddingBottom="20dp" >
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/onboarding_screen_background_image"
+ android:scaleType="centerCrop"
+ android:importantForAccessibility="no" />
<TextView
android:id="@+id/onboarding_screen_title"
@@ -25,42 +32,40 @@
android:layout_height="wrap_content"
android:layout_above="@+id/onboarding_screen_content"
android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="@color/onboarding_primary_text_color" />
+ android:textColor="@color/onboarding_primary_text_color"
+ android:layout_marginStart="@dimen/onboard_screen_side_padding"
+ android:layout_marginEnd="@dimen/onboard_screen_side_padding" />
<TextView
android:id="@id/onboarding_screen_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_above="@+id/onboarding_buttons_container"
+ android:layout_above="@+id/onboard_next_button"
android:layout_marginTop="20dp"
- android:textColor="@color/onboarding_primary_text_color" />
+ android:textColor="@color/onboarding_primary_text_color"
+ android:layout_marginStart="@dimen/onboard_screen_side_padding"
+ android:layout_marginEnd="@dimen/onboard_screen_side_padding" />
- <LinearLayout
- android:id="@id/onboarding_buttons_container"
- android:layout_width="match_parent"
+ <Button
+ android:id="@+id/onboard_skip_button"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_alignTop="@id/onboard_next_button"
+ android:layout_toStartOf="@id/onboard_next_button"
+ android:text="@string/onboarding_skip_button"
+ android:textColor="@color/onboarding_primary_text_color"
+ style="?android:attr/borderlessButtonStyle" />
+
+ <Button
+ android:id="@id/onboard_next_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
- android:layout_marginTop="20dp" >
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="@dimen/onboard_screen_side_padding"
+ android:text="@string/onboarding_next_button"
+ android:textColor="@color/onboarding_primary_text_color"
+ style="@android:style/Widget.Material.Button" />
- <Button
- android:id="@+id/onboard_skip_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:text="@string/onboarding_skip_button"
- android:textColor="@color/onboarding_primary_text_color"
- style="?android:attr/borderlessButtonStyle" />
-
- <Button
- android:id="@+id/onboard_next_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:text="@string/onboarding_next_button"
- android:textColor="@color/onboarding_primary_text_color"
- style="?android:attr/borderlessButtonStyle" />
-
- </LinearLayout>
</RelativeLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index bf7bfb2..da68061 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -132,11 +132,13 @@
<color name="blocked_number_accent_color">#42A5F5</color>
<color name="blocked_number_block_color">#F44336</color>
<color name="blocked_number_header_color">@color/dialer_theme_color</color>
+ <color name="blocked_number_disabled_emergency_header_color">#616161</color>
<!-- Colors for onboarding flow -->
<color name="onboarding_primary_text_color">#ffffff</color>
<color name="onboarding_default_dialer_screen_background_color">#e06055</color>
<color name="onboarding_permissions_screen_background_color">#689f38</color>
+ <color name="onboarding_next_button_color">#ffffff</color>
<!-- Grey 700 -->
<color name="call_detail_footer_text_color">#616161</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 18f33d5..8ea7d1c 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -167,4 +167,6 @@
<dimen name="blocked_number_settings_description_text_size">16sp</dimen>
<dimen name="call_type_icon_size">12dp</dimen>
+
+ <dimen name="onboard_screen_side_padding">20dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0ebb9a8..086145e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -826,6 +826,21 @@
<!-- Label for the blocked numbers settings section [CHAR LIMIT=30] -->
<string name="manage_blocked_numbers_label">Blocked numbers</string>
+ <!-- Label for a section describing that call blocking is temporarily disabled because an
+ emergency call was made. [CHAR LIMIT=50] -->
+ <string name="blocked_numbers_disabled_emergency_header_label">
+ Call blocking temporarily off
+ </string>
+
+ <!-- Description that call blocking is temporarily disabled because the user called an
+ emergency number, and explains that call blocking will be re-enabled after a buffer
+ period has passed. [CHAR LIMIT=NONE] -->
+ <string name="blocked_numbers_disabled_emergency_desc">
+ Call blocking has been disabled because you contacted emergency services from this phone
+ within the last 48 hours. It will be automatically reenabled once the 48 hour period
+ expires.
+ </string>
+
<!-- Label for fragment to import numbers from contacts marked as send to voicemail.
[CHAR_LIMIT=30] -->
<string name="import_send_to_voicemail_numbers_label">Import numbers</string>
@@ -859,10 +874,6 @@
[CHAR LIMIT=NONE]-->
<string name="description_blocked_number_list_delete">Unblock number</string>
- <!-- Displayed in the blocked numbers list when there are no blocked numbers.
- [CHAR LIMIT=NONE] -->
- <string name="listNoBlockedNumbers">No blocked numbers</string>
-
<!-- Button to bring up UI to add a number to the blocked call list. [CHAR LIMIT=40] -->
<string name="blockNumber">Add number</string>
@@ -918,9 +929,6 @@
<!-- Shown as a prompt to turn on contacts permissions to allow contact search [CHAR LIMIT=NONE]-->
<string name="permission_no_search">To search your contacts, turn on the Contacts permissions.</string>
- <!-- Shown as a prompt to turn on location permissions and/or enable location to allow nearby places search [CHAR LIMIT=NONE]-->
- <string name="permission_no_location_for_search">To search nearby locations, allow Phone to access your location.</string>
-
<!-- Shown as a prompt to turn on the phone permission to allow a call to be placed [CHAR LIMIT=NONE]-->
<string name="permission_place_call">To place a call, turn on the Phone permission.</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 533b88e..108f299 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -120,6 +120,8 @@
<item name="windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowNoTitle">true</item>
+ <item name="android:colorButtonNormal">@color/onboarding_next_button_color</item>
+ <item name="colorButtonNormal">@color/onboarding_next_button_color</item>
</style>
<!-- Hide the actionbar title during the activity preview -->
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 3dccf27..ae20e49 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -16,18 +16,20 @@
package com.android.dialer.calllog;
+import com.google.common.annotations.VisibleForTesting;
+
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.support.v7.widget.RecyclerView;
import android.os.Bundle;
import android.os.Trace;
import android.preference.PreferenceManager;
import android.provider.CallLog;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.telecom.PhoneAccountHandle;
import android.telephony.PhoneNumberUtils;
@@ -39,6 +41,7 @@
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
+import com.android.contacts.common.preference.ContactsPreferences;
import com.android.contacts.common.util.PermissionsUtil;
import com.android.dialer.PhoneCallDetails;
import com.android.dialer.R;
@@ -51,8 +54,6 @@
import com.android.dialer.util.PhoneNumberUtil;
import com.android.dialer.voicemail.VoicemailPlaybackPresenter;
-import com.google.common.annotations.VisibleForTesting;
-
import java.util.HashMap;
import java.util.Map;
@@ -118,12 +119,14 @@
* its day group. This hashmap provides a means of determining the previous day group without
* having to reverse the cursor to the start of the previous day call log entry.
*/
- private HashMap<Long,Integer> mDayGroups = new HashMap<Long, Integer>();
+ private HashMap<Long, Integer> mDayGroups = new HashMap<>();
private boolean mLoading = true;
private SharedPreferences mPrefs;
+ private ContactsPreferences mContactsPreferences;
+
protected boolean mShowVoicemailPromoCard = false;
/** Instance of helper class for managing views. */
@@ -254,7 +257,7 @@
CallTypeHelper callTypeHelper = new CallTypeHelper(resources);
mTelecomCallLogCache = new TelecomCallLogCache(mContext);
- mBlockedIdCache = new HashMap<NumberWithCountryIso, Integer>();
+ mBlockedIdCache = new HashMap<>();
PhoneCallDetailsHelper phoneCallDetailsHelper =
new PhoneCallDetailsHelper(mContext, resources, mTelecomCallLogCache);
mCallLogListItemHelper =
@@ -264,6 +267,7 @@
new FilteredNumberAsyncQueryHandler(mContext.getContentResolver());
mPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ mContactsPreferences = new ContactsPreferences(mContext);
maybeShowVoicemailPromoCard();
}
@@ -311,6 +315,7 @@
if (PermissionsUtil.hasPermission(mContext, android.Manifest.permission.READ_CONTACTS)) {
mContactInfoCache.start();
}
+ mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY);
}
public void onPause() {
@@ -460,9 +465,10 @@
details.dataUsage = c.getLong(CallLogQuery.DATA_USAGE);
}
- if (!TextUtils.isEmpty(info.name)) {
+ String preferredName = getPreferredDisplayName(info);
+ if (!TextUtils.isEmpty(preferredName)) {
details.contactUri = info.lookupUri;
- details.name = info.name;
+ details.name = preferredName;
details.numberType = info.type;
details.numberLabel = info.label;
details.photoUri = info.photoUri;
@@ -532,6 +538,14 @@
mCallLogListItemHelper.setPhoneCallDetails(views, details);
}
+ private String getPreferredDisplayName(ContactInfo contactInfo) {
+ if (mContactsPreferences.getDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY ||
+ TextUtils.isEmpty(contactInfo.nameAlternative)) {
+ return contactInfo.name;
+ }
+ return contactInfo.nameAlternative;
+ }
+
@Override
public int getItemCount() {
return super.getItemCount() + (mShowVoicemailPromoCard ? 1 : 0)
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 369730d..f84ffd5 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -33,8 +33,8 @@
import android.provider.CallLog.Calls;
import android.provider.ContactsContract;
import android.provider.VoicemailContract.Status;
-import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -309,7 +309,6 @@
mVoicemailPlaybackPresenter,
mIsCallLogActivity);
mRecyclerView.setAdapter(mAdapter);
-
fetchCalls();
return view;
}
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index 23c77d3..fd649bc 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -276,7 +276,7 @@
if (callType == CallLog.Calls.VOICEMAIL_TYPE) {
menu.setHeaderTitle(mContext.getResources().getText(R.string.voicemail));
} else {
- menu.setHeaderTitle(number);
+ menu.setHeaderTitle(PhoneNumberUtils.createTtsSpannable(number));
}
menu.add(ContextMenu.NONE, R.id.context_menu_copy_to_clipboard, ContextMenu.NONE,
diff --git a/src/com/android/dialer/calllog/ContactInfo.java b/src/com/android/dialer/calllog/ContactInfo.java
index 357c832..30f60d9 100644
--- a/src/com/android/dialer/calllog/ContactInfo.java
+++ b/src/com/android/dialer/calllog/ContactInfo.java
@@ -34,6 +34,7 @@
*/
public String lookupKey;
public String name;
+ public String nameAlternative;
public int type;
public String label;
public String number;
@@ -70,6 +71,7 @@
ContactInfo other = (ContactInfo) obj;
if (!UriUtils.areEqual(lookupUri, other.lookupUri)) return false;
if (!TextUtils.equals(name, other.name)) return false;
+ if (!TextUtils.equals(nameAlternative, other.nameAlternative)) return false;
if (type != other.type) return false;
if (!TextUtils.equals(label, other.label)) return false;
if (!TextUtils.equals(number, other.number)) return false;
@@ -83,9 +85,11 @@
@Override
public String toString() {
- return Objects.toStringHelper(this).add("lookupUri", lookupUri).add("name", name).add(
- "type", type).add("label", label).add("number", number).add("formattedNumber",
- formattedNumber).add("normalizedNumber", normalizedNumber).add("photoId", photoId)
+ return Objects.toStringHelper(this).add("lookupUri", lookupUri).add("name", name)
+ .add("nameAlternative", nameAlternative)
+ .add("type", type).add("label", label)
+ .add("number", number).add("formattedNumber",formattedNumber)
+ .add("normalizedNumber", normalizedNumber).add("photoId", photoId)
.add("photoUri", photoUri).add("objectId", objectId).toString();
}
}
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java
index 2f97bc5..4b9d553 100644
--- a/src/com/android/dialer/calllog/ContactInfoHelper.java
+++ b/src/com/android/dialer/calllog/ContactInfoHelper.java
@@ -41,8 +41,6 @@
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.List;
-
/**
* Utility class to look up the contact information for a given number.
*/
@@ -151,47 +149,70 @@
* The {@link ContactInfo#formattedNumber} field is always set to {@code null} in the returned
* value.
*/
- private ContactInfo lookupContactFromUri(Uri uri) {
+ public ContactInfo lookupContactFromUri(Uri uri) {
if (uri == null) {
return null;
}
if (!PermissionsUtil.hasContactsPermissions(mContext)) {
return ContactInfo.EMPTY;
}
- final ContactInfo info;
- Cursor phonesCursor =
- mContext.getContentResolver().query(uri, PhoneQuery._PROJECTION, null, null, null);
- if (phonesCursor != null) {
- try {
- if (phonesCursor.moveToFirst()) {
- info = new ContactInfo();
- long contactId = phonesCursor.getLong(PhoneQuery.PERSON_ID);
- String lookupKey = phonesCursor.getString(PhoneQuery.LOOKUP_KEY);
- info.lookupKey = lookupKey;
- info.lookupUri = Contacts.getLookupUri(contactId, lookupKey);
- info.name = phonesCursor.getString(PhoneQuery.NAME);
- info.type = phonesCursor.getInt(PhoneQuery.PHONE_TYPE);
- info.label = phonesCursor.getString(PhoneQuery.LABEL);
- info.number = phonesCursor.getString(PhoneQuery.MATCHED_NUMBER);
- info.normalizedNumber = phonesCursor.getString(PhoneQuery.NORMALIZED_NUMBER);
- info.photoId = phonesCursor.getLong(PhoneQuery.PHOTO_ID);
- info.photoUri =
- UriUtils.parseUriOrNull(phonesCursor.getString(PhoneQuery.PHOTO_URI));
- info.formattedNumber = null;
- } else {
- info = ContactInfo.EMPTY;
- }
- } finally {
- phonesCursor.close();
- }
- } else {
- // Failed to fetch the data, ignore this request.
- info = null;
+ Cursor phoneLookupCursor = mContext.getContentResolver().query(uri,
+ PhoneQuery.PHONE_LOOKUP_PROJECTION, null, null, null);
+
+ if (phoneLookupCursor == null) {
+ return null;
}
+
+ try {
+ if (!phoneLookupCursor.moveToFirst()) {
+ return ContactInfo.EMPTY;
+ }
+ String lookupKey = phoneLookupCursor.getString(PhoneQuery.LOOKUP_KEY);
+ ContactInfo contactInfo = createPhoneLookupContactInfo(phoneLookupCursor, lookupKey);
+ contactInfo.nameAlternative = lookUpDisplayNameAlternative(lookupKey);
+ return contactInfo;
+ } finally {
+ phoneLookupCursor.close();
+ }
+ }
+
+ private ContactInfo createPhoneLookupContactInfo(Cursor phoneLookupCursor, String lookupKey) {
+ ContactInfo info = new ContactInfo();
+ info.lookupKey = lookupKey;
+ info.lookupUri = Contacts.getLookupUri(phoneLookupCursor.getLong(PhoneQuery.PERSON_ID),
+ lookupKey);
+ info.name = phoneLookupCursor.getString(PhoneQuery.NAME);
+ info.type = phoneLookupCursor.getInt(PhoneQuery.PHONE_TYPE);
+ info.label = phoneLookupCursor.getString(PhoneQuery.LABEL);
+ info.number = phoneLookupCursor.getString(PhoneQuery.MATCHED_NUMBER);
+ info.normalizedNumber = phoneLookupCursor.getString(PhoneQuery.NORMALIZED_NUMBER);
+ info.photoId = phoneLookupCursor.getLong(PhoneQuery.PHOTO_ID);
+ info.photoUri = UriUtils.parseUriOrNull(phoneLookupCursor.getString(PhoneQuery.PHOTO_URI));
+ info.formattedNumber = null;
return info;
}
+ private String lookUpDisplayNameAlternative(String lookupKey) {
+ Uri uri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey);
+
+ Cursor cursor = mContext.getContentResolver().query(uri,
+ PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION, null, null, null);
+
+ if (cursor == null) {
+ return null;
+ }
+
+ try {
+ if (!cursor.moveToFirst()) {
+ return null;
+ }
+ return cursor.getString(PhoneQuery.NAME_ALTERNATIVE);
+ } finally {
+ cursor.close();
+ }
+ }
+
/**
* Determines the contact information for the given phone number.
* <p>
@@ -367,7 +388,6 @@
*/
public static ContactInfo getContactInfo(Cursor c) {
ContactInfo info = new ContactInfo();
-
info.lookupUri = UriUtils.parseUriOrNull(c.getString(CallLogQuery.CACHED_LOOKUP_URI));
info.name = c.getString(CallLogQuery.CACHED_NAME);
info.type = c.getInt(CallLogQuery.CACHED_NUMBER_TYPE);
@@ -406,6 +426,4 @@
return mCachedNumberLookupService != null
&& mCachedNumberLookupService.canReportAsInvalid(sourceType, objectId);
}
-
-
}
diff --git a/src/com/android/dialer/calllog/PhoneQuery.java b/src/com/android/dialer/calllog/PhoneQuery.java
index 7190522..200b5e1 100644
--- a/src/com/android/dialer/calllog/PhoneQuery.java
+++ b/src/com/android/dialer/calllog/PhoneQuery.java
@@ -16,13 +16,19 @@
package com.android.dialer.calllog;
+import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.PhoneLookup;
/**
- * The query to look up the {@link ContactInfo} for a given number in the Call Log.
+ * The queries to look up the {@link ContactInfo} for a given number in the Call Log.
*/
final class PhoneQuery {
- public static final String[] _PROJECTION = new String[] {
+
+ /**
+ * Projection to look up the ContactInfo. Does not include DISPLAY_NAME_ALTERNATIVE as that
+ * column isn't available in ContactsCommon.PhoneLookup
+ */
+ public static final String[] PHONE_LOOKUP_PROJECTION = new String[] {
PhoneLookup._ID,
PhoneLookup.DISPLAY_NAME,
PhoneLookup.TYPE,
@@ -42,4 +48,13 @@
public static final int PHOTO_ID = 6;
public static final int LOOKUP_KEY = 7;
public static final int PHOTO_URI = 8;
+
+ /**
+ * Projection to look up a contact's DISPLAY_NAME_ALTERNATIVE
+ */
+ public static final String[] DISPLAY_NAME_ALTERNATIVE_PROJECTION = new String[] {
+ Contacts.DISPLAY_NAME_ALTERNATIVE,
+ };
+
+ public static final int NAME_ALTERNATIVE = 0;
}
diff --git a/src/com/android/dialer/contactinfo/ContactInfoCache.java b/src/com/android/dialer/contactinfo/ContactInfoCache.java
index 568f488..1e24579 100644
--- a/src/com/android/dialer/contactinfo/ContactInfoCache.java
+++ b/src/com/android/dialer/contactinfo/ContactInfoCache.java
@@ -162,7 +162,7 @@
// The contact info is no longer up to date, we should request it. However, we
// do not need to request them immediately.
enqueueRequest(number, countryIso, cachedContactInfo, false);
- } else if (!callLogInfoMatches(cachedContactInfo, info)) {
+ } else if (!callLogInfoMatches(cachedContactInfo, info)) {
// The call log information does not match the one we have, look it up again.
// We could simply update the call log directly, but that needs to be done in a
// background thread, so it is easier to simply request a new lookup, which will, as
@@ -309,8 +309,7 @@
* Checks whether the contact info from the call log matches the one from the contacts db.
*/
private boolean callLogInfoMatches(ContactInfo callLogInfo, ContactInfo info) {
- // The call log only contains a subset of the fields in the contacts db.
- // Only check those.
+ // The call log only contains a subset of the fields in the contacts db. Only check those.
return TextUtils.equals(callLogInfo.name, info.name)
&& callLogInfo.type == info.type
&& TextUtils.equals(callLogInfo.label, info.label);
diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
index c478b83..7788cbe 100644
--- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
+++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
@@ -52,6 +52,7 @@
private Switch mHideSettingSwitch;
private View mImportSettings;
+ private View mBlockedNumbersDisabledForEmergency;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
@@ -80,6 +81,8 @@
});
mImportSettings = getActivity().findViewById(R.id.import_settings);
+ mBlockedNumbersDisabledForEmergency =
+ getActivity().findViewById(R.id.blocked_numbers_disabled_for_emergency);
getActivity().findViewById(R.id.import_button).setOnClickListener(this);;
getActivity().findViewById(R.id.view_numbers_button).setOnClickListener(this);
@@ -122,8 +125,14 @@
}
});
- mHideSettingSwitch.setChecked(FilteredNumbersUtil.shouldHideBlockedCalls(getActivity()));
+ mHideSettingSwitch.setChecked(FilteredNumbersUtil.shouldHideBlockedCalls(getContext()));
mCallLogQueryHandler.fetchVoicemailStatus();
+
+ if (FilteredNumbersUtil.hasRecentEmergencyCall(getContext())) {
+ mBlockedNumbersDisabledForEmergency.setVisibility(View.VISIBLE);
+ } else {
+ mBlockedNumbersDisabledForEmergency.setVisibility(View.GONE);
+ }
}
@Override
diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
index 8bfcea0..cceaca9 100644
--- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
+++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
@@ -23,8 +23,6 @@
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -44,6 +42,11 @@
public class FilteredNumbersUtil {
private static final String HIDE_BLOCKED_CALLS_PREF_KEY = "hide_blocked_calls";
+ // Pref key for storing the time, in milliseconds after epoch, of end of the last emergency call.
+ private static final String LAST_EMERGENCY_CALL_PREF_KEY = "last_emergency_call";
+
+ // Disable incoming call blocking if there was a call within the past 2 days.
+ private static final long EMERGENCY_CALL_RECENCY_THRESHOLD_MS = 1000 * 60 * 60 * 24 * 2;
public interface CheckForSendToVoicemailContactListener {
public void onComplete(boolean hasSendToVoicemailContact);
@@ -238,24 +241,36 @@
}
PreferenceManager.getDefaultSharedPreferences(context)
.edit()
- .putBoolean(FilteredNumbersUtil.HIDE_BLOCKED_CALLS_PREF_KEY, shouldHide)
+ .putBoolean(HIDE_BLOCKED_CALLS_PREF_KEY, shouldHide)
+ .apply();
+ }
+
+ public static boolean hasRecentEmergencyCall(Context context) {
+ if (context == null) {
+ return false;
+ }
+
+ Long lastEmergencyCallTime = PreferenceManager.getDefaultSharedPreferences(context)
+ .getLong(LAST_EMERGENCY_CALL_PREF_KEY, 0);
+ if (lastEmergencyCallTime == 0) {
+ return false;
+ }
+
+ return (System.currentTimeMillis() - lastEmergencyCallTime)
+ < EMERGENCY_CALL_RECENCY_THRESHOLD_MS;
+ }
+
+ public static void recordLastEmergencyCallTime(Context context) {
+ if (context == null) {
+ return;
+ }
+ PreferenceManager.getDefaultSharedPreferences(context)
+ .edit()
+ .putLong(LAST_EMERGENCY_CALL_PREF_KEY, System.currentTimeMillis())
.apply();
}
public static boolean canBlockNumber(Context context, String number) {
- if (PhoneNumberUtils.isEmergencyNumber(number)) {
- return false;
- }
-
- TelecomManager telecomManager =
- (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
- List<PhoneAccountHandle> phoneAccountHandles = telecomManager.getCallCapablePhoneAccounts();
- for (PhoneAccountHandle phoneAccountHandle : phoneAccountHandles) {
- if (telecomManager.isVoiceMailNumber(phoneAccountHandle, number)) {
- return false;
- }
- }
-
- return true;
+ return !PhoneNumberUtils.isEmergencyNumber(number) && !TextUtils.isEmpty(number);
}
}
diff --git a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java b/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java
index 581ff98..f785cf7 100644
--- a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java
+++ b/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java
@@ -49,7 +49,10 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.blocked_numbers_activity);
- showManagementUi();
+ // If savedInstanceState != null, the Activity will automatically restore the last fragment.
+ if (savedInstanceState == null) {
+ showManagementUi();
+ }
}
public void showManagementUi() {
diff --git a/src/com/android/dialer/onboard/OnboardingActivity.java b/src/com/android/dialer/onboard/OnboardingActivity.java
index 144e6d4..9be0fd0 100644
--- a/src/com/android/dialer/onboard/OnboardingActivity.java
+++ b/src/com/android/dialer/onboard/OnboardingActivity.java
@@ -257,6 +257,7 @@
SCREEN_DEFAULT_DIALER,
canSkipScreen(),
R.color.onboarding_default_dialer_screen_background_color,
+ R.drawable.ill_onboard_default,
R.string.request_default_dialer_screen_title,
R.string.request_default_dialer_screen_content
);
@@ -294,6 +295,7 @@
SCREEN_PERMISSIONS,
canSkipScreen(),
R.color.onboarding_permissions_screen_background_color,
+ R.drawable.ill_onboard_permissions,
R.string.request_permissions_screen_title,
R.string.request_permissions_screen_content
);
diff --git a/src/com/android/dialer/onboard/OnboardingFragment.java b/src/com/android/dialer/onboard/OnboardingFragment.java
index 77b265b..2836a95 100644
--- a/src/com/android/dialer/onboard/OnboardingFragment.java
+++ b/src/com/android/dialer/onboard/OnboardingFragment.java
@@ -21,6 +21,8 @@
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageView;
import android.widget.TextView;
import com.android.dialer.R;
@@ -28,7 +30,8 @@
public class OnboardingFragment extends Fragment implements OnClickListener {
public static final String ARG_SCREEN_ID = "arg_screen_id";
public static final String ARG_CAN_SKIP_SCREEN = "arg_can_skip_screen";
- public static final String ARG_BACKGROUND_COLOR_RESOURCE = "arg_background_color";
+ public static final String ARG_BACKGROUND_COLOR_RESOURCE = "arg_background_color_resource";
+ public static final String ARG_BACKGROUND_IMAGE_RESOURCE="arg_background_image_resource";
public static final String ARG_TEXT_TITLE_RESOURCE = "arg_text_title_resource";
public static final String ARG_TEXT_CONTENT_RESOURCE = "arg_text_content_resource";
@@ -42,11 +45,12 @@
public OnboardingFragment() {}
public OnboardingFragment(int screenId, boolean canSkipScreen, int backgroundColorResourceId,
- int textTitleResourceId, int textContentResourceId) {
+ int backgroundImageResourceId, int textTitleResourceId, int textContentResourceId) {
final Bundle args = new Bundle();
args.putInt(ARG_SCREEN_ID, screenId);
args.putBoolean(ARG_CAN_SKIP_SCREEN, canSkipScreen);
args.putInt(ARG_BACKGROUND_COLOR_RESOURCE, backgroundColorResourceId);
+ args.putInt(ARG_BACKGROUND_IMAGE_RESOURCE, backgroundImageResourceId);
args.putInt(ARG_TEXT_TITLE_RESOURCE, textTitleResourceId);
args.putInt(ARG_TEXT_CONTENT_RESOURCE, textContentResourceId);
setArguments(args);
@@ -62,12 +66,17 @@
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.onboarding_screen_fragment, container, false);
- view.setBackgroundColor(getResources().getColor(
- getArguments().getInt(ARG_BACKGROUND_COLOR_RESOURCE), null));
+ final int backgroundColor = getResources().getColor(
+ getArguments().getInt(ARG_BACKGROUND_COLOR_RESOURCE), null);
+ view.setBackgroundColor(backgroundColor);
+ ((ImageView) view.findViewById(R.id.onboarding_screen_background_image)).setImageResource(
+ getArguments().getInt(ARG_BACKGROUND_IMAGE_RESOURCE));
((TextView) view.findViewById(R.id.onboarding_screen_content)).
setText(getArguments().getInt(ARG_TEXT_CONTENT_RESOURCE));
((TextView) view.findViewById(R.id.onboarding_screen_title)).
- setText(getArguments().getInt(ARG_TEXT_TITLE_RESOURCE));
+ setText(getArguments().getInt(ARG_TEXT_TITLE_RESOURCE));
+ ((Button) view.findViewById(R.id.onboard_next_button)).setTextColor(backgroundColor);
+
if (!getArguments().getBoolean(ARG_CAN_SKIP_SCREEN)) {
view.findViewById(R.id.onboard_skip_button).setVisibility(View.INVISIBLE);
}
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
index 9b4e20d..c0884ad 100644
--- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
+++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
@@ -749,6 +749,10 @@
* the presenter without the presenter triggering the audio manager and duplicating actions.
*/
public void setSpeakerphoneOn(boolean on) {
+ if (mView == null) {
+ return;
+ }
+
mView.onSpeakerphoneOn(on);
mIsSpeakerphoneOn = on;
diff --git a/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java b/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java
new file mode 100644
index 0000000..6d3e860
--- /dev/null
+++ b/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.dialer.calllog;
+
+import android.net.Uri;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.PhoneLookup;
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
+import com.android.contacts.common.test.mocks.ContactsMockContext;
+import com.android.contacts.common.test.mocks.MockContentProvider.Query;
+
+import junit.framework.Assert;
+
+@MediumTest
+public class ContactInfoHelperTest extends AndroidTestCase {
+
+ private static final String TEST_COUNTRY_ISO = "US";
+ private static final String TEST_DISPLAY_NAME = "Display Name";
+ private static final String TEST_DISPLAY_NAME_ALTERNATIVE = "Name, Display";
+ private static final String[] TEST_DISPLAY_NAME_ALTERNATIVE_ROW = new String[]{null,
+ TEST_DISPLAY_NAME_ALTERNATIVE};
+ private static final String TEST_LOOKUP_KEY = "lookupKey";
+ private static final String[] TEST_LOOKUP_ROW = new String[]{null, TEST_DISPLAY_NAME,
+ null, null, null, null, null, TEST_LOOKUP_KEY, null};
+
+ private Uri displayNameAlternativeUri;
+ private ContactsMockContext mContext;
+ private ContactInfo mContactInfo;
+ private ContactInfoHelper mContactInfoHelper;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ displayNameAlternativeUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI,
+ TEST_LOOKUP_KEY);
+ mContext = new ContactsMockContext(getContext());
+ mContactInfo = new ContactInfo();
+ mContactInfo.name = TEST_DISPLAY_NAME;
+ mContactInfo.nameAlternative = TEST_DISPLAY_NAME_ALTERNATIVE;
+ mContactInfoHelper = new ContactInfoHelper(mContext, TEST_COUNTRY_ISO);
+ }
+
+ public void testLookupContactFromUriNullUri() {
+ Assert.assertNull(mContactInfoHelper.lookupContactFromUri(null));
+ }
+
+ public void testLookupContactFromUriNoResults() {
+ setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
+ PhoneQuery.PHONE_LOOKUP_PROJECTION);
+
+ Assert.assertEquals(ContactInfo.EMPTY, mContactInfoHelper.lookupContactFromUri(
+ PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI));
+ mContext.verify();
+ }
+
+ public void testLookupContactFromUriNoDisplayNameAlternative() {
+ setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
+ PhoneQuery.PHONE_LOOKUP_PROJECTION, TEST_LOOKUP_ROW);
+ setUpQueryExpectations(displayNameAlternativeUri,
+ PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION);
+
+ ContactInfo contactInfo = mContactInfoHelper.lookupContactFromUri(
+ PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI);
+ Assert.assertEquals(TEST_DISPLAY_NAME, contactInfo.name);
+ Assert.assertNull(contactInfo.nameAlternative);
+ mContext.verify();
+ }
+
+ public void testLookupContactFromUriWithDisplayNameAlternative() {
+ setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
+ PhoneQuery.PHONE_LOOKUP_PROJECTION, TEST_LOOKUP_ROW);
+ setUpQueryExpectations(displayNameAlternativeUri,
+ PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION, TEST_DISPLAY_NAME_ALTERNATIVE_ROW);
+
+ ContactInfo contactInfo = mContactInfoHelper.lookupContactFromUri(
+ PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI);
+ Assert.assertEquals(TEST_DISPLAY_NAME, contactInfo.name);
+ Assert.assertEquals(TEST_DISPLAY_NAME_ALTERNATIVE, contactInfo.nameAlternative);
+ mContext.verify();
+ }
+
+ /*
+ * Sets up query expectations to return the given row for all queries for the given
+ * uri and projection. If row is null, an empty cursor is returned for query calls
+ */
+ private void setUpQueryExpectations(Uri uri, String[] projection, String...row) {
+ Query query = mContext.getContactsProvider().expectQuery(uri)
+ .withProjection(projection).withAnySelection().withAnySortOrder();
+ if (row == null || row.length == 0) {
+ query.returnEmptyCursor();
+ return;
+ }
+ query.returnRow(row);
+ }
+}
diff --git a/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java b/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java
deleted file mode 100644
index a212e0f..0000000
--- a/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.dialer.filterednumber;
-
-import static org.mockito.Mockito.when;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.mockito.Matchers;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.LinkedList;
-
-@SmallTest
-public class FilteredNumbersUtilTest extends AndroidTestCase {
-
- private static final String NORMAL_PHONE_NUMBER = "555-555-5555";
- private static final String VOICEMAIL_NUMBER = "*555";
-
- @Mock private Context mContext;
- @Mock private TelecomManager mTelecomManager;
- private PhoneAccountHandle mHandle;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- System.setProperty("dexmaker.dexcache", getContext().getCacheDir().toString());
-
- MockitoAnnotations.initMocks(this);
- when(mContext.getSystemService(Context.TELECOM_SERVICE)).thenReturn(mTelecomManager);
-
- LinkedList<PhoneAccountHandle> handles = new LinkedList<PhoneAccountHandle>();
- mHandle = new PhoneAccountHandle(new ComponentName(getContext(), "TestCase"), "0");
- handles.add(mHandle);
-
- when(mTelecomManager.getCallCapablePhoneAccounts()).thenReturn(handles);
- }
-
- public void testCanBlockNormalNumber() {
- assertTrue(FilteredNumbersUtil.canBlockNumber(mContext, NORMAL_PHONE_NUMBER));
- }
-
- public void testCannotBlockVoicemailNumber() {
- when(mTelecomManager.isVoiceMailNumber(Matchers.eq(mHandle), Matchers.anyString()))
- .thenReturn(true);
- assertFalse(FilteredNumbersUtil.canBlockNumber(mContext, VOICEMAIL_NUMBER));
- }
-}