From d8046e520a866b9948ee9ba47cf642b441ca8e23 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Thu, 6 Apr 2017 09:41:50 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/152373142. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/151342913 (3/27/2017) to cl/152373142 (4/06/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I2fbc88cf6867b90ac8b65f75e5e34468988c7217 --- .../common/compat/TelephonyManagerCompat.java | 23 + .../common/model/account/BaseAccountType.java | 23 +- .../common/res/drawable-hdpi/ic_ab_search.png | Bin 1115 -> 0 bytes .../res/drawable-hdpi/ic_arrow_back_24dp.png | Bin 612 -> 0 bytes .../res/drawable-hdpi/ic_business_white_120dp.png | Bin 2477 -> 0 bytes .../common/res/drawable-hdpi/ic_call_24dp.png | Bin 340 -> 0 bytes .../res/drawable-hdpi/ic_call_note_white_24dp.png | Bin 373 -> 0 bytes .../common/res/drawable-hdpi/ic_close_dk.png | Bin 609 -> 0 bytes .../common/res/drawable-hdpi/ic_create_24dp.png | Bin 370 -> 0 bytes .../res/drawable-hdpi/ic_group_white_24dp.png | Bin 389 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 525 -> 0 bytes .../res/drawable-hdpi/ic_info_outline_24dp.png | Bin 485 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_back.png | Bin 799 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_group_dk.png | Bin 1954 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_group_lt.png | Bin 1922 -> 0 bytes .../res/drawable-hdpi/ic_menu_overflow_lt.png | Bin 220 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_person_dk.png | Bin 1439 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_person_lt.png | Bin 1416 -> 0 bytes .../ic_menu_remove_field_holo_light.png | Bin 515 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_star_dk.png | Bin 1438 -> 0 bytes .../res/drawable-hdpi/ic_menu_star_holo_light.png | Bin 1211 -> 0 bytes .../common/res/drawable-hdpi/ic_menu_star_lt.png | Bin 1414 -> 0 bytes .../common/res/drawable-hdpi/ic_message_24dp.png | Bin 167 -> 0 bytes .../common/res/drawable-hdpi/ic_person_24dp.png | Bin 273 -> 0 bytes .../common/res/drawable-hdpi/ic_phone_attach.png | Bin 828 -> 0 bytes .../common/res/drawable-hdpi/ic_rx_videocam.png | Bin 413 -> 0 bytes .../common/res/drawable-hdpi/ic_scroll_handle.png | Bin 544 -> 0 bytes .../common/res/drawable-hdpi/ic_tx_videocam.png | Bin 370 -> 0 bytes .../common/res/drawable-hdpi/ic_videocam.png | Bin 269 -> 0 bytes .../res/drawable-hdpi/ic_voicemail_avatar.png | Bin 2856 -> 0 bytes .../res/drawable-hdpi/list_activated_holo.9.png | Bin 154 -> 0 bytes .../res/drawable-hdpi/list_background_holo.9.png | Bin 224 -> 0 bytes .../res/drawable-hdpi/list_focused_holo.9.png | Bin 235 -> 0 bytes .../list_longpressed_holo_light.9.png | Bin 158 -> 0 bytes .../drawable-hdpi/list_pressed_holo_light.9.png | Bin 159 -> 0 bytes .../list_section_divider_holo_custom.9.png | Bin 205 -> 0 bytes .../common/res/drawable-hdpi/list_title_holo.9.png | Bin 267 -> 0 bytes .../drawable-ldrtl-hdpi/list_background_holo.9.png | Bin 219 -> 0 bytes .../drawable-ldrtl-mdpi/list_background_holo.9.png | Bin 178 -> 0 bytes .../list_background_holo.9.png | Bin 243 -> 0 bytes .../common/res/drawable-mdpi/ic_ab_search.png | Bin 781 -> 0 bytes .../res/drawable-mdpi/ic_arrow_back_24dp.png | Bin 578 -> 0 bytes .../common/res/drawable-mdpi/ic_call_24dp.png | Bin 246 -> 0 bytes .../common/res/drawable-mdpi/ic_close_dk.png | Bin 572 -> 0 bytes .../common/res/drawable-mdpi/ic_create_24dp.png | Bin 290 -> 0 bytes .../res/drawable-mdpi/ic_group_white_24dp.png | Bin 297 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 340 -> 0 bytes .../res/drawable-mdpi/ic_info_outline_24dp.png | Bin 320 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_back.png | Bin 607 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_group_dk.png | Bin 1266 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_group_lt.png | Bin 1270 -> 0 bytes .../res/drawable-mdpi/ic_menu_overflow_lt.png | Bin 171 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_person_dk.png | Bin 1052 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_person_lt.png | Bin 1021 -> 0 bytes .../ic_menu_remove_field_holo_light.png | Bin 424 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_star_dk.png | Bin 1034 -> 0 bytes .../common/res/drawable-mdpi/ic_menu_star_lt.png | Bin 1018 -> 0 bytes .../common/res/drawable-mdpi/ic_message_24dp.png | Bin 130 -> 0 bytes .../common/res/drawable-mdpi/ic_person_24dp.png | Bin 188 -> 0 bytes .../common/res/drawable-mdpi/ic_rx_videocam.png | Bin 299 -> 0 bytes .../common/res/drawable-mdpi/ic_tx_videocam.png | Bin 265 -> 0 bytes .../common/res/drawable-mdpi/ic_videocam.png | Bin 216 -> 0 bytes .../res/drawable-mdpi/list_background_holo.9.png | Bin 188 -> 0 bytes .../common/res/drawable-mdpi/list_title_holo.9.png | Bin 199 -> 0 bytes .../common/res/drawable-xhdpi/ic_ab_search.png | Bin 1451 -> 0 bytes .../res/drawable-xhdpi/ic_arrow_back_24dp.png | Bin 765 -> 0 bytes .../common/res/drawable-xhdpi/ic_call_24dp.png | Bin 420 -> 0 bytes .../common/res/drawable-xhdpi/ic_close_dk.png | Bin 814 -> 0 bytes .../common/res/drawable-xhdpi/ic_create_24dp.png | Bin 426 -> 0 bytes .../res/drawable-xhdpi/ic_group_white_24dp.png | Bin 461 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 659 -> 0 bytes .../res/drawable-xhdpi/ic_info_outline_24dp.png | Bin 655 -> 0 bytes .../common/res/drawable-xhdpi/ic_menu_back.png | Bin 1034 -> 0 bytes .../common/res/drawable-xhdpi/ic_menu_group_dk.png | Bin 2650 -> 0 bytes .../common/res/drawable-xhdpi/ic_menu_group_lt.png | Bin 2632 -> 0 bytes .../res/drawable-xhdpi/ic_menu_overflow_lt.png | Bin 287 -> 0 bytes .../res/drawable-xhdpi/ic_menu_person_dk.png | Bin 1844 -> 0 bytes .../res/drawable-xhdpi/ic_menu_person_lt.png | Bin 1815 -> 0 bytes .../ic_menu_remove_field_holo_light.png | Bin 593 -> 0 bytes .../common/res/drawable-xhdpi/ic_menu_star_dk.png | Bin 1830 -> 0 bytes .../res/drawable-xhdpi/ic_menu_star_holo_light.png | Bin 1607 -> 0 bytes .../common/res/drawable-xhdpi/ic_menu_star_lt.png | Bin 1827 -> 0 bytes .../common/res/drawable-xhdpi/ic_message_24dp.png | Bin 204 -> 0 bytes .../common/res/drawable-xhdpi/ic_person_24dp.png | Bin 312 -> 0 bytes .../common/res/drawable-xhdpi/ic_rx_videocam.png | Bin 439 -> 0 bytes .../common/res/drawable-xhdpi/ic_tx_videocam.png | Bin 405 -> 0 bytes .../common/res/drawable-xhdpi/ic_videocam.png | Bin 301 -> 0 bytes .../res/drawable-xhdpi/list_background_holo.9.png | Bin 245 -> 0 bytes .../res/drawable-xhdpi/list_title_holo.9.png | Bin 267 -> 0 bytes .../common/res/drawable-xxhdpi/ic_ab_search.png | Bin 2100 -> 0 bytes .../res/drawable-xxhdpi/ic_arrow_back_24dp.png | Bin 1376 -> 0 bytes .../common/res/drawable-xxhdpi/ic_call_24dp.png | Bin 597 -> 0 bytes .../common/res/drawable-xxhdpi/ic_close_dk.png | Bin 1465 -> 0 bytes .../common/res/drawable-xxhdpi/ic_create_24dp.png | Bin 668 -> 0 bytes .../res/drawable-xxhdpi/ic_group_white_24dp.png | Bin 604 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 971 -> 0 bytes .../res/drawable-xxhdpi/ic_info_outline_24dp.png | Bin 953 -> 0 bytes .../common/res/drawable-xxhdpi/ic_menu_back.png | Bin 1546 -> 0 bytes .../res/drawable-xxhdpi/ic_menu_group_dk.png | Bin 3338 -> 0 bytes .../res/drawable-xxhdpi/ic_menu_group_lt.png | Bin 3381 -> 0 bytes .../res/drawable-xxhdpi/ic_menu_overflow_lt.png | Bin 414 -> 0 bytes .../res/drawable-xxhdpi/ic_menu_person_dk.png | Bin 2357 -> 0 bytes .../res/drawable-xxhdpi/ic_menu_person_lt.png | Bin 2363 -> 0 bytes .../ic_menu_remove_field_holo_light.png | Bin 1381 -> 0 bytes .../common/res/drawable-xxhdpi/ic_menu_star_dk.png | Bin 2111 -> 0 bytes .../drawable-xxhdpi/ic_menu_star_holo_light.png | Bin 2119 -> 0 bytes .../common/res/drawable-xxhdpi/ic_menu_star_lt.png | Bin 2117 -> 0 bytes .../common/res/drawable-xxhdpi/ic_message_24dp.png | Bin 269 -> 0 bytes .../common/res/drawable-xxhdpi/ic_person_24dp.png | Bin 440 -> 0 bytes .../common/res/drawable-xxhdpi/ic_rx_videocam.png | Bin 603 -> 0 bytes .../common/res/drawable-xxhdpi/ic_tx_videocam.png | Bin 551 -> 0 bytes .../common/res/drawable-xxhdpi/ic_videocam.png | Bin 398 -> 0 bytes .../res/drawable-xxhdpi/list_title_holo.9.png | Bin 465 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_ab_search.png | Bin 2571 -> 0 bytes .../res/drawable-xxxhdpi/ic_arrow_back_24dp.png | Bin 1512 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_call_24dp.png | Bin 778 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_close_dk.png | Bin 1688 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_create_24dp.png | Bin 612 -> 0 bytes .../ic_history_white_drawable_24dp.png | Bin 1311 -> 0 bytes .../res/drawable-xxxhdpi/ic_info_outline_24dp.png | Bin 1279 -> 0 bytes .../res/drawable-xxxhdpi/ic_message_24dp.png | Bin 342 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_person_24dp.png | Bin 577 -> 0 bytes .../common/res/drawable-xxxhdpi/ic_videocam.png | Bin 481 -> 0 bytes .../contacts/common/res/drawable/ic_back_arrow.xml | 6 +- .../contacts/common/res/drawable/ic_call.xml | 19 - .../common/res/drawable/ic_message_24dp.xml | 19 - .../common/res/drawable/ic_search_video_call.xml | 2 +- .../contacts/common/res/drawable/ic_tab_all.xml | 21 - .../contacts/common/res/drawable/ic_tab_groups.xml | 21 - .../common/res/drawable/ic_tab_starred.xml | 21 - .../drawable/list_item_activated_background.xml | 20 - .../common/res/layout/dialog_call_subject.xml | 2 +- .../common/res/layout/search_bar_expanded.xml | 2 +- .../res/mipmap-hdpi/ic_contacts_launcher.png | Bin 3169 -> 0 bytes java/com/android/dialer/app/AndroidManifest.xml | 5 + java/com/android/dialer/app/DialtactsActivity.java | 68 ++- .../android/dialer/app/SpecialCharSequenceMgr.java | 26 +- .../android/dialer/app/calllog/CallLogAdapter.java | 101 +++- .../dialer/app/calllog/CallLogFragment.java | 21 +- .../app/calllog/CallLogListItemViewHolder.java | 175 +++---- .../app/calllog/CallLogNotificationsActivity.java | 70 +++ .../app/calllog/CallLogNotificationsService.java | 10 +- .../dialer/app/calllog/ClearCallLogDialog.java | 1 + .../app/calllog/DefaultVoicemailNotifier.java | 5 +- .../android/dialer/app/calllog/IntentProvider.java | 10 + .../dialer/app/calllog/MissedCallNotifier.java | 27 +- .../dialer/app/calllog/PhoneAccountHandles.java | 6 + .../dialer/app/calllog/PhoneCallDetailsHelper.java | 19 +- .../calllog/VisualVoicemailCallLogFragment.java | 26 +- .../dialer/app/contactinfo/ContactInfoCache.java | 4 +- .../dialer/app/list/AllContactsFragment.java | 16 +- .../app/list/DialerPhoneNumberListAdapter.java | 6 +- .../dialer/app/list/DialtactsPagerAdapter.java | 189 ++++++++ .../com/android/dialer/app/list/ListsFragment.java | 274 +++-------- .../dialer/app/list/OldSpeedDialFragment.java | 499 ++++++++++++++++++++ .../android/dialer/app/list/SpeedDialFragment.java | 512 --------------------- .../app/res/drawable-hdpi/empty_call_log.png | Bin 3538 -> 0 bytes .../app/res/drawable-hdpi/empty_contacts.png | Bin 2461 -> 0 bytes .../app/res/drawable-hdpi/empty_speed_dial.png | Bin 6041 -> 0 bytes .../res/drawable-hdpi/ic_archive_white_24dp.png | Bin 247 -> 0 bytes .../app/res/drawable-hdpi/ic_content_copy_24dp.png | Bin 203 -> 0 bytes .../app/res/drawable-hdpi/ic_delete_24dp.png | Bin 242 -> 0 bytes .../res/drawable-hdpi/ic_dialer_fork_add_call.png | Bin 1649 -> 0 bytes .../drawable-hdpi/ic_dialer_fork_current_call.png | Bin 2305 -> 0 bytes .../res/drawable-hdpi/ic_dialer_fork_tt_keypad.png | Bin 2419 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_grade_24dp.png | Bin 370 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_handle.png | Bin 543 -> 0 bytes .../app/res/drawable-hdpi/ic_menu_history_lt.png | Bin 1565 -> 0 bytes .../app/res/drawable-hdpi/ic_mic_grey600.png | Bin 377 -> 0 bytes .../app/res/drawable-hdpi/ic_more_vert_24dp.png | Bin 134 -> 0 bytes .../ic_not_interested_googblue_24dp.png | Bin 565 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_not_spam.png | Bin 858 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_pause_24dp.png | Bin 105 -> 0 bytes .../app/res/drawable-hdpi/ic_people_24dp.png | Bin 299 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_phone_24dp.png | Bin 347 -> 0 bytes .../app/res/drawable-hdpi/ic_play_arrow_24dp.png | Bin 195 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_remove.png | Bin 884 -> 0 bytes .../app/res/drawable-hdpi/ic_results_phone.png | Bin 1084 -> 0 bytes .../app/res/drawable-hdpi/ic_schedule_24dp.png | Bin 575 -> 0 bytes .../app/res/drawable-hdpi/ic_share_white_24dp.png | Bin 397 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_star.png | Bin 732 -> 0 bytes .../dialer/app/res/drawable-hdpi/ic_unblock.png | Bin 1049 -> 0 bytes .../app/res/drawable-hdpi/ic_vm_sound_off_dis.png | Bin 1339 -> 0 bytes .../app/res/drawable-hdpi/ic_vm_sound_off_dk.png | Bin 1337 -> 0 bytes .../app/res/drawable-hdpi/ic_vm_sound_on_dis.png | Bin 1755 -> 0 bytes .../app/res/drawable-hdpi/ic_vm_sound_on_dk.png | Bin 1750 -> 0 bytes .../app/res/drawable-hdpi/ic_voicemail_24dp.png | Bin 478 -> 0 bytes .../app/res/drawable-hdpi/ic_volume_down_24dp.png | Bin 186 -> 0 bytes .../app/res/drawable-hdpi/ic_volume_up_24dp.png | Bin 365 -> 0 bytes .../app/res/drawable-hdpi/search_shadow.9.png | Bin 183 -> 0 bytes .../app/res/drawable-hdpi/shadow_contact_photo.png | Bin 960 -> 0 bytes .../res/drawable-mdpi/ic_archive_white_24dp.png | Bin 181 -> 0 bytes .../app/res/drawable-mdpi/ic_content_copy_24dp.png | Bin 134 -> 0 bytes .../app/res/drawable-mdpi/ic_delete_24dp.png | Bin 195 -> 0 bytes .../dialer/app/res/drawable-mdpi/ic_grade_24dp.png | Bin 271 -> 0 bytes .../app/res/drawable-mdpi/ic_more_vert_24dp.png | Bin 112 -> 0 bytes .../dialer/app/res/drawable-mdpi/ic_pause_24dp.png | Bin 83 -> 0 bytes .../app/res/drawable-mdpi/ic_people_24dp.png | Bin 210 -> 0 bytes .../app/res/drawable-mdpi/ic_play_arrow_24dp.png | Bin 157 -> 0 bytes .../app/res/drawable-mdpi/ic_schedule_24dp.png | Bin 377 -> 0 bytes .../app/res/drawable-mdpi/ic_share_white_24dp.png | Bin 268 -> 0 bytes .../app/res/drawable-mdpi/ic_voicemail_24dp.png | Bin 221 -> 0 bytes .../app/res/drawable-mdpi/ic_volume_down_24dp.png | Bin 139 -> 0 bytes .../app/res/drawable-mdpi/ic_volume_up_24dp.png | Bin 251 -> 0 bytes .../res/drawable-xhdpi/ic_archive_white_24dp.png | Bin 267 -> 0 bytes .../res/drawable-xhdpi/ic_content_copy_24dp.png | Bin 188 -> 0 bytes .../app/res/drawable-xhdpi/ic_delete_24dp.png | Bin 271 -> 0 bytes .../app/res/drawable-xhdpi/ic_grade_24dp.png | Bin 479 -> 0 bytes .../app/res/drawable-xhdpi/ic_more_vert_24dp.png | Bin 158 -> 0 bytes .../app/res/drawable-xhdpi/ic_pause_24dp.png | Bin 90 -> 0 bytes .../app/res/drawable-xhdpi/ic_people_24dp.png | Bin 368 -> 0 bytes .../app/res/drawable-xhdpi/ic_play_arrow_24dp.png | Bin 220 -> 0 bytes .../app/res/drawable-xhdpi/ic_schedule_24dp.png | Bin 737 -> 0 bytes .../app/res/drawable-xhdpi/ic_share_white_24dp.png | Bin 496 -> 0 bytes .../app/res/drawable-xhdpi/ic_voicemail_24dp.png | Bin 487 -> 0 bytes .../app/res/drawable-xhdpi/ic_volume_down_24dp.png | Bin 212 -> 0 bytes .../app/res/drawable-xhdpi/ic_volume_up_24dp.png | Bin 455 -> 0 bytes .../res/drawable-xxhdpi/ic_archive_white_24dp.png | Bin 390 -> 0 bytes .../res/drawable-xxhdpi/ic_content_copy_24dp.png | Bin 266 -> 0 bytes .../app/res/drawable-xxhdpi/ic_delete_24dp.png | Bin 323 -> 0 bytes .../app/res/drawable-xxhdpi/ic_grade_24dp.png | Bin 676 -> 0 bytes .../app/res/drawable-xxhdpi/ic_more_vert_24dp.png | Bin 216 -> 0 bytes .../app/res/drawable-xxhdpi/ic_pause_24dp.png | Bin 92 -> 0 bytes .../app/res/drawable-xxhdpi/ic_people_24dp.png | Bin 488 -> 0 bytes .../app/res/drawable-xxhdpi/ic_play_arrow_24dp.png | Bin 283 -> 0 bytes .../app/res/drawable-xxhdpi/ic_schedule_24dp.png | Bin 1107 -> 0 bytes .../res/drawable-xxhdpi/ic_share_white_24dp.png | Bin 698 -> 0 bytes .../app/res/drawable-xxhdpi/ic_voicemail_24dp.png | Bin 625 -> 0 bytes .../res/drawable-xxhdpi/ic_volume_down_24dp.png | Bin 291 -> 0 bytes .../app/res/drawable-xxhdpi/ic_volume_up_24dp.png | Bin 654 -> 0 bytes .../res/drawable-xxxhdpi/ic_archive_white_24dp.png | Bin 489 -> 0 bytes .../res/drawable-xxxhdpi/ic_content_copy_24dp.png | Bin 329 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_delete_24dp.png | Bin 1394 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_grade_24dp.png | Bin 887 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_more_vert_24dp.png | Bin 305 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_pause_24dp.png | Bin 94 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_people_24dp.png | Bin 636 -> 0 bytes .../res/drawable-xxxhdpi/ic_play_arrow_24dp.png | Bin 343 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_schedule_24dp.png | Bin 1478 -> 0 bytes .../res/drawable-xxxhdpi/ic_share_white_24dp.png | Bin 938 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_voicemail_24dp.png | Bin 971 -> 0 bytes .../res/drawable-xxxhdpi/ic_volume_down_24dp.png | Bin 356 -> 0 bytes .../app/res/drawable-xxxhdpi/ic_volume_up_24dp.png | Bin 878 -> 0 bytes .../android/dialer/app/res/drawable/ic_pause.xml | 4 +- .../dialer/app/res/drawable/ic_play_arrow.xml | 4 +- .../dialer/app/res/drawable/overflow_menu.xml | 20 - .../dialer/app/res/layout/call_log_list_item.xml | 32 +- .../app/res/layout/call_log_list_item_actions.xml | 14 +- .../app/res/layout/phone_favorite_tile_view.xml | 2 +- .../dialer/app/res/layout/search_edittext.xml | 4 +- .../app/res/layout/voicemail_playback_layout.xml | 4 +- .../dialer/app/res/menu/actionbar_delete.xml | 25 + .../app/res/mipmap-hdpi/ic_launcher_phone.png | Bin 2780 -> 0 bytes .../android/dialer/app/res/values-de/strings.xml | 34 +- .../dialer/app/res/values-en-rAU/strings.xml | 6 +- .../dialer/app/res/values-en-rGB/strings.xml | 6 +- .../dialer/app/res/values-en-rIN/strings.xml | 6 +- .../android/dialer/app/res/values-fa/strings.xml | 4 +- java/com/android/dialer/app/res/values/styles.xml | 13 +- .../app/settings/DialerSettingsActivity.java | 44 +- .../app/voicemail/VoicemailPlaybackLayout.java | 4 +- .../app/voicemail/VoicemailPlaybackPresenter.java | 172 ++++--- .../error/OmtpVoicemailMessageCreator.java | 184 ++++---- .../app/voicemail/error/VoicemailErrorMessage.java | 38 +- .../error/Vvm3VoicemailMessageCreator.java | 2 +- .../app/voicemail/error/res/values-de/strings.xml | 12 +- .../android/dialer/backup/DialerBackupAgent.java | 3 +- .../binary/aosp/AospDialerRootComponent.java | 4 +- .../basecomponent/BaseDialerRootComponent.java | 4 +- .../dialer/binary/common/DialerApplication.java | 23 +- .../blocking/BlockedNumbersAutoMigrator.java | 97 ++-- .../blocking/FilteredNumberAsyncQueryHandler.java | 14 +- .../dialer/blocking/FilteredNumbersUtil.java | 2 +- .../blocking/res/drawable-hdpi/ic_block_24dp.png | Bin 478 -> 0 bytes .../blocking/res/drawable-hdpi/ic_report_24dp.png | Bin 240 -> 0 bytes .../res/drawable-hdpi/ic_report_white_36dp.png | Bin 312 -> 0 bytes .../blocking/res/drawable-mdpi/ic_block_24dp.png | Bin 335 -> 0 bytes .../blocking/res/drawable-mdpi/ic_report_24dp.png | Bin 174 -> 0 bytes .../res/drawable-mdpi/ic_report_white_36dp.png | Bin 240 -> 0 bytes .../blocking/res/drawable-xhdpi/ic_block_24dp.png | Bin 665 -> 0 bytes .../blocking/res/drawable-xhdpi/ic_report_24dp.png | Bin 272 -> 0 bytes .../res/drawable-xhdpi/ic_report_white_36dp.png | Bin 340 -> 0 bytes .../blocking/res/drawable-xxhdpi/ic_block_24dp.png | Bin 973 -> 0 bytes .../res/drawable-xxhdpi/ic_report_24dp.png | Bin 340 -> 0 bytes .../res/drawable-xxhdpi/ic_report_white_36dp.png | Bin 522 -> 0 bytes .../res/drawable-xxxhdpi/ic_block_24dp.png | Bin 1295 -> 0 bytes .../res/drawable-xxxhdpi/ic_report_24dp.png | Bin 450 -> 0 bytes .../res/drawable-xxxhdpi/ic_report_white_36dp.png | Bin 649 -> 0 bytes .../blocking/res/drawable/blocked_contact.xml | 2 +- .../dialer/blocking/res/values-de/strings.xml | 4 +- .../dialer/callcomposer/CallComposerActivity.java | 162 +++---- .../dialer/callcomposer/CallComposerFragment.java | 3 + .../callcomposer/CameraComposerFragment.java | 1 + .../callcomposer/MessageComposerFragment.java | 18 +- .../res/layout/call_composer_activity.xml | 41 +- .../res/layout/fragment_camera_composer.xml | 3 +- .../res/layout/fragment_gallery_composer.xml | 3 +- .../res/layout/fragment_message_composer.xml | 9 +- .../dialer/callcomposer/res/values/dimens.xml | 2 +- .../callcomposer/util/CopyAndResizeImageTask.java | 4 +- .../dialer/calldetails/CallDetailsActivity.java | 14 +- .../calldetails/CallDetailsEntryViewHolder.java | 1 + .../res/layout/call_details_activity.xml | 9 +- .../calldetails/res/menu/call_details_menu.xml | 5 +- .../dialer/calllogutils/CallTypeIconsView.java | 54 +-- .../dialer/calllogutils/PhoneCallDetails.java | 3 +- java/com/android/dialer/common/Assert.java | 4 + .../common/concurrent/AsyncTaskExecutors.java | 2 +- .../concurrent/DefaultDialerExecutorFactory.java | 255 ++++++++++ .../common/concurrent/DialerAsyncTaskHelper.java | 236 ---------- .../dialer/common/concurrent/DialerExecutor.java | 100 ++++ .../common/concurrent/DialerExecutorFactory.java | 63 +++ .../dialer/common/concurrent/DialerExecutors.java | 134 ++++++ .../common/concurrent/DialerUiTaskFragment.java | 170 +++++++ .../dialer/common/concurrent/ThreadUtil.java | 38 ++ .../res/drawable-hdpi/ic_close_black_24dp.png | Bin 207 -> 0 bytes .../res/drawable-hdpi/ic_dialpad_delete.png | Bin 805 -> 0 bytes .../res/drawable-hdpi/ic_dialpad_voicemail.png | Bin 623 -> 0 bytes .../res/drawable-hdpi/ic_overflow_menu.png | Bin 503 -> 0 bytes .../res/drawable-mdpi/ic_close_black_24dp.png | Bin 164 -> 0 bytes .../res/drawable-mdpi/ic_dialpad_delete.png | Bin 669 -> 0 bytes .../res/drawable-mdpi/ic_dialpad_voicemail.png | Bin 504 -> 0 bytes .../res/drawable-mdpi/ic_overflow_menu.png | Bin 424 -> 0 bytes .../res/drawable-xhdpi/ic_close_black_24dp.png | Bin 235 -> 0 bytes .../res/drawable-xhdpi/ic_dialpad_delete.png | Bin 1110 -> 0 bytes .../res/drawable-xhdpi/ic_dialpad_voicemail.png | Bin 787 -> 0 bytes .../res/drawable-xhdpi/ic_overflow_menu.png | Bin 550 -> 0 bytes .../res/drawable-xxhdpi/ic_close_black_24dp.png | Bin 309 -> 0 bytes .../res/drawable-xxhdpi/ic_dialpad_delete.png | Bin 1745 -> 0 bytes .../res/drawable-xxhdpi/ic_dialpad_voicemail.png | Bin 1578 -> 0 bytes .../res/drawable-xxhdpi/ic_overflow_menu.png | Bin 1384 -> 0 bytes .../res/drawable-xxxhdpi/ic_close_black_24dp.png | Bin 377 -> 0 bytes .../res/drawable-xxxhdpi/ic_dialpad_delete.png | Bin 2128 -> 0 bytes .../res/drawable-xxxhdpi/ic_dialpad_voicemail.png | Bin 1829 -> 0 bytes .../res/drawable-xxxhdpi/ic_overflow_menu.png | Bin 1785 -> 0 bytes .../res/layout-land/dialpad_key_one.xml | 2 +- .../dialpadview/res/layout/dialpad_key_one.xml | 2 +- .../res/layout/dialpad_view_unthemed.xml | 6 +- .../dialer/dialpadview/res/values-de/strings.xml | 2 +- .../interactions/PhoneNumberInteraction.java | 15 +- .../android/dialer/lightbringer/Lightbringer.java | 47 ++ .../dialer/lightbringer/LightbringerComponent.java | 41 ++ .../dialer/lightbringer/LightbringerListener.java | 21 + .../dialer/lightbringer/stub/LightbringerStub.java | 59 +++ .../lightbringer/stub/StubLightbringerModule.java | 30 ++ .../dialer/logging/nano/DialerImpression.java | 12 + .../notification/GroupedNotificationUtil.java | 4 +- .../notification/NotificationChannelManager.java | 45 +- .../dialer/notification/res/values-de/strings.xml | 2 +- java/com/android/dialer/oem/AndroidManifest.xml | 5 +- .../android/dialer/oem/CequintCallerIdManager.java | 42 +- java/com/android/dialer/oem/MotorolaUtils.java | 6 +- .../persistentlog/PersistentLogFileHandler.java | 198 ++++++++ .../dialer/persistentlog/PersistentLogger.java | 170 +++++++ .../CachedNumberLookupService.java | 17 +- .../dialer/phonenumbercache/ContactInfo.java | 3 +- .../dialer/phonenumbercache/ContactInfoHelper.java | 9 +- .../android/dialer/postcall/PostCallActivity.java | 7 +- .../postcall/res/layout/post_call_activity.xml | 13 +- .../dialer/shortcuts/CallContactActivity.java | 14 +- .../android/dialer/shortcuts/res/values/themes.xml | 2 +- .../simulator/impl/SimulatorActionProvider.java | 32 ++ .../android/dialer/speeddial/AndroidManifest.xml | 16 + .../dialer/speeddial/SpeedDialFragment.java | 44 ++ .../speeddial/res/layout/fragment_speed_dial.xml | 20 + .../dialer/speeddial/res/values-af/strings.xml | 20 + .../dialer/speeddial/res/values-am/strings.xml | 20 + .../dialer/speeddial/res/values-ar/strings.xml | 20 + .../dialer/speeddial/res/values-az/strings.xml | 20 + .../dialer/speeddial/res/values-be/strings.xml | 20 + .../dialer/speeddial/res/values-bg/strings.xml | 20 + .../dialer/speeddial/res/values-bn/strings.xml | 20 + .../dialer/speeddial/res/values-bs/strings.xml | 20 + .../dialer/speeddial/res/values-ca/strings.xml | 20 + .../dialer/speeddial/res/values-cs/strings.xml | 20 + .../dialer/speeddial/res/values-da/strings.xml | 20 + .../dialer/speeddial/res/values-de/strings.xml | 20 + .../dialer/speeddial/res/values-el/strings.xml | 20 + .../dialer/speeddial/res/values-en-rAU/strings.xml | 20 + .../dialer/speeddial/res/values-en-rGB/strings.xml | 20 + .../dialer/speeddial/res/values-en-rIN/strings.xml | 20 + .../dialer/speeddial/res/values-es-rUS/strings.xml | 20 + .../dialer/speeddial/res/values-es/strings.xml | 20 + .../dialer/speeddial/res/values-et/strings.xml | 20 + .../dialer/speeddial/res/values-eu/strings.xml | 20 + .../dialer/speeddial/res/values-fa/strings.xml | 20 + .../dialer/speeddial/res/values-fi/strings.xml | 20 + .../dialer/speeddial/res/values-fr-rCA/strings.xml | 20 + .../dialer/speeddial/res/values-fr/strings.xml | 20 + .../dialer/speeddial/res/values-gl/strings.xml | 20 + .../dialer/speeddial/res/values-gu/strings.xml | 20 + .../dialer/speeddial/res/values-hi/strings.xml | 20 + .../dialer/speeddial/res/values-hr/strings.xml | 20 + .../dialer/speeddial/res/values-hu/strings.xml | 20 + .../dialer/speeddial/res/values-hy/strings.xml | 20 + .../dialer/speeddial/res/values-in/strings.xml | 20 + .../dialer/speeddial/res/values-is/strings.xml | 20 + .../dialer/speeddial/res/values-it/strings.xml | 20 + .../dialer/speeddial/res/values-iw/strings.xml | 20 + .../dialer/speeddial/res/values-ja/strings.xml | 20 + .../dialer/speeddial/res/values-ka/strings.xml | 20 + .../dialer/speeddial/res/values-kk/strings.xml | 20 + .../dialer/speeddial/res/values-km/strings.xml | 20 + .../dialer/speeddial/res/values-kn/strings.xml | 20 + .../dialer/speeddial/res/values-ko/strings.xml | 20 + .../dialer/speeddial/res/values-ky/strings.xml | 20 + .../dialer/speeddial/res/values-lo/strings.xml | 20 + .../dialer/speeddial/res/values-lt/strings.xml | 20 + .../dialer/speeddial/res/values-lv/strings.xml | 20 + .../dialer/speeddial/res/values-mk/strings.xml | 20 + .../dialer/speeddial/res/values-ml/strings.xml | 20 + .../dialer/speeddial/res/values-mn/strings.xml | 20 + .../dialer/speeddial/res/values-mr/strings.xml | 20 + .../dialer/speeddial/res/values-ms/strings.xml | 20 + .../dialer/speeddial/res/values-my/strings.xml | 20 + .../dialer/speeddial/res/values-nb/strings.xml | 20 + .../dialer/speeddial/res/values-ne/strings.xml | 20 + .../dialer/speeddial/res/values-nl/strings.xml | 20 + .../dialer/speeddial/res/values-no/strings.xml | 20 + .../dialer/speeddial/res/values-pa/strings.xml | 20 + .../dialer/speeddial/res/values-pl/strings.xml | 20 + .../dialer/speeddial/res/values-pt-rBR/strings.xml | 20 + .../dialer/speeddial/res/values-pt-rPT/strings.xml | 20 + .../dialer/speeddial/res/values-pt/strings.xml | 20 + .../dialer/speeddial/res/values-ro/strings.xml | 20 + .../dialer/speeddial/res/values-ru/strings.xml | 20 + .../dialer/speeddial/res/values-si/strings.xml | 20 + .../dialer/speeddial/res/values-sk/strings.xml | 20 + .../dialer/speeddial/res/values-sl/strings.xml | 20 + .../dialer/speeddial/res/values-sq/strings.xml | 20 + .../dialer/speeddial/res/values-sr/strings.xml | 20 + .../dialer/speeddial/res/values-sv/strings.xml | 20 + .../dialer/speeddial/res/values-sw/strings.xml | 20 + .../dialer/speeddial/res/values-ta/strings.xml | 20 + .../dialer/speeddial/res/values-te/strings.xml | 20 + .../dialer/speeddial/res/values-th/strings.xml | 20 + .../dialer/speeddial/res/values-tl/strings.xml | 20 + .../dialer/speeddial/res/values-tr/strings.xml | 20 + .../dialer/speeddial/res/values-uk/strings.xml | 20 + .../dialer/speeddial/res/values-ur/strings.xml | 20 + .../dialer/speeddial/res/values-uz/strings.xml | 20 + .../dialer/speeddial/res/values-vi/strings.xml | 20 + .../dialer/speeddial/res/values-zh-rCN/strings.xml | 20 + .../dialer/speeddial/res/values-zh-rHK/strings.xml | 20 + .../dialer/speeddial/res/values-zh-rTW/strings.xml | 20 + .../dialer/speeddial/res/values-zu/strings.xml | 20 + .../android/dialer/speeddial/res/values/colors.xml | 18 + .../android/dialer/speeddial/res/values/dimens.xml | 18 + .../dialer/speeddial/res/values/strings.xml | 18 + .../theme/res/drawable-hdpi/ic_block_24dp.png | Bin 478 -> 0 bytes .../theme/res/drawable-hdpi/ic_call_arrow.png | Bin 538 -> 0 bytes .../theme/res/drawable-mdpi/ic_block_24dp.png | Bin 335 -> 0 bytes .../theme/res/drawable-mdpi/ic_call_arrow.png | Bin 455 -> 0 bytes .../theme/res/drawable-xhdpi/ic_block_24dp.png | Bin 665 -> 0 bytes .../theme/res/drawable-xhdpi/ic_call_arrow.png | Bin 627 -> 0 bytes .../theme/res/drawable-xxhdpi/ic_block_24dp.png | Bin 973 -> 0 bytes .../theme/res/drawable-xxhdpi/ic_call_arrow.png | Bin 1203 -> 0 bytes .../theme/res/drawable-xxxhdpi/ic_block_24dp.png | Bin 1295 -> 0 bytes .../theme/res/drawable-xxxhdpi/ic_call_arrow.png | Bin 1344 -> 0 bytes .../com/android/dialer/theme/res/values/colors.xml | 3 + .../com/android/dialer/theme/res/values/dimens.xml | 5 +- .../com/android/dialer/theme/res/values/styles.xml | 11 - .../com/android/dialer/theme/res/values/themes.xml | 8 + .../voicemailstatus/res/values-de/strings.xml | 2 +- java/com/android/dialer/widget/DialerToolbar.java | 67 +++ .../dialer/widget/res/layout/dialer_toolbar.xml | 42 ++ .../android/dialer/widget/res/values/dimens.xml | 5 + java/com/android/incallui/AndroidManifest.xml | 4 - .../android/incallui/AnswerScreenPresenter.java | 7 +- java/com/android/incallui/CallButtonPresenter.java | 2 +- java/com/android/incallui/CallCardPresenter.java | 49 +- java/com/android/incallui/CallerInfo.java | 1 + java/com/android/incallui/ContactInfoCache.java | 148 +++--- java/com/android/incallui/InCallPresenter.java | 32 +- java/com/android/incallui/StatusBarNotifier.java | 105 ++++- java/com/android/incallui/VideoCallPresenter.java | 11 +- .../incallui/answer/impl/AnswerFragment.java | 9 +- .../answer/impl/hint/res/values-de/strings.xml | 4 +- .../answer/impl/hint/res/values-es/strings.xml | 4 +- .../answer/impl/hint/res/values-hr/strings.xml | 4 +- .../answer/impl/hint/res/values-ro/strings.xml | 4 +- .../answer/impl/hint/res/values-ru/strings.xml | 4 +- .../answer/impl/hint/res/values-sr/strings.xml | 4 +- .../incallui/answer/impl/res/values-af/strings.xml | 6 +- .../incallui/answer/impl/res/values-am/strings.xml | 6 +- .../incallui/answer/impl/res/values-ar/strings.xml | 6 +- .../incallui/answer/impl/res/values-az/strings.xml | 6 +- .../incallui/answer/impl/res/values-be/strings.xml | 6 +- .../incallui/answer/impl/res/values-bg/strings.xml | 6 +- .../incallui/answer/impl/res/values-bn/strings.xml | 6 +- .../incallui/answer/impl/res/values-bs/strings.xml | 6 +- .../incallui/answer/impl/res/values-ca/strings.xml | 6 +- .../incallui/answer/impl/res/values-cs/strings.xml | 6 +- .../incallui/answer/impl/res/values-da/strings.xml | 6 +- .../incallui/answer/impl/res/values-de/strings.xml | 6 +- .../incallui/answer/impl/res/values-el/strings.xml | 6 +- .../answer/impl/res/values-en-rAU/strings.xml | 6 +- .../answer/impl/res/values-en-rGB/strings.xml | 6 +- .../answer/impl/res/values-en-rIN/strings.xml | 6 +- .../answer/impl/res/values-es-rUS/strings.xml | 6 +- .../incallui/answer/impl/res/values-es/strings.xml | 6 +- .../incallui/answer/impl/res/values-et/strings.xml | 6 +- .../incallui/answer/impl/res/values-eu/strings.xml | 6 +- .../incallui/answer/impl/res/values-fa/strings.xml | 6 +- .../incallui/answer/impl/res/values-fi/strings.xml | 6 +- .../answer/impl/res/values-fr-rCA/strings.xml | 6 +- .../incallui/answer/impl/res/values-fr/strings.xml | 6 +- .../incallui/answer/impl/res/values-gl/strings.xml | 6 +- .../incallui/answer/impl/res/values-gu/strings.xml | 6 +- .../incallui/answer/impl/res/values-hi/strings.xml | 6 +- .../incallui/answer/impl/res/values-hr/strings.xml | 6 +- .../incallui/answer/impl/res/values-hu/strings.xml | 6 +- .../incallui/answer/impl/res/values-hy/strings.xml | 6 +- .../incallui/answer/impl/res/values-in/strings.xml | 6 +- .../incallui/answer/impl/res/values-is/strings.xml | 6 +- .../incallui/answer/impl/res/values-it/strings.xml | 6 +- .../incallui/answer/impl/res/values-iw/strings.xml | 6 +- .../incallui/answer/impl/res/values-ja/strings.xml | 6 +- .../incallui/answer/impl/res/values-ka/strings.xml | 6 +- .../incallui/answer/impl/res/values-kk/strings.xml | 6 +- .../incallui/answer/impl/res/values-km/strings.xml | 6 +- .../incallui/answer/impl/res/values-kn/strings.xml | 6 +- .../incallui/answer/impl/res/values-ko/strings.xml | 6 +- .../incallui/answer/impl/res/values-ky/strings.xml | 6 +- .../incallui/answer/impl/res/values-lo/strings.xml | 6 +- .../incallui/answer/impl/res/values-lt/strings.xml | 6 +- .../incallui/answer/impl/res/values-lv/strings.xml | 6 +- .../incallui/answer/impl/res/values-mk/strings.xml | 6 +- .../incallui/answer/impl/res/values-ml/strings.xml | 6 +- .../incallui/answer/impl/res/values-mn/strings.xml | 6 +- .../incallui/answer/impl/res/values-mr/strings.xml | 6 +- .../incallui/answer/impl/res/values-ms/strings.xml | 6 +- .../incallui/answer/impl/res/values-my/strings.xml | 6 +- .../incallui/answer/impl/res/values-nb/strings.xml | 6 +- .../incallui/answer/impl/res/values-ne/strings.xml | 6 +- .../incallui/answer/impl/res/values-nl/strings.xml | 6 +- .../incallui/answer/impl/res/values-no/strings.xml | 6 +- .../incallui/answer/impl/res/values-pa/strings.xml | 6 +- .../incallui/answer/impl/res/values-pl/strings.xml | 6 +- .../answer/impl/res/values-pt-rBR/strings.xml | 6 +- .../answer/impl/res/values-pt-rPT/strings.xml | 6 +- .../incallui/answer/impl/res/values-pt/strings.xml | 6 +- .../incallui/answer/impl/res/values-ro/strings.xml | 6 +- .../incallui/answer/impl/res/values-ru/strings.xml | 6 +- .../incallui/answer/impl/res/values-si/strings.xml | 6 +- .../incallui/answer/impl/res/values-sk/strings.xml | 6 +- .../incallui/answer/impl/res/values-sl/strings.xml | 6 +- .../incallui/answer/impl/res/values-sq/strings.xml | 6 +- .../incallui/answer/impl/res/values-sr/strings.xml | 6 +- .../incallui/answer/impl/res/values-sv/strings.xml | 6 +- .../incallui/answer/impl/res/values-sw/strings.xml | 6 +- .../incallui/answer/impl/res/values-ta/strings.xml | 6 +- .../incallui/answer/impl/res/values-te/strings.xml | 6 +- .../incallui/answer/impl/res/values-th/strings.xml | 6 +- .../incallui/answer/impl/res/values-tl/strings.xml | 6 +- .../incallui/answer/impl/res/values-tr/strings.xml | 6 +- .../incallui/answer/impl/res/values-uk/strings.xml | 6 +- .../incallui/answer/impl/res/values-ur/strings.xml | 6 +- .../incallui/answer/impl/res/values-uz/strings.xml | 6 +- .../incallui/answer/impl/res/values-vi/strings.xml | 6 +- .../answer/impl/res/values-zh-rCN/strings.xml | 6 +- .../answer/impl/res/values-zh-rHK/strings.xml | 6 +- .../answer/impl/res/values-zh-rTW/strings.xml | 6 +- .../incallui/answer/impl/res/values-zu/strings.xml | 6 +- .../incallui/answer/impl/res/values/strings.xml | 6 +- java/com/android/incallui/call/CallList.java | 27 +- java/com/android/incallui/call/DialerCall.java | 16 +- .../calllocation/impl/LocationFragment.java | 9 + .../incallui/calllocation/impl/LocationHelper.java | 60 ++- .../calllocation/impl/LocationPresenter.java | 18 +- .../incallui/commontheme/res/anim/blinking.xml | 6 +- .../incallui/commontheme/res/values/styles.xml | 9 + .../android/incallui/contactgrid/BottomRow.java | 8 +- .../incallui/contactgrid/ContactGridManager.java | 9 +- .../res/layout/incall_contactgrid_bottom_row.xml | 30 +- .../incallui/incall/impl/InCallFragment.java | 12 +- .../incall/impl/res/values-en-rAU/strings.xml | 2 +- .../incall/impl/res/values-en-rGB/strings.xml | 2 +- .../incall/impl/res/values-en-rIN/strings.xml | 2 +- .../incall/protocol/InCallScreenDelegate.java | 2 + .../res/drawable-hdpi/ic_block_grey600_24dp.png | Bin 518 -> 0 bytes .../res/drawable-hdpi/ic_call_end_white_24dp.png | Bin 454 -> 0 bytes .../res/drawable-hdpi/ic_call_split_white_24dp.png | Bin 326 -> 0 bytes .../res/drawable-hdpi/ic_close_grey600_24dp.png | Bin 225 -> 0 bytes .../drawable-hdpi/ic_location_on_white_24dp.png | Bin 371 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_01.png | Bin 577 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_02.png | Bin 650 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_03.png | Bin 803 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_04.png | Bin 1009 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_05.png | Bin 946 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_06.png | Bin 856 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_07.png | Bin 577 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_08.png | Bin 577 -> 0 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_09.png | Bin 577 -> 0 bytes .../drawable-hdpi/ic_person_add_grey600_24dp.png | Bin 300 -> 0 bytes .../drawable-hdpi/ic_phone_paused_white_24dp.png | Bin 458 -> 0 bytes .../res/drawable-hdpi/ic_question_mark.png | Bin 845 -> 0 bytes .../res/drawable-hdpi/ic_schedule_white_24dp.png | Bin 575 -> 0 bytes .../incallui/res/drawable-hdpi/img_business.png | Bin 3311 -> 0 bytes .../incallui/res/drawable-hdpi/img_conference.png | Bin 7037 -> 0 bytes .../incallui/res/drawable-hdpi/img_no_image.png | Bin 5362 -> 0 bytes .../incallui/res/drawable-hdpi/img_phone.png | Bin 6157 -> 0 bytes .../res/drawable/spam_notification_icon.xml | 2 +- .../com/android/incallui/res/values-af/strings.xml | 17 + .../com/android/incallui/res/values-am/strings.xml | 17 + .../com/android/incallui/res/values-ar/strings.xml | 17 + .../com/android/incallui/res/values-az/strings.xml | 17 + .../com/android/incallui/res/values-be/strings.xml | 17 + .../com/android/incallui/res/values-bg/strings.xml | 17 + .../com/android/incallui/res/values-bn/strings.xml | 17 + .../com/android/incallui/res/values-bs/strings.xml | 17 + .../com/android/incallui/res/values-ca/strings.xml | 17 + .../com/android/incallui/res/values-cs/strings.xml | 17 + .../com/android/incallui/res/values-da/strings.xml | 17 + .../com/android/incallui/res/values-de/strings.xml | 17 + .../com/android/incallui/res/values-el/strings.xml | 17 + .../android/incallui/res/values-en-rAU/strings.xml | 17 + .../android/incallui/res/values-en-rGB/strings.xml | 17 + .../android/incallui/res/values-en-rIN/strings.xml | 17 + .../android/incallui/res/values-es-rUS/strings.xml | 17 + .../com/android/incallui/res/values-es/strings.xml | 17 + .../com/android/incallui/res/values-et/strings.xml | 17 + .../com/android/incallui/res/values-eu/strings.xml | 34 ++ .../com/android/incallui/res/values-fa/strings.xml | 17 + .../com/android/incallui/res/values-fi/strings.xml | 17 + .../android/incallui/res/values-fr-rCA/strings.xml | 17 + .../com/android/incallui/res/values-fr/strings.xml | 17 + .../com/android/incallui/res/values-gl/strings.xml | 17 + .../com/android/incallui/res/values-gu/strings.xml | 17 + .../com/android/incallui/res/values-hi/strings.xml | 17 + .../com/android/incallui/res/values-hr/strings.xml | 17 + .../com/android/incallui/res/values-hu/strings.xml | 17 + .../com/android/incallui/res/values-hy/strings.xml | 17 + .../com/android/incallui/res/values-in/strings.xml | 17 + .../com/android/incallui/res/values-is/strings.xml | 17 + .../com/android/incallui/res/values-it/strings.xml | 17 + .../com/android/incallui/res/values-iw/strings.xml | 17 + .../com/android/incallui/res/values-ja/strings.xml | 17 + .../com/android/incallui/res/values-ka/strings.xml | 17 + .../com/android/incallui/res/values-kk/strings.xml | 17 + .../com/android/incallui/res/values-km/strings.xml | 17 + .../com/android/incallui/res/values-kn/strings.xml | 17 + .../com/android/incallui/res/values-ko/strings.xml | 17 + .../com/android/incallui/res/values-ky/strings.xml | 17 + .../com/android/incallui/res/values-lo/strings.xml | 17 + .../com/android/incallui/res/values-lt/strings.xml | 17 + .../com/android/incallui/res/values-lv/strings.xml | 17 + .../com/android/incallui/res/values-mk/strings.xml | 17 + .../com/android/incallui/res/values-ml/strings.xml | 17 + .../com/android/incallui/res/values-mn/strings.xml | 17 + .../com/android/incallui/res/values-mr/strings.xml | 17 + .../com/android/incallui/res/values-ms/strings.xml | 17 + .../com/android/incallui/res/values-my/strings.xml | 17 + .../com/android/incallui/res/values-nb/strings.xml | 17 + .../com/android/incallui/res/values-ne/strings.xml | 17 + .../com/android/incallui/res/values-nl/strings.xml | 17 + .../com/android/incallui/res/values-no/strings.xml | 17 + .../com/android/incallui/res/values-pa/strings.xml | 17 + .../com/android/incallui/res/values-pl/strings.xml | 17 + .../android/incallui/res/values-pt-rBR/strings.xml | 17 + .../android/incallui/res/values-pt-rPT/strings.xml | 17 + .../com/android/incallui/res/values-pt/strings.xml | 17 + .../com/android/incallui/res/values-ro/strings.xml | 17 + .../com/android/incallui/res/values-ru/strings.xml | 17 + .../com/android/incallui/res/values-si/strings.xml | 17 + .../com/android/incallui/res/values-sk/strings.xml | 17 + .../com/android/incallui/res/values-sl/strings.xml | 17 + .../com/android/incallui/res/values-sq/strings.xml | 17 + .../com/android/incallui/res/values-sr/strings.xml | 17 + .../com/android/incallui/res/values-sv/strings.xml | 17 + .../com/android/incallui/res/values-sw/strings.xml | 17 + .../com/android/incallui/res/values-ta/strings.xml | 17 + .../com/android/incallui/res/values-te/strings.xml | 17 + .../com/android/incallui/res/values-th/strings.xml | 17 + .../com/android/incallui/res/values-tl/strings.xml | 17 + .../com/android/incallui/res/values-tr/strings.xml | 17 + .../com/android/incallui/res/values-uk/strings.xml | 17 + .../com/android/incallui/res/values-ur/strings.xml | 17 + .../com/android/incallui/res/values-uz/strings.xml | 17 + .../com/android/incallui/res/values-vi/strings.xml | 17 + .../android/incallui/res/values-zh-rCN/strings.xml | 17 + .../android/incallui/res/values-zh-rHK/strings.xml | 17 + .../android/incallui/res/values-zh-rTW/strings.xml | 17 + .../com/android/incallui/res/values-zu/strings.xml | 17 + java/com/android/incallui/res/values/config.xml | 23 - java/com/android/incallui/res/values/strings.xml | 36 ++ .../res/layout/fragment_composer_image.xml | 2 +- .../video/impl/CameraPermissionDialogFragment.java | 9 +- .../video/impl/SurfaceViewVideoCallFragment.java | 181 ++++---- .../incallui/video/impl/VideoCallFragment.java | 9 +- .../res/layout/frag_videocall_land_surfaceview.xml | 98 ++-- .../impl/res/layout/frag_videocall_surfaceview.xml | 103 ++--- .../incallui/video/protocol/AndroidManifest.xml | 22 + .../incallui/video/protocol/res/values/config.xml | 23 + java/com/android/incallui/videotech/VideoTech.java | 4 +- .../incallui/videotech/empty/EmptyVideoTech.java | 4 +- .../incallui/videotech/ims/ImsVideoTech.java | 6 +- .../videotech/lightbringer/LightbringerTech.java | 146 ++++++ java/com/android/voicemail/VoicemailClient.java | 17 + .../com/android/voicemail/impl/ActivationTask.java | 6 + .../com/android/voicemail/impl/AndroidManifest.xml | 13 +- java/com/android/voicemail/impl/OmtpReceiver.java | 11 + .../voicemail/impl/OmtpVvmCarrierConfigHelper.java | 2 +- .../voicemail/impl/VoicemailClientImpl.java | 34 +- java/com/android/voicemail/impl/VvmLog.java | 3 +- .../voicemail/impl/res/values-af/strings.xml | 6 +- .../voicemail/impl/res/values-am/strings.xml | 6 +- .../voicemail/impl/res/values-ar/strings.xml | 6 +- .../voicemail/impl/res/values-az/strings.xml | 6 +- .../voicemail/impl/res/values-be/strings.xml | 6 +- .../voicemail/impl/res/values-bg/strings.xml | 6 +- .../voicemail/impl/res/values-bn/strings.xml | 6 +- .../voicemail/impl/res/values-bs/strings.xml | 6 +- .../voicemail/impl/res/values-ca/strings.xml | 6 +- .../voicemail/impl/res/values-cs/strings.xml | 6 +- .../voicemail/impl/res/values-da/strings.xml | 6 +- .../voicemail/impl/res/values-de/strings.xml | 8 +- .../voicemail/impl/res/values-el/strings.xml | 6 +- .../voicemail/impl/res/values-en-rAU/strings.xml | 6 +- .../voicemail/impl/res/values-en-rGB/strings.xml | 6 +- .../voicemail/impl/res/values-en-rIN/strings.xml | 6 +- .../voicemail/impl/res/values-es-rUS/strings.xml | 6 +- .../voicemail/impl/res/values-es/strings.xml | 6 +- .../voicemail/impl/res/values-et/strings.xml | 6 +- .../voicemail/impl/res/values-eu/strings.xml | 6 +- .../voicemail/impl/res/values-fa/strings.xml | 6 +- .../voicemail/impl/res/values-fi/strings.xml | 6 +- .../voicemail/impl/res/values-fr-rCA/strings.xml | 6 +- .../voicemail/impl/res/values-fr/strings.xml | 6 +- .../voicemail/impl/res/values-gl/strings.xml | 6 +- .../voicemail/impl/res/values-gu/strings.xml | 6 +- .../voicemail/impl/res/values-hi/strings.xml | 6 +- .../voicemail/impl/res/values-hr/strings.xml | 6 +- .../voicemail/impl/res/values-hu/strings.xml | 6 +- .../voicemail/impl/res/values-hy/strings.xml | 6 +- .../voicemail/impl/res/values-in/strings.xml | 6 +- .../voicemail/impl/res/values-is/strings.xml | 6 +- .../voicemail/impl/res/values-it/strings.xml | 6 +- .../voicemail/impl/res/values-iw/strings.xml | 6 +- .../voicemail/impl/res/values-ja/strings.xml | 6 +- .../voicemail/impl/res/values-ka/strings.xml | 6 +- .../voicemail/impl/res/values-kk/strings.xml | 6 +- .../voicemail/impl/res/values-km/strings.xml | 6 +- .../voicemail/impl/res/values-kn/strings.xml | 6 +- .../voicemail/impl/res/values-ko/strings.xml | 6 +- .../voicemail/impl/res/values-ky/strings.xml | 6 +- .../voicemail/impl/res/values-lo/strings.xml | 6 +- .../voicemail/impl/res/values-lt/strings.xml | 6 +- .../voicemail/impl/res/values-lv/strings.xml | 6 +- .../voicemail/impl/res/values-mk/strings.xml | 6 +- .../voicemail/impl/res/values-ml/strings.xml | 6 +- .../voicemail/impl/res/values-mn/strings.xml | 6 +- .../voicemail/impl/res/values-mr/strings.xml | 6 +- .../voicemail/impl/res/values-ms/strings.xml | 6 +- .../voicemail/impl/res/values-my/strings.xml | 6 +- .../voicemail/impl/res/values-nb/strings.xml | 6 +- .../voicemail/impl/res/values-ne/strings.xml | 6 +- .../voicemail/impl/res/values-nl/strings.xml | 6 +- .../voicemail/impl/res/values-no/strings.xml | 6 +- .../voicemail/impl/res/values-pa/strings.xml | 6 +- .../voicemail/impl/res/values-pl/strings.xml | 6 +- .../voicemail/impl/res/values-pt-rBR/strings.xml | 6 +- .../voicemail/impl/res/values-pt-rPT/strings.xml | 6 +- .../voicemail/impl/res/values-pt/strings.xml | 6 +- .../voicemail/impl/res/values-ro/strings.xml | 6 +- .../voicemail/impl/res/values-ru/strings.xml | 6 +- .../voicemail/impl/res/values-si/strings.xml | 6 +- .../voicemail/impl/res/values-sk/strings.xml | 6 +- .../voicemail/impl/res/values-sl/strings.xml | 6 +- .../voicemail/impl/res/values-sq/strings.xml | 6 +- .../voicemail/impl/res/values-sr/strings.xml | 6 +- .../voicemail/impl/res/values-sv/strings.xml | 6 +- .../voicemail/impl/res/values-sw/strings.xml | 6 +- .../voicemail/impl/res/values-ta/strings.xml | 6 +- .../voicemail/impl/res/values-te/strings.xml | 6 +- .../voicemail/impl/res/values-th/strings.xml | 6 +- .../voicemail/impl/res/values-tl/strings.xml | 6 +- .../voicemail/impl/res/values-tr/strings.xml | 6 +- .../voicemail/impl/res/values-uk/strings.xml | 6 +- .../voicemail/impl/res/values-ur/strings.xml | 6 +- .../voicemail/impl/res/values-uz/strings.xml | 6 +- .../voicemail/impl/res/values-vi/strings.xml | 6 +- .../voicemail/impl/res/values-zh-rCN/strings.xml | 6 +- .../voicemail/impl/res/values-zh-rHK/strings.xml | 6 +- .../voicemail/impl/res/values-zh-rTW/strings.xml | 6 +- .../voicemail/impl/res/values-zu/strings.xml | 6 +- .../android/voicemail/impl/res/values/strings.xml | 7 +- .../voicemail/impl/res/xml/voicemail_settings.xml | 2 +- .../impl/settings/VisualVoicemailSettingsUtil.java | 5 +- .../impl/settings/VoicemailSettingsFragment.java | 104 +++-- .../voicemail/impl/sync/OmtpVvmSyncReceiver.java | 2 +- .../voicemail/impl/sync/OmtpVvmSyncService.java | 29 +- .../voicemail/impl/sync/VvmAccountManager.java | 37 ++ .../voicemail/stub/StubVoicemailClient.java | 12 + 794 files changed, 8165 insertions(+), 2838 deletions(-) delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_call_note_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_message_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_phone_attach.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_scroll_handle.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_group_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_back.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_overflow_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_remove_field_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_message_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_rx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_tx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_group_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_back.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_overflow_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_message_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_rx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_tx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_background_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_group_white_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_back.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_overflow_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_remove_field_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_holo_light.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_lt.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_message_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_rx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_tx_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/list_title_holo.9.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_ab_search.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_arrow_back_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_call_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_close_dk.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_create_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_history_white_drawable_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_info_outline_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_message_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_person_24dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_videocam.png delete mode 100644 java/com/android/contacts/common/res/drawable/ic_call.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_message_24dp.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_tab_all.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_tab_groups.xml delete mode 100644 java/com/android/contacts/common/res/drawable/ic_tab_starred.xml delete mode 100644 java/com/android/contacts/common/res/drawable/list_item_activated_background.xml delete mode 100644 java/com/android/contacts/common/res/mipmap-hdpi/ic_contacts_launcher.png create mode 100644 java/com/android/dialer/app/calllog/CallLogNotificationsActivity.java create mode 100644 java/com/android/dialer/app/list/DialtactsPagerAdapter.java create mode 100644 java/com/android/dialer/app/list/OldSpeedDialFragment.java delete mode 100644 java/com/android/dialer/app/list/SpeedDialFragment.java delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_star.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png delete mode 100644 java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_archive_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_content_copy_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_delete_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_grade_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_more_vert_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_pause_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_people_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_play_arrow_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_schedule_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_share_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_voicemail_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_volume_down_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-mdpi/ic_volume_up_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_archive_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_content_copy_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_delete_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_grade_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_more_vert_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_pause_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_people_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_play_arrow_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_schedule_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_share_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_voicemail_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_down_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_up_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_archive_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_content_copy_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_delete_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_grade_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_more_vert_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_pause_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_people_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_play_arrow_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_schedule_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_share_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_voicemail_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_down_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_up_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_archive_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_content_copy_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_delete_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_grade_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_more_vert_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_pause_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_people_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_play_arrow_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_schedule_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_share_white_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_voicemail_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_down_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_up_24dp.png delete mode 100644 java/com/android/dialer/app/res/drawable/overflow_menu.xml create mode 100644 java/com/android/dialer/app/res/menu/actionbar_delete.xml delete mode 100644 java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_white_36dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-mdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-mdpi/ic_report_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-mdpi/ic_report_white_36dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xhdpi/ic_report_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xhdpi/ic_report_white_36dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxhdpi/ic_report_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxhdpi/ic_report_white_36dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxxhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxxhdpi/ic_report_24dp.png delete mode 100644 java/com/android/dialer/blocking/res/drawable-xxxhdpi/ic_report_white_36dp.png create mode 100644 java/com/android/dialer/common/concurrent/DefaultDialerExecutorFactory.java delete mode 100644 java/com/android/dialer/common/concurrent/DialerAsyncTaskHelper.java create mode 100644 java/com/android/dialer/common/concurrent/DialerExecutor.java create mode 100644 java/com/android/dialer/common/concurrent/DialerExecutorFactory.java create mode 100644 java/com/android/dialer/common/concurrent/DialerExecutors.java create mode 100644 java/com/android/dialer/common/concurrent/DialerUiTaskFragment.java create mode 100644 java/com/android/dialer/common/concurrent/ThreadUtil.java delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_close_black_24dp.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_delete.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_voicemail.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_overflow_menu.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-mdpi/ic_close_black_24dp.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-mdpi/ic_dialpad_delete.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-mdpi/ic_dialpad_voicemail.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-mdpi/ic_overflow_menu.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xhdpi/ic_close_black_24dp.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xhdpi/ic_dialpad_delete.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xhdpi/ic_dialpad_voicemail.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xhdpi/ic_overflow_menu.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxhdpi/ic_close_black_24dp.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxhdpi/ic_dialpad_delete.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxhdpi/ic_dialpad_voicemail.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxhdpi/ic_overflow_menu.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxxhdpi/ic_close_black_24dp.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxxhdpi/ic_dialpad_delete.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxxhdpi/ic_dialpad_voicemail.png delete mode 100644 java/com/android/dialer/dialpadview/res/drawable-xxxhdpi/ic_overflow_menu.png create mode 100644 java/com/android/dialer/lightbringer/Lightbringer.java create mode 100644 java/com/android/dialer/lightbringer/LightbringerComponent.java create mode 100644 java/com/android/dialer/lightbringer/LightbringerListener.java create mode 100644 java/com/android/dialer/lightbringer/stub/LightbringerStub.java create mode 100644 java/com/android/dialer/lightbringer/stub/StubLightbringerModule.java create mode 100644 java/com/android/dialer/persistentlog/PersistentLogFileHandler.java create mode 100644 java/com/android/dialer/persistentlog/PersistentLogger.java create mode 100644 java/com/android/dialer/speeddial/AndroidManifest.xml create mode 100644 java/com/android/dialer/speeddial/SpeedDialFragment.java create mode 100644 java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml create mode 100644 java/com/android/dialer/speeddial/res/values-af/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-am/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ar/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-az/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-be/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-bg/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-bn/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-bs/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ca/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-cs/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-da/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-de/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-el/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-en-rAU/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-en-rGB/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-en-rIN/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-es-rUS/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-es/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-et/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-eu/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-fa/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-fi/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-fr-rCA/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-fr/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-gl/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-gu/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-hi/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-hr/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-hu/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-hy/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-in/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-is/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-it/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-iw/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ja/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ka/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-kk/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-km/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-kn/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ko/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ky/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-lo/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-lt/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-lv/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-mk/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ml/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-mn/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-mr/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ms/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-my/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-nb/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ne/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-nl/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-no/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-pa/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-pl/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-pt-rBR/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-pt-rPT/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-pt/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ro/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ru/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-si/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sk/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sl/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sq/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sr/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sv/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-sw/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ta/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-te/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-th/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-tl/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-tr/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-uk/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-ur/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-uz/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-vi/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-zh-rCN/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-zh-rHK/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-zh-rTW/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-zu/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values/colors.xml create mode 100644 java/com/android/dialer/speeddial/res/values/dimens.xml create mode 100644 java/com/android/dialer/speeddial/res/values/strings.xml delete mode 100644 java/com/android/dialer/theme/res/drawable-hdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/theme/res/drawable-hdpi/ic_call_arrow.png delete mode 100644 java/com/android/dialer/theme/res/drawable-mdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/theme/res/drawable-mdpi/ic_call_arrow.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xhdpi/ic_call_arrow.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xxhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xxhdpi/ic_call_arrow.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xxxhdpi/ic_block_24dp.png delete mode 100644 java/com/android/dialer/theme/res/drawable-xxxhdpi/ic_call_arrow.png create mode 100644 java/com/android/dialer/widget/DialerToolbar.java create mode 100644 java/com/android/dialer/widget/res/layout/dialer_toolbar.xml delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_block_grey600_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_call_end_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_call_split_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_close_grey600_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_location_on_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_01.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_02.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_03.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_04.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_05.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_06.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_07.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_08.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_09.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_person_add_grey600_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_question_mark.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_schedule_white_24dp.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_business.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_conference.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_no_image.png delete mode 100644 java/com/android/incallui/res/drawable-hdpi/img_phone.png delete mode 100644 java/com/android/incallui/res/values/config.xml create mode 100644 java/com/android/incallui/video/protocol/AndroidManifest.xml create mode 100644 java/com/android/incallui/video/protocol/res/values/config.xml create mode 100644 java/com/android/incallui/videotech/lightbringer/LightbringerTech.java (limited to 'java') diff --git a/java/com/android/contacts/common/compat/TelephonyManagerCompat.java b/java/com/android/contacts/common/compat/TelephonyManagerCompat.java index c8665af51..84002256a 100644 --- a/java/com/android/contacts/common/compat/TelephonyManagerCompat.java +++ b/java/com/android/contacts/common/compat/TelephonyManagerCompat.java @@ -16,10 +16,13 @@ package com.android.contacts.common.compat; +import android.content.Context; +import android.content.Intent; import android.net.Uri; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.support.annotation.Nullable; +import android.support.v4.os.BuildCompat; import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import com.android.dialer.common.Assert; @@ -40,6 +43,8 @@ public class TelephonyManagerCompat { public static final String TELEPHONY_MANAGER_CLASS = "android.telephony.TelephonyManager"; + private static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE"; + /** * @param telephonyManager The telephony manager instance to use for method calls. * @return true if the current device is "voice capable". @@ -210,4 +215,22 @@ public class TelephonyManagerCompat { } return false; } + + /** + * Handles secret codes to launch arbitrary activities. + * + * @param context the context to use + * @param secretCode the secret code without the "*#*#" prefix and "#*#*" suffix + */ + public static void handleSecretCode(Context context, String secretCode) { + // Must use system service on O+ to avoid using broadcasts, which are not allowed on O+. + if (BuildCompat.isAtLeastO()) { + context.getSystemService(TelephonyManager.class).sendDialerSpecialCode(secretCode); + } else { + // System service call is not supported pre-O, so must use a broadcast for N-. + Intent intent = + new Intent(SECRET_CODE_ACTION, Uri.parse("android_secret_code://" + secretCode)); + context.sendBroadcast(intent); + } + } } diff --git a/java/com/android/contacts/common/model/account/BaseAccountType.java b/java/com/android/contacts/common/model/account/BaseAccountType.java index 21b555917..8e9ba738c 100644 --- a/java/com/android/contacts/common/model/account/BaseAccountType.java +++ b/java/com/android/contacts/common/model/account/BaseAccountType.java @@ -36,12 +36,12 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.CommonDataKinds.Website; import android.util.ArrayMap; import android.util.AttributeSet; -import android.util.Log; import android.view.inputmethod.EditorInfo; import com.android.contacts.common.R; import com.android.contacts.common.model.dataitem.DataKind; import com.android.contacts.common.util.CommonDateUtils; import com.android.contacts.common.util.ContactDisplayUtils; +import com.android.dialer.common.LogUtil; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -111,7 +111,6 @@ public abstract class BaseAccountType extends AccountType { protected static final int MAX_LINES_FOR_POSTAL_ADDRESS = 10; protected static final int MAX_LINES_FOR_GROUP = 10; protected static final int MAX_LINES_FOR_NOTE = 100; - private static final String TAG = "BaseAccountType"; public BaseAccountType() { this.accountType = null; @@ -308,7 +307,7 @@ public abstract class BaseAccountType extends AccountType { DataKind kind = addKind( new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true)); - kind.iconAltRes = R.drawable.ic_message_24dp; + kind.iconAltRes = R.drawable.quantum_ic_message_white_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionHeader = new PhoneActionInflater(); kind.actionAltHeader = new PhoneActionAltInflater(); @@ -546,7 +545,7 @@ public abstract class BaseAccountType extends AccountType { addKind(kind); } } else { - Log.w(TAG, "Skipping unknown tag " + tag); + LogUtil.i("BaseAccountType.parseEditSchema", "Skipping unknown tag " + tag); } } } @@ -875,9 +874,7 @@ public abstract class BaseAccountType extends AccountType { StringInflater actionBody) throws DefinitionException, XmlPullParserException, IOException { - if (Log.isLoggable(TAG, Log.DEBUG)) { - Log.d(TAG, "Adding DataKind: " + mimeType); - } + LogUtil.d("BaseAccountType.newDataKind", "Adding DataKind: " + mimeType); final DataKind kind = new DataKind(mimeType, titleRes, weight, true); kind.typeColumn = typeColumn; @@ -896,13 +893,13 @@ public abstract class BaseAccountType extends AccountType { if (kind.typeColumn != null) { // Parse and add types. kind.typeList = new ArrayList<>(); - parseTypes(context, parser, attrs, kind, true); + parseTypes(parser, attrs, kind, true); if (kind.typeList.size() == 0) { throw new DefinitionException("Kind " + kind.mimeType + " must have at least one type"); } } else { // Make sure it has no types. - parseTypes(context, parser, attrs, kind, false /* can't have types */); + parseTypes(parser, attrs, kind, false /* can't have types */); } } @@ -915,7 +912,6 @@ public abstract class BaseAccountType extends AccountType { * {@link DefinitionException}. */ private void parseTypes( - Context context, XmlPullParser parser, AttributeSet attrs, DataKind kind, @@ -933,7 +929,7 @@ public abstract class BaseAccountType extends AccountType { final String tag = parser.getName(); if (Tag.TYPE.equals(tag)) { if (canHaveTypes) { - kind.typeList.add(parseTypeTag(parser, attrs, kind)); + kind.typeList.add(parseTypeTag(attrs, kind)); } else { throw new DefinitionException("Kind " + kind.mimeType + " can't have types"); } @@ -947,8 +943,7 @@ public abstract class BaseAccountType extends AccountType { * Parses a single Type element and returns an {@link EditType} built from it. Uses {@link * #buildEditTypeForTypeTag} defined in subclasses to actually build an {@link EditType}. */ - private EditType parseTypeTag(XmlPullParser parser, AttributeSet attrs, DataKind kind) - throws DefinitionException { + private EditType parseTypeTag(AttributeSet attrs, DataKind kind) throws DefinitionException { final String typeName = getAttr(attrs, Attr.TYPE); @@ -1233,7 +1228,7 @@ public abstract class BaseAccountType extends AccountType { new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER)); - kind.iconAltRes = R.drawable.ic_message_24dp; + kind.iconAltRes = R.drawable.quantum_ic_message_white_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionAltHeader = new PhoneActionAltInflater(); diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png deleted file mode 100644 index d86b2195a..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png deleted file mode 100644 index ddbb2c459..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png deleted file mode 100644 index d5942dcad..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png deleted file mode 100644 index 4dc506515..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_note_white_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_call_note_white_24dp.png deleted file mode 100644 index 503e58e22..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_call_note_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png deleted file mode 100644 index 969552935..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png deleted file mode 100644 index 540ab4dee..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png deleted file mode 100644 index 017e4bbf7..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index 703d30b92..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png deleted file mode 100644 index c7b1113cf..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png deleted file mode 100644 index deb3a6dc1..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png deleted file mode 100644 index 06bd18fbb..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png deleted file mode 100644 index d829d11e2..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png deleted file mode 100644 index 1ba12950c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png deleted file mode 100644 index 5ff3ac574..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png deleted file mode 100644 index b4ebfc7b2..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png deleted file mode 100644 index 03fd2fb10..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png deleted file mode 100644 index e8cb0f5fe..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png deleted file mode 100644 index 45137967c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png deleted file mode 100644 index 1c9bb81fa..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_message_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_message_24dp.png deleted file mode 100644 index 57177b7c6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_message_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png deleted file mode 100644 index 56708b0ba..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_phone_attach.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_phone_attach.png deleted file mode 100644 index 84b1227bd..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_phone_attach.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png deleted file mode 100644 index ccdda6701..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_scroll_handle.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_scroll_handle.png deleted file mode 100644 index 3aa29b852..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_scroll_handle.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png deleted file mode 100644 index 603ddc895..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png deleted file mode 100644 index 97905c9f5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png deleted file mode 100644 index 2121878ae..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png deleted file mode 100644 index 4ea7afa00..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png deleted file mode 100644 index cddf9be75..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png deleted file mode 100644 index 86578be45..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png deleted file mode 100644 index e9afcc924..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png deleted file mode 100644 index 2054530ed..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png deleted file mode 100644 index a0f17568e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png deleted file mode 100644 index ae937176e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_background_holo.9.png deleted file mode 100644 index 0d80482a9..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-hdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_background_holo.9.png deleted file mode 100644 index d86d61164..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-mdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_background_holo.9.png deleted file mode 100644 index f709f2ce4..000000000 Binary files a/java/com/android/contacts/common/res/drawable-ldrtl-xhdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_ab_search.png deleted file mode 100644 index 2b23b1ec5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_arrow_back_24dp.png deleted file mode 100644 index 1a21fb400..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_call_24dp.png deleted file mode 100644 index 77f9de5e3..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_close_dk.png deleted file mode 100644 index 590a728ad..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_create_24dp.png deleted file mode 100644 index 8a2df3992..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_group_white_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_group_white_24dp.png deleted file mode 100644 index ad268bf2f..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_group_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index b3000d31e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_info_outline_24dp.png deleted file mode 100644 index 353e06495..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_back.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_back.png deleted file mode 100644 index 201ad40cb..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_back.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_dk.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_dk.png deleted file mode 100644 index 9aac6d79b..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_lt.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_lt.png deleted file mode 100644 index 39c16ed2d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_group_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_overflow_lt.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_overflow_lt.png deleted file mode 100644 index 841509682..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_overflow_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_dk.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_dk.png deleted file mode 100644 index b8fc39aee..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_lt.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_lt.png deleted file mode 100644 index 736dfd6fa..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_person_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_remove_field_holo_light.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_remove_field_holo_light.png deleted file mode 100644 index 8c44e7015..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_remove_field_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_dk.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_dk.png deleted file mode 100644 index c16c6c5de..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_lt.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_lt.png deleted file mode 100644 index c67170e31..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_menu_star_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_message_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_message_24dp.png deleted file mode 100644 index 3072b7569..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_message_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_person_24dp.png deleted file mode 100644 index f0b1c725d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_rx_videocam.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_rx_videocam.png deleted file mode 100644 index 1b43a07d0..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_rx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_tx_videocam.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_tx_videocam.png deleted file mode 100644 index 64995d147..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_tx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_videocam.png deleted file mode 100644 index dc9655b6d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_background_holo.9.png deleted file mode 100644 index 7d5d66de3..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-mdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-mdpi/list_title_holo.9.png deleted file mode 100644 index 64bd6912c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_ab_search.png deleted file mode 100644 index 71f782701..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_arrow_back_24dp.png deleted file mode 100644 index bb7327251..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_call_24dp.png deleted file mode 100644 index ef45e933a..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_close_dk.png deleted file mode 100644 index 5769f1178..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_create_24dp.png deleted file mode 100644 index 48e75beee..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_group_white_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_group_white_24dp.png deleted file mode 100644 index 09c0e3efd..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_group_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index e188d4a37..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_info_outline_24dp.png deleted file mode 100644 index c571b2e3e..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_back.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_back.png deleted file mode 100644 index d2f709942..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_back.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_dk.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_dk.png deleted file mode 100644 index ce5f704ec..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_lt.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_lt.png deleted file mode 100644 index 3d0580f93..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_group_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_overflow_lt.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_overflow_lt.png deleted file mode 100644 index f91b71847..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_overflow_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_dk.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_dk.png deleted file mode 100644 index 2fbd458e9..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_lt.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_lt.png deleted file mode 100644 index 2cdb2d7a1..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_person_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png deleted file mode 100644 index 65a6b7bbb..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_dk.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_dk.png deleted file mode 100644 index 48483a0b6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_holo_light.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_holo_light.png deleted file mode 100644 index 906791177..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_lt.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_lt.png deleted file mode 100644 index e053c757a..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_menu_star_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_message_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_message_24dp.png deleted file mode 100644 index 763767b4f..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_message_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_person_24dp.png deleted file mode 100644 index aea15f0be..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_rx_videocam.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_rx_videocam.png deleted file mode 100644 index 43319dc92..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_rx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_tx_videocam.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_tx_videocam.png deleted file mode 100644 index d2671edf7..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_tx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_videocam.png deleted file mode 100644 index c1783de67..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_background_holo.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_background_holo.9.png deleted file mode 100644 index b65272542..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_background_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-xhdpi/list_title_holo.9.png deleted file mode 100644 index f4f00ca0f..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_ab_search.png deleted file mode 100644 index 142c5457d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_arrow_back_24dp.png deleted file mode 100644 index 72c51b0d5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_call_24dp.png deleted file mode 100644 index 90ead2e45..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_close_dk.png deleted file mode 100644 index 670bf796c..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_create_24dp.png deleted file mode 100644 index 24142c729..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_group_white_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_group_white_24dp.png deleted file mode 100644 index 03cad4c90..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_group_white_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index f44df1afd..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_info_outline_24dp.png deleted file mode 100644 index c41a5fcff..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_back.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_back.png deleted file mode 100644 index 436a82da6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_back.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_dk.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_dk.png deleted file mode 100644 index a70c60c03..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_lt.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_lt.png deleted file mode 100644 index c64b9defe..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_group_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_overflow_lt.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_overflow_lt.png deleted file mode 100644 index ff1759b8f..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_overflow_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_dk.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_dk.png deleted file mode 100644 index 878e694ad..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_lt.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_lt.png deleted file mode 100644 index ed4138f15..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_person_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_remove_field_holo_light.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_remove_field_holo_light.png deleted file mode 100644 index 0fec2f2b5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_remove_field_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_dk.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_dk.png deleted file mode 100644 index fa682b11b..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_holo_light.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_holo_light.png deleted file mode 100644 index 6c45bc8e6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_holo_light.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_lt.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_lt.png deleted file mode 100644 index 955f7383b..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_menu_star_lt.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_message_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_message_24dp.png deleted file mode 100644 index 0a79824b8..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_message_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_person_24dp.png deleted file mode 100644 index 184f7418d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_rx_videocam.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_rx_videocam.png deleted file mode 100644 index 89d29b7f5..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_rx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_tx_videocam.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_tx_videocam.png deleted file mode 100644 index 8d897ba5a..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_tx_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_videocam.png deleted file mode 100644 index 4ab5ad0ee..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/list_title_holo.9.png b/java/com/android/contacts/common/res/drawable-xxhdpi/list_title_holo.9.png deleted file mode 100644 index 7ddf14a0d..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/list_title_holo.9.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_ab_search.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_ab_search.png deleted file mode 100644 index 2ffb2ecae..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_ab_search.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_arrow_back_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_arrow_back_24dp.png deleted file mode 100644 index ae01a04ae..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_arrow_back_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_call_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_call_24dp.png deleted file mode 100644 index b0e020573..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_call_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_close_dk.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_close_dk.png deleted file mode 100644 index 3a5540ff6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_close_dk.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_create_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_create_24dp.png deleted file mode 100644 index d3ff0ecb6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_create_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_history_white_drawable_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_history_white_drawable_24dp.png deleted file mode 100644 index 5b96af5b7..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_history_white_drawable_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_info_outline_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_info_outline_24dp.png deleted file mode 100644 index 3a82cab3b..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_info_outline_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_message_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_message_24dp.png deleted file mode 100644 index fa7c17ac4..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_message_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_person_24dp.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_person_24dp.png deleted file mode 100644 index 33d40d8b6..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_person_24dp.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_videocam.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_videocam.png deleted file mode 100644 index 0643ea55f..000000000 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_videocam.png and /dev/null differ diff --git a/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml b/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml index 56fab8f6f..ecf704e8e 100644 --- a/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml +++ b/java/com/android/contacts/common/res/drawable/ic_back_arrow.xml @@ -15,6 +15,6 @@ ~ limitations under the License --> \ No newline at end of file + android:autoMirrored="true" + android:src="@drawable/quantum_ic_arrow_back_white_24" + android:tint="@color/actionbar_icon_color"/> \ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/ic_call.xml b/java/com/android/contacts/common/res/drawable/ic_call.xml deleted file mode 100644 index 0fedd452f..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_call.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_message_24dp.xml b/java/com/android/contacts/common/res/drawable/ic_message_24dp.xml deleted file mode 100644 index 3c6c8b534..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_message_24dp.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml b/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml index f1b5cba43..68c46fed6 100644 --- a/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml +++ b/java/com/android/contacts/common/res/drawable/ic_search_video_call.xml @@ -17,5 +17,5 @@ diff --git a/java/com/android/contacts/common/res/drawable/ic_tab_all.xml b/java/com/android/contacts/common/res/drawable/ic_tab_all.xml deleted file mode 100644 index 9cc6fbc96..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_tab_all.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_tab_groups.xml b/java/com/android/contacts/common/res/drawable/ic_tab_groups.xml deleted file mode 100644 index 6b3e7a415..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_tab_groups.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/java/com/android/contacts/common/res/drawable/ic_tab_starred.xml b/java/com/android/contacts/common/res/drawable/ic_tab_starred.xml deleted file mode 100644 index a12e0993e..000000000 --- a/java/com/android/contacts/common/res/drawable/ic_tab_starred.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/java/com/android/contacts/common/res/drawable/list_item_activated_background.xml b/java/com/android/contacts/common/res/drawable/list_item_activated_background.xml deleted file mode 100644 index 5b774fd20..000000000 --- a/java/com/android/contacts/common/res/drawable/list_item_activated_background.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml index 709bb50cb..a33b2ac85 100644 --- a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml +++ b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml @@ -129,7 +129,7 @@ android:layout_height="25dp" android:layout_alignParentStart="true" android:layout_centerVertical="true" - android:src="@drawable/ic_history_white_drawable_24dp" + android:src="@drawable/quantum_ic_history_white_24" android:tint="@color/call_subject_history_icon"/> diff --git a/java/com/android/contacts/common/res/mipmap-hdpi/ic_contacts_launcher.png b/java/com/android/contacts/common/res/mipmap-hdpi/ic_contacts_launcher.png deleted file mode 100644 index 64eff002f..000000000 Binary files a/java/com/android/contacts/common/res/mipmap-hdpi/ic_contacts_launcher.png and /dev/null differ diff --git a/java/com/android/dialer/app/AndroidManifest.xml b/java/com/android/dialer/app/AndroidManifest.xml index 5ce13dbd7..67290b591 100644 --- a/java/com/android/dialer/app/AndroidManifest.xml +++ b/java/com/android/dialer/app/AndroidManifest.xml @@ -91,6 +91,11 @@ + + + = HISTORY_TAB_SEEN_TIMEOUT; + boolean isOnHistoryTab = + mListsFragment.getCurrentTabIndex() == DialtactsPagerAdapter.TAB_INDEX_HISTORY; + if (isOnHistoryTab && timeoutElapsed && !isChangingConfigurations()) { + mListsFragment.markMissedCallsAsReadAndRemoveNotifications(); + } + } + @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); @@ -637,7 +660,7 @@ public class DialtactsActivity extends TransactionSafeActivity public void onClick(View view) { int resId = view.getId(); if (resId == R.id.floating_action_button) { - if (mListsFragment.getCurrentTabIndex() == ListsFragment.TAB_INDEX_ALL_CONTACTS + if (mListsFragment.getCurrentTabIndex() == DialtactsPagerAdapter.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch && !mInDialpadSearch) { DialerUtils.startActivityWithErrorToast( @@ -1275,11 +1298,11 @@ public class DialtactsActivity extends TransactionSafeActivity mListsFragment.getRemoveView().setDragDropController(dragController); } - /** Implemented to satisfy {@link SpeedDialFragment.HostInterface} */ + /** Implemented to satisfy {@link OldSpeedDialFragment.HostInterface} */ @Override public void showAllContactsTab() { if (mListsFragment != null) { - mListsFragment.showTab(ListsFragment.TAB_INDEX_ALL_CONTACTS); + mListsFragment.showTab(DialtactsPagerAdapter.TAB_INDEX_ALL_CONTACTS); } } @@ -1335,11 +1358,11 @@ public class DialtactsActivity extends TransactionSafeActivity // In RTL, scroll when the current tab is Call History instead, since the order of the tabs // is reversed and the ViewPager returns the left tab position during scroll. boolean isRtl = ViewUtil.isRtl(); - if (!isRtl && tabIndex == ListsFragment.TAB_INDEX_SPEED_DIAL && !mIsLandscape) { + if (!isRtl && tabIndex == DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL && !mIsLandscape) { mFloatingActionButtonController.onPageScrolled(positionOffset); - } else if (isRtl && tabIndex == ListsFragment.TAB_INDEX_HISTORY && !mIsLandscape) { + } else if (isRtl && tabIndex == DialtactsPagerAdapter.TAB_INDEX_HISTORY && !mIsLandscape) { mFloatingActionButtonController.onPageScrolled(1 - positionOffset); - } else if (tabIndex != ListsFragment.TAB_INDEX_SPEED_DIAL) { + } else if (tabIndex != DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL) { mFloatingActionButtonController.onPageScrolled(1); } } @@ -1350,7 +1373,7 @@ public class DialtactsActivity extends TransactionSafeActivity int tabIndex = mListsFragment.getCurrentTabIndex(); mPreviouslySelectedTabIndex = tabIndex; mFloatingActionButtonController.setVisible(true); - if (tabIndex == ListsFragment.TAB_INDEX_ALL_CONTACTS + if (tabIndex == DialtactsPagerAdapter.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch && !mInDialpadSearch) { mFloatingActionButtonController.changeIcon( @@ -1361,6 +1384,8 @@ public class DialtactsActivity extends TransactionSafeActivity getResources().getDrawable(R.drawable.quantum_ic_dialpad_white_24, null), getResources().getString(R.string.action_menu_dialpad_button)); } + + timeTabSelected = SystemClock.elapsedRealtime(); } @Override @@ -1397,14 +1422,14 @@ public class DialtactsActivity extends TransactionSafeActivity private int getFabAlignment() { if (!mIsLandscape && !isInSearchUi() - && mListsFragment.getCurrentTabIndex() == ListsFragment.TAB_INDEX_SPEED_DIAL) { + && mListsFragment.getCurrentTabIndex() == DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL) { return FloatingActionButtonController.ALIGN_MIDDLE; } return FloatingActionButtonController.ALIGN_END; } private void updateMissedCalls() { - if (mPreviouslySelectedTabIndex == ListsFragment.TAB_INDEX_HISTORY) { + if (mPreviouslySelectedTabIndex == DialtactsPagerAdapter.TAB_INDEX_HISTORY) { mListsFragment.markMissedCallsAsReadAndRemoveNotifications(); } } @@ -1452,15 +1477,12 @@ public class DialtactsActivity extends TransactionSafeActivity @Override public void show() { - final boolean hasContactsPermission = - PermissionsUtil.hasContactsPermissions(DialtactsActivity.this); - final Menu menu = getMenu(); - final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents); + Menu menu = getMenu(); + MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents); clearFrequents.setVisible( - mListsFragment != null - && mListsFragment.getSpeedDialFragment() != null - && mListsFragment.getSpeedDialFragment().hasFrequents() - && hasContactsPermission); + PermissionsUtil.hasContactsPermissions(DialtactsActivity.this) + && mListsFragment != null + && mListsFragment.hasFrequents()); menu.findItem(R.id.menu_history) .setVisible(PermissionsUtil.hasPhonePermissions(DialtactsActivity.this)); diff --git a/java/com/android/dialer/app/SpecialCharSequenceMgr.java b/java/com/android/dialer/app/SpecialCharSequenceMgr.java index 712659c12..85c2ea650 100644 --- a/java/com/android/dialer/app/SpecialCharSequenceMgr.java +++ b/java/com/android/dialer/app/SpecialCharSequenceMgr.java @@ -30,7 +30,6 @@ import android.database.Cursor; import android.net.Uri; import android.provider.Settings; import android.support.annotation.Nullable; -import android.support.v4.os.BuildCompat; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telephony.PhoneNumberUtils; @@ -71,7 +70,6 @@ public class SpecialCharSequenceMgr { private static final String TAG_SELECT_ACCT_FRAGMENT = "tag_select_acct_fragment"; - private static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE"; private static final String MMI_IMEI_DISPLAY = "*#06#"; private static final String MMI_REGULATORY_INFO_DISPLAY = "*#07#"; /** ***** This code is used to handle SIM Contact queries ***** */ @@ -133,31 +131,21 @@ public class SpecialCharSequenceMgr { /** * Handles secret codes to launch arbitrary activities in the form of *#*##*#*. - * If a secret code is encountered, an Intent is started with the android_secret_code:// - * URI. * * @param context the context to use * @param input the text to check for a secret code in - * @return true if a secret code was encountered and intent is sent out + * @return true if a secret code was encountered and handled */ static boolean handleSecretCode(Context context, String input) { - // Must use system service on O+ to avoid using broadcasts, which are not allowed on O+. - if (BuildCompat.isAtLeastO()) { - return context.getSystemService(TelephonyManager.class).sendDialerCode(input); - } + // Secret codes are accessed by dialing *#*##*#* - // System service call is not supported pre-O, so must use a broadcast for N-. - // Secret codes are in the form *#*##*#* int len = input.length(); - if (len > 8 && input.startsWith("*#*#") && input.endsWith("#*#*")) { - final Intent intent = - new Intent( - SECRET_CODE_ACTION, - Uri.parse("android_secret_code://" + input.substring(4, len - 4))); - context.sendBroadcast(intent); - return true; + if (len <= 8 || !input.startsWith("*#*#") || !input.endsWith("#*#*")) { + return false; } - return false; + String secretCode = input.substring(4, len - 4); + TelephonyManagerCompat.handleSecretCode(context, secretCode); + return true; } /** diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index 301fc009e..06f48aa20 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -17,6 +17,7 @@ package com.android.dialer.app.calllog; import android.app.Activity; +import android.content.ContentUris; import android.content.res.Resources; import android.database.Cursor; import android.net.Uri; @@ -38,7 +39,12 @@ import android.telecom.PhoneAccountHandle; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.SparseBooleanArray; +import android.view.ActionMode; import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import com.android.contacts.common.ContactsUtils; @@ -58,6 +64,7 @@ import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.calllogutils.PhoneAccountUtils; import com.android.dialer.calllogutils.PhoneCallDetails; import com.android.dialer.common.Assert; +import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.AsyncTaskExecutor; import com.android.dialer.common.concurrent.AsyncTaskExecutors; @@ -65,6 +72,9 @@ import com.android.dialer.enrichedcall.EnrichedCallCapabilities; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult; +import com.android.dialer.lightbringer.Lightbringer; +import com.android.dialer.lightbringer.LightbringerComponent; +import com.android.dialer.lightbringer.LightbringerListener; import com.android.dialer.logging.Logger; import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.phonenumbercache.CallLogQuery; @@ -80,7 +90,7 @@ import java.util.Set; /** Adapter class to fill in data for the Call Log. */ public class CallLogAdapter extends GroupingListAdapter - implements GroupCreator, OnVoicemailDeletedListener { + implements GroupCreator, OnVoicemailDeletedListener, LightbringerListener { // Types of activities the call log adapter is used for public static final int ACTIVITY_TYPE_CALL_LOG = 1; @@ -118,6 +128,58 @@ public class CallLogAdapter extends GroupingListAdapter private long mCurrentlyExpandedRowId = NO_EXPANDED_LIST_ITEM; private final CallLogAlertManager mCallLogAlertManager; + + public static ActionMode mActionMode = null; + private final SparseBooleanArray selectedItems = new SparseBooleanArray(); + + private final ActionMode.Callback mActionModeCallback = + new ActionMode.Callback() { + + // Called when the action mode is created; startActionMode() was called + @Override + public boolean onCreateActionMode(ActionMode mode, Menu menu) { + mActionMode = mode; + // Inflate a menu resource providing context menu items + MenuInflater inflater = mode.getMenuInflater(); + inflater.inflate(R.menu.actionbar_delete, menu); + return true; + } + + // Called each time the action mode is shown. Always called after onCreateActionMode, but + // may be called multiple times if the mode is invalidated. + @Override + public boolean onPrepareActionMode(ActionMode mode, Menu menu) { + return false; // Return false if nothing is done + } + + // Called when the user selects a contextual menu item + @Override + public boolean onActionItemClicked(ActionMode mode, MenuItem item) { + return false; + } + + // Called when the user exits the action mode + @Override + public void onDestroyActionMode(ActionMode mode) { + selectedItems.clear(); + mActionMode = null; + notifyDataSetChanged(); + } + }; + + private final View.OnLongClickListener mLongPressListener = + new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + if (ConfigProviderBindings.get(v.getContext()) + .getBoolean("enable_call_log_multiselect", false)) { + v.startActionMode(mActionModeCallback); + return false; + } + return true; + } + }; + /** The OnClickListener used to expand or collapse the action buttons of a call log entry. */ private final View.OnClickListener mExpandCollapseListener = new View.OnClickListener() { @@ -127,6 +189,20 @@ public class CallLogAdapter extends GroupingListAdapter if (viewHolder == null) { return; } + if (mActionMode != null && viewHolder.voicemailUri != null) { + if (selectedItems.get((int) ContentUris.parseId(Uri.parse(viewHolder.voicemailUri)))) { + selectedItems.delete((int) ContentUris.parseId(Uri.parse(viewHolder.voicemailUri))); + viewHolder.checkBoxView.setVisibility(View.GONE); + viewHolder.quickContactView.setVisibility(View.VISIBLE); + } else { + viewHolder.quickContactView.setVisibility(View.GONE); + viewHolder.checkBoxView.setVisibility(View.VISIBLE); + selectedItems.put( + (int) ContentUris.parseId(Uri.parse(viewHolder.voicemailUri)), true); + } + mActionMode.setTitle(Integer.toString(selectedItems.size())); + return; + } if (mVoicemailPlaybackPresenter != null) { // Always reset the voicemail playback state on expand or collapse. @@ -313,10 +389,12 @@ public class CallLogAdapter extends GroupingListAdapter } mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY); mIsSpamEnabled = Spam.get(mActivity).isSpamEnabled(); + getLightbringer().registerListener(this); notifyDataSetChanged(); } public void onPause() { + getLightbringer().unregisterListener(this); pauseCache(); for (Uri uri : mHiddenItemUris) { CallLogAsyncTaskUtil.deleteVoicemail(mActivity, uri, null); @@ -365,6 +443,7 @@ public class CallLogAdapter extends GroupingListAdapter mActivity, mBlockReportSpamListener, mExpandCollapseListener, + mLongPressListener, mCallLogCache, mCallLogListItemHelper, mVoicemailPlaybackPresenter); @@ -471,6 +550,7 @@ public class CallLogAdapter extends GroupingListAdapter setCallDetailsEntriesHistoryResults( views.number, callDetailsEntries, getAllHistoricalData(views.number, callDetailsEntries)); views.setDetailedPhoneDetails(callDetailsEntries); + views.lightbringerReady = getLightbringer().isReachable(mActivity, views.number); final AsyncTask loadDataTask = new AsyncTask() { @Override @@ -741,6 +821,15 @@ public class CallLogAdapter extends GroupingListAdapter views.workIconView.setVisibility( details.contactUserType == ContactsUtils.USER_TYPE_WORK ? View.VISIBLE : View.GONE); + if (views.voicemailUri != null + && selectedItems.get((int) ContentUris.parseId(Uri.parse(views.voicemailUri)))) { + views.checkBoxView.setVisibility(View.VISIBLE); + views.quickContactView.setVisibility(View.GONE); + } else if (views.voicemailUri != null) { + views.checkBoxView.setVisibility(View.GONE); + views.quickContactView.setVisibility(View.VISIBLE); + } + mCallLogListItemHelper.setPhoneCallDetails(views, details); if (mCurrentlyExpandedRowId == views.rowId) { // In case ViewHolders were added/removed, update the expanded position if the rowIds @@ -997,6 +1086,16 @@ public class CallLogAdapter extends GroupingListAdapter return EnrichedCallComponent.get(mActivity).getEnrichedCallManager(); } + @NonNull + private Lightbringer getLightbringer() { + return LightbringerComponent.get(mActivity).getLightbringer(); + } + + @Override + public void onLightbringerStateChanged() { + notifyDataSetChanged(); + } + /** Interface used to initiate a refresh of the content. */ public interface CallFetcher { diff --git a/java/com/android/dialer/app/calllog/CallLogFragment.java b/java/com/android/dialer/app/calllog/CallLogFragment.java index 4abef3430..fcc34ebef 100644 --- a/java/com/android/dialer/app/calllog/CallLogFragment.java +++ b/java/com/android/dialer/app/calllog/CallLogFragment.java @@ -49,11 +49,11 @@ import com.android.dialer.app.contactinfo.ContactInfoCache; import com.android.dialer.app.contactinfo.ContactInfoCache.OnContactInfoChangedListener; import com.android.dialer.app.contactinfo.ExpirableCacheHeadlessFragment; import com.android.dialer.app.list.ListsFragment; -import com.android.dialer.app.list.ListsFragment.ListsPage; import com.android.dialer.app.voicemail.VoicemailPlaybackPresenter; import com.android.dialer.app.widget.EmptyContentView; import com.android.dialer.app.widget.EmptyContentView.OnEmptyViewActionButtonClickedListener; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; +import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.database.CallLogQueryHandler; import com.android.dialer.phonenumbercache.ContactInfoHelper; @@ -64,8 +64,7 @@ import com.android.dialer.util.PermissionsUtil; * voicemails), specify it in the constructor. */ public class CallLogFragment extends Fragment - implements ListsPage, - CallLogQueryHandler.Listener, + implements CallLogQueryHandler.Listener, CallLogAdapter.CallFetcher, OnEmptyViewActionButtonClickedListener, FragmentCompat.OnRequestPermissionsResultCallback, @@ -133,6 +132,8 @@ public class CallLogFragment extends Fragment refreshData(); rescheduleDisplayUpdate(); break; + default: + throw Assert.createAssertionFailException("Invalid message: " + msg); } } }; @@ -541,20 +542,18 @@ public class CallLogFragment extends Fragment mDisplayUpdateHandler.removeMessages(EVENT_UPDATE_DISPLAY); } - @Override @CallSuper - public void onPageResume(@Nullable Activity activity) { - LogUtil.d("CallLogFragment.onPageResume", "frag: %s", this); - if (activity != null) { - ((HostInterface) activity) + public void onVisible() { + LogUtil.enterBlock("CallLogFragment.onPageSelected"); + if (getActivity() != null) { + ((HostInterface) getActivity()) .enableFloatingButton(mModalAlertManager == null || mModalAlertManager.isEmpty()); } } - @Override @CallSuper - public void onPagePause(@Nullable Activity activity) { - LogUtil.d("CallLogFragment.onPagePause", "frag: %s", this); + public void onNotVisible() { + LogUtil.enterBlock("CallLogFragment.onPageUnselected"); } @Override diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 6a3187fa8..9adcddb3c 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -22,19 +22,16 @@ import android.content.Intent; import android.content.res.Resources; import android.net.Uri; import android.os.AsyncTask; -import android.provider.CallLog; import android.provider.CallLog.Calls; import android.provider.ContactsContract.CommonDataKinds.Phone; +import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; -import android.text.BidiFormatter; -import android.text.TextDirectionHeuristics; import android.text.TextUtils; -import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; import android.view.ViewStub; @@ -45,7 +42,6 @@ import android.widget.TextView; import com.android.contacts.common.ClipboardUtils; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; -import com.android.contacts.common.compat.PhoneNumberUtilsCompat; import com.android.contacts.common.dialog.CallSubjectDialog; import com.android.contacts.common.util.UriUtils; import com.android.dialer.app.DialtactsActivity; @@ -61,10 +57,13 @@ import com.android.dialer.callcomposer.nano.CallComposerContact; import com.android.dialer.calldetails.nano.CallDetailsEntries; import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; +import com.android.dialer.lightbringer.Lightbringer; +import com.android.dialer.lightbringer.LightbringerComponent; import com.android.dialer.logging.Logger; import com.android.dialer.logging.nano.DialerImpression; -import com.android.dialer.logging.nano.ScreenEvent; +import com.android.dialer.phonenumbercache.CachedNumberLookupService; import com.android.dialer.phonenumbercache.ContactInfo; +import com.android.dialer.phonenumbercache.PhoneNumberCache; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.util.CallUtil; import com.android.dialer.util.DialerUtils; @@ -77,9 +76,7 @@ import com.android.dialer.util.DialerUtils; * CallLogAdapter. */ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder - implements View.OnClickListener, - MenuItem.OnMenuItemClickListener, - View.OnCreateContextMenuListener { + implements View.OnClickListener, MenuItem.OnMenuItemClickListener { /** The root view of the call log list item */ public final View rootView; /** The quick contact badge for the contact. */ @@ -98,6 +95,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder private final Context mContext; private final CallLogCache mCallLogCache; private final CallLogListItemHelper mCallLogListItemHelper; + private final CachedNumberLookupService mCachedNumberLookupService; private final VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; private final OnClickListener mBlockReportListener; private final int mPhotoSize; @@ -122,6 +120,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder public View callComposeButtonView; public View sendVoicemailButtonView; public ImageView workIconView; + public ImageView checkBoxView; /** * The row Id for the first call associated with the call log entry. Used as a key for the map * used to track which call log entries have the action button section expanded. @@ -182,8 +181,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder * voicemail log's call button */ public CharSequence callTypeOrLocation; - /** Whether this row is for a business or not. */ - public boolean isBusiness; /** The contact info for the contact displayed in this list item. */ public volatile ContactInfo info; /** Whether spam feature is enabled, which affects UI. */ @@ -192,8 +189,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder public boolean isSpam; public boolean isCallComposerCapable; + public boolean lightbringerReady; private View.OnClickListener mExpandCollapseListener; + private final View.OnLongClickListener longPressListener; private boolean mVoicemailPrimaryActionButtonClicked; public int dayGroupHeaderVisibility; @@ -207,6 +206,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder Context context, OnClickListener blockReportListener, View.OnClickListener expandCollapseListener, + View.OnLongClickListener longClickListener, CallLogCache callLogCache, CallLogListItemHelper callLogListItemHelper, VoicemailPlaybackPresenter voicemailPlaybackPresenter, @@ -221,10 +221,12 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder mContext = context; mExpandCollapseListener = expandCollapseListener; + longPressListener = longClickListener; mCallLogCache = callLogCache; mCallLogListItemHelper = callLogListItemHelper; mVoicemailPlaybackPresenter = voicemailPlaybackPresenter; mBlockReportListener = blockReportListener; + mCachedNumberLookupService = PhoneNumberCache.get(mContext).getCachedNumberLookupService(); this.rootView = rootView; this.quickContactView = quickContactView; @@ -234,6 +236,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder this.dayGroupHeader = dayGroupHeader; this.primaryActionButtonView = primaryActionButtonView; this.workIconView = (ImageView) rootView.findViewById(R.id.work_profile_icon); + this.checkBoxView = (ImageView) rootView.findViewById(R.id.quick_contact_checkbox); mPhotoSize = mContext.getResources().getDimensionPixelSize(R.dimen.contact_photo_size); // Set text height to false on the TextViews so they don't have extra padding. @@ -246,7 +249,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder } primaryActionButtonView.setOnClickListener(this); primaryActionView.setOnClickListener(mExpandCollapseListener); - primaryActionView.setOnCreateContextMenuListener(this); + primaryActionView.setOnLongClickListener(longPressListener); } public static CallLogListItemViewHolder create( @@ -254,6 +257,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder Context context, OnClickListener blockReportListener, View.OnClickListener expandCollapseListener, + View.OnLongClickListener longClickListener, CallLogCache callLogCache, CallLogListItemHelper callLogListItemHelper, VoicemailPlaybackPresenter voicemailPlaybackPresenter) { @@ -262,6 +266,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder context, blockReportListener, expandCollapseListener, + longClickListener, callLogCache, callLogListItemHelper, voicemailPlaybackPresenter, @@ -285,6 +290,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder context, null, null /* expandCollapseListener */, + null, callLogCache, new CallLogListItemHelper(phoneCallDetailsHelper, resources, callLogCache), null /* voicemailPlaybackPresenter */, @@ -299,107 +305,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder viewHolder.actionsView = new View(context); viewHolder.voicemailPlaybackView = new VoicemailPlaybackLayout(context); viewHolder.workIconView = new ImageButton(context); + viewHolder.checkBoxView = new ImageButton(context); return viewHolder; } - @Override - public void onCreateContextMenu( - final ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { - if (TextUtils.isEmpty(number)) { - return; - } - - if (callType == CallLog.Calls.VOICEMAIL_TYPE) { - menu.setHeaderTitle(mContext.getResources().getText(R.string.voicemail)); - } else { - menu.setHeaderTitle( - PhoneNumberUtilsCompat.createTtsSpannable( - BidiFormatter.getInstance().unicodeWrap(number, TextDirectionHeuristics.LTR))); - } - - menu.add( - ContextMenu.NONE, - R.id.context_menu_copy_to_clipboard, - ContextMenu.NONE, - R.string.action_copy_number_text) - .setOnMenuItemClickListener(this); - - // The edit number before call does not show up if any of the conditions apply: - // 1) Number cannot be called - // 2) Number is the voicemail number - // 3) Number is a SIP address - - if (PhoneNumberHelper.canPlaceCallsTo(number, numberPresentation) - && !mCallLogCache.isVoicemailNumber(accountHandle, number) - && !PhoneNumberHelper.isSipNumber(number)) { - menu.add( - ContextMenu.NONE, - R.id.context_menu_edit_before_call, - ContextMenu.NONE, - R.string.action_edit_number_before_call) - .setOnMenuItemClickListener(this); - } - - if (callType == CallLog.Calls.VOICEMAIL_TYPE - && phoneCallDetailsViews.voicemailTranscriptionView.length() > 0) { - menu.add( - ContextMenu.NONE, - R.id.context_menu_copy_transcript_to_clipboard, - ContextMenu.NONE, - R.string.copy_transcript_text) - .setOnMenuItemClickListener(this); - } - - String e164Number = PhoneNumberUtils.formatNumberToE164(number, countryIso); - boolean isVoicemailNumber = mCallLogCache.isVoicemailNumber(accountHandle, number); - if (!isVoicemailNumber - && FilteredNumbersUtil.canBlockNumber(mContext, e164Number, number) - && FilteredNumberCompat.canAttemptBlockOperations(mContext)) { - boolean isBlocked = blockId != null; - if (isBlocked) { - menu.add( - ContextMenu.NONE, - R.id.context_menu_unblock, - ContextMenu.NONE, - R.string.call_log_action_unblock_number) - .setOnMenuItemClickListener(this); - } else { - if (isSpamFeatureEnabled) { - if (isSpam) { - menu.add( - ContextMenu.NONE, - R.id.context_menu_report_not_spam, - ContextMenu.NONE, - R.string.call_log_action_remove_spam) - .setOnMenuItemClickListener(this); - menu.add( - ContextMenu.NONE, - R.id.context_menu_block, - ContextMenu.NONE, - R.string.call_log_action_block_number) - .setOnMenuItemClickListener(this); - } else { - menu.add( - ContextMenu.NONE, - R.id.context_menu_block_report_spam, - ContextMenu.NONE, - R.string.call_log_action_block_report_number) - .setOnMenuItemClickListener(this); - } - } else { - menu.add( - ContextMenu.NONE, - R.id.context_menu_block, - ContextMenu.NONE, - R.string.call_log_action_block_number) - .setOnMenuItemClickListener(this); - } - } - } - - Logger.get(mContext).logScreenView(ScreenEvent.Type.CALL_LOG_CONTEXT_MENU, (Activity) mContext); - } - @Override public boolean onMenuItemClick(MenuItem item) { int resId = item.getItemId(); @@ -518,7 +427,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder if (!TextUtils.isEmpty(voicemailUri)) { // Treat as voicemail list item; show play button if not expanded. if (!isExpanded) { - primaryActionButtonView.setImageResource(R.drawable.ic_play_arrow_24dp); + primaryActionButtonView.setImageResource(R.drawable.quantum_ic_play_arrow_white_24); primaryActionButtonView.setContentDescription( TextUtils.expandTemplate( mContext.getString(R.string.description_voicemail_action), validNameOrNumber)); @@ -541,7 +450,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder primaryActionButtonView.setContentDescription( TextUtils.expandTemplate( mContext.getString(R.string.description_call_action), validNameOrNumber)); - primaryActionButtonView.setImageResource(R.drawable.ic_call_24dp); + primaryActionButtonView.setImageResource(R.drawable.quantum_ic_call_white_24); primaryActionButtonView.setVisibility(View.VISIBLE); } else { primaryActionButtonView.setTag(null); @@ -607,9 +516,12 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder callButtonView.setVisibility(View.GONE); } - if (shouldShowVideoCallActionButton(canPlaceCallToNumber)) { + if (hasPlacedCarrierVideoCall() || canSupportCarrierVideoCall()) { videoCallButtonView.setTag(IntentProvider.getReturnVideoCallIntentProvider(number)); videoCallButtonView.setVisibility(View.VISIBLE); + } else if (lightbringerReady) { + videoCallButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number)); + videoCallButtonView.setVisibility(View.VISIBLE); } else { videoCallButtonView.setVisibility(View.GONE); } @@ -659,7 +571,8 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder addToExistingContactButtonView.setVisibility(View.GONE); } - if (canPlaceCallToNumber && !isBlockedOrSpam) { + boolean isVoicemailNumber = mCallLogCache.isVoicemailNumber(accountHandle, number); + if (canPlaceCallToNumber && !isBlockedOrSpam && !isVoicemailNumber) { sendMessageView.setTag(IntentProvider.getSendSmsIntentProvider(number)); sendMessageView.setVisibility(View.VISIBLE); } else { @@ -669,7 +582,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder mCallLogListItemHelper.setActionContentDescriptions(this); boolean supportsCallSubject = mCallLogCache.doesAccountSupportCallSubject(accountHandle); - boolean isVoicemailNumber = mCallLogCache.isVoicemailNumber(accountHandle, number); callWithNoteButtonView.setVisibility( supportsCallSubject && !isVoicemailNumber && info != null ? View.VISIBLE : View.GONE); @@ -699,15 +611,22 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder return false; } - private boolean shouldShowVideoCallActionButton(boolean canPlaceCallToNumber) { - return canPlaceCallToNumber && (hasPlacedVideoCall() || canSupportVideoCall()); - } - - private boolean hasPlacedVideoCall() { - return phoneCallDetailsViews.callTypeIcons.isVideoShown(); + private boolean hasPlacedCarrierVideoCall() { + if (!phoneCallDetailsViews.callTypeIcons.isVideoShown()) { + return false; + } + if (accountHandle == null) { + return false; + } + if (accountHandle + .getComponentName() + .equals(getLightbringer().getPhoneAccountComponentName(mContext))) { + return false; + } + return true; } - private boolean canSupportVideoCall() { + private boolean canSupportCarrierVideoCall() { return mCallLogCache.canRelyOnVideoPresence() && info != null && (info.carrierPresence & Phone.CARRIER_PRESENCE_VT_CAPABLE) != 0; @@ -800,7 +719,8 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder int contactType = ContactPhotoManager.TYPE_DEFAULT; if (mCallLogCache.isVoicemailNumber(accountHandle, number)) { contactType = ContactPhotoManager.TYPE_VOICEMAIL; - } else if (isBusiness) { + } else if (mCachedNumberLookupService != null + && mCachedNumberLookupService.isBusiness(info.sourceType)) { contactType = ContactPhotoManager.TYPE_BUSINESS; } else if (numberPresentation == TelecomManager.PRESENTATION_RESTRICTED) { contactType = ContactPhotoManager.TYPE_GENERIC_AVATAR; @@ -810,6 +730,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder @Override public void onClick(View view) { + if (view.getId() == R.id.primary_action_button) { + CallLogAsyncTaskUtil.markCallAsRead(mContext, callIds); + } + if (view.getId() == R.id.primary_action_button && !TextUtils.isEmpty(voicemailUri)) { Logger.get(mContext).logImpression(DialerImpression.Type.VOICEMAIL_PLAY_AUDIO_DIRECTLY); mVoicemailPrimaryActionButtonClicked = true; @@ -947,6 +871,11 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder return callDetailsEntries; } + @NonNull + private Lightbringer getLightbringer() { + return LightbringerComponent.get(mContext).getLightbringer(); + } + public interface OnClickListener { void onBlockReportSpam( diff --git a/java/com/android/dialer/app/calllog/CallLogNotificationsActivity.java b/java/com/android/dialer/app/calllog/CallLogNotificationsActivity.java new file mode 100644 index 000000000..c08d2c02b --- /dev/null +++ b/java/com/android/dialer/app/calllog/CallLogNotificationsActivity.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2017 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.app.calllog; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; +import com.android.dialer.common.LogUtil; +import com.android.dialer.util.PermissionsUtil; + +/** + * Provides operations for managing call-related notifications. This is used to forward intent + * that's requiring to unlock screen and it will never be visible to user. + * + *

It handles the following actions: + * + *

    + *
  • Sending an SMS from a missed call + *
+ */ +public class CallLogNotificationsActivity extends AppCompatActivity { + + public static final String ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION = + "com.android.dialer.calllog.SEND_SMS_FROM_MISSED_CALL_NOTIFICATION"; + + /** + * Extra to be included with {@link #ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION} to identify + * the number to text back. + * + *

It must be a {@link String}. + */ + public static final String EXTRA_MISSED_CALL_NUMBER = "MISSED_CALL_NUMBER"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Intent intent = getIntent(); + + if (!PermissionsUtil.hasPermission(this, android.Manifest.permission.READ_CALL_LOG)) { + return; + } + + String action = intent.getAction(); + switch (action) { + case ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION: + MissedCallNotifier.getInstance(this) + .sendSmsFromMissedCall( + intent.getStringExtra(EXTRA_MISSED_CALL_NUMBER), intent.getData()); + break; + default: + LogUtil.d("CallLogNotificationsActivity.onCreate", "could not handle: " + intent); + break; + } + finish(); + } +} diff --git a/java/com/android/dialer/app/calllog/CallLogNotificationsService.java b/java/com/android/dialer/app/calllog/CallLogNotificationsService.java index 2f26027f9..f67837f8a 100644 --- a/java/com/android/dialer/app/calllog/CallLogNotificationsService.java +++ b/java/com/android/dialer/app/calllog/CallLogNotificationsService.java @@ -71,11 +71,8 @@ public class CallLogNotificationsService extends IntentService { public static final String ACTION_CALL_BACK_FROM_MISSED_CALL_NOTIFICATION = "com.android.dialer.calllog.CALL_BACK_FROM_MISSED_CALL_NOTIFICATION"; - public static final String ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION = - "com.android.dialer.calllog.SEND_SMS_FROM_MISSED_CALL_NOTIFICATION"; /** - * Extra to be included with {@link #ACTION_UPDATE_MISSED_CALL_NOTIFICATIONS}, {@link - * #ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION} and {@link + * Extra to be included with {@link #ACTION_UPDATE_MISSED_CALL_NOTIFICATIONS} and {@link * #ACTION_CALL_BACK_FROM_MISSED_CALL_NOTIFICATION} to identify the number to display, call or * text back. * @@ -226,11 +223,6 @@ public class CallLogNotificationsService extends IntentService { .callBackFromMissedCall( intent.getStringExtra(EXTRA_MISSED_CALL_NUMBER), intent.getData()); break; - case ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION: - MissedCallNotifier.getInstance(this) - .sendSmsFromMissedCall( - intent.getStringExtra(EXTRA_MISSED_CALL_NUMBER), intent.getData()); - break; default: LogUtil.d("CallLogNotificationsService.onHandleIntent", "could not handle: " + intent); break; diff --git a/java/com/android/dialer/app/calllog/ClearCallLogDialog.java b/java/com/android/dialer/app/calllog/ClearCallLogDialog.java index 0c9bd4b35..a01b89527 100644 --- a/java/com/android/dialer/app/calllog/ClearCallLogDialog.java +++ b/java/com/android/dialer/app/calllog/ClearCallLogDialog.java @@ -54,6 +54,7 @@ public class ClearCallLogDialog extends DialogFragment { ProgressDialog.show( getActivity(), getString(R.string.clearCallLogProgress_title), "", true, false); progressDialog.setOwnerActivity(getActivity()); + CallLogNotificationsService.markNewMissedCallsAsOld(getContext(), null); final AsyncTask task = new AsyncTask() { @Override diff --git a/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java b/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java index b0a6ee135..dfe5776d8 100644 --- a/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java +++ b/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java @@ -40,7 +40,7 @@ import com.android.dialer.app.DialtactsActivity; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall; import com.android.dialer.app.contactinfo.ContactPhotoLoader; -import com.android.dialer.app.list.ListsFragment; +import com.android.dialer.app.list.DialtactsPagerAdapter; import com.android.dialer.blocking.FilteredNumbersUtil; import com.android.dialer.common.LogUtil; import com.android.dialer.logging.Logger; @@ -274,7 +274,8 @@ public class DefaultVoicemailNotifier { } private PendingIntent newVoicemailIntent(@Nullable NewCall voicemail) { - Intent intent = DialtactsActivity.getShowTabIntent(context, ListsFragment.TAB_INDEX_VOICEMAIL); + Intent intent = + DialtactsActivity.getShowTabIntent(context, DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL); // TODO (b/35486204): scroll to this voicemail if (voicemail != null) { intent.setData(voicemail.voicemailUri); diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index c53e3ec5e..8b77c3f51 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -29,6 +29,7 @@ import com.android.dialer.calldetails.CallDetailsActivity; import com.android.dialer.calldetails.nano.CallDetailsEntries; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.callintent.nano.CallInitiationType; +import com.android.dialer.lightbringer.LightbringerComponent; import com.android.dialer.util.CallUtil; import com.android.dialer.util.IntentUtil; import java.util.ArrayList; @@ -75,6 +76,15 @@ public abstract class IntentProvider { }; } + public static IntentProvider getLightbringerIntentProvider(String number) { + return new IntentProvider() { + @Override + public Intent getIntent(Context context) { + return LightbringerComponent.get(context).getLightbringer().getIntent(context, number); + } + }; + } + public static IntentProvider getReturnVoicemailCallIntentProvider() { return new IntentProvider() { @Override diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index 5b5661615..aa04d81eb 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -40,7 +40,7 @@ import com.android.dialer.app.DialtactsActivity; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall; import com.android.dialer.app.contactinfo.ContactPhotoLoader; -import com.android.dialer.app.list.ListsFragment; +import com.android.dialer.app.list.DialtactsPagerAdapter; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.common.LogUtil; @@ -48,7 +48,6 @@ import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.notification.NotificationChannelManager.Channel; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.phonenumberutil.PhoneNumberHelper; -import com.android.dialer.telecom.TelecomUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; import java.util.HashSet; @@ -187,11 +186,7 @@ public class MissedCallNotifier { .setOnlyAlertOnce(useCallList) .setPublicVersion(publicSummaryBuilder.build()); - NotificationChannelManager.applyChannel( - groupSummary, - context, - Channel.MISSED_CALL, - PhoneAccountHandles.getAccount(context, useCallList ? newCalls.get(0) : null)); + NotificationChannelManager.applyChannel(groupSummary, context, Channel.MISSED_CALL, null); Notification notification = groupSummary.build(); configureLedOnNotification(notification); @@ -291,7 +286,7 @@ public class MissedCallNotifier { if (!PhoneNumberHelper.isUriNumber(call.number)) { builder.addAction( new Notification.Action.Builder( - Icon.createWithResource(context, R.drawable.ic_message_24dp), + Icon.createWithResource(context, R.drawable.quantum_ic_message_white_24), context.getString(R.string.notification_missedCall_message), createSendSmsFromNotificationPendingIntent(call.number, call.callsUri)) .build()); @@ -322,8 +317,7 @@ public class MissedCallNotifier { .setDeleteIntent(createClearMissedCallsPendingIntent(call.callsUri)) .setContentIntent(createCallLogPendingIntent(call.callsUri)); - NotificationChannelManager.applyChannel( - builder, context, Channel.MISSED_CALL, PhoneAccountHandles.getAccount(context, call)); + NotificationChannelManager.applyChannel(builder, context, Channel.MISSED_CALL, null); return builder; } @@ -332,7 +326,6 @@ public class MissedCallNotifier { public void callBackFromMissedCall(String number, Uri callUri) { closeSystemDialogs(context); CallLogNotificationsQueryHelper.removeMissedCallNotifications(context, callUri); - TelecomUtil.cancelMissedCallsNotification(context); DialerUtils.startActivityWithErrorToast( context, new CallIntentBuilder(number, CallInitiationType.Type.MISSED_CALL_NOTIFICATION) @@ -341,11 +334,9 @@ public class MissedCallNotifier { } /** Trigger an intent to send an sms from a missed call number. */ - @WorkerThread public void sendSmsFromMissedCall(String number, Uri callUri) { closeSystemDialogs(context); CallLogNotificationsQueryHelper.removeMissedCallNotifications(context, callUri); - TelecomUtil.cancelMissedCallsNotification(context); DialerUtils.startActivityWithErrorToast( context, IntentUtil.getSendSmsIntent(number).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); } @@ -367,7 +358,7 @@ public class MissedCallNotifier { */ private PendingIntent createCallLogPendingIntent(@Nullable Uri callUri) { Intent contentIntent = - DialtactsActivity.getShowTabIntent(context, ListsFragment.TAB_INDEX_HISTORY); + DialtactsActivity.getShowTabIntent(context, DialtactsPagerAdapter.TAB_INDEX_HISTORY); // TODO (b/35486204): scroll to call contentIntent.setData(callUri); return PendingIntent.getActivity(context, 0, contentIntent, PendingIntent.FLAG_UPDATE_CURRENT); @@ -393,13 +384,13 @@ public class MissedCallNotifier { private PendingIntent createSendSmsFromNotificationPendingIntent( String number, @NonNull Uri callUri) { - Intent intent = new Intent(context, CallLogNotificationsService.class); - intent.setAction(CallLogNotificationsService.ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION); - intent.putExtra(CallLogNotificationsService.EXTRA_MISSED_CALL_NUMBER, number); + Intent intent = new Intent(context, CallLogNotificationsActivity.class); + intent.setAction(CallLogNotificationsActivity.ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION); + intent.putExtra(CallLogNotificationsActivity.EXTRA_MISSED_CALL_NUMBER, number); intent.setData(callUri); // Use FLAG_UPDATE_CURRENT to make sure any previous pending intent is updated with the new // extra. - return PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); + return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); } /** Configures a notification to emit the blinky notification light. */ diff --git a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java index b0fa1ed45..acffffb1d 100644 --- a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java +++ b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java @@ -24,6 +24,7 @@ import android.telecom.PhoneAccountHandle; import com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall; import com.android.dialer.common.LogUtil; import com.android.dialer.telecom.TelecomUtil; +import java.util.List; /** Methods to help extract {@link PhoneAccount} information from database and Telecomm sources. */ class PhoneAccountHandles { @@ -37,6 +38,11 @@ class PhoneAccountHandles { "accountComponentName == null || callToNotify.accountId == null"); handle = TelecomUtil.getDefaultOutgoingPhoneAccount(context, PhoneAccount.SCHEME_TEL); if (handle == null) { + List callCapablePhoneAccounts = + TelecomUtil.getCallCapablePhoneAccounts(context); + if (!callCapablePhoneAccounts.isEmpty()) { + return callCapablePhoneAccounts.get(0); + } return null; } } else { diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java index 15f860009..bc78eda02 100644 --- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java +++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java @@ -31,6 +31,7 @@ import com.android.dialer.app.R; import com.android.dialer.app.calllog.calllogcache.CallLogCache; import com.android.dialer.calllogutils.PhoneCallDetails; import com.android.dialer.oem.MotorolaUtils; +import com.android.dialer.phonenumbercache.CachedNumberLookupService.CachedContactInfo; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.util.DialerUtils; import java.util.ArrayList; @@ -205,7 +206,7 @@ public class PhoneCallDetailsHelper { && !PhoneNumberHelper.isUriNumber(details.number.toString()) && !mCallLogCache.isVoicemailNumber(details.accountHandle, details.number)) { - if (TextUtils.isEmpty(details.namePrimary) && !TextUtils.isEmpty(details.geocode)) { + if (shouldShowLocation(details)) { numberFormattedLabel = details.geocode; } else if (!(details.numberType == Phone.TYPE_CUSTOM && TextUtils.isEmpty(details.numberLabel))) { @@ -223,6 +224,22 @@ public class PhoneCallDetailsHelper { return numberFormattedLabel; } + /** Returns true if primary name is empty or the data is from Cequint Caller ID. */ + private static boolean shouldShowLocation(PhoneCallDetails details) { + if (TextUtils.isEmpty(details.geocode)) { + return false; + } + // For caller ID provided by Cequint we want to show the geo location. + if (details.sourceType == CachedContactInfo.SOURCE_TYPE_CEQUINT_CALLER_ID) { + return true; + } + // Don't bother showing geo location for contacts. + if (!TextUtils.isEmpty(details.namePrimary)) { + return false; + } + return true; + } + public void setPhoneTypeLabelForTest(CharSequence phoneTypeLabel) { this.mPhoneTypeLabelForTest = phoneTypeLabel; } diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java index edbe5c6ed..5e820a750 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java @@ -16,14 +16,12 @@ package com.android.dialer.app.calllog; -import android.app.Activity; import android.content.Intent; import android.database.ContentObserver; import android.media.AudioManager; import android.os.Bundle; import android.provider.CallLog; import android.provider.VoicemailContract; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -119,22 +117,22 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { } @Override - public void onPageResume(@Nullable Activity activity) { - LogUtil.d("VisualVoicemailCallLogFragment.onPageResume", null); - super.onPageResume(activity); - if (activity != null) { - activity.sendBroadcast(new Intent(VoicemailContract.ACTION_SYNC_VOICEMAIL)); - Logger.get(activity).logImpression(DialerImpression.Type.VVM_TAB_VIEWED); - activity.setVolumeControlStream(VoicemailAudioManager.PLAYBACK_STREAM); + public void onVisible() { + LogUtil.enterBlock("VisualVoicemailCallLogFragment.onPageSelected"); + super.onVisible(); + if (getActivity() != null) { + getActivity().sendBroadcast(new Intent(VoicemailContract.ACTION_SYNC_VOICEMAIL)); + Logger.get(getActivity()).logImpression(DialerImpression.Type.VVM_TAB_VIEWED); + getActivity().setVolumeControlStream(VoicemailAudioManager.PLAYBACK_STREAM); } } @Override - public void onPagePause(@Nullable Activity activity) { - LogUtil.d("VisualVoicemailCallLogFragment.onPagePause", null); - super.onPagePause(activity); - if (activity != null) { - activity.setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); + public void onNotVisible() { + LogUtil.enterBlock("VisualVoicemailCallLogFragment.onPageUnselected"); + super.onNotVisible(); + if (getActivity() != null) { + getActivity().setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); } } } diff --git a/java/com/android/dialer/app/contactinfo/ContactInfoCache.java b/java/com/android/dialer/app/contactinfo/ContactInfoCache.java index ab5541b6f..85a9c3ef1 100644 --- a/java/com/android/dialer/app/contactinfo/ContactInfoCache.java +++ b/java/com/android/dialer/app/contactinfo/ContactInfoCache.java @@ -153,9 +153,9 @@ public class ContactInfoCache { if (request.isLocalRequest()) { info = mContactInfoHelper.lookupNumber(request.number, request.countryIso); // TODO: Maybe skip look up if it's already available in cached number lookup service. - long start = SystemClock.uptimeMillis(); + long start = SystemClock.elapsedRealtime(); mContactInfoHelper.updateFromCequintCallerId(info, request.number); - long time = SystemClock.uptimeMillis() - start; + long time = SystemClock.elapsedRealtime() - start; LogUtil.d("ContactInfoCache.queryContactInfo", "Cequint Caller Id look up takes %d ms", time); if (request.type == ContactInfoRequest.TYPE_LOCAL_AND_REMOTE) { if (!mContactInfoHelper.hasName(info)) { diff --git a/java/com/android/dialer/app/list/AllContactsFragment.java b/java/com/android/dialer/app/list/AllContactsFragment.java index 29c0ec47f..04609970a 100644 --- a/java/com/android/dialer/app/list/AllContactsFragment.java +++ b/java/com/android/dialer/app/list/AllContactsFragment.java @@ -28,7 +28,6 @@ import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.QuickContact; -import android.support.annotation.Nullable; import android.support.v13.app.FragmentCompat; import android.view.LayoutInflater; import android.view.View; @@ -39,10 +38,8 @@ import com.android.contacts.common.list.ContactEntryListFragment; import com.android.contacts.common.list.ContactListFilter; import com.android.contacts.common.list.DefaultContactListAdapter; import com.android.dialer.app.R; -import com.android.dialer.app.list.ListsFragment.ListsPage; import com.android.dialer.app.widget.EmptyContentView; import com.android.dialer.app.widget.EmptyContentView.OnEmptyViewActionButtonClickedListener; -import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; @@ -50,8 +47,7 @@ import com.android.dialer.util.PermissionsUtil; /** Fragments to show all contacts with phone numbers. */ public class AllContactsFragment extends ContactEntryListFragment - implements ListsPage, - OnEmptyViewActionButtonClickedListener, + implements OnEmptyViewActionButtonClickedListener, FragmentCompat.OnRequestPermissionsResultCallback { private static final int READ_CONTACTS_PERMISSION_REQUEST_CODE = 1; @@ -193,14 +189,4 @@ public class AllContactsFragment extends ContactEntryListFragment fragments = new ArrayList<>(); + private final String[] tabTitles; + private final boolean useNewSpeedDialTab; + + private OldSpeedDialFragment oldSpeedDialFragment; + private SpeedDialFragment speedDialFragment; + private CallLogFragment callLogFragment; + private AllContactsFragment contactsFragment; + private CallLogFragment voicemailFragment; + + public boolean hasActiveVoicemailProvider; + + public DialtactsPagerAdapter( + Context context, FragmentManager fm, String[] tabTitles, boolean hasVoicemailProvider) { + super(fm); + useNewSpeedDialTab = + ConfigProviderBindings.get(context).getBoolean("enable_new_favorites_tab", false); + this.tabTitles = tabTitles; + hasActiveVoicemailProvider = hasVoicemailProvider; + fragments.addAll(Collections.nCopies(TAB_COUNT_WITH_VOICEMAIL, null)); + } + + @Override + public long getItemId(int position) { + return getRtlPosition(position); + } + + @Override + public Fragment getItem(int position) { + LogUtil.d("ViewPagerAdapter.getItem", "position: %d", position); + switch (getRtlPosition(position)) { + case TAB_INDEX_SPEED_DIAL: + if (useNewSpeedDialTab) { + if (speedDialFragment == null) { + speedDialFragment = SpeedDialFragment.newInstance(); + } + return speedDialFragment; + } else { + if (oldSpeedDialFragment == null) { + oldSpeedDialFragment = new OldSpeedDialFragment(); + } + return oldSpeedDialFragment; + } + case TAB_INDEX_HISTORY: + if (callLogFragment == null) { + callLogFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); + } + return callLogFragment; + case TAB_INDEX_ALL_CONTACTS: + if (contactsFragment == null) { + contactsFragment = new AllContactsFragment(); + } + return contactsFragment; + case TAB_INDEX_VOICEMAIL: + if (voicemailFragment == null) { + voicemailFragment = new VisualVoicemailCallLogFragment(); + LogUtil.v( + "ViewPagerAdapter.getItem", + "new VisualVoicemailCallLogFragment: %s", + voicemailFragment); + } + return voicemailFragment; + default: + throw Assert.createIllegalStateFailException("No fragment at position " + position); + } + } + + @Override + public Fragment instantiateItem(ViewGroup container, int position) { + LogUtil.d("ViewPagerAdapter.instantiateItem", "position: %d", position); + // On rotation the FragmentManager handles rotation. Therefore getItem() isn't called. + // Copy the fragments that the FragmentManager finds so that we can store them in + // instance variables for later. + final Fragment fragment = (Fragment) super.instantiateItem(container, position); + if (fragment instanceof OldSpeedDialFragment) { + oldSpeedDialFragment = (OldSpeedDialFragment) fragment; + } else if (fragment instanceof SpeedDialFragment) { + speedDialFragment = (SpeedDialFragment) fragment; + } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { + callLogFragment = (CallLogFragment) fragment; + } else if (fragment instanceof AllContactsFragment) { + contactsFragment = (AllContactsFragment) fragment; + } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_VOICEMAIL) { + voicemailFragment = (CallLogFragment) fragment; + LogUtil.v("ViewPagerAdapter.instantiateItem", voicemailFragment.toString()); + } + fragments.set(position, fragment); + return fragment; + } + + /** + * When {@link android.support.v4.view.PagerAdapter#notifyDataSetChanged} is called, this method + * is called on all pages to determine whether they need to be recreated. When the voicemail tab + * is removed, the view needs to be recreated by returning POSITION_NONE. If notifyDataSetChanged + * is called for some other reason, the voicemail tab is recreated only if it is active. All other + * tabs do not need to be recreated and POSITION_UNCHANGED is returned. + */ + @Override + public int getItemPosition(Object object) { + return !hasActiveVoicemailProvider && fragments.indexOf(object) == TAB_INDEX_VOICEMAIL + ? POSITION_NONE + : POSITION_UNCHANGED; + } + + @Override + public int getCount() { + return hasActiveVoicemailProvider ? TAB_COUNT_WITH_VOICEMAIL : TAB_COUNT_DEFAULT; + } + + @Override + public CharSequence getPageTitle(@TabIndex int position) { + return tabTitles[position]; + } + + public int getRtlPosition(int position) { + if (ViewUtil.isRtl()) { + return getCount() - 1 - position; + } + return position; + } + + public void removeVoicemailFragment(FragmentManager manager) { + if (voicemailFragment != null) { + manager.beginTransaction().remove(voicemailFragment).commitAllowingStateLoss(); + voicemailFragment = null; + } + } + + public boolean hasActiveVoicemailProvider() { + return hasActiveVoicemailProvider; + } + + public void setHasActiveVoicemailProvider(boolean hasActiveVoicemailProvider) { + this.hasActiveVoicemailProvider = hasActiveVoicemailProvider; + } +} diff --git a/java/com/android/dialer/app/list/ListsFragment.java b/java/com/android/dialer/app/list/ListsFragment.java index 3b94e1562..bf29ef310 100644 --- a/java/com/android/dialer/app/list/ListsFragment.java +++ b/java/com/android/dialer/app/list/ListsFragment.java @@ -13,11 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.android.dialer.app.list; -import android.app.Activity; +import static com.android.dialer.app.list.DialtactsPagerAdapter.TAB_COUNT_WITH_VOICEMAIL; +import static com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_ALL_CONTACTS; +import static com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_HISTORY; +import static com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL; +import static com.android.dialer.app.list.DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL; + import android.app.Fragment; -import android.app.FragmentManager; import android.content.SharedPreferences; import android.database.ContentObserver; import android.database.Cursor; @@ -26,8 +31,6 @@ import android.os.Handler; import android.os.Trace; import android.preference.PreferenceManager; import android.provider.VoicemailContract; -import android.support.annotation.Nullable; -import android.support.v13.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; import android.view.LayoutInflater; @@ -37,7 +40,6 @@ import com.android.contacts.common.list.ViewPagerTabs; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogFragment; import com.android.dialer.app.calllog.CallLogNotificationsService; -import com.android.dialer.app.calllog.VisualVoicemailCallLogFragment; import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler; import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler.Source; import com.android.dialer.common.LogUtil; @@ -45,11 +47,10 @@ import com.android.dialer.database.CallLogQueryHandler; import com.android.dialer.logging.Logger; import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.logging.nano.ScreenEvent; -import com.android.dialer.util.ViewUtil; +import com.android.dialer.speeddial.SpeedDialFragment; import com.android.dialer.voicemailstatus.VisualVoicemailEnabledChecker; import com.android.dialer.voicemailstatus.VoicemailStatusHelper; import java.util.ArrayList; -import java.util.List; /** * Fragment that is used as the main screen of the Dialer. @@ -61,51 +62,18 @@ import java.util.List; public class ListsFragment extends Fragment implements ViewPager.OnPageChangeListener, CallLogQueryHandler.Listener { - /** Every fragment in the list show implement this interface. */ - public interface ListsPage { - - /** - * Called when the page is resumed, including selecting the page or activity resume. Note: This - * is called before the page fragment is attached to a activity. - * - * @param activity the activity hosting the ListFragment - */ - void onPageResume(@Nullable Activity activity); - - /** - * Called when the page is paused, including selecting another page or activity pause. Note: - * This is called after the page fragment is detached from a activity. - * - * @param activity the activity hosting the ListFragment - */ - void onPagePause(@Nullable Activity activity); - } - - public static final int TAB_INDEX_SPEED_DIAL = 0; - public static final int TAB_INDEX_HISTORY = 1; - public static final int TAB_INDEX_ALL_CONTACTS = 2; - public static final int TAB_INDEX_VOICEMAIL = 3; - public static final int TAB_COUNT_DEFAULT = 3; - public static final int TAB_COUNT_WITH_VOICEMAIL = 4; private static final String TAG = "ListsFragment"; private ViewPager mViewPager; private ViewPagerTabs mViewPagerTabs; - private ViewPagerAdapter mViewPagerAdapter; + private DialtactsPagerAdapter mAdapter; private RemoveView mRemoveView; private View mRemoveViewContent; - private SpeedDialFragment mSpeedDialFragment; - private CallLogFragment mHistoryFragment; - private AllContactsFragment mAllContactsFragment; - private CallLogFragment mVoicemailFragment; - private ListsPage mCurrentPage; + private Fragment mCurrentPage; private SharedPreferences mPrefs; - private boolean mHasActiveVoicemailProvider; private boolean mHasFetchedVoicemailStatus; private boolean mShowVoicemailTabAfterVoicemailStatusIsFetched; private VoicemailStatusHelper mVoicemailStatusHelper; private final ArrayList mOnPageChangeListeners = new ArrayList<>(); - private String[] mTabTitles; - private int[] mTabIcons; /** The position of the currently selected tab. */ private int mTabIndex = TAB_INDEX_SPEED_DIAL; @@ -125,15 +93,8 @@ public class ListsFragment extends Fragment LogUtil.d("ListsFragment.onCreate", null); Trace.beginSection(TAG + " onCreate"); super.onCreate(savedInstanceState); - mVoicemailStatusHelper = new VoicemailStatusHelper(); - mHasFetchedVoicemailStatus = false; - mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); - mHasActiveVoicemailProvider = - mPrefs.getBoolean( - VisualVoicemailEnabledChecker.PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false); - Trace.endSection(); } @@ -153,17 +114,17 @@ public class ListsFragment extends Fragment mCallLogQueryHandler.fetchVoicemailStatus(); mCallLogQueryHandler.fetchMissedCallsUnreadCount(); Trace.endSection(); - mCurrentPage = getListsPage(mViewPager.getCurrentItem()); - if (mCurrentPage != null) { - mCurrentPage.onPageResume(getActivity()); + mCurrentPage = mAdapter.getItem(mViewPager.getCurrentItem()); + if (mCurrentPage instanceof CallLogFragment) { + ((CallLogFragment) mCurrentPage).onVisible(); } } @Override public void onPause() { LogUtil.d("ListsFragment.onPause", null); - if (mCurrentPage != null) { - mCurrentPage.onPagePause(getActivity()); + if (mCurrentPage instanceof CallLogFragment) { + ((CallLogFragment) mCurrentPage).onNotVisible(); } super.onPause(); } @@ -183,27 +144,34 @@ public class ListsFragment extends Fragment final View parentView = inflater.inflate(R.layout.lists_fragment, container, false); Trace.endSection(); Trace.beginSection(TAG + " setup views"); + + String[] tabTitles = new String[TAB_COUNT_WITH_VOICEMAIL]; + tabTitles[TAB_INDEX_SPEED_DIAL] = getResources().getString(R.string.tab_speed_dial); + tabTitles[TAB_INDEX_HISTORY] = getResources().getString(R.string.tab_history); + tabTitles[TAB_INDEX_ALL_CONTACTS] = getResources().getString(R.string.tab_all_contacts); + tabTitles[TAB_INDEX_VOICEMAIL] = getResources().getString(R.string.tab_voicemail); + + int[] tabIcons = new int[TAB_COUNT_WITH_VOICEMAIL]; + tabIcons[TAB_INDEX_SPEED_DIAL] = R.drawable.quantum_ic_grade_white_24; + tabIcons[TAB_INDEX_HISTORY] = R.drawable.quantum_ic_schedule_white_24; + tabIcons[TAB_INDEX_ALL_CONTACTS] = R.drawable.quantum_ic_people_white_24; + tabIcons[TAB_INDEX_VOICEMAIL] = R.drawable.quantum_ic_voicemail_white_24; + mViewPager = (ViewPager) parentView.findViewById(R.id.lists_pager); - mViewPagerAdapter = new ViewPagerAdapter(getChildFragmentManager()); - mViewPager.setAdapter(mViewPagerAdapter); + mAdapter = + new DialtactsPagerAdapter( + getContext(), + getChildFragmentManager(), + tabTitles, + mPrefs.getBoolean( + VisualVoicemailEnabledChecker.PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false)); + mViewPager.setAdapter(mAdapter); mViewPager.setOffscreenPageLimit(TAB_COUNT_WITH_VOICEMAIL - 1); mViewPager.addOnPageChangeListener(this); showTab(TAB_INDEX_SPEED_DIAL); - mTabTitles = new String[TAB_COUNT_WITH_VOICEMAIL]; - mTabTitles[TAB_INDEX_SPEED_DIAL] = getResources().getString(R.string.tab_speed_dial); - mTabTitles[TAB_INDEX_HISTORY] = getResources().getString(R.string.tab_history); - mTabTitles[TAB_INDEX_ALL_CONTACTS] = getResources().getString(R.string.tab_all_contacts); - mTabTitles[TAB_INDEX_VOICEMAIL] = getResources().getString(R.string.tab_voicemail); - - mTabIcons = new int[TAB_COUNT_WITH_VOICEMAIL]; - mTabIcons[TAB_INDEX_SPEED_DIAL] = R.drawable.ic_grade_24dp; - mTabIcons[TAB_INDEX_HISTORY] = R.drawable.ic_schedule_24dp; - mTabIcons[TAB_INDEX_ALL_CONTACTS] = R.drawable.ic_people_24dp; - mTabIcons[TAB_INDEX_VOICEMAIL] = R.drawable.ic_voicemail_24dp; - mViewPagerTabs = (ViewPagerTabs) parentView.findViewById(R.id.lists_pager_header); - mViewPagerTabs.configureTabIcons(mTabIcons); + mViewPagerTabs.configureTabIcons(tabIcons); mViewPagerTabs.setViewPager(mViewPager); addOnPageChangeListener(mViewPagerTabs); @@ -239,20 +207,20 @@ public class ListsFragment extends Fragment */ public void showTab(int index) { if (index == TAB_INDEX_VOICEMAIL) { - if (mHasActiveVoicemailProvider) { - mViewPager.setCurrentItem(getRtlPosition(TAB_INDEX_VOICEMAIL)); + if (mAdapter.hasActiveVoicemailProvider()) { + mViewPager.setCurrentItem(mAdapter.getRtlPosition(TAB_INDEX_VOICEMAIL)); } else if (!mHasFetchedVoicemailStatus) { // Try to show the voicemail tab after the voicemail status returns. mShowVoicemailTabAfterVoicemailStatusIsFetched = true; } } else if (index < getTabCount()) { - mViewPager.setCurrentItem(getRtlPosition(index)); + mViewPager.setCurrentItem(mAdapter.getRtlPosition(index)); } } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - mTabIndex = getRtlPosition(position); + mTabIndex = mAdapter.getRtlPosition(position); final int count = mOnPageChangeListeners.size(); for (int i = 0; i < count; i++) { @@ -263,7 +231,7 @@ public class ListsFragment extends Fragment @Override public void onPageSelected(int position) { LogUtil.i("ListsFragment.onPageSelected", "position: %d", position); - mTabIndex = getRtlPosition(position); + mTabIndex = mAdapter.getRtlPosition(position); // Show the tab which has been selected instead. mShowVoicemailTabAfterVoicemailStatusIsFetched = false; @@ -274,12 +242,12 @@ public class ListsFragment extends Fragment } sendScreenViewForCurrentPosition(); - if (mCurrentPage != null) { - mCurrentPage.onPagePause(getActivity()); + if (mCurrentPage instanceof CallLogFragment) { + ((CallLogFragment) mCurrentPage).onNotVisible(); } - mCurrentPage = getListsPage(position); - if (mCurrentPage != null) { - mCurrentPage.onPageResume(getActivity()); + mCurrentPage = mAdapter.getItem(position); + if (mCurrentPage instanceof CallLogFragment) { + ((CallLogFragment) mCurrentPage).onVisible(); } } @@ -302,19 +270,19 @@ public class ListsFragment extends Fragment VoicemailStatusCorruptionHandler.maybeFixVoicemailStatus( getContext(), statusCursor, Source.Activity); - // Update mHasActiveVoicemailProvider, which controls the number of tabs displayed. + // Update hasActiveVoicemailProvider, which controls the number of tabs displayed. boolean hasActiveVoicemailProvider = mVoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor) > 0; - if (hasActiveVoicemailProvider != mHasActiveVoicemailProvider) { - mHasActiveVoicemailProvider = hasActiveVoicemailProvider; - mViewPagerAdapter.notifyDataSetChanged(); + if (hasActiveVoicemailProvider != mAdapter.hasActiveVoicemailProvider()) { + mAdapter.setHasActiveVoicemailProvider(hasActiveVoicemailProvider); + mAdapter.notifyDataSetChanged(); if (hasActiveVoicemailProvider) { Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_TAB_VISIBLE); mViewPagerTabs.updateTab(TAB_INDEX_VOICEMAIL); } else { mViewPagerTabs.removeTab(TAB_INDEX_VOICEMAIL); - removeVoicemailFragment(); + mAdapter.removeVoicemailFragment(getChildFragmentManager()); } mPrefs @@ -329,7 +297,7 @@ public class ListsFragment extends Fragment mCallLogQueryHandler.fetchVoicemailUnreadCount(); } - if (mHasActiveVoicemailProvider && mShowVoicemailTabAfterVoicemailStatusIsFetched) { + if (mAdapter.hasActiveVoicemailProvider() && mShowVoicemailTabAfterVoicemailStatusIsFetched) { mShowVoicemailTabAfterVoicemailStatusIsFetched = false; showTab(TAB_INDEX_VOICEMAIL); } @@ -386,7 +354,7 @@ public class ListsFragment extends Fragment public void updateTabUnreadCounts() { if (mCallLogQueryHandler != null) { mCallLogQueryHandler.fetchMissedCallsUnreadCount(); - if (mHasActiveVoicemailProvider) { + if (mAdapter.hasActiveVoicemailProvider()) { mCallLogQueryHandler.fetchVoicemailUnreadCount(); } } @@ -406,8 +374,11 @@ public class ListsFragment extends Fragment mRemoveView.animate().alpha(show ? 1 : 0).start(); } - public SpeedDialFragment getSpeedDialFragment() { - return mSpeedDialFragment; + public boolean hasFrequents() { + Fragment page = mAdapter.getItem(mAdapter.getRtlPosition(TAB_INDEX_SPEED_DIAL)); + return page instanceof OldSpeedDialFragment + ? ((OldSpeedDialFragment) page).hasFrequents() + : ((SpeedDialFragment) page).hasFrequents(); } public RemoveView getRemoveView() { @@ -415,14 +386,7 @@ public class ListsFragment extends Fragment } public int getTabCount() { - return mViewPagerAdapter.getCount(); - } - - private int getRtlPosition(int position) { - if (ViewUtil.isRtl()) { - return mViewPagerAdapter.getCount() - 1 - position; - } - return position; + return mAdapter.getCount(); } public void sendScreenViewForCurrentPosition() { @@ -449,122 +413,4 @@ public class ListsFragment extends Fragment } Logger.get(getActivity()).logScreenView(screenType, getActivity()); } - - private void removeVoicemailFragment() { - if (mVoicemailFragment != null) { - getChildFragmentManager() - .beginTransaction() - .remove(mVoicemailFragment) - .commitAllowingStateLoss(); - mVoicemailFragment = null; - } - } - - private ListsPage getListsPage(int position) { - switch (getRtlPosition(position)) { - case TAB_INDEX_SPEED_DIAL: - return mSpeedDialFragment; - case TAB_INDEX_HISTORY: - return mHistoryFragment; - case TAB_INDEX_ALL_CONTACTS: - return mAllContactsFragment; - case TAB_INDEX_VOICEMAIL: - return mVoicemailFragment; - } - throw new IllegalStateException("No fragment at position " + position); - } - - public class ViewPagerAdapter extends FragmentPagerAdapter { - - private final List mFragments = new ArrayList<>(); - - public ViewPagerAdapter(FragmentManager fm) { - super(fm); - for (int i = 0; i < TAB_COUNT_WITH_VOICEMAIL; i++) { - mFragments.add(null); - } - } - - @Override - public long getItemId(int position) { - return getRtlPosition(position); - } - - @Override - public Fragment getItem(int position) { - LogUtil.d("ViewPagerAdapter.getItem", "position: %d", position); - switch (getRtlPosition(position)) { - case TAB_INDEX_SPEED_DIAL: - if (mSpeedDialFragment == null) { - mSpeedDialFragment = new SpeedDialFragment(); - } - return mSpeedDialFragment; - case TAB_INDEX_HISTORY: - if (mHistoryFragment == null) { - mHistoryFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); - } - return mHistoryFragment; - case TAB_INDEX_ALL_CONTACTS: - if (mAllContactsFragment == null) { - mAllContactsFragment = new AllContactsFragment(); - } - return mAllContactsFragment; - case TAB_INDEX_VOICEMAIL: - if (mVoicemailFragment == null) { - mVoicemailFragment = new VisualVoicemailCallLogFragment(); - LogUtil.v( - "ViewPagerAdapter.getItem", - "new VisualVoicemailCallLogFragment: %s", - mVoicemailFragment); - } - return mVoicemailFragment; - } - throw new IllegalStateException("No fragment at position " + position); - } - - @Override - public Fragment instantiateItem(ViewGroup container, int position) { - LogUtil.d("ViewPagerAdapter.instantiateItem", "position: %d", position); - // On rotation the FragmentManager handles rotation. Therefore getItem() isn't called. - // Copy the fragments that the FragmentManager finds so that we can store them in - // instance variables for later. - final Fragment fragment = (Fragment) super.instantiateItem(container, position); - if (fragment instanceof SpeedDialFragment) { - mSpeedDialFragment = (SpeedDialFragment) fragment; - } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { - mHistoryFragment = (CallLogFragment) fragment; - } else if (fragment instanceof AllContactsFragment) { - mAllContactsFragment = (AllContactsFragment) fragment; - } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_VOICEMAIL) { - mVoicemailFragment = (CallLogFragment) fragment; - LogUtil.v("ViewPagerAdapter.instantiateItem", mVoicemailFragment.toString()); - } - mFragments.set(position, fragment); - return fragment; - } - - /** - * When {@link android.support.v4.view.PagerAdapter#notifyDataSetChanged} is called, this method - * is called on all pages to determine whether they need to be recreated. When the voicemail tab - * is removed, the view needs to be recreated by returning POSITION_NONE. If - * notifyDataSetChanged is called for some other reason, the voicemail tab is recreated only if - * it is active. All other tabs do not need to be recreated and POSITION_UNCHANGED is returned. - */ - @Override - public int getItemPosition(Object object) { - return !mHasActiveVoicemailProvider && mFragments.indexOf(object) == TAB_INDEX_VOICEMAIL - ? POSITION_NONE - : POSITION_UNCHANGED; - } - - @Override - public int getCount() { - return mHasActiveVoicemailProvider ? TAB_COUNT_WITH_VOICEMAIL : TAB_COUNT_DEFAULT; - } - - @Override - public CharSequence getPageTitle(int position) { - return mTabTitles[position]; - } - } } diff --git a/java/com/android/dialer/app/list/OldSpeedDialFragment.java b/java/com/android/dialer/app/list/OldSpeedDialFragment.java new file mode 100644 index 000000000..4aafd9625 --- /dev/null +++ b/java/com/android/dialer/app/list/OldSpeedDialFragment.java @@ -0,0 +1,499 @@ +/* + * Copyright (C) 2013 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.app.list; + +import static android.Manifest.permission.READ_CONTACTS; + +import android.animation.Animator; +import android.animation.AnimatorSet; +import android.animation.ObjectAnimator; +import android.app.Activity; +import android.app.Fragment; +import android.app.LoaderManager; +import android.content.CursorLoader; +import android.content.Loader; +import android.content.pm.PackageManager; +import android.database.Cursor; +import android.graphics.Rect; +import android.net.Uri; +import android.os.Bundle; +import android.os.Trace; +import android.support.v13.app.FragmentCompat; +import android.support.v4.util.LongSparseArray; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.animation.AnimationUtils; +import android.view.animation.LayoutAnimationController; +import android.widget.AbsListView; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.FrameLayout; +import android.widget.FrameLayout.LayoutParams; +import android.widget.ImageView; +import android.widget.ListView; +import com.android.contacts.common.ContactPhotoManager; +import com.android.contacts.common.ContactTileLoaderFactory; +import com.android.contacts.common.list.ContactTileView; +import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; +import com.android.dialer.app.R; +import com.android.dialer.app.widget.EmptyContentView; +import com.android.dialer.callintent.nano.CallInitiationType; +import com.android.dialer.callintent.nano.CallSpecificAppData; +import com.android.dialer.common.LogUtil; +import com.android.dialer.util.PermissionsUtil; +import com.android.dialer.util.ViewUtil; +import java.util.ArrayList; + +/** This fragment displays the user's favorite/frequent contacts in a grid. */ +public class OldSpeedDialFragment extends Fragment + implements OnItemClickListener, + PhoneFavoritesTileAdapter.OnDataSetChangedForAnimationListener, + EmptyContentView.OnEmptyViewActionButtonClickedListener, + FragmentCompat.OnRequestPermissionsResultCallback { + + private static final int READ_CONTACTS_PERMISSION_REQUEST_CODE = 1; + + /** + * By default, the animation code assumes that all items in a list view are of the same height + * when animating new list items into view (e.g. from the bottom of the screen into view). This + * can cause incorrect translation offsets when a item that is larger or smaller than other list + * item is removed from the list. This key is used to provide the actual height of the removed + * object so that the actual translation appears correct to the user. + */ + private static final long KEY_REMOVED_ITEM_HEIGHT = Long.MAX_VALUE; + + private static final String TAG = "OldSpeedDialFragment"; + private static final boolean DEBUG = false; + /** Used with LoaderManager. */ + private static final int LOADER_ID_CONTACT_TILE = 1; + + private final LongSparseArray mItemIdTopMap = new LongSparseArray<>(); + private final LongSparseArray mItemIdLeftMap = new LongSparseArray<>(); + private final ContactTileView.Listener mContactTileAdapterListener = + new ContactTileAdapterListener(); + private final LoaderManager.LoaderCallbacks mContactTileLoaderListener = + new ContactTileLoaderListener(); + private final ScrollListener mScrollListener = new ScrollListener(); + private int mAnimationDuration; + private OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener; + private OnListFragmentScrolledListener mActivityScrollListener; + private PhoneFavoritesTileAdapter mContactTileAdapter; + private View mParentView; + private PhoneFavoriteListView mListView; + private View mContactTileFrame; + /** Layout used when there are no favorites. */ + private EmptyContentView mEmptyView; + + @Override + public void onCreate(Bundle savedState) { + if (DEBUG) { + LogUtil.d("OldSpeedDialFragment.onCreate", null); + } + Trace.beginSection(TAG + " onCreate"); + super.onCreate(savedState); + + // Construct two base adapters which will become part of PhoneFavoriteMergedAdapter. + // We don't construct the resultant adapter at this moment since it requires LayoutInflater + // that will be available on onCreateView(). + mContactTileAdapter = + new PhoneFavoritesTileAdapter(getActivity(), mContactTileAdapterListener, this); + mContactTileAdapter.setPhotoLoader(ContactPhotoManager.getInstance(getActivity())); + mAnimationDuration = getResources().getInteger(R.integer.fade_duration); + Trace.endSection(); + } + + @Override + public void onResume() { + Trace.beginSection(TAG + " onResume"); + super.onResume(); + if (mContactTileAdapter != null) { + mContactTileAdapter.refreshContactsPreferences(); + } + if (PermissionsUtil.hasContactsPermissions(getActivity())) { + if (getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE) == null) { + getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener); + + } else { + getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE).forceLoad(); + } + + mEmptyView.setDescription(R.string.speed_dial_empty); + mEmptyView.setActionLabel(R.string.speed_dial_empty_add_favorite_action); + } else { + mEmptyView.setDescription(R.string.permission_no_speeddial); + mEmptyView.setActionLabel(R.string.permission_single_turn_on); + } + Trace.endSection(); + } + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + Trace.beginSection(TAG + " onCreateView"); + mParentView = inflater.inflate(R.layout.speed_dial_fragment, container, false); + + mListView = (PhoneFavoriteListView) mParentView.findViewById(R.id.contact_tile_list); + mListView.setOnItemClickListener(this); + mListView.setVerticalScrollBarEnabled(false); + mListView.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT); + mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY); + mListView.getDragDropController().addOnDragDropListener(mContactTileAdapter); + + final ImageView dragShadowOverlay = + (ImageView) getActivity().findViewById(R.id.contact_tile_drag_shadow_overlay); + mListView.setDragShadowOverlay(dragShadowOverlay); + + mEmptyView = (EmptyContentView) mParentView.findViewById(R.id.empty_list_view); + mEmptyView.setImage(R.drawable.empty_speed_dial); + mEmptyView.setActionClickedListener(this); + + mContactTileFrame = mParentView.findViewById(R.id.contact_tile_frame); + + final LayoutAnimationController controller = + new LayoutAnimationController( + AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in)); + controller.setDelay(0); + mListView.setLayoutAnimation(controller); + mListView.setAdapter(mContactTileAdapter); + + mListView.setOnScrollListener(mScrollListener); + mListView.setFastScrollEnabled(false); + mListView.setFastScrollAlwaysVisible(false); + + //prevent content changes of the list from firing accessibility events. + mListView.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE); + ContentChangedFilter.addToParent(mListView); + + Trace.endSection(); + return mParentView; + } + + public boolean hasFrequents() { + if (mContactTileAdapter == null) { + return false; + } + return mContactTileAdapter.getNumFrequents() > 0; + } + + /* package */ void setEmptyViewVisibility(final boolean visible) { + final int previousVisibility = mEmptyView.getVisibility(); + final int emptyViewVisibility = visible ? View.VISIBLE : View.GONE; + final int listViewVisibility = visible ? View.GONE : View.VISIBLE; + + if (previousVisibility != emptyViewVisibility) { + final FrameLayout.LayoutParams params = (LayoutParams) mContactTileFrame.getLayoutParams(); + params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; + mContactTileFrame.setLayoutParams(params); + mEmptyView.setVisibility(emptyViewVisibility); + mListView.setVisibility(listViewVisibility); + } + } + + @Override + public void onStart() { + super.onStart(); + + final Activity activity = getActivity(); + + try { + mActivityScrollListener = (OnListFragmentScrolledListener) activity; + } catch (ClassCastException e) { + throw new ClassCastException( + activity.toString() + " must implement OnListFragmentScrolledListener"); + } + + try { + OnDragDropListener listener = (OnDragDropListener) activity; + mListView.getDragDropController().addOnDragDropListener(listener); + ((HostInterface) activity).setDragDropController(mListView.getDragDropController()); + } catch (ClassCastException e) { + throw new ClassCastException( + activity.toString() + " must implement OnDragDropListener and HostInterface"); + } + + try { + mPhoneNumberPickerActionListener = (OnPhoneNumberPickerActionListener) activity; + } catch (ClassCastException e) { + throw new ClassCastException( + activity.toString() + " must implement PhoneFavoritesFragment.listener"); + } + + // Use initLoader() instead of restartLoader() to refraining unnecessary reload. + // This method call implicitly assures ContactTileLoaderListener's onLoadFinished() will + // be called, on which we'll check if "all" contacts should be reloaded again or not. + if (PermissionsUtil.hasContactsPermissions(activity)) { + getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener); + } else { + setEmptyViewVisibility(true); + } + } + + /** + * {@inheritDoc} + * + *

This is only effective for elements provided by {@link #mContactTileAdapter}. {@link + * #mContactTileAdapter} has its own logic for click events. + */ + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + final int contactTileAdapterCount = mContactTileAdapter.getCount(); + if (position <= contactTileAdapterCount) { + LogUtil.e( + "OldSpeedDialFragment.onItemClick", + "event for unexpected position. The position " + + position + + " is before \"all\" section. Ignored."); + } + } + + /** + * Cache the current view offsets into memory. Once a relayout of views in the ListView has + * happened due to a dataset change, the cached offsets are used to create animations that slide + * views from their previous positions to their new ones, to give the appearance that the views + * are sliding into their new positions. + */ + private void saveOffsets(int removedItemHeight) { + final int firstVisiblePosition = mListView.getFirstVisiblePosition(); + if (DEBUG) { + LogUtil.d("OldSpeedDialFragment.saveOffsets", "Child count : " + mListView.getChildCount()); + } + for (int i = 0; i < mListView.getChildCount(); i++) { + final View child = mListView.getChildAt(i); + final int position = firstVisiblePosition + i; + // Since we are getting the position from mListView and then querying + // mContactTileAdapter, its very possible that things are out of sync + // and we might index out of bounds. Let's make sure that this doesn't happen. + if (!mContactTileAdapter.isIndexInBound(position)) { + continue; + } + final long itemId = mContactTileAdapter.getItemId(position); + if (DEBUG) { + LogUtil.d( + "OldSpeedDialFragment.saveOffsets", + "Saving itemId: " + itemId + " for listview child " + i + " Top: " + child.getTop()); + } + mItemIdTopMap.put(itemId, child.getTop()); + mItemIdLeftMap.put(itemId, child.getLeft()); + } + mItemIdTopMap.put(KEY_REMOVED_ITEM_HEIGHT, removedItemHeight); + } + + /* + * Performs animations for the gridView + */ + private void animateGridView(final long... idsInPlace) { + if (mItemIdTopMap.size() == 0) { + // Don't do animations if the database is being queried for the first time and + // the previous item offsets have not been cached, or the user hasn't done anything + // (dragging, swiping etc) that requires an animation. + return; + } + + ViewUtil.doOnPreDraw( + mListView, + true, + new Runnable() { + @Override + public void run() { + + final int firstVisiblePosition = mListView.getFirstVisiblePosition(); + final AnimatorSet animSet = new AnimatorSet(); + final ArrayList animators = new ArrayList(); + for (int i = 0; i < mListView.getChildCount(); i++) { + final View child = mListView.getChildAt(i); + int position = firstVisiblePosition + i; + + // Since we are getting the position from mListView and then querying + // mContactTileAdapter, its very possible that things are out of sync + // and we might index out of bounds. Let's make sure that this doesn't happen. + if (!mContactTileAdapter.isIndexInBound(position)) { + continue; + } + + final long itemId = mContactTileAdapter.getItemId(position); + + if (containsId(idsInPlace, itemId)) { + animators.add(ObjectAnimator.ofFloat(child, "alpha", 0.0f, 1.0f)); + break; + } else { + Integer startTop = mItemIdTopMap.get(itemId); + Integer startLeft = mItemIdLeftMap.get(itemId); + final int top = child.getTop(); + final int left = child.getLeft(); + int deltaX = 0; + int deltaY = 0; + + if (startLeft != null) { + if (startLeft != left) { + deltaX = startLeft - left; + animators.add(ObjectAnimator.ofFloat(child, "translationX", deltaX, 0.0f)); + } + } + + if (startTop != null) { + if (startTop != top) { + deltaY = startTop - top; + animators.add(ObjectAnimator.ofFloat(child, "translationY", deltaY, 0.0f)); + } + } + + if (DEBUG) { + LogUtil.d( + "OldSpeedDialFragment.onPreDraw", + "Found itemId: " + + itemId + + " for listview child " + + i + + " Top: " + + top + + " Delta: " + + deltaY); + } + } + } + + if (animators.size() > 0) { + animSet.setDuration(mAnimationDuration).playTogether(animators); + animSet.start(); + } + + mItemIdTopMap.clear(); + mItemIdLeftMap.clear(); + } + }); + } + + private boolean containsId(long[] ids, long target) { + // Linear search on array is fine because this is typically only 0-1 elements long + for (int i = 0; i < ids.length; i++) { + if (ids[i] == target) { + return true; + } + } + return false; + } + + @Override + public void onDataSetChangedForAnimation(long... idsInPlace) { + animateGridView(idsInPlace); + } + + @Override + public void cacheOffsetsForDatasetChange() { + saveOffsets(0); + } + + @Override + public void onEmptyViewActionButtonClicked() { + final Activity activity = getActivity(); + if (activity == null) { + return; + } + + if (!PermissionsUtil.hasPermission(activity, READ_CONTACTS)) { + FragmentCompat.requestPermissions( + this, new String[] {READ_CONTACTS}, READ_CONTACTS_PERMISSION_REQUEST_CODE); + } else { + // Switch tabs + ((HostInterface) activity).showAllContactsTab(); + } + } + + @Override + public void onRequestPermissionsResult( + int requestCode, String[] permissions, int[] grantResults) { + if (requestCode == READ_CONTACTS_PERMISSION_REQUEST_CODE) { + if (grantResults.length == 1 && PackageManager.PERMISSION_GRANTED == grantResults[0]) { + PermissionsUtil.notifyPermissionGranted(getActivity(), READ_CONTACTS); + } + } + } + + public interface HostInterface { + + void setDragDropController(DragDropController controller); + + void showAllContactsTab(); + } + + private class ContactTileLoaderListener implements LoaderManager.LoaderCallbacks { + + @Override + public CursorLoader onCreateLoader(int id, Bundle args) { + if (DEBUG) { + LogUtil.d("ContactTileLoaderListener.onCreateLoader", null); + } + return ContactTileLoaderFactory.createStrequentPhoneOnlyLoader(getActivity()); + } + + @Override + public void onLoadFinished(Loader loader, Cursor data) { + if (DEBUG) { + LogUtil.d("ContactTileLoaderListener.onLoadFinished", null); + } + mContactTileAdapter.setContactCursor(data); + setEmptyViewVisibility(mContactTileAdapter.getCount() == 0); + } + + @Override + public void onLoaderReset(Loader loader) { + if (DEBUG) { + LogUtil.d("ContactTileLoaderListener.onLoaderReset", null); + } + } + } + + private class ContactTileAdapterListener implements ContactTileView.Listener { + + @Override + public void onContactSelected(Uri contactUri, Rect targetRect) { + if (mPhoneNumberPickerActionListener != null) { + CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); + callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; + mPhoneNumberPickerActionListener.onPickDataUri( + contactUri, false /* isVideoCall */, callSpecificAppData); + } + } + + @Override + public void onCallNumberDirectly(String phoneNumber) { + if (mPhoneNumberPickerActionListener != null) { + CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); + callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; + mPhoneNumberPickerActionListener.onPickPhoneNumber( + phoneNumber, false /* isVideoCall */, callSpecificAppData); + } + } + } + + private class ScrollListener implements ListView.OnScrollListener { + + @Override + public void onScroll( + AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + if (mActivityScrollListener != null) { + mActivityScrollListener.onListFragmentScroll( + firstVisibleItem, visibleItemCount, totalItemCount); + } + } + + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + mActivityScrollListener.onListFragmentScrollStateChange(scrollState); + } + } +} diff --git a/java/com/android/dialer/app/list/SpeedDialFragment.java b/java/com/android/dialer/app/list/SpeedDialFragment.java deleted file mode 100644 index 8e0f89028..000000000 --- a/java/com/android/dialer/app/list/SpeedDialFragment.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Copyright (C) 2013 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.app.list; - -import static android.Manifest.permission.READ_CONTACTS; - -import android.animation.Animator; -import android.animation.AnimatorSet; -import android.animation.ObjectAnimator; -import android.app.Activity; -import android.app.Fragment; -import android.app.LoaderManager; -import android.content.CursorLoader; -import android.content.Loader; -import android.content.pm.PackageManager; -import android.database.Cursor; -import android.graphics.Rect; -import android.net.Uri; -import android.os.Bundle; -import android.os.Trace; -import android.support.annotation.Nullable; -import android.support.v13.app.FragmentCompat; -import android.support.v4.util.LongSparseArray; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.view.animation.AnimationUtils; -import android.view.animation.LayoutAnimationController; -import android.widget.AbsListView; -import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.FrameLayout; -import android.widget.FrameLayout.LayoutParams; -import android.widget.ImageView; -import android.widget.ListView; -import com.android.contacts.common.ContactPhotoManager; -import com.android.contacts.common.ContactTileLoaderFactory; -import com.android.contacts.common.list.ContactTileView; -import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; -import com.android.dialer.app.R; -import com.android.dialer.app.list.ListsFragment.ListsPage; -import com.android.dialer.app.widget.EmptyContentView; -import com.android.dialer.callintent.nano.CallInitiationType; -import com.android.dialer.callintent.nano.CallSpecificAppData; -import com.android.dialer.common.LogUtil; -import com.android.dialer.util.PermissionsUtil; -import com.android.dialer.util.ViewUtil; -import java.util.ArrayList; - -/** This fragment displays the user's favorite/frequent contacts in a grid. */ -public class SpeedDialFragment extends Fragment - implements ListsPage, - OnItemClickListener, - PhoneFavoritesTileAdapter.OnDataSetChangedForAnimationListener, - EmptyContentView.OnEmptyViewActionButtonClickedListener, - FragmentCompat.OnRequestPermissionsResultCallback { - - private static final int READ_CONTACTS_PERMISSION_REQUEST_CODE = 1; - - /** - * By default, the animation code assumes that all items in a list view are of the same height - * when animating new list items into view (e.g. from the bottom of the screen into view). This - * can cause incorrect translation offsets when a item that is larger or smaller than other list - * item is removed from the list. This key is used to provide the actual height of the removed - * object so that the actual translation appears correct to the user. - */ - private static final long KEY_REMOVED_ITEM_HEIGHT = Long.MAX_VALUE; - - private static final String TAG = "SpeedDialFragment"; - private static final boolean DEBUG = false; - /** Used with LoaderManager. */ - private static final int LOADER_ID_CONTACT_TILE = 1; - - private final LongSparseArray mItemIdTopMap = new LongSparseArray<>(); - private final LongSparseArray mItemIdLeftMap = new LongSparseArray<>(); - private final ContactTileView.Listener mContactTileAdapterListener = - new ContactTileAdapterListener(); - private final LoaderManager.LoaderCallbacks mContactTileLoaderListener = - new ContactTileLoaderListener(); - private final ScrollListener mScrollListener = new ScrollListener(); - private int mAnimationDuration; - private OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener; - private OnListFragmentScrolledListener mActivityScrollListener; - private PhoneFavoritesTileAdapter mContactTileAdapter; - private View mParentView; - private PhoneFavoriteListView mListView; - private View mContactTileFrame; - /** Layout used when there are no favorites. */ - private EmptyContentView mEmptyView; - - @Override - public void onCreate(Bundle savedState) { - if (DEBUG) { - LogUtil.d("SpeedDialFragment.onCreate", null); - } - Trace.beginSection(TAG + " onCreate"); - super.onCreate(savedState); - - // Construct two base adapters which will become part of PhoneFavoriteMergedAdapter. - // We don't construct the resultant adapter at this moment since it requires LayoutInflater - // that will be available on onCreateView(). - mContactTileAdapter = - new PhoneFavoritesTileAdapter(getActivity(), mContactTileAdapterListener, this); - mContactTileAdapter.setPhotoLoader(ContactPhotoManager.getInstance(getActivity())); - mAnimationDuration = getResources().getInteger(R.integer.fade_duration); - Trace.endSection(); - } - - @Override - public void onResume() { - Trace.beginSection(TAG + " onResume"); - super.onResume(); - if (mContactTileAdapter != null) { - mContactTileAdapter.refreshContactsPreferences(); - } - if (PermissionsUtil.hasContactsPermissions(getActivity())) { - if (getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE) == null) { - getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener); - - } else { - getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE).forceLoad(); - } - - mEmptyView.setDescription(R.string.speed_dial_empty); - mEmptyView.setActionLabel(R.string.speed_dial_empty_add_favorite_action); - } else { - mEmptyView.setDescription(R.string.permission_no_speeddial); - mEmptyView.setActionLabel(R.string.permission_single_turn_on); - } - Trace.endSection(); - } - - @Override - public View onCreateView( - LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - Trace.beginSection(TAG + " onCreateView"); - mParentView = inflater.inflate(R.layout.speed_dial_fragment, container, false); - - mListView = (PhoneFavoriteListView) mParentView.findViewById(R.id.contact_tile_list); - mListView.setOnItemClickListener(this); - mListView.setVerticalScrollBarEnabled(false); - mListView.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT); - mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY); - mListView.getDragDropController().addOnDragDropListener(mContactTileAdapter); - - final ImageView dragShadowOverlay = - (ImageView) getActivity().findViewById(R.id.contact_tile_drag_shadow_overlay); - mListView.setDragShadowOverlay(dragShadowOverlay); - - mEmptyView = (EmptyContentView) mParentView.findViewById(R.id.empty_list_view); - mEmptyView.setImage(R.drawable.empty_speed_dial); - mEmptyView.setActionClickedListener(this); - - mContactTileFrame = mParentView.findViewById(R.id.contact_tile_frame); - - final LayoutAnimationController controller = - new LayoutAnimationController( - AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in)); - controller.setDelay(0); - mListView.setLayoutAnimation(controller); - mListView.setAdapter(mContactTileAdapter); - - mListView.setOnScrollListener(mScrollListener); - mListView.setFastScrollEnabled(false); - mListView.setFastScrollAlwaysVisible(false); - - //prevent content changes of the list from firing accessibility events. - mListView.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE); - ContentChangedFilter.addToParent(mListView); - - Trace.endSection(); - return mParentView; - } - - public boolean hasFrequents() { - if (mContactTileAdapter == null) { - return false; - } - return mContactTileAdapter.getNumFrequents() > 0; - } - - /* package */ void setEmptyViewVisibility(final boolean visible) { - final int previousVisibility = mEmptyView.getVisibility(); - final int emptyViewVisibility = visible ? View.VISIBLE : View.GONE; - final int listViewVisibility = visible ? View.GONE : View.VISIBLE; - - if (previousVisibility != emptyViewVisibility) { - final FrameLayout.LayoutParams params = (LayoutParams) mContactTileFrame.getLayoutParams(); - params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; - mContactTileFrame.setLayoutParams(params); - mEmptyView.setVisibility(emptyViewVisibility); - mListView.setVisibility(listViewVisibility); - } - } - - @Override - public void onStart() { - super.onStart(); - - final Activity activity = getActivity(); - - try { - mActivityScrollListener = (OnListFragmentScrolledListener) activity; - } catch (ClassCastException e) { - throw new ClassCastException( - activity.toString() + " must implement OnListFragmentScrolledListener"); - } - - try { - OnDragDropListener listener = (OnDragDropListener) activity; - mListView.getDragDropController().addOnDragDropListener(listener); - ((HostInterface) activity).setDragDropController(mListView.getDragDropController()); - } catch (ClassCastException e) { - throw new ClassCastException( - activity.toString() + " must implement OnDragDropListener and HostInterface"); - } - - try { - mPhoneNumberPickerActionListener = (OnPhoneNumberPickerActionListener) activity; - } catch (ClassCastException e) { - throw new ClassCastException( - activity.toString() + " must implement PhoneFavoritesFragment.listener"); - } - - // Use initLoader() instead of restartLoader() to refraining unnecessary reload. - // This method call implicitly assures ContactTileLoaderListener's onLoadFinished() will - // be called, on which we'll check if "all" contacts should be reloaded again or not. - if (PermissionsUtil.hasContactsPermissions(activity)) { - getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener); - } else { - setEmptyViewVisibility(true); - } - } - - /** - * {@inheritDoc} - * - *

This is only effective for elements provided by {@link #mContactTileAdapter}. {@link - * #mContactTileAdapter} has its own logic for click events. - */ - @Override - public void onItemClick(AdapterView parent, View view, int position, long id) { - final int contactTileAdapterCount = mContactTileAdapter.getCount(); - if (position <= contactTileAdapterCount) { - LogUtil.e( - "SpeedDialFragment.onItemClick", - "event for unexpected position. The position " - + position - + " is before \"all\" section. Ignored."); - } - } - - /** - * Cache the current view offsets into memory. Once a relayout of views in the ListView has - * happened due to a dataset change, the cached offsets are used to create animations that slide - * views from their previous positions to their new ones, to give the appearance that the views - * are sliding into their new positions. - */ - private void saveOffsets(int removedItemHeight) { - final int firstVisiblePosition = mListView.getFirstVisiblePosition(); - if (DEBUG) { - LogUtil.d("SpeedDialFragment.saveOffsets", "Child count : " + mListView.getChildCount()); - } - for (int i = 0; i < mListView.getChildCount(); i++) { - final View child = mListView.getChildAt(i); - final int position = firstVisiblePosition + i; - // Since we are getting the position from mListView and then querying - // mContactTileAdapter, its very possible that things are out of sync - // and we might index out of bounds. Let's make sure that this doesn't happen. - if (!mContactTileAdapter.isIndexInBound(position)) { - continue; - } - final long itemId = mContactTileAdapter.getItemId(position); - if (DEBUG) { - LogUtil.d( - "SpeedDialFragment.saveOffsets", - "Saving itemId: " + itemId + " for listview child " + i + " Top: " + child.getTop()); - } - mItemIdTopMap.put(itemId, child.getTop()); - mItemIdLeftMap.put(itemId, child.getLeft()); - } - mItemIdTopMap.put(KEY_REMOVED_ITEM_HEIGHT, removedItemHeight); - } - - /* - * Performs animations for the gridView - */ - private void animateGridView(final long... idsInPlace) { - if (mItemIdTopMap.size() == 0) { - // Don't do animations if the database is being queried for the first time and - // the previous item offsets have not been cached, or the user hasn't done anything - // (dragging, swiping etc) that requires an animation. - return; - } - - ViewUtil.doOnPreDraw( - mListView, - true, - new Runnable() { - @Override - public void run() { - - final int firstVisiblePosition = mListView.getFirstVisiblePosition(); - final AnimatorSet animSet = new AnimatorSet(); - final ArrayList animators = new ArrayList(); - for (int i = 0; i < mListView.getChildCount(); i++) { - final View child = mListView.getChildAt(i); - int position = firstVisiblePosition + i; - - // Since we are getting the position from mListView and then querying - // mContactTileAdapter, its very possible that things are out of sync - // and we might index out of bounds. Let's make sure that this doesn't happen. - if (!mContactTileAdapter.isIndexInBound(position)) { - continue; - } - - final long itemId = mContactTileAdapter.getItemId(position); - - if (containsId(idsInPlace, itemId)) { - animators.add(ObjectAnimator.ofFloat(child, "alpha", 0.0f, 1.0f)); - break; - } else { - Integer startTop = mItemIdTopMap.get(itemId); - Integer startLeft = mItemIdLeftMap.get(itemId); - final int top = child.getTop(); - final int left = child.getLeft(); - int deltaX = 0; - int deltaY = 0; - - if (startLeft != null) { - if (startLeft != left) { - deltaX = startLeft - left; - animators.add(ObjectAnimator.ofFloat(child, "translationX", deltaX, 0.0f)); - } - } - - if (startTop != null) { - if (startTop != top) { - deltaY = startTop - top; - animators.add(ObjectAnimator.ofFloat(child, "translationY", deltaY, 0.0f)); - } - } - - if (DEBUG) { - LogUtil.d( - "SpeedDialFragment.onPreDraw", - "Found itemId: " - + itemId - + " for listview child " - + i - + " Top: " - + top - + " Delta: " - + deltaY); - } - } - } - - if (animators.size() > 0) { - animSet.setDuration(mAnimationDuration).playTogether(animators); - animSet.start(); - } - - mItemIdTopMap.clear(); - mItemIdLeftMap.clear(); - } - }); - } - - private boolean containsId(long[] ids, long target) { - // Linear search on array is fine because this is typically only 0-1 elements long - for (int i = 0; i < ids.length; i++) { - if (ids[i] == target) { - return true; - } - } - return false; - } - - @Override - public void onDataSetChangedForAnimation(long... idsInPlace) { - animateGridView(idsInPlace); - } - - @Override - public void cacheOffsetsForDatasetChange() { - saveOffsets(0); - } - - @Override - public void onEmptyViewActionButtonClicked() { - final Activity activity = getActivity(); - if (activity == null) { - return; - } - - if (!PermissionsUtil.hasPermission(activity, READ_CONTACTS)) { - FragmentCompat.requestPermissions( - this, new String[] {READ_CONTACTS}, READ_CONTACTS_PERMISSION_REQUEST_CODE); - } else { - // Switch tabs - ((HostInterface) activity).showAllContactsTab(); - } - } - - @Override - public void onRequestPermissionsResult( - int requestCode, String[] permissions, int[] grantResults) { - if (requestCode == READ_CONTACTS_PERMISSION_REQUEST_CODE) { - if (grantResults.length == 1 && PackageManager.PERMISSION_GRANTED == grantResults[0]) { - PermissionsUtil.notifyPermissionGranted(getActivity(), READ_CONTACTS); - } - } - } - - @Override - public void onPageResume(@Nullable Activity activity) { - LogUtil.i("SpeedDialFragment.onPageResume", null); - } - - @Override - public void onPagePause(@Nullable Activity activity) { - LogUtil.i("SpeedDialFragment.onPagePause", null); - } - - public interface HostInterface { - - void setDragDropController(DragDropController controller); - - void showAllContactsTab(); - } - - private class ContactTileLoaderListener implements LoaderManager.LoaderCallbacks { - - @Override - public CursorLoader onCreateLoader(int id, Bundle args) { - if (DEBUG) { - LogUtil.d("ContactTileLoaderListener.onCreateLoader", null); - } - return ContactTileLoaderFactory.createStrequentPhoneOnlyLoader(getActivity()); - } - - @Override - public void onLoadFinished(Loader loader, Cursor data) { - if (DEBUG) { - LogUtil.d("ContactTileLoaderListener.onLoadFinished", null); - } - mContactTileAdapter.setContactCursor(data); - setEmptyViewVisibility(mContactTileAdapter.getCount() == 0); - } - - @Override - public void onLoaderReset(Loader loader) { - if (DEBUG) { - LogUtil.d("ContactTileLoaderListener.onLoaderReset", null); - } - } - } - - private class ContactTileAdapterListener implements ContactTileView.Listener { - - @Override - public void onContactSelected(Uri contactUri, Rect targetRect) { - if (mPhoneNumberPickerActionListener != null) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; - mPhoneNumberPickerActionListener.onPickDataUri( - contactUri, false /* isVideoCall */, callSpecificAppData); - } - } - - @Override - public void onCallNumberDirectly(String phoneNumber) { - if (mPhoneNumberPickerActionListener != null) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; - mPhoneNumberPickerActionListener.onPickPhoneNumber( - phoneNumber, false /* isVideoCall */, callSpecificAppData); - } - } - } - - private class ScrollListener implements ListView.OnScrollListener { - - @Override - public void onScroll( - AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { - if (mActivityScrollListener != null) { - mActivityScrollListener.onListFragmentScroll( - firstVisibleItem, visibleItemCount, totalItemCount); - } - } - - @Override - public void onScrollStateChanged(AbsListView view, int scrollState) { - mActivityScrollListener.onListFragmentScrollStateChange(scrollState); - } - } -} diff --git a/java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png b/java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png deleted file mode 100644 index d6f6daaab..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png b/java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png deleted file mode 100644 index d3c0378f5..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png b/java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png deleted file mode 100644 index 3e9232fc9..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png deleted file mode 100644 index bb72e890f..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png deleted file mode 100644 index 70eb07378..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png deleted file mode 100644 index 9fb43b066..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png deleted file mode 100644 index 4e0d5649e..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png deleted file mode 100644 index 2cf41d598..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png deleted file mode 100644 index 043685fd9..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png deleted file mode 100644 index 86eecdd4a..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png deleted file mode 100644 index 34310aa49..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png deleted file mode 100644 index a36323ca9..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png deleted file mode 100644 index 4b67cf71a..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png deleted file mode 100644 index 67f07e473..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png deleted file mode 100644 index 26a26f911..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png deleted file mode 100644 index bf413f912..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png deleted file mode 100644 index 4d2ea05c4..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png deleted file mode 100644 index ff698afc0..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png deleted file mode 100644 index b27dfba06..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png deleted file mode 100644 index 57c9fa546..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png deleted file mode 100644 index 1ee6adf8d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png deleted file mode 100644 index 3a1a7a790..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png deleted file mode 100644 index f3581d104..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png deleted file mode 100644 index b09a6926d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_star.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_star.png deleted file mode 100644 index 62e1f8a6d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_star.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png deleted file mode 100644 index 03643b20d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png deleted file mode 100644 index 47e32492c..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png deleted file mode 100644 index 2bfe0c0cf..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png deleted file mode 100644 index 90b5238f3..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png deleted file mode 100644 index 7556637fc..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png deleted file mode 100644 index 03a62e15f..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png deleted file mode 100644 index e22e92c85..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png deleted file mode 100644 index 57d787163..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png b/java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png deleted file mode 100644 index 3dc1c17f6..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png b/java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png deleted file mode 100644 index 44b06f261..000000000 Binary files a/java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_archive_white_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_archive_white_24dp.png deleted file mode 100644 index f6aa3f966..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_archive_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_content_copy_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_content_copy_24dp.png deleted file mode 100644 index 80c069557..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_content_copy_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_delete_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_delete_24dp.png deleted file mode 100644 index c903fd1dd..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_delete_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_grade_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_grade_24dp.png deleted file mode 100644 index d2cbe4c92..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_grade_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_more_vert_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_more_vert_24dp.png deleted file mode 100644 index 017e45ede..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_more_vert_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_pause_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_pause_24dp.png deleted file mode 100644 index 2272d478c..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_pause_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_people_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_people_24dp.png deleted file mode 100644 index 270e4de2e..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_people_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_play_arrow_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_play_arrow_24dp.png deleted file mode 100644 index c61e948bb..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_play_arrow_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_schedule_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_schedule_24dp.png deleted file mode 100644 index 501ee842e..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_schedule_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_share_white_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_share_white_24dp.png deleted file mode 100644 index e944fd70c..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_share_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_voicemail_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_voicemail_24dp.png deleted file mode 100644 index e5aa7db05..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_voicemail_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_down_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_down_24dp.png deleted file mode 100644 index 10992ed70..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_down_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_up_24dp.png b/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_up_24dp.png deleted file mode 100644 index 7cfd4c7b8..000000000 Binary files a/java/com/android/dialer/app/res/drawable-mdpi/ic_volume_up_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_archive_white_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_archive_white_24dp.png deleted file mode 100644 index 3513bd9fe..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_archive_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_content_copy_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_content_copy_24dp.png deleted file mode 100644 index 537fd4e8b..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_content_copy_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_delete_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_delete_24dp.png deleted file mode 100644 index be1ee4d07..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_delete_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_grade_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_grade_24dp.png deleted file mode 100644 index d65f39d7c..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_grade_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_more_vert_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_more_vert_24dp.png deleted file mode 100644 index efab8a74f..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_more_vert_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_pause_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_pause_24dp.png deleted file mode 100644 index f49aed757..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_pause_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_people_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_people_24dp.png deleted file mode 100644 index 323981ccf..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_people_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_play_arrow_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_play_arrow_24dp.png deleted file mode 100644 index a3c80e73d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_play_arrow_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_schedule_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_schedule_24dp.png deleted file mode 100644 index 2e27936a4..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_schedule_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_share_white_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_share_white_24dp.png deleted file mode 100644 index 22a8783e7..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_share_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_voicemail_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_voicemail_24dp.png deleted file mode 100644 index 59126d706..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_voicemail_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_down_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_down_24dp.png deleted file mode 100644 index 2621bc15d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_down_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_up_24dp.png b/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_up_24dp.png deleted file mode 100644 index 2ed00343b..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xhdpi/ic_volume_up_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_archive_white_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_archive_white_24dp.png deleted file mode 100644 index 00e04e42b..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_archive_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_content_copy_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_content_copy_24dp.png deleted file mode 100644 index 9dff893e7..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_content_copy_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_delete_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_delete_24dp.png deleted file mode 100644 index eb637920d..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_delete_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_grade_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_grade_24dp.png deleted file mode 100644 index aa5879215..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_grade_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_more_vert_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_more_vert_24dp.png deleted file mode 100644 index d32281307..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_more_vert_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_pause_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_pause_24dp.png deleted file mode 100644 index 7192ad487..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_pause_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_people_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_people_24dp.png deleted file mode 100644 index 6c68435fb..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_people_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_play_arrow_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_play_arrow_24dp.png deleted file mode 100644 index 547ef30aa..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_play_arrow_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_schedule_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_schedule_24dp.png deleted file mode 100644 index bfc72736a..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_schedule_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_share_white_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_share_white_24dp.png deleted file mode 100644 index a35b3cd14..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_share_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_voicemail_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_voicemail_24dp.png deleted file mode 100644 index 28b8e936a..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_voicemail_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_down_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_down_24dp.png deleted file mode 100644 index 5eb8b671f..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_down_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_up_24dp.png b/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_up_24dp.png deleted file mode 100644 index 2e751a40f..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_volume_up_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_archive_white_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_archive_white_24dp.png deleted file mode 100644 index 34cd3fd80..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_archive_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_content_copy_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_content_copy_24dp.png deleted file mode 100644 index 4ddee9ef0..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_content_copy_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_delete_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_delete_24dp.png deleted file mode 100644 index 2f250f64a..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_delete_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_grade_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_grade_24dp.png deleted file mode 100644 index 7f38d0963..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_grade_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_more_vert_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_more_vert_24dp.png deleted file mode 100644 index 2f2cb3d00..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_more_vert_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_pause_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_pause_24dp.png deleted file mode 100644 index 660ac6585..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_pause_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_people_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_people_24dp.png deleted file mode 100644 index 5676f7041..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_people_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_play_arrow_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_play_arrow_24dp.png deleted file mode 100644 index be5c062b5..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_play_arrow_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_schedule_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_schedule_24dp.png deleted file mode 100644 index b94f4dfa1..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_schedule_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_share_white_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_share_white_24dp.png deleted file mode 100644 index e351c7beb..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_share_white_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_voicemail_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_voicemail_24dp.png deleted file mode 100644 index 820ff5066..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_voicemail_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_down_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_down_24dp.png deleted file mode 100644 index 4ab55abbd..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_down_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_up_24dp.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_up_24dp.png deleted file mode 100644 index 82972b4e5..000000000 Binary files a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_volume_up_24dp.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/drawable/ic_pause.xml b/java/com/android/dialer/app/res/drawable/ic_pause.xml index 5bea58192..7696eb0e2 100644 --- a/java/com/android/dialer/app/res/drawable/ic_pause.xml +++ b/java/com/android/dialer/app/res/drawable/ic_pause.xml @@ -18,13 +18,13 @@ diff --git a/java/com/android/dialer/app/res/drawable/ic_play_arrow.xml b/java/com/android/dialer/app/res/drawable/ic_play_arrow.xml index d7d935016..97f736c1f 100644 --- a/java/com/android/dialer/app/res/drawable/ic_play_arrow.xml +++ b/java/com/android/dialer/app/res/drawable/ic_play_arrow.xml @@ -19,13 +19,13 @@ diff --git a/java/com/android/dialer/app/res/drawable/overflow_menu.xml b/java/com/android/dialer/app/res/drawable/overflow_menu.xml deleted file mode 100644 index 81be5dcd5..000000000 --- a/java/com/android/dialer/app/res/drawable/overflow_menu.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item.xml b/java/com/android/dialer/app/res/layout/call_log_list_item.xml index 1592aa928..0fbbb9dd1 100644 --- a/java/com/android/dialer/app/res/layout/call_log_list_item.xml +++ b/java/com/android/dialer/app/res/layout/call_log_list_item.xml @@ -60,14 +60,30 @@ android:nextFocusRight="@+id/call_back_action" android:nextFocusLeft="@+id/quick_contact_photo"> - + + + + + + + + + android:src="@drawable/quantum_ic_call_white_24"/> + android:src="@drawable/quantum_ic_person_white_24"/> + android:src="@drawable/quantum_ic_message_white_24"/> + android:src="@drawable/quantum_ic_block_white_24"/> + android:src="@drawable/quantum_ic_block_white_24"/> + android:src="@drawable/quantum_ic_info_outline_white_24"/> + android:src="@drawable/quantum_ic_send_white_24"/> + android:src="@drawable/quantum_ic_more_vert_white_24"/> diff --git a/java/com/android/dialer/app/res/layout/search_edittext.xml b/java/com/android/dialer/app/res/layout/search_edittext.xml index 1b4f9c4a4..903fbcae9 100644 --- a/java/com/android/dialer/app/res/layout/search_edittext.xml +++ b/java/com/android/dialer/app/res/layout/search_edittext.xml @@ -27,7 +27,7 @@ android:padding="@dimen/search_box_search_icon_padding" android:importantForAccessibility="no" android:scaleType="center" - android:src="@drawable/ic_ab_search" + android:src="@drawable/quantum_ic_search_white_24" android:tint="@color/searchbox_icon_tint"/> diff --git a/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml b/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml index 7fff9d204..2589a67c6 100644 --- a/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml +++ b/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml @@ -79,7 +79,7 @@ android:id="@+id/playback_speakerphone" style="@style/VoicemailPlaybackLayoutButtonStyle" android:contentDescription="@string/description_playback_speakerphone" - android:src="@drawable/ic_volume_down_24dp" + android:src="@drawable/quantum_ic_volume_down_white_24" android:tint="@color/voicemail_icon_tint"/> + + +

+ + \ No newline at end of file diff --git a/java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png b/java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png deleted file mode 100644 index 15c41423b..000000000 Binary files a/java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png and /dev/null differ diff --git a/java/com/android/dialer/app/res/values-de/strings.xml b/java/com/android/dialer/app/res/values-de/strings.xml index d6195ba30..25bc8a6df 100644 --- a/java/com/android/dialer/app/res/values-de/strings.xml +++ b/java/com/android/dialer/app/res/values-de/strings.xml @@ -28,7 +28,7 @@ "Blockierung der Nummer aufheben" "Nummer vor Anruf bearbeiten" "Anrufliste löschen" - "Mailbox-Nachricht löschen" + "Mailboxnachricht löschen" "Mailbox gelöscht" "Rückgängig" "Anrufliste löschen?" @@ -43,16 +43,16 @@ "Nachricht" "%1$s: %2$s" - %1$d Mailbox-Nachrichten - Mailbox-Nachricht + %1$d Mailboxnachrichten + Mailboxnachricht "Anhören" "%1$s, %2$s" - "Neue Mailbox-Nachricht von %1$s" - "Mailbox-Nachricht-Wiedergabe nicht möglich" - "Mailbox-Nachricht wird geladen…" - "Mailbox-Nachricht wird archiviert…" - "Laden der Mailbox-Nachricht nicht möglich" + "Neue Mailboxnachricht von %1$s" + "Mailboxnachricht-Wiedergabe nicht möglich" + "Mailboxnachricht wird geladen…" + "Mailboxnachricht wird archiviert…" + "Laden der Mailboxnachricht nicht möglich" "Nur Mailbox-Anrufe" "Nur eingehende Anrufe" "Nur ausgehende Anrufe" @@ -91,7 +91,7 @@ "%1$s Anrufe" "Videoanruf" "SMS an %1$s senden" - "Nicht abgehörte Mailbox-Nachricht" + "Nicht abgehörte Mailboxnachricht" "Sprachsuche starten" "%s wählen" "Mailbox" @@ -122,7 +122,7 @@ "Anrufliste" "Alle" "Entgangen" - "Mailbox-Nachrichten" + "Mailboxnachrichten" "Schnellauswahl" "Anrufliste" "Kontakte" @@ -149,17 +149,17 @@ "^1 anrufen" "Anruf von ^1, ^2, ^3, ^4 verpasst" "Anruf von ^1, ^2, ^3, ^4 angenommen" - "Ungelesene Mailbox-Nachricht von ^1, ^2, ^3, ^4." - "Mailbox-Nachricht von ^1, ^2, ^3, ^4." + "Ungelesene Mailboxnachricht von ^1, ^2, ^3, ^4." + "Mailboxnachricht von ^1, ^2, ^3, ^4." "Ausgehender Anruf an ^1, ^2, ^3, ^4" "über %1$s" "%1$s über %2$s" "^1 anrufen" "^1 über Videoanruf anrufen" "Mailboxnachricht von ^1 anhören" - "Mailbox-Nachricht von ^1 abhören" - "Mailbox-Nachricht von ^1 pausieren" - "Mailbox-Nachricht von ^1 löschen" + "Mailboxnachricht von ^1 abhören" + "Mailboxnachricht von ^1 pausieren" + "Mailboxnachricht von ^1 löschen" %d neue Mailboxnachrichten %d neue Mailboxnachricht @@ -200,8 +200,8 @@ "Importieren" "Blockierung der Nummer aufheben" "Nummer hinzufügen" - "Anrufe von diesen Nummern werden blockiert und Mailbox-Nachrichten automatisch gelöscht." - "Anrufe von diesen Nummern werden blockiert. Die Anrufer haben aber unter Umständen weiterhin die Möglichkeit, dir Mailbox-Nachrichten zu hinterlassen." + "Anrufe von diesen Nummern werden blockiert und Mailboxnachrichten automatisch gelöscht." + "Anrufe von diesen Nummern werden blockiert. Die Anrufer haben aber unter Umständen weiterhin die Möglichkeit, dir Mailboxnachrichten zu hinterlassen." "Blockierte Nummern" "%1$s ist bereits blockiert." "Anrufkonten" diff --git a/java/com/android/dialer/app/res/values-en-rAU/strings.xml b/java/com/android/dialer/app/res/values-en-rAU/strings.xml index e9a508510..36d25346d 100644 --- a/java/com/android/dialer/app/res/values-en-rAU/strings.xml +++ b/java/com/android/dialer/app/res/values-en-rAU/strings.xml @@ -18,7 +18,7 @@ "Phone" - "Phone key pad" + "Phone keypad" "Phone" "Call history" "Report inaccurate number" @@ -182,8 +182,8 @@ "Accessibility" "Phone ringtone" "Also vibrate for calls" - "Key pad tones" - "Key pad tone length" + "Keypad tones" + "Keypad tone length" "Normal" "Long" diff --git a/java/com/android/dialer/app/res/values-en-rGB/strings.xml b/java/com/android/dialer/app/res/values-en-rGB/strings.xml index e9a508510..36d25346d 100644 --- a/java/com/android/dialer/app/res/values-en-rGB/strings.xml +++ b/java/com/android/dialer/app/res/values-en-rGB/strings.xml @@ -18,7 +18,7 @@ "Phone" - "Phone key pad" + "Phone keypad" "Phone" "Call history" "Report inaccurate number" @@ -182,8 +182,8 @@ "Accessibility" "Phone ringtone" "Also vibrate for calls" - "Key pad tones" - "Key pad tone length" + "Keypad tones" + "Keypad tone length" "Normal" "Long" diff --git a/java/com/android/dialer/app/res/values-en-rIN/strings.xml b/java/com/android/dialer/app/res/values-en-rIN/strings.xml index e9a508510..36d25346d 100644 --- a/java/com/android/dialer/app/res/values-en-rIN/strings.xml +++ b/java/com/android/dialer/app/res/values-en-rIN/strings.xml @@ -18,7 +18,7 @@ "Phone" - "Phone key pad" + "Phone keypad" "Phone" "Call history" "Report inaccurate number" @@ -182,8 +182,8 @@ "Accessibility" "Phone ringtone" "Also vibrate for calls" - "Key pad tones" - "Key pad tone length" + "Keypad tones" + "Keypad tone length" "Normal" "Long" diff --git a/java/com/android/dialer/app/res/values-fa/strings.xml b/java/com/android/dialer/app/res/values-fa/strings.xml index 6a2c1ce94..63461664f 100644 --- a/java/com/android/dialer/app/res/values-fa/strings.xml +++ b/java/com/android/dialer/app/res/values-fa/strings.xml @@ -92,7 +92,7 @@ "تماس ویدئویی." "ارسال پیامک به %1$s" "پست صوتی شنیده نشده" - "شروع جستجوی صوتی" + "شروع جستجوی گفتاری" "تماس با %s" "پست صوتی" "%s ثانیه" @@ -110,7 +110,7 @@ "در حال بارگیری سیم کارت..." "مخاطبین سیم کارت" "هیچ برنامه مخاطبی در دسترس نیست" - "جستجوی شفاهی در دسترس نیست" + "جستجوی گفتاری در دسترس نیست" "برقراری تماس تلفنی ممکن نیست، زیرا برنامه تلفن غیرفعال شده است." "جستجوی مخاطبین" "افزودن شماره یا جستجوی مخاطب" diff --git a/java/com/android/dialer/app/res/values/styles.xml b/java/com/android/dialer/app/res/values/styles.xml index 24521ddaf..3b2df96f2 100644 --- a/java/com/android/dialer/app/res/values/styles.xml +++ b/java/com/android/dialer/app/res/values/styles.xml @@ -18,10 +18,6 @@ - - - - - - - diff --git a/java/com/android/dialer/theme/res/values/themes.xml b/java/com/android/dialer/theme/res/values/themes.xml index 452b36929..0d0c45f90 100644 --- a/java/com/android/dialer/theme/res/values/themes.xml +++ b/java/com/android/dialer/theme/res/values/themes.xml @@ -18,4 +18,12 @@ @dimen/action_bar_height @dimen/action_bar_height + + diff --git a/java/com/android/dialer/voicemailstatus/res/values-de/strings.xml b/java/com/android/dialer/voicemailstatus/res/values-de/strings.xml index 75a5a0742..1c1ede17b 100644 --- a/java/com/android/dialer/voicemailstatus/res/values-de/strings.xml +++ b/java/com/android/dialer/voicemailstatus/res/values-de/strings.xml @@ -18,7 +18,7 @@ "Keine Mailbox-Aktualisierungen verfügbar" - "Neue Mailbox-Nachricht wartet. Laden momentan nicht möglich." + "Neue Mailboxnachricht wartet. Laden momentan nicht möglich." "Richte deine Mailbox ein." "Audio nicht verfügbar" "Einrichten" diff --git a/java/com/android/dialer/widget/DialerToolbar.java b/java/com/android/dialer/widget/DialerToolbar.java new file mode 100644 index 000000000..715a27701 --- /dev/null +++ b/java/com/android/dialer/widget/DialerToolbar.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2017 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.widget; + +import android.app.Activity; +import android.content.Context; +import android.support.annotation.Nullable; +import android.support.annotation.StringRes; +import android.support.v7.widget.Toolbar; +import android.util.AttributeSet; +import android.widget.TextView; + +/** Toolbar widget for Dialer. */ +public class DialerToolbar extends Toolbar { + + private final TextView title; + private final TextView subtitle; + + public DialerToolbar(Context context, @Nullable AttributeSet attributeSet) { + super(context, attributeSet); + inflate(context, R.layout.dialer_toolbar, this); + title = (TextView) findViewById(R.id.title); + subtitle = (TextView) findViewById(R.id.subtitle); + + setElevation(getResources().getDimensionPixelSize(R.dimen.toolbar_elevation)); + setBackgroundColor(getResources().getColor(R.color.dialer_theme_color)); + setNavigationIcon(R.drawable.quantum_ic_close_white_24); + setNavigationOnClickListener(v -> ((Activity) context).finish()); + } + + @Override + public void setTitle(@StringRes int id) { + setTitle(getResources().getString(id)); + } + + @Override + public void setTitle(CharSequence charSequence) { + title.setText(charSequence); + } + + @Override + public void setSubtitle(@StringRes int id) { + setSubtitle(getResources().getString(id)); + } + + @Override + public void setSubtitle(CharSequence charSequence) { + if (charSequence != null) { + subtitle.setText(charSequence); + subtitle.setVisibility(VISIBLE); + } + } +} diff --git a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml new file mode 100644 index 000000000..c4aac65fb --- /dev/null +++ b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/java/com/android/dialer/widget/res/values/dimens.xml b/java/com/android/dialer/widget/res/values/dimens.xml index 6c4ea604f..0b1c1f15b 100644 --- a/java/com/android/dialer/widget/res/values/dimens.xml +++ b/java/com/android/dialer/widget/res/values/dimens.xml @@ -20,4 +20,9 @@ 16dp 12sp 1dp + + 20sp + 14sp + 12sp + 4dp \ No newline at end of file diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml index 4ddaa6ab5..276b47a5e 100644 --- a/java/com/android/incallui/AndroidManifest.xml +++ b/java/com/android/incallui/AndroidManifest.xml @@ -37,10 +37,6 @@ - - - Video is off diff --git a/java/com/android/incallui/call/CallList.java b/java/com/android/incallui/call/CallList.java index cc7e1e206..ab2feba3e 100644 --- a/java/com/android/incallui/call/CallList.java +++ b/java/com/android/incallui/call/CallList.java @@ -100,6 +100,11 @@ public class CallList implements DialerCallDelegate { @VisibleForTesting public CallList() {} + @VisibleForTesting + public static void setCallListInstance(CallList callList) { + sInstance = callList; + } + /** Static singleton accessor method. */ public static CallList getInstance() { return sInstance; @@ -124,9 +129,11 @@ public class CallList implements DialerCallDelegate { new SpamBindings.Listener() { @Override public void onComplete(boolean isSpam) { + boolean isIncomingCall = + call.getState() == DialerCall.State.INCOMING + || call.getState() == DialerCall.State.CALL_WAITING; if (isSpam) { - if (call.getState() != DialerCall.State.INCOMING - && call.getState() != DialerCall.State.CALL_WAITING) { + if (!isIncomingCall) { LogUtil.i( "CallList.onCallAdded", "marking spam call as not spam because it's not an incoming call"); @@ -140,13 +147,15 @@ public class CallList implements DialerCallDelegate { } } - Logger.get(context) - .logCallImpression( - isSpam - ? DialerImpression.Type.INCOMING_SPAM_CALL - : DialerImpression.Type.INCOMING_NON_SPAM_CALL, - call.getUniqueCallId(), - call.getTimeAddedMs()); + if (isIncomingCall) { + Logger.get(context) + .logCallImpression( + isSpam + ? DialerImpression.Type.INCOMING_SPAM_CALL + : DialerImpression.Type.INCOMING_NON_SPAM_CALL, + call.getUniqueCallId(), + call.getTimeAddedMs()); + } call.setSpam(isSpam); dialerCallListener.onDialerCallUpdate(); } diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index 4f5a8b7ec..f37ce27a7 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -49,6 +49,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; import com.android.dialer.enrichedcall.EnrichedCallComponent; +import com.android.dialer.lightbringer.LightbringerComponent; import com.android.dialer.logging.nano.ContactLookupResult; import com.android.incallui.latencyreport.LatencyReport; import com.android.incallui.util.TelecomCallUtil; @@ -56,6 +57,7 @@ import com.android.incallui.videotech.VideoTech; import com.android.incallui.videotech.VideoTech.VideoTechListener; import com.android.incallui.videotech.empty.EmptyVideoTech; import com.android.incallui.videotech.ims.ImsVideoTech; +import com.android.incallui.videotech.lightbringer.LightbringerTech; import com.android.incallui.videotech.utils.VideoUtils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -1252,12 +1254,16 @@ public class DialerCall implements VideoTechListener { } private static class VideoTechManager { + private final Context context; private final EmptyVideoTech emptyVideoTech = new EmptyVideoTech(); private final List videoTechs; private VideoTech savedTech; VideoTechManager(DialerCall call) { + this.context = call.mContext; + String phoneNumber = call.getNumber(); + phoneNumber = phoneNumber != null ? phoneNumber : ""; // Insert order here determines the priority of that video tech option this.videoTechs = new ArrayList<>(); @@ -1269,10 +1275,14 @@ public class DialerCall implements VideoTechListener { .newRcsVideoShare( EnrichedCallComponent.get(call.mContext).getEnrichedCallManager(), call, - phoneNumber != null ? phoneNumber : ""); + phoneNumber); if (rcsVideoTech != null) { videoTechs.add(rcsVideoTech); } + + videoTechs.add( + new LightbringerTech( + LightbringerComponent.get(call.mContext).getLightbringer(), call, phoneNumber)); } VideoTech getVideoTech() { @@ -1281,7 +1291,7 @@ public class DialerCall implements VideoTechListener { } for (VideoTech tech : videoTechs) { - if (tech.isAvailable()) { + if (tech.isAvailable(context)) { // Remember the first VideoTech that becomes available and always use it savedTech = tech; return savedTech; @@ -1293,7 +1303,7 @@ public class DialerCall implements VideoTechListener { void dispatchCallStateChanged(int newState) { for (VideoTech videoTech : videoTechs) { - videoTech.onCallStateChanged(newState); + videoTech.onCallStateChanged(context, newState); } } } diff --git a/java/com/android/incallui/calllocation/impl/LocationFragment.java b/java/com/android/incallui/calllocation/impl/LocationFragment.java index b152cd683..3c5d2f972 100644 --- a/java/com/android/incallui/calllocation/impl/LocationFragment.java +++ b/java/com/android/incallui/calllocation/impl/LocationFragment.java @@ -30,6 +30,8 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.ViewAnimator; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.Logger; +import com.android.dialer.logging.nano.DialerImpression; import com.android.incallui.baseui.BaseFragment; import java.util.Objects; import java.util.concurrent.TimeUnit; @@ -114,6 +116,7 @@ public class LocationFragment extends BaseFragment listeners = new ArrayList<>(); @@ -71,28 +91,32 @@ public class LocationHelper { } /** - * Whether the location is valid. We consider it valid if it was recorded within the specified - * time threshold of the present and has an accuracy less than the specified distance threshold. + * Check whether the location is valid. We consider it valid if it was recorded within the + * specified time threshold of the present and has an accuracy less than the specified distance + * threshold. * * @param location The location to determine the validity of. - * @return {@code true} if the location is valid, and {@code false} otherwise. + * @return {@code LocationStatus} indicating if the location is valid or the reason its not valid */ - static boolean isValidLocation(Location location) { - if (location != null) { - long locationTimeMs = location.getTime(); - long elapsedTimeMs = System.currentTimeMillis() - locationTimeMs; - if (elapsedTimeMs > LAST_UPDATE_THRESHOLD_MS) { - LogUtil.i("LocationHelper.isValidLocation", "stale location, age: " + elapsedTimeMs); - return false; - } - if (location.getAccuracy() > LOCATION_ACCURACY_THRESHOLD_METERS) { - LogUtil.i("LocationHelper.isValidLocation", "poor accuracy: " + location.getAccuracy()); - return false; - } - return true; + static @LocationStatus int checkLocation(Location location) { + if (location == null) { + LogUtil.i("LocationHelper.checkLocation", "no location"); + return LOCATION_STATUS_NO_LOCATION; } - LogUtil.i("LocationHelper.isValidLocation", "no location"); - return false; + + long locationTimeMs = location.getTime(); + long elapsedTimeMs = System.currentTimeMillis() - locationTimeMs; + if (elapsedTimeMs > LAST_UPDATE_THRESHOLD_MS) { + LogUtil.i("LocationHelper.checkLocation", "stale location, age: " + elapsedTimeMs); + return LOCATION_STATUS_STALE; + } + + if (location.getAccuracy() > LOCATION_ACCURACY_THRESHOLD_METERS) { + LogUtil.i("LocationHelper.checkLocation", "poor accuracy: " + location.getAccuracy()); + return LOCATION_STATUS_INACCURATE; + } + + return LOCATION_STATUS_OK; } @MainThread diff --git a/java/com/android/incallui/calllocation/impl/LocationPresenter.java b/java/com/android/incallui/calllocation/impl/LocationPresenter.java index a56fd3b3c..155d9fdfd 100644 --- a/java/com/android/incallui/calllocation/impl/LocationPresenter.java +++ b/java/com/android/incallui/calllocation/impl/LocationPresenter.java @@ -21,6 +21,8 @@ import android.graphics.drawable.Drawable; import android.location.Location; import android.os.AsyncTask; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.Logger; +import com.android.dialer.logging.nano.DialerImpression; import com.android.incallui.baseui.Presenter; import com.android.incallui.baseui.Ui; import com.google.android.gms.location.LocationListener; @@ -71,8 +73,9 @@ public class LocationPresenter extends Presenter LogUtil.i("LocationPresenter.updateLocation", "location: " + location); if (forceUpdate || !Objects.equals(mLastLocation, location)) { mLastLocation = location; - if (LocationHelper.isValidLocation(location)) { - LocationUi ui = getUi(); + int status = LocationHelper.checkLocation(location); + LocationUi ui = getUi(); + if (status == LocationHelper.LOCATION_STATUS_OK) { mDownloadMapTask = new DownloadMapImageTask(new WeakReference<>(ui)).execute(location); mReverseGeocodeTask = new ReverseGeocodeTask(new WeakReference<>(ui)).execute(location); if (ui != null) { @@ -80,6 +83,17 @@ public class LocationPresenter extends Presenter } else { LogUtil.i("LocationPresenter.updateLocation", "no Ui"); } + } else if (status != LocationHelper.LOCATION_STATUS_NO_LOCATION) { + // Log impression indicating why the location is not valid + // Note: its possible for this to be called before the UI has been initialized. + Context context = (ui != null) ? ui.getContext() : null; + if (context != null) { + if (status == LocationHelper.LOCATION_STATUS_STALE) { + Logger.get(context).logImpression(DialerImpression.Type.EMERGENCY_STALE_LOCATION); + } else if (status == LocationHelper.LOCATION_STATUS_INACCURATE) { + Logger.get(context).logImpression(DialerImpression.Type.EMERGENCY_INACCURATE_LOCATION); + } + } } } } diff --git a/java/com/android/incallui/commontheme/res/anim/blinking.xml b/java/com/android/incallui/commontheme/res/anim/blinking.xml index aaec18c56..4b921c611 100644 --- a/java/com/android/incallui/commontheme/res/anim/blinking.xml +++ b/java/com/android/incallui/commontheme/res/anim/blinking.xml @@ -1,10 +1,10 @@ + android:toAlpha="0.6"/> \ No newline at end of file diff --git a/java/com/android/incallui/commontheme/res/values/styles.xml b/java/com/android/incallui/commontheme/res/values/styles.xml index 311f9cf4b..81e64cb16 100644 --- a/java/com/android/incallui/commontheme/res/values/styles.xml +++ b/java/com/android/incallui/commontheme/res/values/styles.xml @@ -33,6 +33,15 @@ 18sp + +