From 8369df095a73a77b3715f8ae7ba06089cebca4ce Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 3 May 2017 10:27:13 -0700 Subject: This change reflects the Dialer V10 RC00 branch. RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f --- Android.mk | 62 +- apache/org/apache/james/mime4j/BodyDescriptor.java | 392 ------ .../james/mime4j/CloseShieldInputStream.java | 129 -- apache/org/apache/james/mime4j/ContentHandler.java | 177 --- .../james/mime4j/EOLConvertingInputStream.java | 139 --- apache/org/apache/james/mime4j/Log.java | 114 -- apache/org/apache/james/mime4j/LogFactory.java | 29 - .../james/mime4j/MimeBoundaryInputStream.java | 184 --- .../org/apache/james/mime4j/MimeStreamParser.java | 324 ----- .../org/apache/james/mime4j/RootInputStream.java | 111 -- .../org/apache/james/mime4j/codec/EncoderUtil.java | 630 ---------- .../james/mime4j/decoder/Base64InputStream.java | 151 --- .../org/apache/james/mime4j/decoder/ByteQueue.java | 62 - .../apache/james/mime4j/decoder/DecoderUtil.java | 284 ----- .../mime4j/decoder/QuotedPrintableInputStream.java | 229 ---- .../mime4j/decoder/UnboundedFifoByteBuffer.java | 272 ----- .../james/mime4j/field/AddressListField.java | 65 - .../mime4j/field/ContentTransferEncodingField.java | 88 -- .../james/mime4j/field/ContentTypeField.java | 259 ---- .../apache/james/mime4j/field/DateTimeField.java | 96 -- .../james/mime4j/field/DefaultFieldParser.java | 45 - .../james/mime4j/field/DelegatingFieldParser.java | 47 - apache/org/apache/james/mime4j/field/Field.java | 192 --- .../org/apache/james/mime4j/field/FieldParser.java | 21 - .../apache/james/mime4j/field/MailboxField.java | 70 -- .../james/mime4j/field/MailboxListField.java | 67 -- .../james/mime4j/field/UnstructuredField.java | 49 - .../apache/james/mime4j/field/address/Address.java | 52 - .../james/mime4j/field/address/AddressList.java | 138 --- .../apache/james/mime4j/field/address/Builder.java | 243 ---- .../james/mime4j/field/address/DomainList.java | 76 -- .../apache/james/mime4j/field/address/Group.java | 75 -- .../apache/james/mime4j/field/address/Mailbox.java | 121 -- .../james/mime4j/field/address/MailboxList.java | 71 -- .../james/mime4j/field/address/NamedMailbox.java | 71 -- .../mime4j/field/address/parser/ASTaddr_spec.java | 19 - .../mime4j/field/address/parser/ASTaddress.java | 19 - .../field/address/parser/ASTaddress_list.java | 19 - .../mime4j/field/address/parser/ASTangle_addr.java | 19 - .../mime4j/field/address/parser/ASTdomain.java | 19 - .../mime4j/field/address/parser/ASTgroup_body.java | 19 - .../mime4j/field/address/parser/ASTlocal_part.java | 19 - .../mime4j/field/address/parser/ASTmailbox.java | 19 - .../mime4j/field/address/parser/ASTname_addr.java | 19 - .../mime4j/field/address/parser/ASTphrase.java | 19 - .../mime4j/field/address/parser/ASTroute.java | 19 - .../field/address/parser/AddressListParser.java | 977 --------------- .../field/address/parser/AddressListParser.jj | 595 ---------- .../address/parser/AddressListParserConstants.java | 76 -- .../parser/AddressListParserTokenManager.java | 1009 ---------------- .../parser/AddressListParserTreeConstants.java | 35 - .../address/parser/AddressListParserVisitor.java | 19 - .../mime4j/field/address/parser/BaseNode.java | 30 - .../address/parser/JJTAddressListParserState.java | 123 -- .../james/mime4j/field/address/parser/Node.java | 37 - .../field/address/parser/ParseException.java | 207 ---- .../field/address/parser/SimpleCharStream.java | 454 ------- .../mime4j/field/address/parser/SimpleNode.java | 87 -- .../james/mime4j/field/address/parser/Token.java | 96 -- .../mime4j/field/address/parser/TokenMgrError.java | 148 --- .../contenttype/parser/ContentTypeParser.java | 268 ----- .../parser/ContentTypeParserConstants.java | 62 - .../parser/ContentTypeParserTokenManager.java | 877 -------------- .../field/contenttype/parser/ParseException.java | 207 ---- .../field/contenttype/parser/SimpleCharStream.java | 454 ------- .../mime4j/field/contenttype/parser/Token.java | 96 -- .../field/contenttype/parser/TokenMgrError.java | 148 --- .../james/mime4j/field/datetime/DateTime.java | 127 -- .../field/datetime/parser/DateTimeParser.java | 570 --------- .../datetime/parser/DateTimeParserConstants.java | 86 -- .../parser/DateTimeParserTokenManager.java | 882 -------------- .../field/datetime/parser/ParseException.java | 207 ---- .../field/datetime/parser/SimpleCharStream.java | 454 ------- .../james/mime4j/field/datetime/parser/Token.java | 96 -- .../field/datetime/parser/TokenMgrError.java | 148 --- .../org/apache/james/mime4j/util/CharsetUtil.java | 1249 -------------------- .../drawable/quantum_ic_business_vd_theme_24.xml | 10 + .../res/drawable/quantum_ic_report_vd_theme_24.xml | 10 + .../drawable/quantum_ic_voicemail_vd_theme_24.xml | 10 + .../contacts/common/ContactPhotoManager.java | 18 +- .../contacts/common/dialog/CallSubjectDialog.java | 12 +- .../common/lettertiles/LetterTileDrawable.java | 100 +- .../list/OnPhoneNumberPickerActionListener.java | 4 +- .../common/list/PhoneNumberPickerFragment.java | 19 +- .../common/res/drawable-hdpi/ic_ab_search.png | Bin 0 -> 1115 bytes .../res/drawable-hdpi/ic_arrow_back_24dp.png | Bin 0 -> 612 bytes .../res/drawable-hdpi/ic_business_white_120dp.png | Bin 0 -> 2477 bytes .../common/res/drawable-hdpi/ic_call_24dp.png | Bin 0 -> 340 bytes .../res/drawable-hdpi/ic_call_note_white_24dp.png | Bin 0 -> 373 bytes .../common/res/drawable-hdpi/ic_close_dk.png | Bin 0 -> 609 bytes .../common/res/drawable-hdpi/ic_create_24dp.png | Bin 0 -> 370 bytes .../res/drawable-hdpi/ic_group_white_24dp.png | Bin 0 -> 389 bytes .../ic_history_white_drawable_24dp.png | Bin 0 -> 525 bytes .../res/drawable-hdpi/ic_info_outline_24dp.png | Bin 0 -> 485 bytes .../common/res/drawable-hdpi/ic_menu_back.png | Bin 0 -> 799 bytes .../common/res/drawable-hdpi/ic_menu_group_dk.png | Bin 0 -> 1954 bytes .../common/res/drawable-hdpi/ic_menu_group_lt.png | Bin 0 -> 1922 bytes .../res/drawable-hdpi/ic_menu_overflow_lt.png | Bin 0 -> 220 bytes .../common/res/drawable-hdpi/ic_menu_person_dk.png | Bin 0 -> 1439 bytes .../common/res/drawable-hdpi/ic_menu_person_lt.png | Bin 0 -> 1416 bytes .../ic_menu_remove_field_holo_light.png | Bin 0 -> 515 bytes .../common/res/drawable-hdpi/ic_menu_star_dk.png | Bin 0 -> 1438 bytes .../res/drawable-hdpi/ic_menu_star_holo_light.png | Bin 0 -> 1211 bytes .../common/res/drawable-hdpi/ic_menu_star_lt.png | Bin 0 -> 1414 bytes .../common/res/drawable-hdpi/ic_person_24dp.png | Bin 0 -> 273 bytes .../common/res/drawable-hdpi/ic_phone_attach.png | Bin 0 -> 828 bytes .../common/res/drawable-hdpi/ic_rx_videocam.png | Bin 0 -> 413 bytes .../common/res/drawable-hdpi/ic_scroll_handle.png | Bin 0 -> 544 bytes .../common/res/drawable-hdpi/ic_tx_videocam.png | Bin 0 -> 370 bytes .../common/res/drawable-hdpi/ic_videocam.png | Bin 0 -> 269 bytes .../res/drawable-hdpi/ic_voicemail_avatar.png | Bin 0 -> 2856 bytes .../res/drawable-hdpi/list_activated_holo.9.png | Bin 0 -> 154 bytes .../res/drawable-hdpi/list_background_holo.9.png | Bin 0 -> 224 bytes .../res/drawable-hdpi/list_focused_holo.9.png | Bin 0 -> 235 bytes .../list_longpressed_holo_light.9.png | Bin 0 -> 158 bytes .../drawable-hdpi/list_pressed_holo_light.9.png | Bin 0 -> 159 bytes .../list_section_divider_holo_custom.9.png | Bin 0 -> 205 bytes .../common/res/drawable-hdpi/list_title_holo.9.png | Bin 0 -> 267 bytes .../res/drawable-mdpi/ic_business_white_120dp.png | Bin 2040 -> 0 bytes .../res/drawable-mdpi/ic_voicemail_avatar.png | Bin 1752 -> 0 bytes .../res/drawable-xhdpi/ic_business_white_120dp.png | Bin 2916 -> 0 bytes .../res/drawable-xhdpi/ic_voicemail_avatar.png | Bin 3783 -> 0 bytes .../drawable-xxhdpi/ic_business_white_120dp.png | Bin 2541 -> 0 bytes .../res/drawable-xxhdpi/ic_voicemail_avatar.png | Bin 6206 -> 0 bytes .../drawable-xxxhdpi/ic_business_white_120dp.png | Bin 2915 -> 0 bytes .../res/drawable-xxxhdpi/ic_voicemail_avatar.png | Bin 8570 -> 0 bytes .../res/mipmap-hdpi/ic_contacts_launcher.png | Bin 0 -> 3169 bytes .../common/res/values-b+sr+Latn/strings.xml | 267 +++++ .../android/contacts/common/res/values/colors.xml | 2 + java/com/android/dialer/app/AndroidManifest.xml | 10 + java/com/android/dialer/app/DialtactsActivity.java | 6 +- .../app/calllog/BlockReportSpamListener.java | 13 +- .../dialer/app/calllog/CallLogActivity.java | 2 +- .../android/dialer/app/calllog/CallLogAdapter.java | 160 ++- .../dialer/app/calllog/CallLogListItemHelper.java | 2 +- .../app/calllog/CallLogListItemViewHolder.java | 192 ++- .../app/calllog/DefaultVoicemailNotifier.java | 110 +- .../android/dialer/app/calllog/IntentProvider.java | 6 +- .../dialer/app/calllog/MissedCallNotifier.java | 2 +- .../dialer/app/calllog/PhoneCallDetailsHelper.java | 7 +- .../calllog/VisualVoicemailCallLogFragment.java | 18 +- .../dialer/app/calllog/VoicemailQueryHandler.java | 4 +- .../dialer/app/contactinfo/ContactInfoCache.java | 5 +- .../dialer/app/dialpad/DialpadFragment.java | 2 +- .../app/filterednumber/BlockedNumbersAdapter.java | 4 +- .../BlockedNumbersSettingsActivity.java | 2 +- .../dialer/app/list/BlockedListSearchFragment.java | 14 +- .../dialer/app/list/DialtactsPagerAdapter.java | 47 +- .../com/android/dialer/app/list/ListsFragment.java | 13 +- .../dialer/app/list/OldSpeedDialFragment.java | 16 +- .../dialer/app/list/RegularSearchFragment.java | 4 +- .../android/dialer/app/list/SearchFragment.java | 28 +- .../dialer/app/list/SmartDialSearchFragment.java | 4 +- .../app/res/drawable-hdpi/empty_call_log.png | Bin 0 -> 3538 bytes .../app/res/drawable-hdpi/empty_contacts.png | Bin 0 -> 2461 bytes .../app/res/drawable-hdpi/empty_speed_dial.png | Bin 0 -> 6041 bytes .../res/drawable-hdpi/ic_archive_white_24dp.png | Bin 0 -> 247 bytes .../app/res/drawable-hdpi/ic_content_copy_24dp.png | Bin 0 -> 203 bytes .../app/res/drawable-hdpi/ic_delete_24dp.png | Bin 0 -> 242 bytes .../res/drawable-hdpi/ic_dialer_fork_add_call.png | Bin 0 -> 1649 bytes .../drawable-hdpi/ic_dialer_fork_current_call.png | Bin 0 -> 2305 bytes .../res/drawable-hdpi/ic_dialer_fork_tt_keypad.png | Bin 0 -> 2419 bytes .../dialer/app/res/drawable-hdpi/ic_grade_24dp.png | Bin 0 -> 370 bytes .../dialer/app/res/drawable-hdpi/ic_handle.png | Bin 0 -> 543 bytes .../app/res/drawable-hdpi/ic_menu_history_lt.png | Bin 0 -> 1565 bytes .../app/res/drawable-hdpi/ic_mic_grey600.png | Bin 0 -> 377 bytes .../app/res/drawable-hdpi/ic_more_vert_24dp.png | Bin 0 -> 134 bytes .../ic_not_interested_googblue_24dp.png | Bin 0 -> 565 bytes .../dialer/app/res/drawable-hdpi/ic_not_spam.png | Bin 0 -> 858 bytes .../dialer/app/res/drawable-hdpi/ic_pause_24dp.png | Bin 0 -> 105 bytes .../app/res/drawable-hdpi/ic_people_24dp.png | Bin 0 -> 299 bytes .../dialer/app/res/drawable-hdpi/ic_phone_24dp.png | Bin 0 -> 347 bytes .../app/res/drawable-hdpi/ic_play_arrow_24dp.png | Bin 0 -> 195 bytes .../dialer/app/res/drawable-hdpi/ic_remove.png | Bin 0 -> 884 bytes .../app/res/drawable-hdpi/ic_results_phone.png | Bin 0 -> 1084 bytes .../app/res/drawable-hdpi/ic_schedule_24dp.png | Bin 0 -> 575 bytes .../app/res/drawable-hdpi/ic_share_white_24dp.png | Bin 0 -> 397 bytes .../dialer/app/res/drawable-hdpi/ic_star.png | Bin 0 -> 732 bytes .../dialer/app/res/drawable-hdpi/ic_unblock.png | Bin 0 -> 1049 bytes .../app/res/drawable-hdpi/ic_vm_sound_off_dis.png | Bin 0 -> 1339 bytes .../app/res/drawable-hdpi/ic_vm_sound_off_dk.png | Bin 0 -> 1337 bytes .../app/res/drawable-hdpi/ic_vm_sound_on_dis.png | Bin 0 -> 1755 bytes .../app/res/drawable-hdpi/ic_vm_sound_on_dk.png | Bin 0 -> 1750 bytes .../app/res/drawable-hdpi/ic_voicemail_24dp.png | Bin 0 -> 478 bytes .../app/res/drawable-hdpi/ic_volume_down_24dp.png | Bin 0 -> 186 bytes .../app/res/drawable-hdpi/ic_volume_up_24dp.png | Bin 0 -> 365 bytes .../app/res/drawable-hdpi/search_shadow.9.png | Bin 0 -> 183 bytes .../app/res/drawable-hdpi/shadow_contact_photo.png | Bin 0 -> 960 bytes .../app/res/layout/all_contacts_fragment.xml | 4 +- .../dialer/app/res/menu/actionbar_delete.xml | 2 +- .../app/res/mipmap-hdpi/ic_launcher_phone.png | Bin 0 -> 2780 bytes .../android/dialer/app/res/values-af/strings.xml | 7 + .../android/dialer/app/res/values-am/strings.xml | 8 + .../android/dialer/app/res/values-ar/strings.xml | 7 + .../android/dialer/app/res/values-az/strings.xml | 8 + .../dialer/app/res/values-b+sr+Latn/strings.xml | 234 ++++ .../android/dialer/app/res/values-be/strings.xml | 8 + .../android/dialer/app/res/values-bg/strings.xml | 7 + .../android/dialer/app/res/values-bn/strings.xml | 8 + .../android/dialer/app/res/values-bs/strings.xml | 8 + .../android/dialer/app/res/values-ca/strings.xml | 8 + .../android/dialer/app/res/values-cs/strings.xml | 8 + .../android/dialer/app/res/values-da/strings.xml | 8 + .../android/dialer/app/res/values-de/strings.xml | 10 + .../android/dialer/app/res/values-el/strings.xml | 8 + .../dialer/app/res/values-en-rAU/strings.xml | 8 + .../dialer/app/res/values-en-rGB/strings.xml | 8 + .../dialer/app/res/values-en-rIN/strings.xml | 8 + .../dialer/app/res/values-es-rUS/strings.xml | 8 + .../android/dialer/app/res/values-es/strings.xml | 7 + .../android/dialer/app/res/values-et/strings.xml | 8 + .../android/dialer/app/res/values-eu/strings.xml | 8 + .../android/dialer/app/res/values-fa/strings.xml | 10 + .../android/dialer/app/res/values-fi/strings.xml | 7 + .../dialer/app/res/values-fr-rCA/strings.xml | 7 + .../android/dialer/app/res/values-fr/strings.xml | 7 + .../android/dialer/app/res/values-gl/strings.xml | 8 + .../android/dialer/app/res/values-gu/strings.xml | 8 + .../android/dialer/app/res/values-hi/strings.xml | 8 + .../android/dialer/app/res/values-hr/strings.xml | 10 + .../android/dialer/app/res/values-hu/strings.xml | 10 + .../android/dialer/app/res/values-hy/strings.xml | 7 + .../android/dialer/app/res/values-in/strings.xml | 12 +- .../android/dialer/app/res/values-is/strings.xml | 8 + .../android/dialer/app/res/values-it/strings.xml | 8 + .../android/dialer/app/res/values-iw/strings.xml | 7 + .../android/dialer/app/res/values-ja/strings.xml | 7 + .../android/dialer/app/res/values-ka/strings.xml | 10 + .../android/dialer/app/res/values-kk/strings.xml | 8 + .../android/dialer/app/res/values-km/strings.xml | 7 + .../android/dialer/app/res/values-kn/strings.xml | 8 + .../android/dialer/app/res/values-ko/strings.xml | 8 + .../android/dialer/app/res/values-ky/strings.xml | 10 + .../android/dialer/app/res/values-lo/strings.xml | 8 + .../android/dialer/app/res/values-lt/strings.xml | 8 + .../android/dialer/app/res/values-lv/strings.xml | 8 + .../android/dialer/app/res/values-mk/strings.xml | 8 + .../android/dialer/app/res/values-ml/strings.xml | 8 + .../android/dialer/app/res/values-mn/strings.xml | 7 + .../android/dialer/app/res/values-mr/strings.xml | 8 + .../android/dialer/app/res/values-ms/strings.xml | 10 + .../android/dialer/app/res/values-my/strings.xml | 8 + .../android/dialer/app/res/values-nb/strings.xml | 7 + .../android/dialer/app/res/values-ne/strings.xml | 7 + .../android/dialer/app/res/values-nl/strings.xml | 8 + .../android/dialer/app/res/values-no/strings.xml | 7 + .../android/dialer/app/res/values-pa/strings.xml | 8 + .../android/dialer/app/res/values-pl/strings.xml | 8 + .../dialer/app/res/values-pt-rBR/strings.xml | 8 + .../dialer/app/res/values-pt-rPT/strings.xml | 8 + .../android/dialer/app/res/values-pt/strings.xml | 8 + .../android/dialer/app/res/values-ro/strings.xml | 8 + .../android/dialer/app/res/values-ru/strings.xml | 8 + .../android/dialer/app/res/values-si/strings.xml | 8 + .../android/dialer/app/res/values-sk/strings.xml | 8 + .../android/dialer/app/res/values-sl/strings.xml | 8 + .../android/dialer/app/res/values-sq/strings.xml | 10 + .../android/dialer/app/res/values-sr/strings.xml | 8 + .../android/dialer/app/res/values-sv/strings.xml | 8 + .../android/dialer/app/res/values-sw/strings.xml | 10 + .../android/dialer/app/res/values-ta/strings.xml | 8 + .../android/dialer/app/res/values-te/strings.xml | 8 + .../android/dialer/app/res/values-th/strings.xml | 8 + .../android/dialer/app/res/values-tl/strings.xml | 8 + .../android/dialer/app/res/values-tr/strings.xml | 10 + .../android/dialer/app/res/values-uk/strings.xml | 8 + .../android/dialer/app/res/values-ur/strings.xml | 10 + .../android/dialer/app/res/values-uz/strings.xml | 10 + .../android/dialer/app/res/values-vi/strings.xml | 8 + .../dialer/app/res/values-zh-rCN/strings.xml | 8 + .../dialer/app/res/values-zh-rHK/strings.xml | 7 + .../dialer/app/res/values-zh-rTW/strings.xml | 10 + .../android/dialer/app/res/values-zu/strings.xml | 8 + java/com/android/dialer/app/res/values/strings.xml | 12 + .../LegacyVoicemailNotificationReceiver.java | 90 ++ .../app/voicemail/VoicemailErrorManager.java | 70 +- .../app/voicemail/VoicemailPlaybackLayout.java | 2 +- .../app/voicemail/VoicemailPlaybackPresenter.java | 2 +- .../error/OmtpVoicemailMessageCreator.java | 21 +- .../app/voicemail/error/VoicemailErrorAlert.java | 2 + .../app/voicemail/error/VoicemailErrorMessage.java | 8 +- .../app/voicemail/error/VoicemailStatus.java | 63 +- .../error/VoicemailStatusCorruptionHandler.java | 2 +- .../error/Vvm3VoicemailMessageCreator.java | 11 +- .../res/drawable-hdpi/ic_voicemail_error_24px.png | Bin 0 -> 638 bytes .../res/drawable-mdpi/ic_voicemail_error_24px.png | Bin 0 -> 339 bytes .../res/drawable-xhdpi/ic_voicemail_error_24px.png | Bin 0 -> 589 bytes .../drawable-xxhdpi/ic_voicemail_error_24px.png | Bin 0 -> 813 bytes .../drawable-xxxhdpi/ic_voicemail_error_24px.png | Bin 0 -> 1043 bytes .../layout/voicemail_error_message_fragment.xml | 149 ++- .../app/voicemail/error/res/values-af/strings.xml | 8 +- .../app/voicemail/error/res/values-am/strings.xml | 8 +- .../app/voicemail/error/res/values-ar/strings.xml | 8 +- .../app/voicemail/error/res/values-az/strings.xml | 8 +- .../error/res/values-b+sr+Latn/strings.xml | 110 ++ .../app/voicemail/error/res/values-be/strings.xml | 8 +- .../app/voicemail/error/res/values-bg/strings.xml | 8 +- .../app/voicemail/error/res/values-bn/strings.xml | 8 +- .../app/voicemail/error/res/values-bs/strings.xml | 8 +- .../app/voicemail/error/res/values-ca/strings.xml | 8 +- .../app/voicemail/error/res/values-cs/strings.xml | 8 +- .../app/voicemail/error/res/values-da/strings.xml | 8 +- .../app/voicemail/error/res/values-de/strings.xml | 8 +- .../app/voicemail/error/res/values-el/strings.xml | 8 +- .../voicemail/error/res/values-en-rAU/strings.xml | 8 +- .../voicemail/error/res/values-en-rGB/strings.xml | 8 +- .../voicemail/error/res/values-en-rIN/strings.xml | 8 +- .../voicemail/error/res/values-es-rUS/strings.xml | 8 +- .../app/voicemail/error/res/values-es/strings.xml | 8 +- .../app/voicemail/error/res/values-et/strings.xml | 8 +- .../app/voicemail/error/res/values-eu/strings.xml | 8 +- .../app/voicemail/error/res/values-fa/strings.xml | 8 +- .../app/voicemail/error/res/values-fi/strings.xml | 8 +- .../voicemail/error/res/values-fr-rCA/strings.xml | 8 +- .../app/voicemail/error/res/values-fr/strings.xml | 8 +- .../app/voicemail/error/res/values-gl/strings.xml | 8 +- .../app/voicemail/error/res/values-gu/strings.xml | 8 +- .../app/voicemail/error/res/values-hi/strings.xml | 8 +- .../app/voicemail/error/res/values-hr/strings.xml | 8 +- .../app/voicemail/error/res/values-hu/strings.xml | 8 +- .../app/voicemail/error/res/values-hy/strings.xml | 8 +- .../app/voicemail/error/res/values-in/strings.xml | 8 +- .../app/voicemail/error/res/values-is/strings.xml | 8 +- .../app/voicemail/error/res/values-it/strings.xml | 8 +- .../app/voicemail/error/res/values-iw/strings.xml | 8 +- .../app/voicemail/error/res/values-ja/strings.xml | 8 +- .../app/voicemail/error/res/values-ka/strings.xml | 8 +- .../app/voicemail/error/res/values-kk/strings.xml | 8 +- .../app/voicemail/error/res/values-km/strings.xml | 8 +- .../app/voicemail/error/res/values-kn/strings.xml | 8 +- .../app/voicemail/error/res/values-ko/strings.xml | 8 +- .../app/voicemail/error/res/values-ky/strings.xml | 8 +- .../app/voicemail/error/res/values-lo/strings.xml | 8 +- .../app/voicemail/error/res/values-lt/strings.xml | 8 +- .../app/voicemail/error/res/values-lv/strings.xml | 8 +- .../app/voicemail/error/res/values-mk/strings.xml | 8 +- .../app/voicemail/error/res/values-ml/strings.xml | 8 +- .../app/voicemail/error/res/values-mn/strings.xml | 8 +- .../app/voicemail/error/res/values-mr/strings.xml | 8 +- .../app/voicemail/error/res/values-ms/strings.xml | 8 +- .../app/voicemail/error/res/values-my/strings.xml | 8 +- .../app/voicemail/error/res/values-nb/strings.xml | 8 +- .../app/voicemail/error/res/values-ne/strings.xml | 8 +- .../app/voicemail/error/res/values-nl/strings.xml | 8 +- .../app/voicemail/error/res/values-no/strings.xml | 8 +- .../app/voicemail/error/res/values-pa/strings.xml | 8 +- .../app/voicemail/error/res/values-pl/strings.xml | 8 +- .../voicemail/error/res/values-pt-rBR/strings.xml | 8 +- .../voicemail/error/res/values-pt-rPT/strings.xml | 8 +- .../app/voicemail/error/res/values-pt/strings.xml | 8 +- .../app/voicemail/error/res/values-ro/strings.xml | 8 +- .../app/voicemail/error/res/values-ru/strings.xml | 8 +- .../app/voicemail/error/res/values-si/strings.xml | 8 +- .../app/voicemail/error/res/values-sk/strings.xml | 8 +- .../app/voicemail/error/res/values-sl/strings.xml | 8 +- .../app/voicemail/error/res/values-sq/strings.xml | 8 +- .../app/voicemail/error/res/values-sr/strings.xml | 8 +- .../app/voicemail/error/res/values-sv/strings.xml | 8 +- .../app/voicemail/error/res/values-sw/strings.xml | 8 +- .../app/voicemail/error/res/values-ta/strings.xml | 8 +- .../app/voicemail/error/res/values-te/strings.xml | 8 +- .../app/voicemail/error/res/values-th/strings.xml | 8 +- .../app/voicemail/error/res/values-tl/strings.xml | 8 +- .../app/voicemail/error/res/values-tr/strings.xml | 8 +- .../app/voicemail/error/res/values-uk/strings.xml | 8 +- .../app/voicemail/error/res/values-ur/strings.xml | 8 +- .../app/voicemail/error/res/values-uz/strings.xml | 8 +- .../app/voicemail/error/res/values-vi/strings.xml | 8 +- .../voicemail/error/res/values-zh-rCN/strings.xml | 8 +- .../voicemail/error/res/values-zh-rHK/strings.xml | 8 +- .../voicemail/error/res/values-zh-rTW/strings.xml | 8 +- .../app/voicemail/error/res/values-zu/strings.xml | 8 +- .../app/voicemail/error/res/values/dimens.xml | 13 + .../app/voicemail/error/res/values/strings.xml | 8 +- .../android/dialer/backup/DialerBackupAgent.java | 5 +- .../android/dialer/backup/DialerBackupUtils.java | 111 +- .../android/dialer/backup/nano/VoicemailInfo.java | 399 ------- .../dialer/backup/proto/voicemail_info.proto | 30 + .../binary/aosp/AospDialerRootComponent.java | 2 + .../basecomponent/BaseDialerRootComponent.java | 6 +- .../dialer/binary/common/DialerApplication.java | 2 + .../dialer/blocking/BlockNumberDialogFragment.java | 2 +- .../dialer/blocking/FilteredNumbersUtil.java | 2 +- .../blocking/res/drawable-hdpi/ic_block_24dp.png | Bin 0 -> 478 bytes .../blocking/res/drawable-hdpi/ic_report_24dp.png | Bin 0 -> 240 bytes .../res/drawable-hdpi/ic_report_white_36dp.png | Bin 0 -> 312 bytes .../blocking/res/values-b+sr+Latn/strings.xml | 46 + .../dialer/callcomposer/CallComposerActivity.java | 103 +- .../callcomposer/CameraComposerFragment.java | 2 +- .../callcomposer/CopyAndResizeImageWorker.java | 70 ++ .../callcomposer/GalleryComposerFragment.java | 65 +- .../callcomposer/camera/ImagePersistTask.java | 6 +- .../cameraui/res/values-b+sr+Latn/strings.xml | 11 + .../callcomposer/nano/CallComposerContact.java | 220 ---- .../callcomposer/proto/call_composer_contact.proto | 18 + .../callcomposer/res/values-b+sr+Latn/strings.xml | 33 + .../dialer/callcomposer/util/BitmapResizer.java | 67 ++ .../callcomposer/util/CopyAndResizeImageTask.java | 124 -- .../dialer/calldetails/CallDetailsActivity.java | 33 +- .../dialer/calldetails/CallDetailsAdapter.java | 24 +- .../calldetails/CallDetailsEntryViewHolder.java | 49 +- .../calldetails/CallDetailsFooterViewHolder.java | 8 +- .../calldetails/CallDetailsHeaderViewHolder.java | 36 +- .../calldetails/nano/CallDetailsEntries.java | 440 ------- .../calldetails/proto/call_details_entries.proto | 23 + .../calldetails/res/layout/call_details_footer.xml | 1 + .../calldetails/res/layout/contact_container.xml | 10 +- .../dialer/calldetails/res/values-af/strings.xml | 1 + .../dialer/calldetails/res/values-am/strings.xml | 1 + .../dialer/calldetails/res/values-ar/strings.xml | 1 + .../dialer/calldetails/res/values-az/strings.xml | 1 + .../calldetails/res/values-b+sr+Latn/strings.xml | 29 + .../dialer/calldetails/res/values-be/strings.xml | 1 + .../dialer/calldetails/res/values-bg/strings.xml | 1 + .../dialer/calldetails/res/values-bn/strings.xml | 1 + .../dialer/calldetails/res/values-bs/strings.xml | 1 + .../dialer/calldetails/res/values-ca/strings.xml | 1 + .../dialer/calldetails/res/values-cs/strings.xml | 1 + .../dialer/calldetails/res/values-da/strings.xml | 1 + .../dialer/calldetails/res/values-de/strings.xml | 1 + .../dialer/calldetails/res/values-el/strings.xml | 1 + .../calldetails/res/values-en-rAU/strings.xml | 1 + .../calldetails/res/values-en-rGB/strings.xml | 1 + .../calldetails/res/values-en-rIN/strings.xml | 1 + .../calldetails/res/values-es-rUS/strings.xml | 1 + .../dialer/calldetails/res/values-es/strings.xml | 1 + .../dialer/calldetails/res/values-et/strings.xml | 1 + .../dialer/calldetails/res/values-eu/strings.xml | 1 + .../dialer/calldetails/res/values-fa/strings.xml | 1 + .../dialer/calldetails/res/values-fi/strings.xml | 1 + .../calldetails/res/values-fr-rCA/strings.xml | 1 + .../dialer/calldetails/res/values-fr/strings.xml | 1 + .../dialer/calldetails/res/values-gl/strings.xml | 1 + .../dialer/calldetails/res/values-gu/strings.xml | 1 + .../dialer/calldetails/res/values-hi/strings.xml | 1 + .../dialer/calldetails/res/values-hr/strings.xml | 1 + .../dialer/calldetails/res/values-hu/strings.xml | 1 + .../dialer/calldetails/res/values-hy/strings.xml | 1 + .../dialer/calldetails/res/values-in/strings.xml | 1 + .../dialer/calldetails/res/values-is/strings.xml | 1 + .../dialer/calldetails/res/values-it/strings.xml | 1 + .../dialer/calldetails/res/values-iw/strings.xml | 1 + .../dialer/calldetails/res/values-ja/strings.xml | 1 + .../dialer/calldetails/res/values-ka/strings.xml | 1 + .../dialer/calldetails/res/values-kk/strings.xml | 1 + .../dialer/calldetails/res/values-km/strings.xml | 1 + .../dialer/calldetails/res/values-kn/strings.xml | 1 + .../dialer/calldetails/res/values-ko/strings.xml | 1 + .../dialer/calldetails/res/values-ky/strings.xml | 1 + .../dialer/calldetails/res/values-lo/strings.xml | 1 + .../dialer/calldetails/res/values-lt/strings.xml | 1 + .../dialer/calldetails/res/values-lv/strings.xml | 1 + .../dialer/calldetails/res/values-mk/strings.xml | 1 + .../dialer/calldetails/res/values-ml/strings.xml | 1 + .../dialer/calldetails/res/values-mn/strings.xml | 1 + .../dialer/calldetails/res/values-mr/strings.xml | 1 + .../dialer/calldetails/res/values-ms/strings.xml | 1 + .../dialer/calldetails/res/values-my/strings.xml | 1 + .../dialer/calldetails/res/values-nb/strings.xml | 1 + .../dialer/calldetails/res/values-ne/strings.xml | 1 + .../dialer/calldetails/res/values-nl/strings.xml | 1 + .../dialer/calldetails/res/values-no/strings.xml | 1 + .../dialer/calldetails/res/values-pa/strings.xml | 1 + .../dialer/calldetails/res/values-pl/strings.xml | 1 + .../calldetails/res/values-pt-rBR/strings.xml | 1 + .../calldetails/res/values-pt-rPT/strings.xml | 1 + .../dialer/calldetails/res/values-pt/strings.xml | 1 + .../dialer/calldetails/res/values-ro/strings.xml | 1 + .../dialer/calldetails/res/values-ru/strings.xml | 1 + .../dialer/calldetails/res/values-si/strings.xml | 1 + .../dialer/calldetails/res/values-sk/strings.xml | 1 + .../dialer/calldetails/res/values-sl/strings.xml | 1 + .../dialer/calldetails/res/values-sq/strings.xml | 1 + .../dialer/calldetails/res/values-sr/strings.xml | 1 + .../dialer/calldetails/res/values-sv/strings.xml | 1 + .../dialer/calldetails/res/values-sw/strings.xml | 1 + .../dialer/calldetails/res/values-ta/strings.xml | 1 + .../dialer/calldetails/res/values-te/strings.xml | 1 + .../dialer/calldetails/res/values-th/strings.xml | 1 + .../dialer/calldetails/res/values-tl/strings.xml | 1 + .../dialer/calldetails/res/values-tr/strings.xml | 1 + .../dialer/calldetails/res/values-uk/strings.xml | 1 + .../dialer/calldetails/res/values-ur/strings.xml | 1 + .../dialer/calldetails/res/values-uz/strings.xml | 1 + .../dialer/calldetails/res/values-vi/strings.xml | 1 + .../calldetails/res/values-zh-rCN/strings.xml | 1 + .../calldetails/res/values-zh-rHK/strings.xml | 1 + .../calldetails/res/values-zh-rTW/strings.xml | 1 + .../dialer/calldetails/res/values-zu/strings.xml | 1 + .../dialer/calldetails/res/values/dimens.xml | 10 +- .../dialer/calldetails/res/values/strings.xml | 7 + .../dialer/callintent/CallIntentBuilder.java | 15 +- .../dialer/callintent/CallIntentParser.java | 9 +- .../dialer/callintent/call_initiation_type.proto | 60 + .../dialer/callintent/call_specific_app_data.proto | 20 + .../dialer/callintent/nano/CallInitiationType.java | 102 -- .../callintent/nano/CallSpecificAppData.java | 143 --- .../android/dialer/calllog/CallLogComponent.java | 37 + .../android/dialer/calllog/CallLogFramework.java | 117 ++ java/com/android/dialer/calllog/CallLogModule.java | 62 + java/com/android/dialer/calllog/DataSources.java | 31 + .../calllog/RefreshAnnotatedCallLogWorker.java | 183 +++ .../dialer/calllog/database/AnnotatedCallLog.java | 53 + .../database/AnnotatedCallLogDatabaseHelper.java | 58 + .../dialer/calllog/database/CallLogMutations.java | 58 + .../calllog/datasources/CallLogDataSource.java | 68 ++ .../datasources/contacts/ContactsDataSource.java | 58 + .../systemcalllog/SystemCallLogDataSource.java | 114 ++ .../android/dialer/calllog/ui/AndroidManifest.xml | 16 + .../calllog/ui/AnnotatedCallLogCursorLoader.java | 48 + .../dialer/calllog/ui/NewCallLogFragment.java | 138 +++ .../calllog/ui/res/layout/new_call_log_entry.xml | 33 + .../ui/res/layout/new_call_log_fragment.xml | 22 + .../dialer/calllogutils/CallEntryFormatter.java | 19 +- .../dialer/calllogutils/CallTypeIconsView.java | 28 +- .../dialer/calllogutils/PhoneCallDetails.java | 4 +- .../dialer/calllogutils/res/values-af/strings.xml | 6 +- .../dialer/calllogutils/res/values-am/strings.xml | 6 +- .../dialer/calllogutils/res/values-ar/strings.xml | 6 +- .../dialer/calllogutils/res/values-az/strings.xml | 6 +- .../calllogutils/res/values-b+sr+Latn/strings.xml | 42 + .../dialer/calllogutils/res/values-be/strings.xml | 6 +- .../dialer/calllogutils/res/values-bg/strings.xml | 6 +- .../dialer/calllogutils/res/values-bn/strings.xml | 6 +- .../dialer/calllogutils/res/values-bs/strings.xml | 6 +- .../dialer/calllogutils/res/values-ca/strings.xml | 6 +- .../dialer/calllogutils/res/values-cs/strings.xml | 6 +- .../dialer/calllogutils/res/values-da/strings.xml | 6 +- .../dialer/calllogutils/res/values-de/strings.xml | 6 +- .../dialer/calllogutils/res/values-el/strings.xml | 6 +- .../calllogutils/res/values-en-rAU/strings.xml | 6 +- .../calllogutils/res/values-en-rGB/strings.xml | 6 +- .../calllogutils/res/values-en-rIN/strings.xml | 6 +- .../calllogutils/res/values-es-rUS/strings.xml | 6 +- .../dialer/calllogutils/res/values-es/strings.xml | 6 +- .../dialer/calllogutils/res/values-et/strings.xml | 6 +- .../dialer/calllogutils/res/values-eu/strings.xml | 6 +- .../dialer/calllogutils/res/values-fa/strings.xml | 6 +- .../dialer/calllogutils/res/values-fi/strings.xml | 6 +- .../calllogutils/res/values-fr-rCA/strings.xml | 6 +- .../dialer/calllogutils/res/values-fr/strings.xml | 6 +- .../dialer/calllogutils/res/values-gl/strings.xml | 6 +- .../dialer/calllogutils/res/values-gu/strings.xml | 6 +- .../dialer/calllogutils/res/values-hi/strings.xml | 6 +- .../dialer/calllogutils/res/values-hr/strings.xml | 6 +- .../dialer/calllogutils/res/values-hu/strings.xml | 6 +- .../dialer/calllogutils/res/values-hy/strings.xml | 6 +- .../dialer/calllogutils/res/values-in/strings.xml | 6 +- .../dialer/calllogutils/res/values-is/strings.xml | 6 +- .../dialer/calllogutils/res/values-it/strings.xml | 6 +- .../dialer/calllogutils/res/values-iw/strings.xml | 6 +- .../dialer/calllogutils/res/values-ja/strings.xml | 6 +- .../dialer/calllogutils/res/values-ka/strings.xml | 6 +- .../dialer/calllogutils/res/values-kk/strings.xml | 6 +- .../dialer/calllogutils/res/values-km/strings.xml | 6 +- .../dialer/calllogutils/res/values-kn/strings.xml | 6 +- .../dialer/calllogutils/res/values-ko/strings.xml | 6 +- .../dialer/calllogutils/res/values-ky/strings.xml | 6 +- .../dialer/calllogutils/res/values-lo/strings.xml | 6 +- .../dialer/calllogutils/res/values-lt/strings.xml | 6 +- .../dialer/calllogutils/res/values-lv/strings.xml | 6 +- .../dialer/calllogutils/res/values-mk/strings.xml | 6 +- .../dialer/calllogutils/res/values-ml/strings.xml | 6 +- .../dialer/calllogutils/res/values-mn/strings.xml | 6 +- .../dialer/calllogutils/res/values-mr/strings.xml | 6 +- .../dialer/calllogutils/res/values-ms/strings.xml | 6 +- .../dialer/calllogutils/res/values-my/strings.xml | 6 +- .../dialer/calllogutils/res/values-nb/strings.xml | 6 +- .../dialer/calllogutils/res/values-ne/strings.xml | 6 +- .../dialer/calllogutils/res/values-nl/strings.xml | 6 +- .../dialer/calllogutils/res/values-no/strings.xml | 6 +- .../dialer/calllogutils/res/values-pa/strings.xml | 6 +- .../dialer/calllogutils/res/values-pl/strings.xml | 6 +- .../calllogutils/res/values-pt-rBR/strings.xml | 6 +- .../calllogutils/res/values-pt-rPT/strings.xml | 6 +- .../dialer/calllogutils/res/values-pt/strings.xml | 6 +- .../dialer/calllogutils/res/values-ro/strings.xml | 6 +- .../dialer/calllogutils/res/values-ru/strings.xml | 6 +- .../dialer/calllogutils/res/values-si/strings.xml | 6 +- .../dialer/calllogutils/res/values-sk/strings.xml | 6 +- .../dialer/calllogutils/res/values-sl/strings.xml | 6 +- .../dialer/calllogutils/res/values-sq/strings.xml | 6 +- .../dialer/calllogutils/res/values-sr/strings.xml | 6 +- .../dialer/calllogutils/res/values-sv/strings.xml | 6 +- .../dialer/calllogutils/res/values-sw/strings.xml | 6 +- .../dialer/calllogutils/res/values-ta/strings.xml | 6 +- .../dialer/calllogutils/res/values-te/strings.xml | 6 +- .../dialer/calllogutils/res/values-th/strings.xml | 6 +- .../dialer/calllogutils/res/values-tl/strings.xml | 6 +- .../dialer/calllogutils/res/values-tr/strings.xml | 6 +- .../dialer/calllogutils/res/values-uk/strings.xml | 6 +- .../dialer/calllogutils/res/values-ur/strings.xml | 6 +- .../dialer/calllogutils/res/values-uz/strings.xml | 6 +- .../dialer/calllogutils/res/values-vi/strings.xml | 6 +- .../calllogutils/res/values-zh-rCN/strings.xml | 6 +- .../calllogutils/res/values-zh-rHK/strings.xml | 6 +- .../calllogutils/res/values-zh-rTW/strings.xml | 6 +- .../dialer/calllogutils/res/values-zu/strings.xml | 6 +- .../dialer/calllogutils/res/values/strings.xml | 10 +- .../concurrent/DefaultDialerExecutorFactory.java | 21 +- .../dialer/common/concurrent/DialerExecutor.java | 2 +- .../dialer/common/res/values-b+sr+Latn/strings.xml | 6 + .../android/dialer/constants/ScheduledJobIds.java | 3 + .../dialer/contactsfragment/AndroidManifest.xml | 16 + .../dialer/contactsfragment/ContactViewHolder.java | 82 ++ .../dialer/contactsfragment/ContactsAdapter.java | 149 +++ .../contactsfragment/ContactsCursorLoader.java | 53 + .../dialer/contactsfragment/ContactsFragment.java | 112 ++ .../contactsfragment/res/layout/contact_row.xml | 55 + .../res/layout/fragment_contacts.xml | 30 + .../dialer/contactsfragment/res/layout/header.xml | 26 + .../dialer/contactsfragment/res/values/dimens.xml | 28 + .../res/drawable-hdpi/ic_close_black_24dp.png | Bin 0 -> 207 bytes .../res/drawable-hdpi/ic_dialpad_delete.png | Bin 0 -> 805 bytes .../res/drawable-hdpi/ic_dialpad_voicemail.png | Bin 0 -> 623 bytes .../res/drawable-hdpi/ic_overflow_menu.png | Bin 0 -> 503 bytes .../dialer/dialpadview/res/layout/dialpad_view.xml | 2 + .../res/layout/dialpad_view_unthemed.xml | 1 + .../dialpadview/res/values-b+sr+Latn/strings.xml | 25 + .../dialer/dialpadview/res/values/attrs.xml | 1 + .../dialer/dialpadview/res/values/styles.xml | 1 + .../dialer/enrichedcall/EnrichedCallManager.java | 6 +- .../historyquery/nano/HistoryResult.java | 203 ---- .../historyquery/proto/history_result.proto | 23 + .../enrichedcall/stub/EnrichedCallManagerStub.java | 6 +- .../interactions/PhoneNumberInteraction.java | 2 +- .../interactions/res/values-b+sr+Latn/strings.xml | 23 + .../android/dialer/logging/LoggingBindings.java | 22 +- .../dialer/logging/LoggingBindingsStub.java | 10 +- .../dialer/logging/contact_lookup_result.proto | 32 + .../android/dialer/logging/contact_source.proto | 38 + .../android/dialer/logging/dialer_impression.proto | 384 ++++++ .../android/dialer/logging/interaction_event.proto | 46 + .../dialer/logging/nano/ContactLookupResult.java | 92 -- .../android/dialer/logging/nano/ContactSource.java | 91 -- .../dialer/logging/nano/DialerImpression.java | 249 ---- .../dialer/logging/nano/InteractionEvent.java | 95 -- .../dialer/logging/nano/ReportingLocation.java | 88 -- .../android/dialer/logging/nano/ScreenEvent.java | 104 -- .../dialer/logging/reporting_location.proto | 16 + java/com/android/dialer/logging/screen_event.proto | 71 ++ .../notification/NotificationChannelManager.java | 2 +- .../notification/res/values-b+sr+Latn/strings.xml | 26 + .../android/dialer/notification/res/values/ids.xml | 3 +- .../persistentlog/PersistentLogFileHandler.java | 3 + .../CachedNumberLookupService.java | 28 +- .../dialer/phonenumbercache/ContactInfo.java | 9 +- .../dialer/phonenumbercache/ContactInfoHelper.java | 11 +- .../res/values-b+sr+Latn/strings.xml | 22 + java/com/android/dialer/postcall/PostCall.java | 2 +- .../postcall/res/values-b+sr+Latn/strings.xml | 27 + java/com/android/dialer/protos/ProtoParsers.java | 167 --- .../dialer/shortcuts/CallContactActivity.java | 10 +- .../shortcuts/res/values-b+sr+Latn/strings.xml | 25 + java/com/android/dialer/spam/SpamBindings.java | 43 +- java/com/android/dialer/spam/SpamBindingsStub.java | 28 +- .../speeddial/res/values-b+sr+Latn/strings.xml | 20 + .../theme/res/drawable-hdpi/ic_block_24dp.png | Bin 0 -> 478 bytes .../dialer/theme/res/values-b+sr+Latn/strings.xml | 23 + .../dialer/util/res/values-b+sr+Latn/strings.xml | 26 + .../res/values-b+sr+Latn/strings.xml | 26 + java/com/android/dialer/widget/DialerToolbar.java | 1 + .../com/android/dialer/widget/MessageFragment.java | 11 +- .../dialer/widget/res/layout/fragment_message.xml | 4 +- .../dialer/widget/res/values-af/strings.xml | 1 + .../dialer/widget/res/values-am/strings.xml | 1 + .../dialer/widget/res/values-ar/strings.xml | 1 + .../dialer/widget/res/values-az/strings.xml | 1 + .../dialer/widget/res/values-b+sr+Latn/strings.xml | 6 + .../dialer/widget/res/values-be/strings.xml | 1 + .../dialer/widget/res/values-bg/strings.xml | 1 + .../dialer/widget/res/values-bn/strings.xml | 1 + .../dialer/widget/res/values-bs/strings.xml | 1 + .../dialer/widget/res/values-ca/strings.xml | 1 + .../dialer/widget/res/values-cs/strings.xml | 1 + .../dialer/widget/res/values-da/strings.xml | 1 + .../dialer/widget/res/values-de/strings.xml | 1 + .../dialer/widget/res/values-el/strings.xml | 1 + .../dialer/widget/res/values-en-rAU/strings.xml | 1 + .../dialer/widget/res/values-en-rGB/strings.xml | 1 + .../dialer/widget/res/values-en-rIN/strings.xml | 1 + .../dialer/widget/res/values-es-rUS/strings.xml | 1 + .../dialer/widget/res/values-es/strings.xml | 1 + .../dialer/widget/res/values-et/strings.xml | 1 + .../dialer/widget/res/values-eu/strings.xml | 1 + .../dialer/widget/res/values-fa/strings.xml | 1 + .../dialer/widget/res/values-fi/strings.xml | 1 + .../dialer/widget/res/values-fr-rCA/strings.xml | 1 + .../dialer/widget/res/values-fr/strings.xml | 1 + .../dialer/widget/res/values-gl/strings.xml | 1 + .../dialer/widget/res/values-gu/strings.xml | 1 + .../dialer/widget/res/values-hi/strings.xml | 1 + .../dialer/widget/res/values-hr/strings.xml | 1 + .../dialer/widget/res/values-hu/strings.xml | 1 + .../dialer/widget/res/values-hy/strings.xml | 1 + .../dialer/widget/res/values-in/strings.xml | 1 + .../dialer/widget/res/values-is/strings.xml | 1 + .../dialer/widget/res/values-it/strings.xml | 1 + .../dialer/widget/res/values-iw/strings.xml | 1 + .../dialer/widget/res/values-ja/strings.xml | 1 + .../dialer/widget/res/values-ka/strings.xml | 1 + .../dialer/widget/res/values-kk/strings.xml | 1 + .../dialer/widget/res/values-km/strings.xml | 1 + .../dialer/widget/res/values-kn/strings.xml | 1 + .../dialer/widget/res/values-ko/strings.xml | 1 + .../dialer/widget/res/values-ky/strings.xml | 1 + .../dialer/widget/res/values-lo/strings.xml | 1 + .../dialer/widget/res/values-lt/strings.xml | 1 + .../dialer/widget/res/values-lv/strings.xml | 1 + .../dialer/widget/res/values-mk/strings.xml | 1 + .../dialer/widget/res/values-ml/strings.xml | 1 + .../dialer/widget/res/values-mn/strings.xml | 1 + .../dialer/widget/res/values-mr/strings.xml | 1 + .../dialer/widget/res/values-ms/strings.xml | 1 + .../dialer/widget/res/values-my/strings.xml | 1 + .../dialer/widget/res/values-nb/strings.xml | 1 + .../dialer/widget/res/values-ne/strings.xml | 1 + .../dialer/widget/res/values-nl/strings.xml | 1 + .../dialer/widget/res/values-no/strings.xml | 1 + .../dialer/widget/res/values-pa/strings.xml | 1 + .../dialer/widget/res/values-pl/strings.xml | 1 + .../dialer/widget/res/values-pt-rBR/strings.xml | 1 + .../dialer/widget/res/values-pt-rPT/strings.xml | 1 + .../dialer/widget/res/values-pt/strings.xml | 1 + .../dialer/widget/res/values-ro/strings.xml | 1 + .../dialer/widget/res/values-ru/strings.xml | 1 + .../dialer/widget/res/values-si/strings.xml | 1 + .../dialer/widget/res/values-sk/strings.xml | 1 + .../dialer/widget/res/values-sl/strings.xml | 1 + .../dialer/widget/res/values-sq/strings.xml | 1 + .../dialer/widget/res/values-sr/strings.xml | 1 + .../dialer/widget/res/values-sv/strings.xml | 1 + .../dialer/widget/res/values-sw/strings.xml | 1 + .../dialer/widget/res/values-ta/strings.xml | 1 + .../dialer/widget/res/values-te/strings.xml | 1 + .../dialer/widget/res/values-th/strings.xml | 1 + .../dialer/widget/res/values-tl/strings.xml | 1 + .../dialer/widget/res/values-tr/strings.xml | 1 + .../dialer/widget/res/values-uk/strings.xml | 1 + .../dialer/widget/res/values-ur/strings.xml | 1 + .../dialer/widget/res/values-uz/strings.xml | 1 + .../dialer/widget/res/values-vi/strings.xml | 1 + .../dialer/widget/res/values-zh-rCN/strings.xml | 1 + .../dialer/widget/res/values-zh-rHK/strings.xml | 1 + .../dialer/widget/res/values-zh-rTW/strings.xml | 1 + .../dialer/widget/res/values-zu/strings.xml | 1 + .../android/dialer/widget/res/values/dimens.xml | 1 + .../android/dialer/widget/res/values/strings.xml | 3 + .../android/incallui/AnswerScreenPresenter.java | 17 + java/com/android/incallui/AudioModeProvider.java | 69 -- java/com/android/incallui/CallButtonPresenter.java | 10 +- java/com/android/incallui/CallCardPresenter.java | 11 +- .../incallui/ConferenceManagerFragment.java | 2 +- java/com/android/incallui/ContactInfoCache.java | 34 +- java/com/android/incallui/InCallActivity.java | 2 +- .../com/android/incallui/InCallActivityCommon.java | 3 +- java/com/android/incallui/InCallPresenter.java | 20 +- java/com/android/incallui/InCallServiceImpl.java | 1 + .../incallui/NotificationBroadcastReceiver.java | 2 +- java/com/android/incallui/ProximitySensor.java | 3 +- java/com/android/incallui/StatusBarNotifier.java | 24 +- .../incallui/answer/impl/AnswerFragment.java | 2 +- .../impl/answermethod/FlingUpDownMethod.java | 76 +- .../res/layout/swipe_up_down_method.xml | 167 +-- .../answermethod/res/values-b+sr+Latn/strings.xml | 12 + .../answer/impl/hint/PawSecretCodeListener.java | 2 +- .../impl/hint/res/values-b+sr+Latn/strings.xml | 6 + .../answer/impl/res/layout/fragment_avatar.xml | 3 +- .../impl/res/layout/fragment_incoming_call.xml | 201 ++-- .../answer/impl/res/values-b+sr+Latn/strings.xml | 24 + .../answer/impl/res/values-h480dp/dimens.xml | 1 - .../answer/impl/res/values-h540dp/dimens.xml | 1 - .../incallui/answer/impl/res/values/dimens.xml | 1 - .../incallui/audiomode/AudioModeProvider.java | 69 ++ .../audioroute/res/values-b+sr+Latn/strings.xml | 8 + .../incallui/bindings/PhoneNumberService.java | 3 +- java/com/android/incallui/call/CallList.java | 6 +- java/com/android/incallui/call/DialerCall.java | 127 +- .../calllocation/impl/LocationFragment.java | 2 +- .../calllocation/impl/LocationPresenter.java | 2 +- .../commontheme/res/values-b+sr+Latn/strings.xml | 18 + .../contactgrid/res/values-b+sr+Latn/strings.xml | 22 + .../incallui/hold/res/values-b+sr+Latn/strings.xml | 5 + .../incallui/incall/impl/ButtonChooserFactory.java | 6 +- .../incallui/incall/impl/InCallFragment.java | 4 +- .../incall/impl/res/layout/frag_incall_voice.xml | 4 + .../incall/impl/res/values-b+sr+Latn/strings.xml | 18 + .../res/drawable-hdpi/ic_block_grey600_24dp.png | Bin 0 -> 518 bytes .../res/drawable-hdpi/ic_call_end_white_24dp.png | Bin 0 -> 454 bytes .../res/drawable-hdpi/ic_call_split_white_24dp.png | Bin 0 -> 326 bytes .../res/drawable-hdpi/ic_close_grey600_24dp.png | Bin 0 -> 225 bytes .../drawable-hdpi/ic_location_on_white_24dp.png | Bin 0 -> 371 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_01.png | Bin 0 -> 577 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_02.png | Bin 0 -> 650 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_03.png | Bin 0 -> 803 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_04.png | Bin 0 -> 1009 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_05.png | Bin 0 -> 946 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_06.png | Bin 0 -> 856 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_07.png | Bin 0 -> 577 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_08.png | Bin 0 -> 577 bytes .../res/drawable-hdpi/ic_ongoing_phone_24px_09.png | Bin 0 -> 577 bytes .../drawable-hdpi/ic_person_add_grey600_24dp.png | Bin 0 -> 300 bytes .../drawable-hdpi/ic_phone_paused_white_24dp.png | Bin 0 -> 458 bytes .../res/drawable-hdpi/ic_question_mark.png | Bin 0 -> 845 bytes .../res/drawable-hdpi/ic_schedule_white_24dp.png | Bin 0 -> 575 bytes .../incallui/res/drawable-hdpi/img_business.png | Bin 0 -> 3311 bytes .../incallui/res/drawable-hdpi/img_conference.png | Bin 0 -> 7037 bytes .../incallui/res/drawable-hdpi/img_no_image.png | Bin 0 -> 5362 bytes .../incallui/res/drawable-hdpi/img_phone.png | Bin 0 -> 6157 bytes .../res/layout/incall_dialpad_fragment.xml | 2 + .../com/android/incallui/res/values-af/strings.xml | 4 - .../com/android/incallui/res/values-am/strings.xml | 4 - .../com/android/incallui/res/values-ar/strings.xml | 4 - .../com/android/incallui/res/values-az/strings.xml | 4 - .../incallui/res/values-b+sr+Latn/strings.xml | 141 +++ .../com/android/incallui/res/values-be/strings.xml | 4 - .../com/android/incallui/res/values-bg/strings.xml | 4 - .../com/android/incallui/res/values-bn/strings.xml | 4 - .../com/android/incallui/res/values-bs/strings.xml | 6 +- .../com/android/incallui/res/values-ca/strings.xml | 4 - .../com/android/incallui/res/values-cs/strings.xml | 4 - .../com/android/incallui/res/values-da/strings.xml | 4 - .../com/android/incallui/res/values-de/strings.xml | 4 - .../com/android/incallui/res/values-el/strings.xml | 4 - .../android/incallui/res/values-en-rAU/strings.xml | 4 - .../android/incallui/res/values-en-rGB/strings.xml | 4 - .../android/incallui/res/values-en-rIN/strings.xml | 4 - .../android/incallui/res/values-es-rUS/strings.xml | 4 - .../com/android/incallui/res/values-es/strings.xml | 4 - .../com/android/incallui/res/values-et/strings.xml | 4 - .../com/android/incallui/res/values-eu/strings.xml | 55 +- .../com/android/incallui/res/values-fa/strings.xml | 4 - .../com/android/incallui/res/values-fi/strings.xml | 4 - .../android/incallui/res/values-fr-rCA/strings.xml | 4 - .../com/android/incallui/res/values-fr/strings.xml | 4 - .../com/android/incallui/res/values-gl/strings.xml | 4 - .../com/android/incallui/res/values-gu/strings.xml | 4 - .../com/android/incallui/res/values-hi/strings.xml | 4 - .../com/android/incallui/res/values-hr/strings.xml | 4 - .../com/android/incallui/res/values-hu/strings.xml | 4 - .../com/android/incallui/res/values-hy/strings.xml | 4 - .../com/android/incallui/res/values-in/strings.xml | 4 - .../com/android/incallui/res/values-is/strings.xml | 4 - .../com/android/incallui/res/values-it/strings.xml | 4 - .../com/android/incallui/res/values-iw/strings.xml | 4 - .../com/android/incallui/res/values-ja/strings.xml | 4 - .../com/android/incallui/res/values-ka/strings.xml | 4 - .../com/android/incallui/res/values-kk/strings.xml | 4 - .../com/android/incallui/res/values-km/strings.xml | 4 - .../com/android/incallui/res/values-kn/strings.xml | 4 - .../com/android/incallui/res/values-ko/strings.xml | 4 - .../com/android/incallui/res/values-ky/strings.xml | 4 - .../com/android/incallui/res/values-lo/strings.xml | 4 - .../com/android/incallui/res/values-lt/strings.xml | 4 - .../com/android/incallui/res/values-lv/strings.xml | 4 - .../com/android/incallui/res/values-mk/strings.xml | 4 - .../com/android/incallui/res/values-ml/strings.xml | 4 - .../com/android/incallui/res/values-mn/strings.xml | 4 - .../com/android/incallui/res/values-mr/strings.xml | 4 - .../com/android/incallui/res/values-ms/strings.xml | 4 - .../com/android/incallui/res/values-my/strings.xml | 4 - .../com/android/incallui/res/values-nb/strings.xml | 4 - .../com/android/incallui/res/values-ne/strings.xml | 36 +- .../com/android/incallui/res/values-nl/strings.xml | 4 - .../com/android/incallui/res/values-no/strings.xml | 4 - .../com/android/incallui/res/values-pa/strings.xml | 4 - .../com/android/incallui/res/values-pl/strings.xml | 4 - .../android/incallui/res/values-pt-rBR/strings.xml | 4 - .../android/incallui/res/values-pt-rPT/strings.xml | 4 - .../com/android/incallui/res/values-pt/strings.xml | 4 - .../com/android/incallui/res/values-ro/strings.xml | 4 - .../com/android/incallui/res/values-ru/strings.xml | 4 - .../com/android/incallui/res/values-si/strings.xml | 4 - .../com/android/incallui/res/values-sk/strings.xml | 4 - .../com/android/incallui/res/values-sl/strings.xml | 4 - .../com/android/incallui/res/values-sq/strings.xml | 20 +- .../com/android/incallui/res/values-sr/strings.xml | 4 - .../com/android/incallui/res/values-sv/strings.xml | 4 - .../com/android/incallui/res/values-sw/strings.xml | 4 - .../com/android/incallui/res/values-ta/strings.xml | 4 - .../com/android/incallui/res/values-te/strings.xml | 4 - .../com/android/incallui/res/values-th/strings.xml | 4 - .../com/android/incallui/res/values-tl/strings.xml | 4 - .../com/android/incallui/res/values-tr/strings.xml | 4 - .../com/android/incallui/res/values-uk/strings.xml | 4 - .../com/android/incallui/res/values-ur/strings.xml | 4 - .../com/android/incallui/res/values-uz/strings.xml | 4 - .../com/android/incallui/res/values-vi/strings.xml | 4 - .../android/incallui/res/values-zh-rCN/strings.xml | 20 +- .../android/incallui/res/values-zh-rHK/strings.xml | 4 - .../android/incallui/res/values-zh-rTW/strings.xml | 4 - .../com/android/incallui/res/values-zu/strings.xml | 4 - java/com/android/incallui/res/values/strings.xml | 11 - java/com/android/incallui/res/values/styles.xml | 1 + .../incallui/spam/SpamCallListListener.java | 4 +- .../incallui/spam/SpamNotificationActivity.java | 38 +- .../incallui/spam/SpamNotificationService.java | 11 +- .../video/impl/SurfaceViewVideoCallFragment.java | 14 +- .../incallui/video/impl/VideoCallFragment.java | 3 + .../layout-land/videocall_controls_surfaceview.xml | 129 ++ .../res/layout/frag_videocall_land_surfaceview.xml | 93 -- .../impl/res/layout/frag_videocall_surfaceview.xml | 33 +- .../res/layout/videocall_controls_surfaceview.xml | 130 ++ .../video/impl/res/values-b+sr+Latn/strings.xml | 12 + .../video/impl/res/values-h580dp-land/dimens.xml | 19 + .../video/impl/res/values-h580dp/dimens.xml | 16 + .../incallui/video/impl/res/values-land/dimens.xml | 19 + .../incallui/video/impl/res/values-land/styles.xml | 26 + .../video/impl/res/values-w460dp-land/dimens.xml | 19 + .../video/impl/res/values-w460dp/dimens.xml | 16 + .../incallui/video/impl/res/values/dimens.xml | 16 + .../incallui/video/impl/res/values/styles.xml | 24 +- java/com/android/incallui/videotech/VideoTech.java | 2 + .../videotech/ims/ImsVideoCallCallback.java | 16 +- .../incallui/videotech/ims/ImsVideoTech.java | 20 +- .../incallui/wifi/res/values-b+sr+Latn/strings.xml | 5 + java/com/android/voicemail/VoicemailClient.java | 32 +- .../voicemail/VoicemailPermissionHelper.java | 60 + .../com/android/voicemail/impl/ActivationTask.java | 21 +- .../com/android/voicemail/impl/AndroidManifest.xml | 26 + java/com/android/voicemail/impl/OmtpReceiver.java | 2 +- .../voicemail/impl/OmtpVvmCarrierConfigHelper.java | 2 + .../voicemail/impl/StatusCheckJobService.java | 71 ++ .../android/voicemail/impl/StatusCheckTask.java | 128 ++ .../voicemail/impl/VoicemailBootReceiver.java | 31 + .../voicemail/impl/VoicemailClientImpl.java | 19 +- .../android/voicemail/impl/VoicemailModule.java | 19 +- .../voicemail/impl/VvmPackageInstallReceiver.java | 34 +- .../impl/fetch/FetchVoicemailReceiver.java | 10 + java/com/android/voicemail/impl/mail/Address.java | 8 +- .../voicemail/impl/mail/internet/MimeMessage.java | 40 +- .../voicemail/impl/mail/internet/MimeUtility.java | 9 +- .../voicemail/impl/mail/store/ImapFolder.java | 36 +- .../voicemail/impl/mail/store/ImapStore.java | 3 +- .../voicemail/impl/protocol/Vvm3Protocol.java | 11 +- .../voicemail/impl/res/values-af/strings.xml | 1 - .../voicemail/impl/res/values-am/strings.xml | 1 - .../voicemail/impl/res/values-ar/strings.xml | 1 - .../voicemail/impl/res/values-az/strings.xml | 1 - .../impl/res/values-b+sr+Latn/strings.xml | 53 + .../voicemail/impl/res/values-be/strings.xml | 1 - .../voicemail/impl/res/values-bg/strings.xml | 1 - .../voicemail/impl/res/values-bn/strings.xml | 1 - .../voicemail/impl/res/values-bs/strings.xml | 1 - .../voicemail/impl/res/values-ca/strings.xml | 1 - .../voicemail/impl/res/values-cs/strings.xml | 1 - .../voicemail/impl/res/values-da/strings.xml | 1 - .../voicemail/impl/res/values-de/strings.xml | 1 - .../voicemail/impl/res/values-el/strings.xml | 1 - .../voicemail/impl/res/values-en-rAU/strings.xml | 1 - .../voicemail/impl/res/values-en-rGB/strings.xml | 1 - .../voicemail/impl/res/values-en-rIN/strings.xml | 1 - .../voicemail/impl/res/values-es-rUS/strings.xml | 1 - .../voicemail/impl/res/values-es/strings.xml | 1 - .../voicemail/impl/res/values-et/strings.xml | 1 - .../voicemail/impl/res/values-eu/strings.xml | 1 - .../voicemail/impl/res/values-fa/strings.xml | 1 - .../voicemail/impl/res/values-fi/strings.xml | 1 - .../voicemail/impl/res/values-fr-rCA/strings.xml | 1 - .../voicemail/impl/res/values-fr/strings.xml | 1 - .../voicemail/impl/res/values-gl/strings.xml | 1 - .../voicemail/impl/res/values-gu/strings.xml | 1 - .../voicemail/impl/res/values-hi/strings.xml | 1 - .../voicemail/impl/res/values-hr/strings.xml | 1 - .../voicemail/impl/res/values-hu/strings.xml | 1 - .../voicemail/impl/res/values-hy/strings.xml | 1 - .../voicemail/impl/res/values-in/strings.xml | 1 - .../voicemail/impl/res/values-is/strings.xml | 1 - .../voicemail/impl/res/values-it/strings.xml | 1 - .../voicemail/impl/res/values-iw/strings.xml | 1 - .../voicemail/impl/res/values-ja/strings.xml | 1 - .../voicemail/impl/res/values-ka/strings.xml | 1 - .../voicemail/impl/res/values-kk/strings.xml | 1 - .../voicemail/impl/res/values-km/strings.xml | 1 - .../voicemail/impl/res/values-kn/strings.xml | 1 - .../voicemail/impl/res/values-ko/strings.xml | 1 - .../voicemail/impl/res/values-ky/strings.xml | 1 - .../voicemail/impl/res/values-lo/strings.xml | 1 - .../voicemail/impl/res/values-lt/strings.xml | 1 - .../voicemail/impl/res/values-lv/strings.xml | 1 - .../voicemail/impl/res/values-mk/strings.xml | 1 - .../voicemail/impl/res/values-ml/strings.xml | 1 - .../voicemail/impl/res/values-mn/strings.xml | 1 - .../voicemail/impl/res/values-mr/strings.xml | 1 - .../voicemail/impl/res/values-ms/strings.xml | 1 - .../voicemail/impl/res/values-my/strings.xml | 1 - .../voicemail/impl/res/values-nb/strings.xml | 1 - .../voicemail/impl/res/values-ne/strings.xml | 1 - .../voicemail/impl/res/values-nl/strings.xml | 1 - .../voicemail/impl/res/values-no/strings.xml | 1 - .../voicemail/impl/res/values-pa/strings.xml | 1 - .../voicemail/impl/res/values-pl/strings.xml | 1 - .../voicemail/impl/res/values-pt-rBR/strings.xml | 1 - .../voicemail/impl/res/values-pt-rPT/strings.xml | 1 - .../voicemail/impl/res/values-pt/strings.xml | 1 - .../voicemail/impl/res/values-ro/strings.xml | 1 - .../voicemail/impl/res/values-ru/strings.xml | 1 - .../voicemail/impl/res/values-si/strings.xml | 1 - .../voicemail/impl/res/values-sk/strings.xml | 1 - .../voicemail/impl/res/values-sl/strings.xml | 1 - .../voicemail/impl/res/values-sq/strings.xml | 1 - .../voicemail/impl/res/values-sr/strings.xml | 1 - .../voicemail/impl/res/values-sv/strings.xml | 1 - .../voicemail/impl/res/values-sw/strings.xml | 1 - .../voicemail/impl/res/values-ta/strings.xml | 1 - .../voicemail/impl/res/values-te/strings.xml | 1 - .../voicemail/impl/res/values-th/strings.xml | 1 - .../voicemail/impl/res/values-tl/strings.xml | 1 - .../voicemail/impl/res/values-tr/strings.xml | 1 - .../voicemail/impl/res/values-uk/strings.xml | 1 - .../voicemail/impl/res/values-ur/strings.xml | 1 - .../voicemail/impl/res/values-uz/strings.xml | 1 - .../voicemail/impl/res/values-vi/strings.xml | 1 - .../voicemail/impl/res/values-zh-rCN/strings.xml | 1 - .../voicemail/impl/res/values-zh-rHK/strings.xml | 1 - .../voicemail/impl/res/values-zh-rTW/strings.xml | 1 - .../voicemail/impl/res/values-zu/strings.xml | 1 - .../android/voicemail/impl/res/values/strings.xml | 5 - .../voicemail/impl/scheduling/BaseTask.java | 36 +- .../voicemail/impl/scheduling/BlockerTask.java | 14 +- .../impl/scheduling/MinimalIntervalPolicy.java | 5 +- .../android/voicemail/impl/scheduling/Policy.java | 4 +- .../voicemail/impl/scheduling/PostponePolicy.java | 6 +- .../voicemail/impl/scheduling/RetryPolicy.java | 11 +- .../android/voicemail/impl/scheduling/Task.java | 38 +- .../voicemail/impl/scheduling/TaskQueue.java | 149 +++ .../impl/scheduling/TaskSchedulerJobService.java | 158 +++ .../impl/scheduling/TaskSchedulerService.java | 294 ++--- .../android/voicemail/impl/scheduling/Tasks.java | 73 ++ .../impl/settings/VisualVoicemailSettingsUtil.java | 2 + .../impl/settings/VoicemailChangePinActivity.java | 7 +- .../impl/settings/VoicemailSettingsFragment.java | 4 +- .../voicemail/impl/sms/LegacyModeSmsHandler.java | 92 +- .../voicemail/impl/sync/OmtpVvmSyncService.java | 33 +- .../android/voicemail/impl/sync/SyncOneTask.java | 20 +- java/com/android/voicemail/impl/sync/SyncTask.java | 18 +- .../android/voicemail/impl/sync/UploadTask.java | 7 +- .../voicemail/impl/sync/VoicemailsQueryHelper.java | 36 +- .../android/voicemail/impl/utils/LoggerUtils.java | 33 + .../voicemail/stub/StubVoicemailClient.java | 14 + 1040 files changed, 9200 insertions(+), 20139 deletions(-) delete mode 100644 apache/org/apache/james/mime4j/BodyDescriptor.java delete mode 100644 apache/org/apache/james/mime4j/CloseShieldInputStream.java delete mode 100644 apache/org/apache/james/mime4j/ContentHandler.java delete mode 100644 apache/org/apache/james/mime4j/EOLConvertingInputStream.java delete mode 100644 apache/org/apache/james/mime4j/Log.java delete mode 100644 apache/org/apache/james/mime4j/LogFactory.java delete mode 100644 apache/org/apache/james/mime4j/MimeBoundaryInputStream.java delete mode 100644 apache/org/apache/james/mime4j/MimeStreamParser.java delete mode 100644 apache/org/apache/james/mime4j/RootInputStream.java delete mode 100644 apache/org/apache/james/mime4j/codec/EncoderUtil.java delete mode 100644 apache/org/apache/james/mime4j/decoder/Base64InputStream.java delete mode 100644 apache/org/apache/james/mime4j/decoder/ByteQueue.java delete mode 100644 apache/org/apache/james/mime4j/decoder/DecoderUtil.java delete mode 100644 apache/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java delete mode 100644 apache/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java delete mode 100644 apache/org/apache/james/mime4j/field/AddressListField.java delete mode 100644 apache/org/apache/james/mime4j/field/ContentTransferEncodingField.java delete mode 100644 apache/org/apache/james/mime4j/field/ContentTypeField.java delete mode 100644 apache/org/apache/james/mime4j/field/DateTimeField.java delete mode 100644 apache/org/apache/james/mime4j/field/DefaultFieldParser.java delete mode 100644 apache/org/apache/james/mime4j/field/DelegatingFieldParser.java delete mode 100644 apache/org/apache/james/mime4j/field/Field.java delete mode 100644 apache/org/apache/james/mime4j/field/FieldParser.java delete mode 100644 apache/org/apache/james/mime4j/field/MailboxField.java delete mode 100644 apache/org/apache/james/mime4j/field/MailboxListField.java delete mode 100644 apache/org/apache/james/mime4j/field/UnstructuredField.java delete mode 100644 apache/org/apache/james/mime4j/field/address/Address.java delete mode 100644 apache/org/apache/james/mime4j/field/address/AddressList.java delete mode 100644 apache/org/apache/james/mime4j/field/address/Builder.java delete mode 100644 apache/org/apache/james/mime4j/field/address/DomainList.java delete mode 100644 apache/org/apache/james/mime4j/field/address/Group.java delete mode 100644 apache/org/apache/james/mime4j/field/address/Mailbox.java delete mode 100644 apache/org/apache/james/mime4j/field/address/MailboxList.java delete mode 100644 apache/org/apache/james/mime4j/field/address/NamedMailbox.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTaddress.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTdomain.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTmailbox.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTname_addr.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTphrase.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ASTroute.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParser.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParser.jj delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/BaseNode.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/Node.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/ParseException.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/SimpleNode.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/Token.java delete mode 100644 apache/org/apache/james/mime4j/field/address/parser/TokenMgrError.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserConstants.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/ParseException.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/Token.java delete mode 100644 apache/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/DateTime.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParserConstants.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/ParseException.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/Token.java delete mode 100644 apache/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java delete mode 100644 apache/org/apache/james/mime4j/util/CharsetUtil.java create mode 100644 assets/quantum/res/drawable/quantum_ic_business_vd_theme_24.xml create mode 100644 assets/quantum/res/drawable/quantum_ic_report_vd_theme_24.xml create mode 100644 assets/quantum/res/drawable/quantum_ic_voicemail_vd_theme_24.xml create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_ab_search.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_arrow_back_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_business_white_120dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_call_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_call_note_white_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_close_dk.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_create_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_group_white_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_history_white_drawable_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_info_outline_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_back.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_dk.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_group_lt.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_overflow_lt.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_dk.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_person_lt.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_remove_field_holo_light.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_dk.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_holo_light.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_menu_star_lt.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_person_24dp.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_phone_attach.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_rx_videocam.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_scroll_handle.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_tx_videocam.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_videocam.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_activated_holo.9.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_background_holo.9.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_focused_holo.9.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_longpressed_holo_light.9.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_pressed_holo_light.9.png create mode 100644 java/com/android/contacts/common/res/drawable-hdpi/list_section_divider_holo_custom.9.png create 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-mdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_business_white_120dp.png delete mode 100644 java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png create mode 100644 java/com/android/contacts/common/res/mipmap-hdpi/ic_contacts_launcher.png create mode 100644 java/com/android/contacts/common/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_star.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png create mode 100644 java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png create mode 100644 java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png create mode 100644 java/com/android/dialer/app/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java create mode 100644 java/com/android/dialer/app/voicemail/error/res/drawable-hdpi/ic_voicemail_error_24px.png create mode 100644 java/com/android/dialer/app/voicemail/error/res/drawable-mdpi/ic_voicemail_error_24px.png create mode 100644 java/com/android/dialer/app/voicemail/error/res/drawable-xhdpi/ic_voicemail_error_24px.png create mode 100644 java/com/android/dialer/app/voicemail/error/res/drawable-xxhdpi/ic_voicemail_error_24px.png create mode 100644 java/com/android/dialer/app/voicemail/error/res/drawable-xxxhdpi/ic_voicemail_error_24px.png create mode 100644 java/com/android/dialer/app/voicemail/error/res/values-b+sr+Latn/strings.xml delete mode 100644 java/com/android/dialer/backup/nano/VoicemailInfo.java create mode 100644 java/com/android/dialer/backup/proto/voicemail_info.proto create mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_block_24dp.png create mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_24dp.png create mode 100644 java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_white_36dp.png create mode 100644 java/com/android/dialer/blocking/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/callcomposer/CopyAndResizeImageWorker.java create mode 100644 java/com/android/dialer/callcomposer/cameraui/res/values-b+sr+Latn/strings.xml delete mode 100644 java/com/android/dialer/callcomposer/nano/CallComposerContact.java create mode 100644 java/com/android/dialer/callcomposer/proto/call_composer_contact.proto create mode 100644 java/com/android/dialer/callcomposer/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/callcomposer/util/BitmapResizer.java delete mode 100644 java/com/android/dialer/callcomposer/util/CopyAndResizeImageTask.java delete mode 100644 java/com/android/dialer/calldetails/nano/CallDetailsEntries.java create mode 100644 java/com/android/dialer/calldetails/proto/call_details_entries.proto create mode 100644 java/com/android/dialer/calldetails/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/callintent/call_initiation_type.proto create mode 100644 java/com/android/dialer/callintent/call_specific_app_data.proto delete mode 100644 java/com/android/dialer/callintent/nano/CallInitiationType.java delete mode 100644 java/com/android/dialer/callintent/nano/CallSpecificAppData.java create mode 100644 java/com/android/dialer/calllog/CallLogComponent.java create mode 100644 java/com/android/dialer/calllog/CallLogFramework.java create mode 100644 java/com/android/dialer/calllog/CallLogModule.java create mode 100644 java/com/android/dialer/calllog/DataSources.java create mode 100644 java/com/android/dialer/calllog/RefreshAnnotatedCallLogWorker.java create mode 100644 java/com/android/dialer/calllog/database/AnnotatedCallLog.java create mode 100644 java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java create mode 100644 java/com/android/dialer/calllog/database/CallLogMutations.java create mode 100644 java/com/android/dialer/calllog/datasources/CallLogDataSource.java create mode 100644 java/com/android/dialer/calllog/datasources/contacts/ContactsDataSource.java create mode 100644 java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java create mode 100644 java/com/android/dialer/calllog/ui/AndroidManifest.xml create mode 100644 java/com/android/dialer/calllog/ui/AnnotatedCallLogCursorLoader.java create mode 100644 java/com/android/dialer/calllog/ui/NewCallLogFragment.java create mode 100644 java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml create mode 100644 java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml create mode 100644 java/com/android/dialer/calllogutils/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/common/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/contactsfragment/AndroidManifest.xml create mode 100644 java/com/android/dialer/contactsfragment/ContactViewHolder.java create mode 100644 java/com/android/dialer/contactsfragment/ContactsAdapter.java create mode 100644 java/com/android/dialer/contactsfragment/ContactsCursorLoader.java create mode 100644 java/com/android/dialer/contactsfragment/ContactsFragment.java create mode 100644 java/com/android/dialer/contactsfragment/res/layout/contact_row.xml create mode 100644 java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml create mode 100644 java/com/android/dialer/contactsfragment/res/layout/header.xml create mode 100644 java/com/android/dialer/contactsfragment/res/values/dimens.xml create mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_close_black_24dp.png create mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_delete.png create mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_voicemail.png create mode 100644 java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_overflow_menu.png create mode 100644 java/com/android/dialer/dialpadview/res/values-b+sr+Latn/strings.xml delete mode 100644 java/com/android/dialer/enrichedcall/historyquery/nano/HistoryResult.java create mode 100644 java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto create mode 100644 java/com/android/dialer/interactions/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/logging/contact_lookup_result.proto create mode 100644 java/com/android/dialer/logging/contact_source.proto create mode 100644 java/com/android/dialer/logging/dialer_impression.proto create mode 100644 java/com/android/dialer/logging/interaction_event.proto delete mode 100644 java/com/android/dialer/logging/nano/ContactLookupResult.java delete mode 100644 java/com/android/dialer/logging/nano/ContactSource.java delete mode 100644 java/com/android/dialer/logging/nano/DialerImpression.java delete mode 100644 java/com/android/dialer/logging/nano/InteractionEvent.java delete mode 100644 java/com/android/dialer/logging/nano/ReportingLocation.java delete mode 100644 java/com/android/dialer/logging/nano/ScreenEvent.java create mode 100644 java/com/android/dialer/logging/reporting_location.proto create mode 100644 java/com/android/dialer/logging/screen_event.proto create mode 100644 java/com/android/dialer/notification/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/phonenumberutil/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/postcall/res/values-b+sr+Latn/strings.xml delete mode 100644 java/com/android/dialer/protos/ProtoParsers.java create mode 100644 java/com/android/dialer/shortcuts/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/speeddial/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/theme/res/drawable-hdpi/ic_block_24dp.png create mode 100644 java/com/android/dialer/theme/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/util/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/voicemailstatus/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/dialer/widget/res/values-b+sr+Latn/strings.xml delete mode 100644 java/com/android/incallui/AudioModeProvider.java create mode 100644 java/com/android/incallui/answer/impl/answermethod/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/answer/impl/hint/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/answer/impl/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/audiomode/AudioModeProvider.java create mode 100644 java/com/android/incallui/audioroute/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/commontheme/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/contactgrid/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/hold/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/incall/impl/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_block_grey600_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_call_end_white_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_call_split_white_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_close_grey600_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_location_on_white_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_01.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_02.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_03.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_04.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_05.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_06.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_07.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_08.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_ongoing_phone_24px_09.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_person_add_grey600_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_phone_paused_white_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_question_mark.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/ic_schedule_white_24dp.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/img_business.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/img_conference.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/img_no_image.png create mode 100644 java/com/android/incallui/res/drawable-hdpi/img_phone.png create mode 100644 java/com/android/incallui/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/video/impl/res/layout-land/videocall_controls_surfaceview.xml delete mode 100644 java/com/android/incallui/video/impl/res/layout/frag_videocall_land_surfaceview.xml create mode 100644 java/com/android/incallui/video/impl/res/layout/videocall_controls_surfaceview.xml create mode 100644 java/com/android/incallui/video/impl/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/video/impl/res/values-h580dp-land/dimens.xml create mode 100644 java/com/android/incallui/video/impl/res/values-land/dimens.xml create mode 100644 java/com/android/incallui/video/impl/res/values-land/styles.xml create mode 100644 java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml create mode 100644 java/com/android/incallui/wifi/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/voicemail/VoicemailPermissionHelper.java create mode 100644 java/com/android/voicemail/impl/StatusCheckJobService.java create mode 100644 java/com/android/voicemail/impl/StatusCheckTask.java create mode 100644 java/com/android/voicemail/impl/VoicemailBootReceiver.java create mode 100644 java/com/android/voicemail/impl/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/voicemail/impl/scheduling/TaskQueue.java create mode 100644 java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java create mode 100644 java/com/android/voicemail/impl/scheduling/Tasks.java create mode 100644 java/com/android/voicemail/impl/utils/LoggerUtils.java diff --git a/Android.mk b/Android.mk index c753cfefd..b00519f48 100644 --- a/Android.mk +++ b/Android.mk @@ -1,11 +1,9 @@ # Local modifications: -# * b/31757757 Precompiled proto classes have been included. # * removed com.google.android.backup.api_key. This should be added to # the manifest in the top level directory. # * removed com.google.android.geo.API_KEY key. This should be added to # the manifest files in java/com/android/incallui/calllocation/impl/ # and /java/com/android/incallui/maps/impl/ -# * b/35391680 apache temporarily included in the top level directory. LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) @@ -20,7 +18,6 @@ BASE_DIR := java/com/android # Primary dialer module sources. SRC_DIRS := \ - apache \ $(BASE_DIR)/contacts/common \ $(BASE_DIR)/dialer \ $(BASE_DIR)/incallui \ @@ -57,8 +54,10 @@ RES_DIRS := \ $(BASE_DIR)/dialer/callcomposer/cameraui/res \ $(BASE_DIR)/dialer/callcomposer/res \ $(BASE_DIR)/dialer/calldetails/res \ + $(BASE_DIR)/dialer/calllog/ui/res \ $(BASE_DIR)/dialer/calllogutils/res \ $(BASE_DIR)/dialer/common/res \ + $(BASE_DIR)/dialer/contactsfragment/res \ $(BASE_DIR)/dialer/dialpadview/res \ $(BASE_DIR)/dialer/interactions/res \ $(BASE_DIR)/dialer/notification/res \ @@ -87,7 +86,7 @@ RES_DIRS := \ $(BASE_DIR)/incallui/video/impl/res \ $(BASE_DIR)/incallui/video/protocol/res \ $(BASE_DIR)/incallui/wifi/res \ - $(BASE_DIR)/voicemail/impl/res + $(BASE_DIR)/voicemail/impl/res \ # Dialer manifest files to merge. @@ -104,8 +103,10 @@ DIALER_MANIFEST_FILES += \ $(BASE_DIR)/dialer/callcomposer/camera/camerafocus/AndroidManifest.xml \ $(BASE_DIR)/dialer/callcomposer/cameraui/AndroidManifest.xml \ $(BASE_DIR)/dialer/calldetails/AndroidManifest.xml \ + $(BASE_DIR)/dialer/calllog/ui/AndroidManifest.xml \ $(BASE_DIR)/dialer/calllogutils/AndroidManifest.xml \ $(BASE_DIR)/dialer/common/AndroidManifest.xml \ + $(BASE_DIR)/dialer/contactsfragment/AndroidManifest.xml \ $(BASE_DIR)/dialer/dialpadview/AndroidManifest.xml \ $(BASE_DIR)/dialer/interactions/AndroidManifest.xml \ $(BASE_DIR)/dialer/notification/AndroidManifest.xml \ @@ -134,7 +135,7 @@ DIALER_MANIFEST_FILES += \ $(BASE_DIR)/incallui/video/impl/AndroidManifest.xml \ $(BASE_DIR)/incallui/video/protocol/AndroidManifest.xml \ $(BASE_DIR)/incallui/wifi/AndroidManifest.xml \ - $(BASE_DIR)/voicemail/impl/AndroidManifest.xml + $(BASE_DIR)/voicemail/impl/AndroidManifest.xml \ # Merge all manifest files. @@ -142,12 +143,9 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ $(addprefix $(LOCAL_PATH)/, $(DIALER_MANIFEST_FILES)) LOCAL_SRC_FILES := $(call all-java-files-under, $(SRC_DIRS)) LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES)) -# Native protobuf compilation disabled b/36564333 -# Include protocol buffers and use the nano compiler. -# LOCAL_SRC_FILES += $(call all-proto-files-under, $(SRC_DIRS)) -# LOCAL_PROTOC_OPTIMIZE_TYPE := nano -# LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH) -# LOCAL_PROTO_JAVA_OUTPUT_PARAMS := enum_style=java,generate_clear=true,store_unknown_fields=true,generate_equals=true +LOCAL_SRC_FILES += $(call all-proto-files-under, $(SRC_DIRS)) +LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH) + LOCAL_RESOURCE_DIR := \ $(addprefix $(LOCAL_PATH)/, $(RES_DIRS)) \ $(support_library_root_dir)/design/res \ @@ -156,8 +154,6 @@ LOCAL_RESOURCE_DIR := \ $(support_library_root_dir)/v7/cardview/res \ $(support_library_root_dir)/v7/recyclerview/res -LOCAL_USE_AAPT2 := true - # We specify each package explicitly to glob resource files. LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ @@ -171,8 +167,10 @@ LOCAL_AAPT_FLAGS := \ --extra-packages com.android.dialer.callcomposer.camera.camerafocus \ --extra-packages com.android.dialer.callcomposer.cameraui \ --extra-packages com.android.dialer.calldetails \ + --extra-packages com.android.dialer.calllog.ui \ --extra-packages com.android.dialer.calllogutils \ --extra-packages com.android.dialer.common \ + --extra-packages com.android.dialer.contactsfragment \ --extra-packages com.android.dialer.dialpadview \ --extra-packages com.android.dialer.interactions \ --extra-packages com.android.dialer.notification \ @@ -223,9 +221,10 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ dialer-javax-annotation-api-target \ dialer-javax-inject-target \ dialer-libshortcutbadger-target \ + dialer-mime4j-core-target \ + dialer-mime4j-dom-target \ jsr305 \ libphonenumber \ - libprotobuf-java-nano \ volley \ LOCAL_STATIC_ANDROID_LIBRARIES := \ @@ -278,6 +277,11 @@ LOCAL_MODULE_TAGS := optional LOCAL_PACKAGE_NAME := Dialer LOCAL_CERTIFICATE := shared LOCAL_PRIVILEGED_MODULE := true +LOCAL_USE_AAPT2 := true + +# b/37483961 - Jack Not Compiling Dagger Class Properly +LOCAL_JACK_ENABLED := javac_frontend + include $(BUILD_PACKAGE) # Cleanup local state @@ -293,10 +297,10 @@ PROCESSOR_JARS := include $(CLEAR_VARS) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ - dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.6/dagger-compiler-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \ + dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.7/dagger-compiler-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-auto-value:../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.3/auto-value-1.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ - dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.6/dagger-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \ - dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.6/dagger-producers-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \ + dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ + dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.7/dagger-producers-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-javax-annotation-api:../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-javax-inject:../../../prebuilts/tools/common/m2/repository/javax/inject/javax.inject/1/javax.inject-1$(COMMON_JAVA_PACKAGE_SUFFIX) @@ -320,7 +324,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := JAVA_LIBRARIES LOCAL_MODULE := dialer-dagger2-target LOCAL_SDK_VERSION := current -LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.6/dagger-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) LOCAL_UNINSTALLABLE_MODULE := true include $(BUILD_PREBUILT) @@ -387,8 +391,6 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) -include $(CLEAR_VARS) - LOCAL_MODULE_CLASS := JAVA_LIBRARIES LOCAL_MODULE := dialer-commons-io-target LOCAL_SDK_VERSION := current @@ -398,3 +400,23 @@ LOCAL_UNINSTALLABLE_MODULE := true include $(BUILD_PREBUILT) include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := JAVA_LIBRARIES +LOCAL_MODULE := dialer-mime4j-core-target +LOCAL_SDK_VERSION := current +LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/org/apache/james/apache-mime4j-core/0.7.2/apache-mime4j-core-0.7.2$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_UNINSTALLABLE_MODULE := true + +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := JAVA_LIBRARIES +LOCAL_MODULE := dialer-mime4j-dom-target +LOCAL_SDK_VERSION := current +LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/org/apache/james/apache-mime4j-dom/0.7.2/apache-mime4j-dom-0.7.2$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_UNINSTALLABLE_MODULE := true + +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/BodyDescriptor.java b/apache/org/apache/james/mime4j/BodyDescriptor.java deleted file mode 100644 index 867c43d86..000000000 --- a/apache/org/apache/james/mime4j/BodyDescriptor.java +++ /dev/null @@ -1,392 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.util.HashMap; -import java.util.Map; - -/** - * Encapsulates the values of the MIME-specific header fields - * (which starts with Content-). - * - * - * @version $Id: BodyDescriptor.java,v 1.4 2005/02/11 10:08:37 ntherning Exp $ - */ -public class BodyDescriptor { - private static Log log = LogFactory.getLog(BodyDescriptor.class); - - private String mimeType = "text/plain"; - private String boundary = null; - private String charset = "us-ascii"; - private String transferEncoding = "7bit"; - private Map parameters = new HashMap(); - private boolean contentTypeSet = false; - private boolean contentTransferEncSet = false; - - /** - * Creates a new root BodyDescriptor instance. - */ - public BodyDescriptor() { - this(null); - } - - /** - * Creates a new BodyDescriptor instance. - * - * @param parent the descriptor of the parent or null if this - * is the root descriptor. - */ - public BodyDescriptor(BodyDescriptor parent) { - if (parent != null && parent.isMimeType("multipart/digest")) { - mimeType = "message/rfc822"; - } else { - mimeType = "text/plain"; - } - } - - /** - * Should be called for each Content- header field of - * a MIME message or part. - * - * @param name the field name. - * @param value the field value. - */ - public void addField(String name, String value) { - - name = name.trim().toLowerCase(); - - if (name.equals("content-transfer-encoding") && !contentTransferEncSet) { - contentTransferEncSet = true; - - value = value.trim().toLowerCase(); - if (value.length() > 0) { - transferEncoding = value; - } - - } else if (name.equals("content-type") && !contentTypeSet) { - contentTypeSet = true; - - value = value.trim(); - - /* - * Unfold Content-Type value - */ - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < value.length(); i++) { - char c = value.charAt(i); - if (c == '\r' || c == '\n') { - continue; - } - sb.append(c); - } - - Map params = getHeaderParams(sb.toString()); - - String main = params.get(""); - if (main != null) { - main = main.toLowerCase().trim(); - int index = main.indexOf('/'); - boolean valid = false; - if (index != -1) { - String type = main.substring(0, index).trim(); - String subtype = main.substring(index + 1).trim(); - if (type.length() > 0 && subtype.length() > 0) { - main = type + "/" + subtype; - valid = true; - } - } - - if (!valid) { - main = null; - } - } - String b = params.get("boundary"); - - if (main != null - && ((main.startsWith("multipart/") && b != null) - || !main.startsWith("multipart/"))) { - - mimeType = main; - } - - if (isMultipart()) { - boundary = b; - } - - String c = params.get("charset"); - if (c != null) { - c = c.trim(); - if (c.length() > 0) { - charset = c.toLowerCase(); - } - } - - /* - * Add all other parameters to parameters. - */ - parameters.putAll(params); - parameters.remove(""); - parameters.remove("boundary"); - parameters.remove("charset"); - } - } - - private Map getHeaderParams(String headerValue) { - Map result = new HashMap(); - - // split main value and parameters - String main; - String rest; - if (headerValue.indexOf(";") == -1) { - main = headerValue; - rest = null; - } else { - main = headerValue.substring(0, headerValue.indexOf(";")); - rest = headerValue.substring(main.length() + 1); - } - - result.put("", main); - if (rest != null) { - char[] chars = rest.toCharArray(); - StringBuffer paramName = new StringBuffer(); - StringBuffer paramValue = new StringBuffer(); - - final byte READY_FOR_NAME = 0; - final byte IN_NAME = 1; - final byte READY_FOR_VALUE = 2; - final byte IN_VALUE = 3; - final byte IN_QUOTED_VALUE = 4; - final byte VALUE_DONE = 5; - final byte ERROR = 99; - - byte state = READY_FOR_NAME; - boolean escaped = false; - for (int i = 0; i < chars.length; i++) { - char c = chars[i]; - - switch (state) { - case ERROR: - if (c == ';') - state = READY_FOR_NAME; - break; - - case READY_FOR_NAME: - if (c == '=') { - log.error("Expected header param name, got '='"); - state = ERROR; - break; - } - - paramName = new StringBuffer(); - paramValue = new StringBuffer(); - - state = IN_NAME; - // $FALL-THROUGH$ - - case IN_NAME: - if (c == '=') { - if (paramName.length() == 0) - state = ERROR; - else - state = READY_FOR_VALUE; - break; - } - - // not '='... just add to name - paramName.append(c); - break; - - case READY_FOR_VALUE: - boolean fallThrough = false; - switch (c) { - case ' ': - case '\t': - break; // ignore spaces, especially before '"' - - case '"': - state = IN_QUOTED_VALUE; - break; - - default: - state = IN_VALUE; - fallThrough = true; - break; - } - if (!fallThrough) - break; - - // $FALL-THROUGH$ - - case IN_VALUE: - fallThrough = false; - switch (c) { - case ';': - case ' ': - case '\t': - result.put( - paramName.toString().trim().toLowerCase(), - paramValue.toString().trim()); - state = VALUE_DONE; - fallThrough = true; - break; - default: - paramValue.append(c); - break; - } - if (!fallThrough) - break; - - // $FALL-THROUGH$ - - case VALUE_DONE: - switch (c) { - case ';': - state = READY_FOR_NAME; - break; - - case ' ': - case '\t': - break; - - default: - state = ERROR; - break; - } - break; - - case IN_QUOTED_VALUE: - switch (c) { - case '"': - if (!escaped) { - // don't trim quoted strings; the spaces could be intentional. - result.put( - paramName.toString().trim().toLowerCase(), - paramValue.toString()); - state = VALUE_DONE; - } else { - escaped = false; - paramValue.append(c); - } - break; - - case '\\': - if (escaped) { - paramValue.append('\\'); - } - escaped = !escaped; - break; - - default: - if (escaped) { - paramValue.append('\\'); - } - escaped = false; - paramValue.append(c); - break; - } - break; - - } - } - - // done looping. check if anything is left over. - if (state == IN_VALUE) { - result.put( - paramName.toString().trim().toLowerCase(), - paramValue.toString().trim()); - } - } - - return result; - } - - - public boolean isMimeType(String mimeType) { - return this.mimeType.equals(mimeType.toLowerCase()); - } - - /** - * Return true if the BodyDescriptor belongs to a message - */ - public boolean isMessage() { - return mimeType.equals("message/rfc822"); - } - - /** - * Return true if the BodyDescripotro belongs to a multipart - */ - public boolean isMultipart() { - return mimeType.startsWith("multipart/"); - } - - /** - * Return the MimeType - */ - public String getMimeType() { - return mimeType; - } - - /** - * Return the boundary - */ - public String getBoundary() { - return boundary; - } - - /** - * Return the charset - */ - public String getCharset() { - return charset; - } - - /** - * Return all parameters for the BodyDescriptor - */ - public Map getParameters() { - return parameters; - } - - /** - * Return the TransferEncoding - */ - public String getTransferEncoding() { - return transferEncoding; - } - - /** - * Return true if it's base64 encoded - */ - public boolean isBase64Encoded() { - return "base64".equals(transferEncoding); - } - - /** - * Return true if it's quoted-printable - */ - public boolean isQuotedPrintableEncoded() { - return "quoted-printable".equals(transferEncoding); - } - - @Override - public String toString() { - return mimeType; - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/CloseShieldInputStream.java b/apache/org/apache/james/mime4j/CloseShieldInputStream.java deleted file mode 100644 index d9f3b078a..000000000 --- a/apache/org/apache/james/mime4j/CloseShieldInputStream.java +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.io.InputStream; -import java.io.IOException; - -/** - * InputStream that shields its underlying input stream from - * being closed. - * - * - * @version $Id: CloseShieldInputStream.java,v 1.2 2004/10/02 12:41:10 ntherning Exp $ - */ -public class CloseShieldInputStream extends InputStream { - - /** - * Underlying InputStream - */ - private InputStream is; - - public CloseShieldInputStream(InputStream is) { - this.is = is; - } - - public InputStream getUnderlyingStream() { - return is; - } - - /** - * @see java.io.InputStream#read() - */ - public int read() throws IOException { - checkIfClosed(); - return is.read(); - } - - /** - * @see java.io.InputStream#available() - */ - public int available() throws IOException { - checkIfClosed(); - return is.available(); - } - - - /** - * Set the underlying InputStream to null - */ - public void close() throws IOException { - is = null; - } - - /** - * @see java.io.FilterInputStream#reset() - */ - public synchronized void reset() throws IOException { - checkIfClosed(); - is.reset(); - } - - /** - * @see java.io.FilterInputStream#markSupported() - */ - public boolean markSupported() { - if (is == null) - return false; - return is.markSupported(); - } - - /** - * @see java.io.FilterInputStream#mark(int) - */ - public synchronized void mark(int readlimit) { - if (is != null) - is.mark(readlimit); - } - - /** - * @see java.io.FilterInputStream#skip(long) - */ - public long skip(long n) throws IOException { - checkIfClosed(); - return is.skip(n); - } - - /** - * @see java.io.FilterInputStream#read(byte[]) - */ - public int read(byte b[]) throws IOException { - checkIfClosed(); - return is.read(b); - } - - /** - * @see java.io.FilterInputStream#read(byte[], int, int) - */ - public int read(byte b[], int off, int len) throws IOException { - checkIfClosed(); - return is.read(b, off, len); - } - - /** - * Check if the underlying InputStream is null. If so throw an Exception - * - * @throws IOException if the underlying InputStream is null - */ - private void checkIfClosed() throws IOException { - if (is == null) - throw new IOException("Stream is closed"); - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/ContentHandler.java b/apache/org/apache/james/mime4j/ContentHandler.java deleted file mode 100644 index b437e739e..000000000 --- a/apache/org/apache/james/mime4j/ContentHandler.java +++ /dev/null @@ -1,177 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.io.IOException; -import java.io.InputStream; - -/** - *

- * Receives notifications of the content of a plain RFC822 or MIME message. - * Implement this interface and register an instance of that implementation - * with a MimeStreamParser instance using its - * {@link org.apache.james.mime4j.MimeStreamParser#setContentHandler(ContentHandler)} - * method. The parser uses the ContentHandler instance to report - * basic message-related events like the start and end of the body of a - * part in a multipart MIME entity. - *

- *

- * Events will be generated in the order the corresponding elements occur in - * the message stream parsed by the parser. E.g.: - *

- *      startMessage()
- *          startHeader()
- *              field(...)
- *              field(...)
- *              ...
- *          endHeader()
- *          startMultipart()
- *              preamble(...)
- *              startBodyPart()
- *                  startHeader()
- *                      field(...)
- *                      field(...)
- *                      ...
- *                  endHeader()
- *                  body()
- *              endBodyPart()
- *              startBodyPart()
- *                  startHeader()
- *                      field(...)
- *                      field(...)
- *                      ...
- *                  endHeader()
- *                  body()
- *              endBodyPart()
- *              epilogue(...)
- *          endMultipart()
- *      endMessage()
- * 
- * The above shows an example of a MIME message consisting of a multipart - * body containing two body parts. - *

- *

- * See MIME RFCs 2045-2049 for more information on the structure of MIME - * messages and RFC 822 and 2822 for the general structure of Internet mail - * messages. - *

- * - * - * @version $Id: ContentHandler.java,v 1.3 2004/10/02 12:41:10 ntherning Exp $ - */ -public interface ContentHandler { - /** - * Called when a new message starts (a top level message or an embedded - * rfc822 message). - */ - void startMessage(); - - /** - * Called when a message ends. - */ - void endMessage(); - - /** - * Called when a new body part starts inside a - * multipart/* entity. - */ - void startBodyPart(); - - /** - * Called when a body part ends. - */ - void endBodyPart(); - - /** - * Called when a header (of a message or body part) is about to be parsed. - */ - void startHeader(); - - /** - * Called for each field of a header. - * - * @param fieldData the raw contents of the field - * (Field-Name: field value). The value will not be - * unfolded. - */ - void field(String fieldData); - - /** - * Called when there are no more header fields in a message or body part. - */ - void endHeader(); - - /** - * Called for the preamble (whatever comes before the first body part) - * of a multipart/* entity. - * - * @param is used to get the contents of the preamble. - * @throws IOException should be thrown on I/O errors. - */ - void preamble(InputStream is) throws IOException; - - /** - * Called for the epilogue (whatever comes after the final body part) - * of a multipart/* entity. - * - * @param is used to get the contents of the epilogue. - * @throws IOException should be thrown on I/O errors. - */ - void epilogue(InputStream is) throws IOException; - - /** - * Called when the body of a multipart entity is about to be parsed. - * - * @param bd encapsulates the values (either read from the - * message stream or, if not present, determined implictly - * as described in the - * MIME rfc:s) of the Content-Type and - * Content-Transfer-Encoding header fields. - */ - void startMultipart(BodyDescriptor bd); - - /** - * Called when the body of an entity has been parsed. - */ - void endMultipart(); - - /** - * Called when the body of a discrete (non-multipart) entity is about to - * be parsed. - * - * @param bd see {@link #startMultipart(BodyDescriptor)} - * @param is the contents of the body. NOTE: this is the raw body contents - * - it will not be decoded if encoded. The bd - * parameter should be used to determine how the stream data - * should be decoded. - * @throws IOException should be thrown on I/O errors. - */ - void body(BodyDescriptor bd, InputStream is) throws IOException; - - /** - * Called when a new entity (message or body part) starts and the - * parser is in raw mode. - * - * @param is the raw contents of the entity. - * @throws IOException should be thrown on I/O errors. - * @see MimeStreamParser#setRaw(boolean) - */ - void raw(InputStream is) throws IOException; -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/EOLConvertingInputStream.java b/apache/org/apache/james/mime4j/EOLConvertingInputStream.java deleted file mode 100644 index d6ef706b2..000000000 --- a/apache/org/apache/james/mime4j/EOLConvertingInputStream.java +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.io.IOException; -import java.io.InputStream; -import java.io.PushbackInputStream; - -/** - * InputStream which converts \r - * bytes not followed by \n and \n not - * preceded by \r to \r\n. - * - * - * @version $Id: EOLConvertingInputStream.java,v 1.4 2004/11/29 13:15:42 ntherning Exp $ - */ -public class EOLConvertingInputStream extends InputStream { - /** Converts single '\r' to '\r\n' */ - public static final int CONVERT_CR = 1; - /** Converts single '\n' to '\r\n' */ - public static final int CONVERT_LF = 2; - /** Converts single '\r' and '\n' to '\r\n' */ - public static final int CONVERT_BOTH = 3; - - private PushbackInputStream in = null; - private int previous = 0; - private int flags = CONVERT_BOTH; - private int size = 0; - private int pos = 0; - private int nextTenPctPos; - private int tenPctSize; - private Callback callback; - - public interface Callback { - public void report(int bytesRead); - } - - /** - * Creates a new EOLConvertingInputStream - * instance converting bytes in the given InputStream. - * The flag CONVERT_BOTH is the default. - * - * @param in the InputStream to read from. - */ - public EOLConvertingInputStream(InputStream _in) { - super(); - in = new PushbackInputStream(_in, 2); - } - - /** - * Creates a new EOLConvertingInputStream - * instance converting bytes in the given InputStream. - * - * @param _in the InputStream to read from. - * @param _size the size of the input stream (need not be exact) - * @param _callback a callback reporting when each 10% of stream's size is reached - */ - public EOLConvertingInputStream(InputStream _in, int _size, Callback _callback) { - this(_in); - size = _size; - tenPctSize = size / 10; - nextTenPctPos = tenPctSize; - callback = _callback; - } - - /** - * Closes the underlying stream. - * - * @throws IOException on I/O errors. - */ - public void close() throws IOException { - in.close(); - } - - private int readByte() throws IOException { - int b = in.read(); - if (b != -1) { - if (callback != null && pos++ == nextTenPctPos) { - nextTenPctPos += tenPctSize; - if (callback != null) { - callback.report(pos); - } - } - } - return b; - } - - private void unreadByte(int c) throws IOException { - in.unread(c); - pos--; - } - - /** - * @see java.io.InputStream#read() - */ - public int read() throws IOException { - int b = readByte(); - - if (b == -1) { - pos = size; - return -1; - } - - if ((flags & CONVERT_CR) != 0 && b == '\r') { - int c = readByte(); - if (c != -1) { - unreadByte(c); - } - if (c != '\n') { - unreadByte('\n'); - } - } else if ((flags & CONVERT_LF) != 0 && b == '\n' && previous != '\r') { - b = '\r'; - unreadByte('\n'); - } - - previous = b; - - return b; - } - -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/Log.java b/apache/org/apache/james/mime4j/Log.java deleted file mode 100644 index 5eeead5f3..000000000 --- a/apache/org/apache/james/mime4j/Log.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2009 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 org.apache.james.mime4j; - -/** - * Empty stub for the apache logging library. - */ -public class Log { - private static final String LOG_TAG = "Email Log"; - - public Log(Class mClazz) { - } - - public boolean isDebugEnabled() { - return false; - } - - public boolean isErrorEnabled() { - return true; - } - - public boolean isFatalEnabled() { - return true; - } - - public boolean isInfoEnabled() { - return false; - } - - public boolean isTraceEnabled() { - return false; - } - - public boolean isWarnEnabled() { - return true; - } - - public void trace(Object message) { - if (!isTraceEnabled()) return; - android.util.Log.v(LOG_TAG, toString(message, null)); - } - - public void trace(Object message, Throwable t) { - if (!isTraceEnabled()) return; - android.util.Log.v(LOG_TAG, toString(message, t)); - } - - public void debug(Object message) { - if (!isDebugEnabled()) return; - android.util.Log.d(LOG_TAG, toString(message, null)); - } - - public void debug(Object message, Throwable t) { - if (!isDebugEnabled()) return; - android.util.Log.d(LOG_TAG, toString(message, t)); - } - - public void info(Object message) { - if (!isInfoEnabled()) return; - android.util.Log.i(LOG_TAG, toString(message, null)); - } - - public void info(Object message, Throwable t) { - if (!isInfoEnabled()) return; - android.util.Log.i(LOG_TAG, toString(message, t)); - } - - public void warn(Object message) { - android.util.Log.w(LOG_TAG, toString(message, null)); - } - - public void warn(Object message, Throwable t) { - android.util.Log.w(LOG_TAG, toString(message, t)); - } - - public void error(Object message) { - android.util.Log.e(LOG_TAG, toString(message, null)); - } - - public void error(Object message, Throwable t) { - android.util.Log.e(LOG_TAG, toString(message, t)); - } - - public void fatal(Object message) { - android.util.Log.e(LOG_TAG, toString(message, null)); - } - - public void fatal(Object message, Throwable t) { - android.util.Log.e(LOG_TAG, toString(message, t)); - } - - private static String toString(Object o, Throwable t) { - String m = (o == null) ? "(null)" : o.toString(); - if (t == null) { - return m; - } else { - return m + " " + t.getMessage(); - } - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/LogFactory.java b/apache/org/apache/james/mime4j/LogFactory.java deleted file mode 100644 index ed6e3de3d..000000000 --- a/apache/org/apache/james/mime4j/LogFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2009 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 org.apache.james.mime4j; - -/** - * Empty stub for the apache logging library. - */ -public final class LogFactory { - private LogFactory() { - } - - public static Log getLog(Class clazz) { - return new Log(clazz); - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/MimeBoundaryInputStream.java b/apache/org/apache/james/mime4j/MimeBoundaryInputStream.java deleted file mode 100644 index c6d6f248a..000000000 --- a/apache/org/apache/james/mime4j/MimeBoundaryInputStream.java +++ /dev/null @@ -1,184 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.io.IOException; -import java.io.InputStream; -import java.io.PushbackInputStream; - -/** - * Stream that constrains itself to a single MIME body part. - * After the stream ends (i.e. read() returns -1) {@link #hasMoreParts()} - * can be used to determine if a final boundary has been seen or not. - * If {@link #parentEOF()} is true an unexpected end of stream - * has been detected in the parent stream. - * - * - * - * @version $Id: MimeBoundaryInputStream.java,v 1.2 2004/11/29 13:15:42 ntherning Exp $ - */ -public class MimeBoundaryInputStream extends InputStream { - - private PushbackInputStream s = null; - private byte[] boundary = null; - private boolean first = true; - private boolean eof = false; - private boolean parenteof = false; - private boolean moreParts = true; - - /** - * Creates a new MimeBoundaryInputStream. - * @param s The underlying stream. - * @param boundary Boundary string (not including leading hyphens). - */ - public MimeBoundaryInputStream(InputStream s, String boundary) - throws IOException { - - this.s = new PushbackInputStream(s, boundary.length() + 4); - - boundary = "--" + boundary; - this.boundary = new byte[boundary.length()]; - for (int i = 0; i < this.boundary.length; i++) { - this.boundary[i] = (byte) boundary.charAt(i); - } - - /* - * By reading one byte we will update moreParts to be as expected - * before any bytes have been read. - */ - int b = read(); - if (b != -1) { - this.s.unread(b); - } - } - - /** - * Closes the underlying stream. - * - * @throws IOException on I/O errors. - */ - public void close() throws IOException { - s.close(); - } - - /** - * Determines if the underlying stream has more parts (this stream has - * not seen an end boundary). - * - * @return true if there are more parts in the underlying - * stream, false otherwise. - */ - public boolean hasMoreParts() { - return moreParts; - } - - /** - * Determines if the parent stream has reached EOF - * - * @return true if EOF has been reached for the parent stream, - * false otherwise. - */ - public boolean parentEOF() { - return parenteof; - } - - /** - * Consumes all unread bytes of this stream. After a call to this method - * this stream will have reached EOF. - * - * @throws IOException on I/O errors. - */ - public void consume() throws IOException { - while (read() != -1) { - } - } - - /** - * @see java.io.InputStream#read() - */ - public int read() throws IOException { - if (eof) { - return -1; - } - - if (first) { - first = false; - if (matchBoundary()) { - return -1; - } - } - - int b1 = s.read(); - int b2 = s.read(); - - if (b1 == '\r' && b2 == '\n') { - if (matchBoundary()) { - return -1; - } - } - - if (b2 != -1) { - s.unread(b2); - } - - parenteof = b1 == -1; - eof = parenteof; - - return b1; - } - - private boolean matchBoundary() throws IOException { - - for (int i = 0; i < boundary.length; i++) { - int b = s.read(); - if (b != boundary[i]) { - if (b != -1) { - s.unread(b); - } - for (int j = i - 1; j >= 0; j--) { - s.unread(boundary[j]); - } - return false; - } - } - - /* - * We have a match. Is it an end boundary? - */ - int prev = s.read(); - int curr = s.read(); - moreParts = !(prev == '-' && curr == '-'); - do { - if (curr == '\n' && prev == '\r') { - break; - } - prev = curr; - } while ((curr = s.read()) != -1); - - if (curr == -1) { - moreParts = false; - parenteof = true; - } - - eof = true; - - return true; - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/MimeStreamParser.java b/apache/org/apache/james/mime4j/MimeStreamParser.java deleted file mode 100644 index a8aad5a38..000000000 --- a/apache/org/apache/james/mime4j/MimeStreamParser.java +++ /dev/null @@ -1,324 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import org.apache.james.mime4j.decoder.Base64InputStream; -import org.apache.james.mime4j.decoder.QuotedPrintableInputStream; - -import java.io.IOException; -import java.io.InputStream; -import java.util.BitSet; -import java.util.LinkedList; - -/** - *

- * Parses MIME (or RFC822) message streams of bytes or characters and reports - * parsing events to a ContentHandler instance. - *

- *

- * Typical usage:
- *

- *      ContentHandler handler = new MyHandler();
- *      MimeStreamParser parser = new MimeStreamParser();
- *      parser.setContentHandler(handler);
- *      parser.parse(new BufferedInputStream(new FileInputStream("mime.msg")));
- * 
- * NOTE: All lines must end with CRLF - * (\r\n). If you are unsure of the line endings in your stream - * you should wrap it in a {@link org.apache.james.mime4j.EOLConvertingInputStream} instance. - * - * - * @version $Id: MimeStreamParser.java,v 1.8 2005/02/11 10:12:02 ntherning Exp $ - */ -public class MimeStreamParser { - private static final Log log = LogFactory.getLog(MimeStreamParser.class); - - private static BitSet fieldChars = null; - - private RootInputStream rootStream = null; - private LinkedList bodyDescriptors = new LinkedList(); - private ContentHandler handler = null; - private boolean raw = false; - private boolean prematureEof = false; - - static { - fieldChars = new BitSet(); - for (int i = 0x21; i <= 0x39; i++) { - fieldChars.set(i); - } - for (int i = 0x3b; i <= 0x7e; i++) { - fieldChars.set(i); - } - } - - /** - * Creates a new MimeStreamParser instance. - */ - public MimeStreamParser() { - } - - /** - * Parses a stream of bytes containing a MIME message. - * - * @param is the stream to parse. - * @throws IOException on I/O errors. - */ - public void parse(InputStream is) throws IOException { - rootStream = new RootInputStream(is); - parseMessage(rootStream); - } - - /** - * Determines if this parser is currently in raw mode. - * - * @return true if in raw mode, false - * otherwise. - * @see #setRaw(boolean) - */ - public boolean isRaw() { - return raw; - } - - /** - * Enables or disables raw mode. In raw mode all future entities - * (messages or body parts) in the stream will be reported to the - * {@link ContentHandler#raw(InputStream)} handler method only. - * The stream will contain the entire unparsed entity contents - * including header fields and whatever is in the body. - * - * @param raw true enables raw mode, false - * disables it. - */ - public void setRaw(boolean raw) { - this.raw = raw; - } - - /** - * Finishes the parsing and stops reading lines. - * NOTE: No more lines will be parsed but the parser - * will still call - * {@link ContentHandler#endMultipart()}, - * {@link ContentHandler#endBodyPart()}, - * {@link ContentHandler#endMessage()}, etc to match previous calls - * to - * {@link ContentHandler#startMultipart(BodyDescriptor)}, - * {@link ContentHandler#startBodyPart()}, - * {@link ContentHandler#startMessage()}, etc. - */ - public void stop() { - rootStream.truncate(); - } - - /** - * Parses an entity which consists of a header followed by a body containing - * arbitrary data, body parts or an embedded message. - * - * @param is the stream to parse. - * @throws IOException on I/O errors. - */ - private void parseEntity(InputStream is) throws IOException { - BodyDescriptor bd = parseHeader(is); - - if (bd.isMultipart()) { - bodyDescriptors.addFirst(bd); - - handler.startMultipart(bd); - - MimeBoundaryInputStream tempIs = - new MimeBoundaryInputStream(is, bd.getBoundary()); - handler.preamble(new CloseShieldInputStream(tempIs)); - tempIs.consume(); - - while (tempIs.hasMoreParts()) { - tempIs = new MimeBoundaryInputStream(is, bd.getBoundary()); - parseBodyPart(tempIs); - tempIs.consume(); - if (tempIs.parentEOF()) { - prematureEof = true; -// if (log.isWarnEnabled()) { -// log.warn("Line " + rootStream.getLineNumber() -// + ": Body part ended prematurely. " -// + "Higher level boundary detected or " -// + "EOF reached."); -// } - break; - } - } - - handler.epilogue(new CloseShieldInputStream(is)); - - handler.endMultipart(); - - bodyDescriptors.removeFirst(); - - } else if (bd.isMessage()) { - if (bd.isBase64Encoded()) { - log.warn("base64 encoded message/rfc822 detected"); - is = new EOLConvertingInputStream( - new Base64InputStream(is)); - } else if (bd.isQuotedPrintableEncoded()) { - log.warn("quoted-printable encoded message/rfc822 detected"); - is = new EOLConvertingInputStream( - new QuotedPrintableInputStream(is)); - } - bodyDescriptors.addFirst(bd); - parseMessage(is); - bodyDescriptors.removeFirst(); - } else { - handler.body(bd, new CloseShieldInputStream(is)); - } - - /* - * Make sure the stream has been consumed. - */ - while (is.read() != -1) { - } - } - - private void parseMessage(InputStream is) throws IOException { - if (raw) { - handler.raw(new CloseShieldInputStream(is)); - } else { - handler.startMessage(); - parseEntity(is); - handler.endMessage(); - } - } - - public boolean getPrematureEof() { - return prematureEof; - } - - private void parseBodyPart(InputStream is) throws IOException { - if (raw) { - handler.raw(new CloseShieldInputStream(is)); - } else { - handler.startBodyPart(); - parseEntity(is); - handler.endBodyPart(); - } - } - - /** - * Parses a header. - * - * @param is the stream to parse. - * @return a BodyDescriptor describing the body following - * the header. - */ - private BodyDescriptor parseHeader(InputStream is) throws IOException { - BodyDescriptor bd = new BodyDescriptor(bodyDescriptors.isEmpty() - ? null : (BodyDescriptor) bodyDescriptors.getFirst()); - - handler.startHeader(); - - int lineNumber = rootStream.getLineNumber(); - - StringBuffer sb = new StringBuffer(); - int curr = 0; - int prev = 0; - while ((curr = is.read()) != -1) { - if (curr == '\n' && (prev == '\n' || prev == 0)) { - /* - * [\r]\n[\r]\n or an immediate \r\n have been seen. - */ - sb.deleteCharAt(sb.length() - 1); - break; - } - sb.append((char) curr); - prev = curr == '\r' ? prev : curr; - } - -// if (curr == -1 && log.isWarnEnabled()) { -// log.warn("Line " + rootStream.getLineNumber() -// + ": Unexpected end of headers detected. " -// + "Boundary detected in header or EOF reached."); -// } - - int start = 0; - int pos = 0; - int startLineNumber = lineNumber; - while (pos < sb.length()) { - while (pos < sb.length() && sb.charAt(pos) != '\r') { - pos++; - } - if (pos < sb.length() - 1 && sb.charAt(pos + 1) != '\n') { - pos++; - continue; - } - - if (pos >= sb.length() - 2 || fieldChars.get(sb.charAt(pos + 2))) { - - /* - * field should be the complete field data excluding the - * trailing \r\n. - */ - String field = sb.substring(start, pos); - start = pos + 2; - - /* - * Check for a valid field. - */ - int index = field.indexOf(':'); - boolean valid = false; - if (index != -1 && fieldChars.get(field.charAt(0))) { - valid = true; - String fieldName = field.substring(0, index).trim(); - for (int i = 0; i < fieldName.length(); i++) { - if (!fieldChars.get(fieldName.charAt(i))) { - valid = false; - break; - } - } - - if (valid) { - handler.field(field); - bd.addField(fieldName, field.substring(index + 1)); - } - } - - if (!valid && log.isWarnEnabled()) { - log.warn("Line " + startLineNumber - + ": Ignoring invalid field: '" + field.trim() + "'"); - } - - startLineNumber = lineNumber; - } - - pos += 2; - lineNumber++; - } - - handler.endHeader(); - - return bd; - } - - /** - * Sets the ContentHandler to use when reporting - * parsing events. - * - * @param h the ContentHandler. - */ - public void setContentHandler(ContentHandler h) { - this.handler = h; - } - -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/RootInputStream.java b/apache/org/apache/james/mime4j/RootInputStream.java deleted file mode 100644 index cc8b2411c..000000000 --- a/apache/org/apache/james/mime4j/RootInputStream.java +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j; - -import java.io.IOException; -import java.io.InputStream; - -/** - * InputStream used by the parser to wrap the original user - * supplied stream. This stream keeps track of the current line number and - * can also be truncated. When truncated the stream will appear to have - * reached end of file. This is used by the parser's - * {@link org.apache.james.mime4j.MimeStreamParser#stop()} method. - * - * - * @version $Id: RootInputStream.java,v 1.2 2004/10/02 12:41:10 ntherning Exp $ - */ -class RootInputStream extends InputStream { - private InputStream is = null; - private int lineNumber = 1; - private int prev = -1; - private boolean truncated = false; - - /** - * Creates a new RootInputStream. - * - * @param in the stream to read from. - */ - public RootInputStream(InputStream is) { - this.is = is; - } - - /** - * Gets the current line number starting at 1 - * (the number of \r\n read so far plus 1). - * - * @return the current line number. - */ - public int getLineNumber() { - return lineNumber; - } - - /** - * Truncates this InputStream. After this call any - * call to {@link #read()}, {@link #read(byte[]) or - * {@link #read(byte[], int, int)} will return - * -1 as if end-of-file had been reached. - */ - public void truncate() { - this.truncated = true; - } - - /** - * @see java.io.InputStream#read() - */ - public int read() throws IOException { - if (truncated) { - return -1; - } - - int b = is.read(); - if (prev == '\r' && b == '\n') { - lineNumber++; - } - prev = b; - return b; - } - - /** - * - * @see java.io.InputStream#read(byte[], int, int) - */ - public int read(byte[] b, int off, int len) throws IOException { - if (truncated) { - return -1; - } - - int n = is.read(b, off, len); - for (int i = off; i < off + n; i++) { - if (prev == '\r' && b[i] == '\n') { - lineNumber++; - } - prev = b[i]; - } - return n; - } - - /** - * @see java.io.InputStream#read(byte[]) - */ - public int read(byte[] b) throws IOException { - return read(b, 0, b.length); - } -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/codec/EncoderUtil.java b/apache/org/apache/james/mime4j/codec/EncoderUtil.java deleted file mode 100644 index 6841bc998..000000000 --- a/apache/org/apache/james/mime4j/codec/EncoderUtil.java +++ /dev/null @@ -1,630 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.codec; - -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.util.BitSet; -import java.util.Locale; - -import org.apache.james.mime4j.util.CharsetUtil; - -/** - * ANDROID: THIS CLASS IS COPIED FROM A NEWER VERSION OF MIME4J - */ - -/** - * Static methods for encoding header field values. This includes encoded-words - * as defined in RFC 2047 - * or display-names of an e-mail address, for example. - * - */ -public class EncoderUtil { - - // This array is a lookup table that translates 6-bit positive integer index - // values into their "Base64 Alphabet" equivalents as specified in Table 1 - // of RFC 2045. - // ANDROID: THIS TABLE IS COPIED FROM BASE64OUTPUTSTREAM - static final byte[] BASE64_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F', - 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', - '6', '7', '8', '9', '+', '/' }; - - // Byte used to pad output. - private static final byte BASE64_PAD = '='; - - private static final BitSet Q_REGULAR_CHARS = initChars("=_?"); - - private static final BitSet Q_RESTRICTED_CHARS = initChars("=_?\"#$%&'(),.:;<>@[\\]^`{|}~"); - - private static final int MAX_USED_CHARACTERS = 50; - - private static final String ENC_WORD_PREFIX = "=?"; - private static final String ENC_WORD_SUFFIX = "?="; - - private static final int ENCODED_WORD_MAX_LENGTH = 75; // RFC 2047 - - private static final BitSet TOKEN_CHARS = initChars("()<>@,;:\\\"/[]?="); - - private static final BitSet ATEXT_CHARS = initChars("()<>@.,;:\\\"[]"); - - private static BitSet initChars(String specials) { - BitSet bs = new BitSet(128); - for (char ch = 33; ch < 127; ch++) { - if (specials.indexOf(ch) == -1) { - bs.set(ch); - } - } - return bs; - } - - /** - * Selects one of the two encodings specified in RFC 2047. - */ - public enum Encoding { - /** The B encoding (identical to base64 defined in RFC 2045). */ - B, - /** The Q encoding (similar to quoted-printable defined in RFC 2045). */ - Q - } - - /** - * Indicates the intended usage of an encoded word. - */ - public enum Usage { - /** - * Encoded word is used to replace a 'text' token in any Subject or - * Comments header field. - */ - TEXT_TOKEN, - /** - * Encoded word is used to replace a 'word' entity within a 'phrase', - * for example, one that precedes an address in a From, To, or Cc - * header. - */ - WORD_ENTITY - } - - private EncoderUtil() { - } - - /** - * Encodes the display-name portion of an address. See RFC 5322 section 3.4 - * and RFC 2047 section - * 5.3. The specified string should not be folded. - * - * @param displayName - * display-name to encode. - * @return encoded display-name. - */ - public static String encodeAddressDisplayName(String displayName) { - // display-name = phrase - // phrase = 1*( encoded-word / word ) - // word = atom / quoted-string - // atom = [CFWS] 1*atext [CFWS] - // CFWS = comment or folding white space - - if (isAtomPhrase(displayName)) { - return displayName; - } else if (hasToBeEncoded(displayName, 0)) { - return encodeEncodedWord(displayName, Usage.WORD_ENTITY); - } else { - return quote(displayName); - } - } - - /** - * Encodes the local part of an address specification as described in RFC - * 5322 section 3.4.1. Leading and trailing CFWS should have been removed - * before calling this method. The specified string should not contain any - * illegal (control or non-ASCII) characters. - * - * @param localPart - * the local part to encode - * @return the encoded local part. - */ - public static String encodeAddressLocalPart(String localPart) { - // local-part = dot-atom / quoted-string - // dot-atom = [CFWS] dot-atom-text [CFWS] - // CFWS = comment or folding white space - - if (isDotAtomText(localPart)) { - return localPart; - } else { - return quote(localPart); - } - } - - /** - * Encodes the specified strings into a header parameter as described in RFC - * 2045 section 5.1 and RFC 2183 section 2. The specified strings should not - * contain any illegal (control or non-ASCII) characters. - * - * @param name - * parameter name. - * @param value - * parameter value. - * @return encoded result. - */ - public static String encodeHeaderParameter(String name, String value) { - name = name.toLowerCase(Locale.US); - - // value := token / quoted-string - if (isToken(value)) { - return name + "=" + value; - } else { - return name + "=" + quote(value); - } - } - - /** - * Shortcut method that encodes the specified text into an encoded-word if - * the text has to be encoded. - * - * @param text - * text to encode. - * @param usage - * whether the encoded-word is to be used to replace a text token - * or a word entity (see RFC 822). - * @param usedCharacters - * number of characters already used up (0 <= usedCharacters <= 50). - * @return the specified text if encoding is not necessary or an encoded - * word or a sequence of encoded words otherwise. - */ - public static String encodeIfNecessary(String text, Usage usage, - int usedCharacters) { - if (hasToBeEncoded(text, usedCharacters)) - return encodeEncodedWord(text, usage, usedCharacters); - else - return text; - } - - /** - * Determines if the specified string has to encoded into an encoded-word. - * Returns true if the text contains characters that don't - * fall into the printable ASCII character set or if the text contains a - * 'word' (sequence of non-whitespace characters) longer than 77 characters - * (including characters already used up in the line). - * - * @param text - * text to analyze. - * @param usedCharacters - * number of characters already used up (0 <= usedCharacters <= 50). - * @return true if the specified text has to be encoded into - * an encoded-word, false otherwise. - */ - public static boolean hasToBeEncoded(String text, int usedCharacters) { - if (text == null) - throw new IllegalArgumentException(); - if (usedCharacters < 0 || usedCharacters > MAX_USED_CHARACTERS) - throw new IllegalArgumentException(); - - int nonWhiteSpaceCount = usedCharacters; - - for (int idx = 0; idx < text.length(); idx++) { - char ch = text.charAt(idx); - if (ch == '\t' || ch == ' ') { - nonWhiteSpaceCount = 0; - } else { - nonWhiteSpaceCount++; - if (nonWhiteSpaceCount > 77) { - // Line cannot be folded into multiple lines with no more - // than 78 characters each. Encoding as encoded-words makes - // that possible. One character has to be reserved for - // folding white space; that leaves 77 characters. - return true; - } - - if (ch < 32 || ch >= 127) { - // non-printable ascii character has to be encoded - return true; - } - } - } - - return false; - } - - /** - * Encodes the specified text into an encoded word or a sequence of encoded - * words separated by space. The text is separated into a sequence of - * encoded words if it does not fit in a single one. - *

- * The charset to encode the specified text into a byte array and the - * encoding to use for the encoded-word are detected automatically. - *

- * This method assumes that zero characters have already been used up in the - * current line. - * - * @param text - * text to encode. - * @param usage - * whether the encoded-word is to be used to replace a text token - * or a word entity (see RFC 822). - * @return the encoded word (or sequence of encoded words if the given text - * does not fit in a single encoded word). - * @see #hasToBeEncoded(String, int) - */ - public static String encodeEncodedWord(String text, Usage usage) { - return encodeEncodedWord(text, usage, 0, null, null); - } - - /** - * Encodes the specified text into an encoded word or a sequence of encoded - * words separated by space. The text is separated into a sequence of - * encoded words if it does not fit in a single one. - *

- * The charset to encode the specified text into a byte array and the - * encoding to use for the encoded-word are detected automatically. - * - * @param text - * text to encode. - * @param usage - * whether the encoded-word is to be used to replace a text token - * or a word entity (see RFC 822). - * @param usedCharacters - * number of characters already used up (0 <= usedCharacters <= 50). - * @return the encoded word (or sequence of encoded words if the given text - * does not fit in a single encoded word). - * @see #hasToBeEncoded(String, int) - */ - public static String encodeEncodedWord(String text, Usage usage, - int usedCharacters) { - return encodeEncodedWord(text, usage, usedCharacters, null, null); - } - - /** - * Encodes the specified text into an encoded word or a sequence of encoded - * words separated by space. The text is separated into a sequence of - * encoded words if it does not fit in a single one. - * - * @param text - * text to encode. - * @param usage - * whether the encoded-word is to be used to replace a text token - * or a word entity (see RFC 822). - * @param usedCharacters - * number of characters already used up (0 <= usedCharacters <= 50). - * @param charset - * the Java charset that should be used to encode the specified - * string into a byte array. A suitable charset is detected - * automatically if this parameter is null. - * @param encoding - * the encoding to use for the encoded-word (either B or Q). A - * suitable encoding is automatically chosen if this parameter is - * null. - * @return the encoded word (or sequence of encoded words if the given text - * does not fit in a single encoded word). - * @see #hasToBeEncoded(String, int) - */ - public static String encodeEncodedWord(String text, Usage usage, - int usedCharacters, Charset charset, Encoding encoding) { - if (text == null) - throw new IllegalArgumentException(); - if (usedCharacters < 0 || usedCharacters > MAX_USED_CHARACTERS) - throw new IllegalArgumentException(); - - if (charset == null) - charset = determineCharset(text); - - String mimeCharset = CharsetUtil.toMimeCharset(charset.name()); - if (mimeCharset == null) { - // cannot happen if charset was originally null - throw new IllegalArgumentException("Unsupported charset"); - } - - byte[] bytes = encode(text, charset); - - if (encoding == null) - encoding = determineEncoding(bytes, usage); - - if (encoding == Encoding.B) { - String prefix = ENC_WORD_PREFIX + mimeCharset + "?B?"; - return encodeB(prefix, text, usedCharacters, charset, bytes); - } else { - String prefix = ENC_WORD_PREFIX + mimeCharset + "?Q?"; - return encodeQ(prefix, text, usage, usedCharacters, charset, bytes); - } - } - - /** - * Encodes the specified byte array using the B encoding defined in RFC - * 2047. - * - * @param bytes - * byte array to encode. - * @return encoded string. - */ - public static String encodeB(byte[] bytes) { - StringBuilder sb = new StringBuilder(); - - int idx = 0; - final int end = bytes.length; - for (; idx < end - 2; idx += 3) { - int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8 - | bytes[idx + 2] & 0xff; - sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]); - sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]); - sb.append((char) BASE64_TABLE[data >> 6 & 0x3f]); - sb.append((char) BASE64_TABLE[data & 0x3f]); - } - - if (idx == end - 2) { - int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8; - sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]); - sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]); - sb.append((char) BASE64_TABLE[data >> 6 & 0x3f]); - sb.append((char) BASE64_PAD); - - } else if (idx == end - 1) { - int data = (bytes[idx] & 0xff) << 16; - sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]); - sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]); - sb.append((char) BASE64_PAD); - sb.append((char) BASE64_PAD); - } - - return sb.toString(); - } - - /** - * Encodes the specified byte array using the Q encoding defined in RFC - * 2047. - * - * @param bytes - * byte array to encode. - * @param usage - * whether the encoded-word is to be used to replace a text token - * or a word entity (see RFC 822). - * @return encoded string. - */ - public static String encodeQ(byte[] bytes, Usage usage) { - BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS - : Q_RESTRICTED_CHARS; - - StringBuilder sb = new StringBuilder(); - - final int end = bytes.length; - for (int idx = 0; idx < end; idx++) { - int v = bytes[idx] & 0xff; - if (v == 32) { - sb.append('_'); - } else if (!qChars.get(v)) { - sb.append('='); - sb.append(hexDigit(v >>> 4)); - sb.append(hexDigit(v & 0xf)); - } else { - sb.append((char) v); - } - } - - return sb.toString(); - } - - /** - * Tests whether the specified string is a token as defined in RFC 2045 - * section 5.1. - * - * @param str - * string to test. - * @return true if the specified string is a RFC 2045 token, - * false otherwise. - */ - public static boolean isToken(String str) { - // token := 1* - // tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / - // <"> / "/" / "[" / "]" / "?" / "=" - // CTL := 0.- 31., 127. - - final int length = str.length(); - if (length == 0) - return false; - - for (int idx = 0; idx < length; idx++) { - char ch = str.charAt(idx); - if (!TOKEN_CHARS.get(ch)) - return false; - } - - return true; - } - - private static boolean isAtomPhrase(String str) { - // atom = [CFWS] 1*atext [CFWS] - - boolean containsAText = false; - - final int length = str.length(); - for (int idx = 0; idx < length; idx++) { - char ch = str.charAt(idx); - if (ATEXT_CHARS.get(ch)) { - containsAText = true; - } else if (!CharsetUtil.isWhitespace(ch)) { - return false; - } - } - - return containsAText; - } - - // RFC 5322 section 3.2.3 - private static boolean isDotAtomText(String str) { - // dot-atom-text = 1*atext *("." 1*atext) - // atext = ALPHA / DIGIT / "!" / "#" / "$" / "%" / "&" / "'" / "*" / - // "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~" - - char prev = '.'; - - final int length = str.length(); - if (length == 0) - return false; - - for (int idx = 0; idx < length; idx++) { - char ch = str.charAt(idx); - - if (ch == '.') { - if (prev == '.' || idx == length - 1) - return false; - } else { - if (!ATEXT_CHARS.get(ch)) - return false; - } - - prev = ch; - } - - return true; - } - - // RFC 5322 section 3.2.4 - private static String quote(String str) { - // quoted-string = [CFWS] DQUOTE *([FWS] qcontent) [FWS] DQUOTE [CFWS] - // qcontent = qtext / quoted-pair - // qtext = %d33 / %d35-91 / %d93-126 - // quoted-pair = ("\" (VCHAR / WSP)) - // VCHAR = %x21-7E - // DQUOTE = %x22 - - String escaped = str.replaceAll("[\\\\\"]", "\\\\$0"); - return "\"" + escaped + "\""; - } - - private static String encodeB(String prefix, String text, - int usedCharacters, Charset charset, byte[] bytes) { - int encodedLength = bEncodedLength(bytes); - - int totalLength = prefix.length() + encodedLength - + ENC_WORD_SUFFIX.length(); - if (totalLength <= ENCODED_WORD_MAX_LENGTH - usedCharacters) { - return prefix + encodeB(bytes) + ENC_WORD_SUFFIX; - } else { - int splitOffset = text.offsetByCodePoints(text.length() / 2, -1); - - String part1 = text.substring(0, splitOffset); - byte[] bytes1 = encode(part1, charset); - String word1 = encodeB(prefix, part1, usedCharacters, charset, - bytes1); - - String part2 = text.substring(splitOffset); - byte[] bytes2 = encode(part2, charset); - String word2 = encodeB(prefix, part2, 0, charset, bytes2); - - return word1 + " " + word2; - } - } - - private static int bEncodedLength(byte[] bytes) { - return (bytes.length + 2) / 3 * 4; - } - - private static String encodeQ(String prefix, String text, Usage usage, - int usedCharacters, Charset charset, byte[] bytes) { - int encodedLength = qEncodedLength(bytes, usage); - - int totalLength = prefix.length() + encodedLength - + ENC_WORD_SUFFIX.length(); - if (totalLength <= ENCODED_WORD_MAX_LENGTH - usedCharacters) { - return prefix + encodeQ(bytes, usage) + ENC_WORD_SUFFIX; - } else { - int splitOffset = text.offsetByCodePoints(text.length() / 2, -1); - - String part1 = text.substring(0, splitOffset); - byte[] bytes1 = encode(part1, charset); - String word1 = encodeQ(prefix, part1, usage, usedCharacters, - charset, bytes1); - - String part2 = text.substring(splitOffset); - byte[] bytes2 = encode(part2, charset); - String word2 = encodeQ(prefix, part2, usage, 0, charset, bytes2); - - return word1 + " " + word2; - } - } - - private static int qEncodedLength(byte[] bytes, Usage usage) { - BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS - : Q_RESTRICTED_CHARS; - - int count = 0; - - for (int idx = 0; idx < bytes.length; idx++) { - int v = bytes[idx] & 0xff; - if (v == 32) { - count++; - } else if (!qChars.get(v)) { - count += 3; - } else { - count++; - } - } - - return count; - } - - private static byte[] encode(String text, Charset charset) { - ByteBuffer buffer = charset.encode(text); - byte[] bytes = new byte[buffer.limit()]; - buffer.get(bytes); - return bytes; - } - - private static Charset determineCharset(String text) { - // it is an important property of iso-8859-1 that it directly maps - // unicode code points 0000 to 00ff to byte values 00 to ff. - boolean ascii = true; - final int len = text.length(); - for (int index = 0; index < len; index++) { - char ch = text.charAt(index); - if (ch > 0xff) { - return CharsetUtil.UTF_8; - } - if (ch > 0x7f) { - ascii = false; - } - } - return ascii ? CharsetUtil.US_ASCII : CharsetUtil.ISO_8859_1; - } - - private static Encoding determineEncoding(byte[] bytes, Usage usage) { - if (bytes.length == 0) - return Encoding.Q; - - BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS - : Q_RESTRICTED_CHARS; - - int qEncoded = 0; - for (int i = 0; i < bytes.length; i++) { - int v = bytes[i] & 0xff; - if (v != 32 && !qChars.get(v)) { - qEncoded++; - } - } - - int percentage = qEncoded * 100 / bytes.length; - return percentage > 30 ? Encoding.B : Encoding.Q; - } - - private static char hexDigit(int i) { - return i < 10 ? (char) (i + '0') : (char) (i - 10 + 'A'); - } -} diff --git a/apache/org/apache/james/mime4j/decoder/Base64InputStream.java b/apache/org/apache/james/mime4j/decoder/Base64InputStream.java deleted file mode 100644 index 77f5d7d4a..000000000 --- a/apache/org/apache/james/mime4j/decoder/Base64InputStream.java +++ /dev/null @@ -1,151 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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. * - ****************************************************************/ - -/** - * Modified to improve efficiency by Android 21-Aug-2009 - */ - -package org.apache.james.mime4j.decoder; - -import java.io.IOException; -import java.io.InputStream; - -/** - * Performs Base-64 decoding on an underlying stream. - * - * - * @version $Id: Base64InputStream.java,v 1.3 2004/11/29 13:15:47 ntherning Exp $ - */ -public class Base64InputStream extends InputStream { - private final InputStream s; - private int outCount = 0; - private int outIndex = 0; - private final int[] outputBuffer = new int[3]; - private final byte[] inputBuffer = new byte[4]; - private boolean done = false; - - public Base64InputStream(InputStream s) { - this.s = s; - } - - /** - * Closes the underlying stream. - * - * @throws IOException on I/O errors. - */ - @Override - public void close() throws IOException { - s.close(); - } - - @Override - public int read() throws IOException { - if (outIndex == outCount) { - fillBuffer(); - if (outIndex == outCount) { - return -1; - } - } - - return outputBuffer[outIndex++]; - } - - /** - * Retrieve data from the underlying stream, decode it, - * and put the results in the byteq. - * @throws IOException - */ - private void fillBuffer() throws IOException { - outCount = 0; - outIndex = 0; - int inCount = 0; - - int i; - // "done" is needed for the two successive '=' at the end - while (!done) { - switch (i = s.read()) { - case -1: - // No more input - just return, let outputBuffer drain out, and be done - return; - case '=': - // once we meet the first '=', avoid reading the second '=' - done = true; - decodeAndEnqueue(inCount); - return; - default: - byte sX = TRANSLATION[i]; - if (sX < 0) continue; - inputBuffer[inCount++] = sX; - if (inCount == 4) { - decodeAndEnqueue(inCount); - return; - } - break; - } - } - } - - private void decodeAndEnqueue(int len) { - int accum = 0; - accum |= inputBuffer[0] << 18; - accum |= inputBuffer[1] << 12; - accum |= inputBuffer[2] << 6; - accum |= inputBuffer[3]; - - // There's a bit of duplicated code here because we want to have straight-through operation - // for the most common case of len==4 - if (len == 4) { - outputBuffer[0] = (accum >> 16) & 0xFF; - outputBuffer[1] = (accum >> 8) & 0xFF; - outputBuffer[2] = (accum) & 0xFF; - outCount = 3; - return; - } else if (len == 3) { - outputBuffer[0] = (accum >> 16) & 0xFF; - outputBuffer[1] = (accum >> 8) & 0xFF; - outCount = 2; - return; - } else { // len == 2 - outputBuffer[0] = (accum >> 16) & 0xFF; - outCount = 1; - return; - } - } - - private static byte[] TRANSLATION = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /* 0x20 */ - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /* 0x30 */ - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40 */ - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /* 0x50 */ - -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60 */ - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /* 0x70 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 0xF0 */ - }; - - -} diff --git a/apache/org/apache/james/mime4j/decoder/ByteQueue.java b/apache/org/apache/james/mime4j/decoder/ByteQueue.java deleted file mode 100644 index 6d7ccef52..000000000 --- a/apache/org/apache/james/mime4j/decoder/ByteQueue.java +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.decoder; - -import java.util.Iterator; - -public class ByteQueue { - - private UnboundedFifoByteBuffer buf; - private int initialCapacity = -1; - - public ByteQueue() { - buf = new UnboundedFifoByteBuffer(); - } - - public ByteQueue(int initialCapacity) { - buf = new UnboundedFifoByteBuffer(initialCapacity); - this.initialCapacity = initialCapacity; - } - - public void enqueue(byte b) { - buf.add(b); - } - - public byte dequeue() { - return buf.remove(); - } - - public int count() { - return buf.size(); - } - - public void clear() { - if (initialCapacity != -1) - buf = new UnboundedFifoByteBuffer(initialCapacity); - else - buf = new UnboundedFifoByteBuffer(); - } - - public Iterator iterator() { - return buf.iterator(); - } - - -} diff --git a/apache/org/apache/james/mime4j/decoder/DecoderUtil.java b/apache/org/apache/james/mime4j/decoder/DecoderUtil.java deleted file mode 100644 index 48fe07dee..000000000 --- a/apache/org/apache/james/mime4j/decoder/DecoderUtil.java +++ /dev/null @@ -1,284 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.decoder; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed -import org.apache.james.mime4j.util.CharsetUtil; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.UnsupportedEncodingException; - -/** - * Static methods for decoding strings, byte arrays and encoded words. - * - * - * @version $Id: DecoderUtil.java,v 1.3 2005/02/07 15:33:59 ntherning Exp $ - */ -public class DecoderUtil { - private static Log log = LogFactory.getLog(DecoderUtil.class); - - /** - * Decodes a string containing quoted-printable encoded data. - * - * @param s the string to decode. - * @return the decoded bytes. - */ - public static byte[] decodeBaseQuotedPrintable(String s) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - try { - byte[] bytes = s.getBytes("US-ASCII"); - - QuotedPrintableInputStream is = new QuotedPrintableInputStream( - new ByteArrayInputStream(bytes)); - - int b = 0; - while ((b = is.read()) != -1) { - baos.write(b); - } - } catch (IOException e) { - /* - * This should never happen! - */ - log.error(e); - } - - return baos.toByteArray(); - } - - /** - * Decodes a string containing base64 encoded data. - * - * @param s the string to decode. - * @return the decoded bytes. - */ - public static byte[] decodeBase64(String s) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - try { - byte[] bytes = s.getBytes("US-ASCII"); - - Base64InputStream is = new Base64InputStream( - new ByteArrayInputStream(bytes)); - - int b = 0; - while ((b = is.read()) != -1) { - baos.write(b); - } - } catch (IOException e) { - /* - * This should never happen! - */ - log.error(e); - } - - return baos.toByteArray(); - } - - /** - * Decodes an encoded word encoded with the 'B' encoding (described in - * RFC 2047) found in a header field body. - * - * @param encodedWord the encoded word to decode. - * @param charset the Java charset to use. - * @return the decoded string. - * @throws UnsupportedEncodingException if the given Java charset isn't - * supported. - */ - public static String decodeB(String encodedWord, String charset) - throws UnsupportedEncodingException { - - return new String(decodeBase64(encodedWord), charset); - } - - /** - * Decodes an encoded word encoded with the 'Q' encoding (described in - * RFC 2047) found in a header field body. - * - * @param encodedWord the encoded word to decode. - * @param charset the Java charset to use. - * @return the decoded string. - * @throws UnsupportedEncodingException if the given Java charset isn't - * supported. - */ - public static String decodeQ(String encodedWord, String charset) - throws UnsupportedEncodingException { - - /* - * Replace _ with =20 - */ - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < encodedWord.length(); i++) { - char c = encodedWord.charAt(i); - if (c == '_') { - sb.append("=20"); - } else { - sb.append(c); - } - } - - return new String(decodeBaseQuotedPrintable(sb.toString()), charset); - } - - /** - * Decodes a string containing encoded words as defined by RFC 2047. - * Encoded words in have the form - * =?charset?enc?Encoded word?= where enc is either 'Q' or 'q' for - * quoted-printable and 'B' or 'b' for Base64. - * - * ANDROID: COPIED FROM A NEWER VERSION OF MIME4J - * - * @param body the string to decode. - * @return the decoded string. - */ - public static String decodeEncodedWords(String body) { - - // ANDROID: Most strings will not include "=?" so a quick test can prevent unneeded - // object creation. This could also be handled via lazy creation of the StringBuilder. - if (body.indexOf("=?") == -1) { - return body; - } - - int previousEnd = 0; - boolean previousWasEncoded = false; - - StringBuilder sb = new StringBuilder(); - - while (true) { - int begin = body.indexOf("=?", previousEnd); - - // ANDROID: The mime4j original version has an error here. It gets confused if - // the encoded string begins with an '=' (just after "?Q?"). This patch seeks forward - // to find the two '?' in the "header", before looking for the final "?=". - if (begin == -1) { - break; - } - int qm1 = body.indexOf('?', begin + 2); - if (qm1 == -1) { - break; - } - int qm2 = body.indexOf('?', qm1 + 1); - if (qm2 == -1) { - break; - } - int end = body.indexOf("?=", qm2 + 1); - if (end == -1) { - break; - } - end += 2; - - String sep = body.substring(previousEnd, begin); - - String decoded = decodeEncodedWord(body, begin, end); - if (decoded == null) { - sb.append(sep); - sb.append(body.substring(begin, end)); - } else { - if (!previousWasEncoded || !CharsetUtil.isWhitespace(sep)) { - sb.append(sep); - } - sb.append(decoded); - } - - previousEnd = end; - previousWasEncoded = decoded != null; - } - - if (previousEnd == 0) - return body; - - sb.append(body.substring(previousEnd)); - return sb.toString(); - } - - // return null on error. Begin is index of '=?' in body. - public static String decodeEncodedWord(String body, int begin, int end) { - // Skip the '?=' chars in body and scan forward from there for next '?' - int qm1 = body.indexOf('?', begin + 2); - if (qm1 == -1 || qm1 == end - 2) - return null; - - int qm2 = body.indexOf('?', qm1 + 1); - if (qm2 == -1 || qm2 == end - 2) - return null; - - String mimeCharset = body.substring(begin + 2, qm1); - String encoding = body.substring(qm1 + 1, qm2); - String encodedText = body.substring(qm2 + 1, end - 2); - - String charset = CharsetUtil.toJavaCharset(mimeCharset); - if (charset == null) { - if (log.isWarnEnabled()) { - log.warn("MIME charset '" + mimeCharset + "' in encoded word '" - + body.substring(begin, end) + "' doesn't have a " - + "corresponding Java charset"); - } - return null; - } else if (!CharsetUtil.isDecodingSupported(charset)) { - if (log.isWarnEnabled()) { - log.warn("Current JDK doesn't support decoding of charset '" - + charset + "' (MIME charset '" + mimeCharset - + "' in encoded word '" + body.substring(begin, end) - + "')"); - } - return null; - } - - if (encodedText.length() == 0) { - if (log.isWarnEnabled()) { - log.warn("Missing encoded text in encoded word: '" - + body.substring(begin, end) + "'"); - } - return null; - } - - try { - if (encoding.equalsIgnoreCase("Q")) { - return DecoderUtil.decodeQ(encodedText, charset); - } else if (encoding.equalsIgnoreCase("B")) { - return DecoderUtil.decodeB(encodedText, charset); - } else { - if (log.isWarnEnabled()) { - log.warn("Warning: Unknown encoding in encoded word '" - + body.substring(begin, end) + "'"); - } - return null; - } - } catch (UnsupportedEncodingException e) { - // should not happen because of isDecodingSupported check above - if (log.isWarnEnabled()) { - log.warn("Unsupported encoding in encoded word '" - + body.substring(begin, end) + "'", e); - } - return null; - } catch (RuntimeException e) { - if (log.isWarnEnabled()) { - log.warn("Could not decode encoded word '" - + body.substring(begin, end) + "'", e); - } - return null; - } - } -} diff --git a/apache/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java b/apache/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java deleted file mode 100644 index e43f398f9..000000000 --- a/apache/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.decoder; - -import java.io.IOException; -import java.io.InputStream; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed - -/** - * Performs Quoted-Printable decoding on an underlying stream. - * - * - * - * @version $Id: QuotedPrintableInputStream.java,v 1.3 2004/11/29 13:15:47 ntherning Exp $ - */ -public class QuotedPrintableInputStream extends InputStream { - private static Log log = LogFactory.getLog(QuotedPrintableInputStream.class); - - private InputStream stream; - ByteQueue byteq = new ByteQueue(); - ByteQueue pushbackq = new ByteQueue(); - private byte state = 0; - - public QuotedPrintableInputStream(InputStream stream) { - this.stream = stream; - } - - /** - * Closes the underlying stream. - * - * @throws IOException on I/O errors. - */ - public void close() throws IOException { - stream.close(); - } - - public int read() throws IOException { - fillBuffer(); - if (byteq.count() == 0) - return -1; - else { - byte val = byteq.dequeue(); - if (val >= 0) - return val; - else - return val & 0xFF; - } - } - - /** - * Pulls bytes out of the underlying stream and places them in the - * pushback queue. This is necessary (vs. reading from the - * underlying stream directly) to detect and filter out "transport - * padding" whitespace, i.e., all whitespace that appears immediately - * before a CRLF. - * - * @throws IOException Underlying stream threw IOException. - */ - private void populatePushbackQueue() throws IOException { - //Debug.verify(pushbackq.count() == 0, "PopulatePushbackQueue called when pushback queue was not empty!"); - - if (pushbackq.count() != 0) - return; - - while (true) { - int i = stream.read(); - switch (i) { - case -1: - // stream is done - pushbackq.clear(); // discard any whitespace preceding EOF - return; - case ' ': - case '\t': - pushbackq.enqueue((byte)i); - break; - case '\r': - case '\n': - pushbackq.clear(); // discard any whitespace preceding EOL - pushbackq.enqueue((byte)i); - return; - default: - pushbackq.enqueue((byte)i); - return; - } - } - } - - /** - * Causes the pushback queue to get populated if it is empty, then - * consumes and decodes bytes out of it until one or more bytes are - * in the byte queue. This decoding step performs the actual QP - * decoding. - * - * @throws IOException Underlying stream threw IOException. - */ - private void fillBuffer() throws IOException { - byte msdChar = 0; // first digit of escaped num - while (byteq.count() == 0) { - if (pushbackq.count() == 0) { - populatePushbackQueue(); - if (pushbackq.count() == 0) - return; - } - - byte b = (byte)pushbackq.dequeue(); - - switch (state) { - case 0: // start state, no bytes pending - if (b != '=') { - byteq.enqueue(b); - break; // state remains 0 - } else { - state = 1; - break; - } - case 1: // encountered "=" so far - if (b == '\r') { - state = 2; - break; - } else if ((b >= '0' && b <= '9') || (b >= 'A' && b <= 'F') || (b >= 'a' && b <= 'f')) { - state = 3; - msdChar = b; // save until next digit encountered - break; - } else if (b == '=') { - /* - * Special case when == is encountered. - * Emit one = and stay in this state. - */ - if (log.isWarnEnabled()) { - log.warn("Malformed MIME; got =="); - } - byteq.enqueue((byte)'='); - break; - } else { - if (log.isWarnEnabled()) { - log.warn("Malformed MIME; expected \\r or " - + "[0-9A-Z], got " + b); - } - state = 0; - byteq.enqueue((byte)'='); - byteq.enqueue(b); - break; - } - case 2: // encountered "=\r" so far - if (b == '\n') { - state = 0; - break; - } else { - if (log.isWarnEnabled()) { - log.warn("Malformed MIME; expected " - + (int)'\n' + ", got " + b); - } - state = 0; - byteq.enqueue((byte)'='); - byteq.enqueue((byte)'\r'); - byteq.enqueue(b); - break; - } - case 3: // encountered = so far; expecting another to complete the octet - if ((b >= '0' && b <= '9') || (b >= 'A' && b <= 'F') || (b >= 'a' && b <= 'f')) { - byte msd = asciiCharToNumericValue(msdChar); - byte low = asciiCharToNumericValue(b); - state = 0; - byteq.enqueue((byte)((msd << 4) | low)); - break; - } else { - if (log.isWarnEnabled()) { - log.warn("Malformed MIME; expected " - + "[0-9A-Z], got " + b); - } - state = 0; - byteq.enqueue((byte)'='); - byteq.enqueue(msdChar); - byteq.enqueue(b); - break; - } - default: // should never happen - log.error("Illegal state: " + state); - state = 0; - byteq.enqueue(b); - break; - } - } - } - - /** - * Converts '0' => 0, 'A' => 10, etc. - * @param c ASCII character value. - * @return Numeric value of hexadecimal character. - */ - private byte asciiCharToNumericValue(byte c) { - if (c >= '0' && c <= '9') { - return (byte)(c - '0'); - } else if (c >= 'A' && c <= 'Z') { - return (byte)(0xA + (c - 'A')); - } else if (c >= 'a' && c <= 'z') { - return (byte)(0xA + (c - 'a')); - } else { - /* - * This should never happen since all calls to this method - * are preceded by a check that c is in [0-9A-Za-z] - */ - throw new IllegalArgumentException((char) c - + " is not a hexadecimal digit"); - } - } - -} diff --git a/apache/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java b/apache/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java deleted file mode 100644 index f01194fd1..000000000 --- a/apache/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java +++ /dev/null @@ -1,272 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.decoder; - -import java.util.Iterator; -import java.util.NoSuchElementException; - -/** - * UnboundedFifoByteBuffer is a very efficient buffer implementation. - * According to performance testing, it exhibits a constant access time, but it - * also outperforms ArrayList when used for the same purpose. - *

- * The removal order of an UnboundedFifoByteBuffer is based on the insertion - * order; elements are removed in the same order in which they were added. - * The iteration order is the same as the removal order. - *

- * The {@link #remove()} and {@link #get()} operations perform in constant time. - * The {@link #add(Object)} operation performs in amortized constant time. All - * other operations perform in linear time or worse. - *

- * Note that this implementation is not synchronized. The following can be - * used to provide synchronized access to your UnboundedFifoByteBuffer: - *

- *   Buffer fifo = BufferUtils.synchronizedBuffer(new UnboundedFifoByteBuffer());
- * 
- *

- * This buffer prevents null objects from being added. - * - * @since Commons Collections 3.0 (previously in main package v2.1) - * @version $Revision: 1.1 $ $Date: 2004/08/24 06:52:02 $ - * - * - * - * - * - * - */ -class UnboundedFifoByteBuffer { - - protected byte[] buffer; - protected int head; - protected int tail; - - /** - * Constructs an UnboundedFifoByteBuffer with the default number of elements. - * It is exactly the same as performing the following: - * - *

-     *   new UnboundedFifoByteBuffer(32);
-     * 
- */ - public UnboundedFifoByteBuffer() { - this(32); - } - - /** - * Constructs an UnboundedFifoByteBuffer with the specified number of elements. - * The integer must be a positive integer. - * - * @param initialSize the initial size of the buffer - * @throws IllegalArgumentException if the size is less than 1 - */ - public UnboundedFifoByteBuffer(int initialSize) { - if (initialSize <= 0) { - throw new IllegalArgumentException("The size must be greater than 0"); - } - buffer = new byte[initialSize + 1]; - head = 0; - tail = 0; - } - - /** - * Returns the number of elements stored in the buffer. - * - * @return this buffer's size - */ - public int size() { - int size = 0; - - if (tail < head) { - size = buffer.length - head + tail; - } else { - size = tail - head; - } - - return size; - } - - /** - * Returns true if this buffer is empty; false otherwise. - * - * @return true if this buffer is empty - */ - public boolean isEmpty() { - return (size() == 0); - } - - /** - * Adds the given element to this buffer. - * - * @param b the byte to add - * @return true, always - */ - public boolean add(final byte b) { - - if (size() + 1 >= buffer.length) { - byte[] tmp = new byte[((buffer.length - 1) * 2) + 1]; - - int j = 0; - for (int i = head; i != tail;) { - tmp[j] = buffer[i]; - buffer[i] = 0; - - j++; - i++; - if (i == buffer.length) { - i = 0; - } - } - - buffer = tmp; - head = 0; - tail = j; - } - - buffer[tail] = b; - tail++; - if (tail >= buffer.length) { - tail = 0; - } - return true; - } - - /** - * Returns the next object in the buffer. - * - * @return the next object in the buffer - * @throws BufferUnderflowException if this buffer is empty - */ - public byte get() { - if (isEmpty()) { - throw new IllegalStateException("The buffer is already empty"); - } - - return buffer[head]; - } - - /** - * Removes the next object from the buffer - * - * @return the removed object - * @throws BufferUnderflowException if this buffer is empty - */ - public byte remove() { - if (isEmpty()) { - throw new IllegalStateException("The buffer is already empty"); - } - - byte element = buffer[head]; - - head++; - if (head >= buffer.length) { - head = 0; - } - - return element; - } - - /** - * Increments the internal index. - * - * @param index the index to increment - * @return the updated index - */ - private int increment(int index) { - index++; - if (index >= buffer.length) { - index = 0; - } - return index; - } - - /** - * Decrements the internal index. - * - * @param index the index to decrement - * @return the updated index - */ - private int decrement(int index) { - index--; - if (index < 0) { - index = buffer.length - 1; - } - return index; - } - - /** - * Returns an iterator over this buffer's elements. - * - * @return an iterator over this buffer's elements - */ - public Iterator iterator() { - return new Iterator() { - - private int index = head; - private int lastReturnedIndex = -1; - - public boolean hasNext() { - return index != tail; - - } - - public Object next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - lastReturnedIndex = index; - index = increment(index); - return new Byte(buffer[lastReturnedIndex]); - } - - public void remove() { - if (lastReturnedIndex == -1) { - throw new IllegalStateException(); - } - - // First element can be removed quickly - if (lastReturnedIndex == head) { - UnboundedFifoByteBuffer.this.remove(); - lastReturnedIndex = -1; - return; - } - - // Other elements require us to shift the subsequent elements - int i = lastReturnedIndex + 1; - while (i != tail) { - if (i >= buffer.length) { - buffer[i - 1] = buffer[0]; - i = 0; - } else { - buffer[i - 1] = buffer[i]; - i++; - } - } - - lastReturnedIndex = -1; - tail = decrement(tail); - buffer[tail] = 0; - index = decrement(index); - } - - }; - } - -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/field/AddressListField.java b/apache/org/apache/james/mime4j/field/AddressListField.java deleted file mode 100644 index df9f39835..000000000 --- a/apache/org/apache/james/mime4j/field/AddressListField.java +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed -import org.apache.james.mime4j.field.address.AddressList; -import org.apache.james.mime4j.field.address.parser.ParseException; - -public class AddressListField extends Field { - private AddressList addressList; - private ParseException parseException; - - protected AddressListField(String name, String body, String raw, AddressList addressList, ParseException parseException) { - super(name, body, raw); - this.addressList = addressList; - this.parseException = parseException; - } - - public AddressList getAddressList() { - return addressList; - } - - public ParseException getParseException() { - return parseException; - } - - public static class Parser implements FieldParser { - private static Log log = LogFactory.getLog(Parser.class); - - public Field parse(final String name, final String body, final String raw) { - AddressList addressList = null; - ParseException parseException = null; - try { - addressList = AddressList.parse(body); - } - catch (ParseException e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = e; - } - return new AddressListField(name, body, raw, addressList, parseException); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/ContentTransferEncodingField.java b/apache/org/apache/james/mime4j/field/ContentTransferEncodingField.java deleted file mode 100644 index 73d8d2339..000000000 --- a/apache/org/apache/james/mime4j/field/ContentTransferEncodingField.java +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - - - -/** - * Represents a Content-Transfer-Encoding field. - * - * - * @version $Id: ContentTransferEncodingField.java,v 1.2 2004/10/02 12:41:11 ntherning Exp $ - */ -public class ContentTransferEncodingField extends Field { - /** - * The 7bit encoding. - */ - public static final String ENC_7BIT = "7bit"; - /** - * The 8bit encoding. - */ - public static final String ENC_8BIT = "8bit"; - /** - * The binary encoding. - */ - public static final String ENC_BINARY = "binary"; - /** - * The quoted-printable encoding. - */ - public static final String ENC_QUOTED_PRINTABLE = "quoted-printable"; - /** - * The base64 encoding. - */ - public static final String ENC_BASE64 = "base64"; - - private String encoding; - - protected ContentTransferEncodingField(String name, String body, String raw, String encoding) { - super(name, body, raw); - this.encoding = encoding; - } - - /** - * Gets the encoding defined in this field. - * - * @return the encoding or an empty string if not set. - */ - public String getEncoding() { - return encoding; - } - - /** - * Gets the encoding of the given field if. Returns the default - * 7bit if not set or if - * f is null. - * - * @return the encoding. - */ - public static String getEncoding(ContentTransferEncodingField f) { - if (f != null && f.getEncoding().length() != 0) { - return f.getEncoding(); - } - return ENC_7BIT; - } - - public static class Parser implements FieldParser { - public Field parse(final String name, final String body, final String raw) { - final String encoding = body.trim().toLowerCase(); - return new ContentTransferEncodingField(name, body, raw, encoding); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/ContentTypeField.java b/apache/org/apache/james/mime4j/field/ContentTypeField.java deleted file mode 100644 index ad9f7f9ac..000000000 --- a/apache/org/apache/james/mime4j/field/ContentTypeField.java +++ /dev/null @@ -1,259 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -import java.io.StringReader; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed -import org.apache.james.mime4j.field.contenttype.parser.ContentTypeParser; -import org.apache.james.mime4j.field.contenttype.parser.ParseException; -import org.apache.james.mime4j.field.contenttype.parser.TokenMgrError; - -/** - * Represents a Content-Type field. - * - *

TODO: Remove dependency on Java 1.4 regexps

- * - * - * @version $Id: ContentTypeField.java,v 1.6 2005/01/27 14:16:31 ntherning Exp $ - */ -public class ContentTypeField extends Field { - - /** - * The prefix of all multipart MIME types. - */ - public static final String TYPE_MULTIPART_PREFIX = "multipart/"; - /** - * The multipart/digest MIME type. - */ - public static final String TYPE_MULTIPART_DIGEST = "multipart/digest"; - /** - * The text/plain MIME type. - */ - public static final String TYPE_TEXT_PLAIN = "text/plain"; - /** - * The message/rfc822 MIME type. - */ - public static final String TYPE_MESSAGE_RFC822 = "message/rfc822"; - /** - * The name of the boundary parameter. - */ - public static final String PARAM_BOUNDARY = "boundary"; - /** - * The name of the charset parameter. - */ - public static final String PARAM_CHARSET = "charset"; - - private String mimeType = ""; - private Map parameters = null; - private ParseException parseException; - - protected ContentTypeField(String name, String body, String raw, String mimeType, Map parameters, ParseException parseException) { - super(name, body, raw); - this.mimeType = mimeType; - this.parameters = parameters; - this.parseException = parseException; - } - - /** - * Gets the exception that was raised during parsing of - * the field value, if any; otherwise, null. - */ - public ParseException getParseException() { - return parseException; - } - - /** - * Gets the MIME type defined in this Content-Type field. - * - * @return the MIME type or an empty string if not set. - */ - public String getMimeType() { - return mimeType; - } - - /** - * Gets the MIME type defined in the child's - * Content-Type field or derives a MIME type from the parent - * if child is null or hasn't got a MIME type value set. - * If child's MIME type is multipart but no boundary - * has been set the MIME type of child will be derived from - * the parent. - * - * @param child the child. - * @param parent the parent. - * @return the MIME type. - */ - public static String getMimeType(ContentTypeField child, - ContentTypeField parent) { - - if (child == null || child.getMimeType().length() == 0 - || child.isMultipart() && child.getBoundary() == null) { - - if (parent != null && parent.isMimeType(TYPE_MULTIPART_DIGEST)) { - return TYPE_MESSAGE_RFC822; - } else { - return TYPE_TEXT_PLAIN; - } - } - - return child.getMimeType(); - } - - /** - * Gets the value of a parameter. Parameter names are case-insensitive. - * - * @param name the name of the parameter to get. - * @return the parameter value or null if not set. - */ - public String getParameter(String name) { - return parameters != null - ? parameters.get(name.toLowerCase()) - : null; - } - - /** - * Gets all parameters. - * - * @return the parameters. - */ - public Map getParameters() { - if (parameters != null) { - return Collections.unmodifiableMap(parameters); - } - return Collections.emptyMap(); - } - - /** - * Gets the value of the boundary parameter if set. - * - * @return the boundary parameter value or null - * if not set. - */ - public String getBoundary() { - return getParameter(PARAM_BOUNDARY); - } - - /** - * Gets the value of the charset parameter if set. - * - * @return the charset parameter value or null - * if not set. - */ - public String getCharset() { - return getParameter(PARAM_CHARSET); - } - - /** - * Gets the value of the charset parameter if set for the - * given field. Returns the default us-ascii if not set or if - * f is null. - * - * @return the charset parameter value. - */ - public static String getCharset(ContentTypeField f) { - if (f != null) { - if (f.getCharset() != null && f.getCharset().length() > 0) { - return f.getCharset(); - } - } - return "us-ascii"; - } - - /** - * Determines if the MIME type of this field matches the given one. - * - * @param mimeType the MIME type to match against. - * @return true if the MIME type of this field matches, - * false otherwise. - */ - public boolean isMimeType(String mimeType) { - return this.mimeType.equalsIgnoreCase(mimeType); - } - - /** - * Determines if the MIME type of this field is multipart/*. - * - * @return true if this field is has a multipart/* - * MIME type, false otherwise. - */ - public boolean isMultipart() { - return mimeType.startsWith(TYPE_MULTIPART_PREFIX); - } - - public static class Parser implements FieldParser { - private static Log log = LogFactory.getLog(Parser.class); - - public Field parse(final String name, final String body, final String raw) { - ParseException parseException = null; - String mimeType = ""; - Map parameters = null; - - ContentTypeParser parser = new ContentTypeParser(new StringReader(body)); - try { - parser.parseAll(); - } - catch (ParseException e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = e; - } - catch (TokenMgrError e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = new ParseException(e.getMessage()); - } - - try { - final String type = parser.getType(); - final String subType = parser.getSubType(); - - if (type != null && subType != null) { - mimeType = (type + "/" + parser.getSubType()).toLowerCase(); - - ArrayList paramNames = parser.getParamNames(); - ArrayList paramValues = parser.getParamValues(); - - if (paramNames != null && paramValues != null) { - for (int i = 0; i < paramNames.size() && i < paramValues.size(); i++) { - if (parameters == null) - parameters = new HashMap((int)(paramNames.size() * 1.3 + 1)); - String paramName = paramNames.get(i).toLowerCase(); - String paramValue = paramValues.get(i); - parameters.put(paramName, paramValue); - } - } - } - } - catch (NullPointerException npe) { - } - return new ContentTypeField(name, body, raw, mimeType, parameters, parseException); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/DateTimeField.java b/apache/org/apache/james/mime4j/field/DateTimeField.java deleted file mode 100644 index 2336d99db..000000000 --- a/apache/org/apache/james/mime4j/field/DateTimeField.java +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -//BEGIN android-changed: Stubbing out logging - -import android.text.TextUtils; -import java.util.regex.Pattern; -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; - -//END -import org.apache.james.mime4j.field.datetime.DateTime; -import org.apache.james.mime4j.field.datetime.parser.ParseException; - -import java.util.Date; - -public class DateTimeField extends Field { - private Date date; - private ParseException parseException; - - //BEGIN android-changed - // "GMT" + "+" or "-" + 4 digits - private static final Pattern DATE_CLEANUP_PATTERN_WRONG_TIMEZONE = - Pattern.compile("GMT([-+]\\d{4})$"); - //END android-changed - - protected DateTimeField(String name, String body, String raw, Date date, ParseException parseException) { - super(name, body, raw); - this.date = date; - this.parseException = parseException; - } - - public Date getDate() { - return date; - } - - public ParseException getParseException() { - return parseException; - } - - public static class Parser implements FieldParser { - private static Log log = LogFactory.getLog(Parser.class); - - public Field parse(final String name, String body, final String raw) { - Date date = null; - ParseException parseException = null; - //BEGIN android-changed - body = cleanUpMimeDate(body); - //END android-changed - try { - date = DateTime.parse(body).getDate(); - } - catch (ParseException e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = e; - } - return new DateTimeField(name, body, raw, date, parseException); - } - } - - //BEGIN android-changed - /** - * Try to make a date MIME(RFC 2822/5322)-compliant. - * - *

It fixes: - "Thu, 10 Dec 09 15:08:08 GMT-0700" to "Thu, 10 Dec 09 15:08:08 -0700" (4 digit - * zone value can't be preceded by "GMT") We got a report saying eBay sends a date in this format - */ - private static String cleanUpMimeDate(String date) { - if (TextUtils.isEmpty(date)) { - return date; - } - date = DATE_CLEANUP_PATTERN_WRONG_TIMEZONE.matcher(date).replaceFirst("$1"); - return date; - } - //END android-changed -} diff --git a/apache/org/apache/james/mime4j/field/DefaultFieldParser.java b/apache/org/apache/james/mime4j/field/DefaultFieldParser.java deleted file mode 100644 index 3695afe3e..000000000 --- a/apache/org/apache/james/mime4j/field/DefaultFieldParser.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2006 the mime4j 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 org.apache.james.mime4j.field; - -public class DefaultFieldParser extends DelegatingFieldParser { - - public DefaultFieldParser() { - setFieldParser(Field.CONTENT_TRANSFER_ENCODING, new ContentTransferEncodingField.Parser()); - setFieldParser(Field.CONTENT_TYPE, new ContentTypeField.Parser()); - - final DateTimeField.Parser dateTimeParser = new DateTimeField.Parser(); - setFieldParser(Field.DATE, dateTimeParser); - setFieldParser(Field.RESENT_DATE, dateTimeParser); - - final MailboxListField.Parser mailboxListParser = new MailboxListField.Parser(); - setFieldParser(Field.FROM, mailboxListParser); - setFieldParser(Field.RESENT_FROM, mailboxListParser); - - final MailboxField.Parser mailboxParser = new MailboxField.Parser(); - setFieldParser(Field.SENDER, mailboxParser); - setFieldParser(Field.RESENT_SENDER, mailboxParser); - - final AddressListField.Parser addressListParser = new AddressListField.Parser(); - setFieldParser(Field.TO, addressListParser); - setFieldParser(Field.RESENT_TO, addressListParser); - setFieldParser(Field.CC, addressListParser); - setFieldParser(Field.RESENT_CC, addressListParser); - setFieldParser(Field.BCC, addressListParser); - setFieldParser(Field.RESENT_BCC, addressListParser); - setFieldParser(Field.REPLY_TO, addressListParser); - } -} diff --git a/apache/org/apache/james/mime4j/field/DelegatingFieldParser.java b/apache/org/apache/james/mime4j/field/DelegatingFieldParser.java deleted file mode 100644 index 32b69ec13..000000000 --- a/apache/org/apache/james/mime4j/field/DelegatingFieldParser.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2006 the mime4j 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 org.apache.james.mime4j.field; - -import java.util.HashMap; -import java.util.Map; - -public class DelegatingFieldParser implements FieldParser { - - private Map parsers = new HashMap(); - private FieldParser defaultParser = new UnstructuredField.Parser(); - - /** - * Sets the parser used for the field named name. - * @param name the name of the field - * @param parser the parser for fields named name - */ - public void setFieldParser(final String name, final FieldParser parser) { - parsers.put(name.toLowerCase(), parser); - } - - public FieldParser getParser(final String name) { - final FieldParser field = parsers.get(name.toLowerCase()); - if(field==null) { - return defaultParser; - } - return field; - } - - public Field parse(final String name, final String body, final String raw) { - final FieldParser parser = getParser(name); - return parser.parse(name, body, raw); - } -} diff --git a/apache/org/apache/james/mime4j/field/Field.java b/apache/org/apache/james/mime4j/field/Field.java deleted file mode 100644 index 4dea5c5cf..000000000 --- a/apache/org/apache/james/mime4j/field/Field.java +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * The base class of all field classes. - * - * - * @version $Id: Field.java,v 1.6 2004/10/25 07:26:46 ntherning Exp $ - */ -public abstract class Field { - public static final String SENDER = "Sender"; - public static final String FROM = "From"; - public static final String TO = "To"; - public static final String CC = "Cc"; - public static final String BCC = "Bcc"; - public static final String REPLY_TO = "Reply-To"; - public static final String RESENT_SENDER = "Resent-Sender"; - public static final String RESENT_FROM = "Resent-From"; - public static final String RESENT_TO = "Resent-To"; - public static final String RESENT_CC = "Resent-Cc"; - public static final String RESENT_BCC = "Resent-Bcc"; - - public static final String DATE = "Date"; - public static final String RESENT_DATE = "Resent-Date"; - - public static final String SUBJECT = "Subject"; - public static final String CONTENT_TYPE = "Content-Type"; - public static final String CONTENT_TRANSFER_ENCODING = - "Content-Transfer-Encoding"; - - private static final String FIELD_NAME_PATTERN = - "^([\\x21-\\x39\\x3b-\\x7e]+)[ \t]*:"; - private static final Pattern fieldNamePattern = - Pattern.compile(FIELD_NAME_PATTERN); - - private static final DefaultFieldParser parser = new DefaultFieldParser(); - - private final String name; - private final String body; - private final String raw; - - protected Field(final String name, final String body, final String raw) { - this.name = name; - this.body = body; - this.raw = raw; - } - - /** - * Parses the given string and returns an instance of the - * Field class. The type of the class returned depends on - * the field name: - * - * - * - * - * - * - *
Field nameClass returnedContent-Typeorg.apache.james.mime4j.field.ContentTypeFieldotherorg.apache.james.mime4j.field.UnstructuredField
- * - * @param s the string to parse. - * @return a Field instance. - * @throws IllegalArgumentException on parse errors. - */ - public static Field parse(final String raw) { - - /* - * Unfold the field. - */ - final String unfolded = raw.replaceAll("\r|\n", ""); - - /* - * Split into name and value. - */ - final Matcher fieldMatcher = fieldNamePattern.matcher(unfolded); - if (!fieldMatcher.find()) { - throw new IllegalArgumentException("Invalid field in string"); - } - final String name = fieldMatcher.group(1); - - String body = unfolded.substring(fieldMatcher.end()); - if (body.length() > 0 && body.charAt(0) == ' ') { - body = body.substring(1); - } - - return parser.parse(name, body, raw); - } - - /** - * Gets the default parser used to parse fields. - * @return the default field parser - */ - public static DefaultFieldParser getParser() { - return parser; - } - - /** - * Gets the name of the field (Subject, - * From, etc). - * - * @return the field name. - */ - public String getName() { - return name; - } - - /** - * Gets the original raw field string. - * - * @return the original raw field string. - */ - public String getRaw() { - return raw; - } - - /** - * Gets the unfolded, unparsed and possibly encoded (see RFC 2047) field - * body string. - * - * @return the unfolded unparsed field body string. - */ - public String getBody() { - return body; - } - - /** - * Determines if this is a Content-Type field. - * - * @return true if this is a Content-Type field, - * false otherwise. - */ - public boolean isContentType() { - return CONTENT_TYPE.equalsIgnoreCase(name); - } - - /** - * Determines if this is a Subject field. - * - * @return true if this is a Subject field, - * false otherwise. - */ - public boolean isSubject() { - return SUBJECT.equalsIgnoreCase(name); - } - - /** - * Determines if this is a From field. - * - * @return true if this is a From field, - * false otherwise. - */ - public boolean isFrom() { - return FROM.equalsIgnoreCase(name); - } - - /** - * Determines if this is a To field. - * - * @return true if this is a To field, - * false otherwise. - */ - public boolean isTo() { - return TO.equalsIgnoreCase(name); - } - - /** - * @see #getRaw() - */ - public String toString() { - return raw; - } -} diff --git a/apache/org/apache/james/mime4j/field/FieldParser.java b/apache/org/apache/james/mime4j/field/FieldParser.java deleted file mode 100644 index 78aaf1334..000000000 --- a/apache/org/apache/james/mime4j/field/FieldParser.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2006 the mime4j 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 org.apache.james.mime4j.field; - -public interface FieldParser { - - Field parse(final String name, final String body, final String raw); -} diff --git a/apache/org/apache/james/mime4j/field/MailboxField.java b/apache/org/apache/james/mime4j/field/MailboxField.java deleted file mode 100644 index f15980055..000000000 --- a/apache/org/apache/james/mime4j/field/MailboxField.java +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed -import org.apache.james.mime4j.field.address.AddressList; -import org.apache.james.mime4j.field.address.Mailbox; -import org.apache.james.mime4j.field.address.MailboxList; -import org.apache.james.mime4j.field.address.parser.ParseException; - -public class MailboxField extends Field { - private final Mailbox mailbox; - private final ParseException parseException; - - protected MailboxField(final String name, final String body, final String raw, final Mailbox mailbox, final ParseException parseException) { - super(name, body, raw); - this.mailbox = mailbox; - this.parseException = parseException; - } - - public Mailbox getMailbox() { - return mailbox; - } - - public ParseException getParseException() { - return parseException; - } - - public static class Parser implements FieldParser { - private static Log log = LogFactory.getLog(Parser.class); - - public Field parse(final String name, final String body, final String raw) { - Mailbox mailbox = null; - ParseException parseException = null; - try { - MailboxList mailboxList = AddressList.parse(body).flatten(); - if (mailboxList.size() > 0) { - mailbox = mailboxList.get(0); - } - } - catch (ParseException e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = e; - } - return new MailboxField(name, body, raw, mailbox, parseException); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/MailboxListField.java b/apache/org/apache/james/mime4j/field/MailboxListField.java deleted file mode 100644 index 23378d4fa..000000000 --- a/apache/org/apache/james/mime4j/field/MailboxListField.java +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed -import org.apache.james.mime4j.field.address.AddressList; -import org.apache.james.mime4j.field.address.MailboxList; -import org.apache.james.mime4j.field.address.parser.ParseException; - -public class MailboxListField extends Field { - - private MailboxList mailboxList; - private ParseException parseException; - - protected MailboxListField(final String name, final String body, final String raw, final MailboxList mailboxList, final ParseException parseException) { - super(name, body, raw); - this.mailboxList = mailboxList; - this.parseException = parseException; - } - - public MailboxList getMailboxList() { - return mailboxList; - } - - public ParseException getParseException() { - return parseException; - } - - public static class Parser implements FieldParser { - private static Log log = LogFactory.getLog(Parser.class); - - public Field parse(final String name, final String body, final String raw) { - MailboxList mailboxList = null; - ParseException parseException = null; - try { - mailboxList = AddressList.parse(body).flatten(); - } - catch (ParseException e) { - if (log.isDebugEnabled()) { - log.debug("Parsing value '" + body + "': "+ e.getMessage()); - } - parseException = e; - } - return new MailboxListField(name, body, raw, mailboxList, parseException); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/UnstructuredField.java b/apache/org/apache/james/mime4j/field/UnstructuredField.java deleted file mode 100644 index 6084e4435..000000000 --- a/apache/org/apache/james/mime4j/field/UnstructuredField.java +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field; - -import org.apache.james.mime4j.decoder.DecoderUtil; - - -/** - * Simple unstructured field such as Subject. - * - * - * @version $Id: UnstructuredField.java,v 1.3 2004/10/25 07:26:46 ntherning Exp $ - */ -public class UnstructuredField extends Field { - private String value; - - protected UnstructuredField(String name, String body, String raw, String value) { - super(name, body, raw); - this.value = value; - } - - public String getValue() { - return value; - } - - public static class Parser implements FieldParser { - public Field parse(final String name, final String body, final String raw) { - final String value = DecoderUtil.decodeEncodedWords(body); - return new UnstructuredField(name, body, raw, value); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/address/Address.java b/apache/org/apache/james/mime4j/field/address/Address.java deleted file mode 100644 index 3e24e91aa..000000000 --- a/apache/org/apache/james/mime4j/field/address/Address.java +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; - -/** - * The abstract base for classes that represent RFC2822 addresses. - * This includes groups and mailboxes. - * - * Currently, no public methods are introduced on this class. - * - * - */ -public abstract class Address { - - /** - * Adds any mailboxes represented by this address - * into the given ArrayList. Note that this method - * has default (package) access, so a doAddMailboxesTo - * method is needed to allow the behavior to be - * overridden by subclasses. - */ - final void addMailboxesTo(ArrayList

results) { - doAddMailboxesTo(results); - } - - /** - * Adds any mailboxes represented by this address - * into the given ArrayList. Must be overridden by - * concrete subclasses. - */ - protected abstract void doAddMailboxesTo(ArrayList
results); - -} diff --git a/apache/org/apache/james/mime4j/field/address/AddressList.java b/apache/org/apache/james/mime4j/field/address/AddressList.java deleted file mode 100644 index 1829e79aa..000000000 --- a/apache/org/apache/james/mime4j/field/address/AddressList.java +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import org.apache.james.mime4j.field.address.parser.AddressListParser; -import org.apache.james.mime4j.field.address.parser.ParseException; - -import java.io.StringReader; -import java.util.ArrayList; - -/** - * An immutable, random-access list of Address objects. - * - * - */ -public class AddressList { - - private ArrayList
addresses; - - /** - * @param addresses An ArrayList that contains only Address objects. - * @param dontCopy true iff it is not possible for the addresses ArrayList to be modified by someone else. - */ - public AddressList(ArrayList
addresses, boolean dontCopy) { - if (addresses != null) - this.addresses = (dontCopy ? addresses : new ArrayList
(addresses)); - else - this.addresses = new ArrayList
(0); - } - - /** - * The number of elements in this list. - */ - public int size() { - return addresses.size(); - } - - /** - * Gets an address. - */ - public Address get(int index) { - if (0 > index || size() <= index) - throw new IndexOutOfBoundsException(); - return addresses.get(index); - } - - /** - * Returns a flat list of all mailboxes represented - * in this address list. Use this if you don't care - * about grouping. - */ - public MailboxList flatten() { - // in the common case, all addresses are mailboxes - boolean groupDetected = false; - for (int i = 0; i < size(); i++) { - if (!(get(i) instanceof Mailbox)) { - groupDetected = true; - break; - } - } - - if (!groupDetected) - return new MailboxList(addresses, true); - - ArrayList
results = new ArrayList
(); - for (int i = 0; i < size(); i++) { - Address addr = get(i); - addr.addMailboxesTo(results); - } - - // copy-on-construct this time, because subclasses - // could have held onto a reference to the results - return new MailboxList(results, false); - } - - /** - * Dumps a representation of this address list to - * stdout, for debugging purposes. - */ - public void print() { - for (int i = 0; i < size(); i++) { - Address addr = get(i); - System.out.println(addr.toString()); - } - } - - /** - * Parse the address list string, such as the value - * of a From, To, Cc, Bcc, Sender, or Reply-To - * header. - * - * The string MUST be unfolded already. - */ - public static AddressList parse(String rawAddressList) throws ParseException { - AddressListParser parser = new AddressListParser(new StringReader(rawAddressList)); - return Builder.getInstance().buildAddressList(parser.parse()); - } - - /** - * Test console. - */ - public static void main(String[] args) throws Exception { - java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(System.in)); - while (true) { - try { - System.out.print("> "); - String line = reader.readLine(); - if (line.length() == 0 || line.toLowerCase().equals("exit") || line.toLowerCase().equals("quit")) { - System.out.println("Goodbye."); - return; - } - AddressList list = parse(line); - list.print(); - } - catch(Exception e) { - e.printStackTrace(); - Thread.sleep(300); - } - } - } -} diff --git a/apache/org/apache/james/mime4j/field/address/Builder.java b/apache/org/apache/james/mime4j/field/address/Builder.java deleted file mode 100644 index 3bcd15b6f..000000000 --- a/apache/org/apache/james/mime4j/field/address/Builder.java +++ /dev/null @@ -1,243 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.apache.james.mime4j.decoder.DecoderUtil; -import org.apache.james.mime4j.field.address.parser.ASTaddr_spec; -import org.apache.james.mime4j.field.address.parser.ASTaddress; -import org.apache.james.mime4j.field.address.parser.ASTaddress_list; -import org.apache.james.mime4j.field.address.parser.ASTangle_addr; -import org.apache.james.mime4j.field.address.parser.ASTdomain; -import org.apache.james.mime4j.field.address.parser.ASTgroup_body; -import org.apache.james.mime4j.field.address.parser.ASTlocal_part; -import org.apache.james.mime4j.field.address.parser.ASTmailbox; -import org.apache.james.mime4j.field.address.parser.ASTname_addr; -import org.apache.james.mime4j.field.address.parser.ASTphrase; -import org.apache.james.mime4j.field.address.parser.ASTroute; -import org.apache.james.mime4j.field.address.parser.Node; -import org.apache.james.mime4j.field.address.parser.SimpleNode; -import org.apache.james.mime4j.field.address.parser.Token; - -/** - * Transforms the JJTree-generated abstract syntax tree - * into a graph of org.apache.james.mime4j.field.address objects. - * - * - */ -class Builder { - - private static Builder singleton = new Builder(); - - public static Builder getInstance() { - return singleton; - } - - - - public AddressList buildAddressList(ASTaddress_list node) { - ArrayList
list = new ArrayList
(); - for (int i = 0; i < node.jjtGetNumChildren(); i++) { - ASTaddress childNode = (ASTaddress) node.jjtGetChild(i); - Address address = buildAddress(childNode); - list.add(address); - } - return new AddressList(list, true); - } - - private Address buildAddress(ASTaddress node) { - ChildNodeIterator it = new ChildNodeIterator(node); - Node n = it.nextNode(); - if (n instanceof ASTaddr_spec) { - return buildAddrSpec((ASTaddr_spec)n); - } - else if (n instanceof ASTangle_addr) { - return buildAngleAddr((ASTangle_addr)n); - } - else if (n instanceof ASTphrase) { - String name = buildString((ASTphrase)n, false); - Node n2 = it.nextNode(); - if (n2 instanceof ASTgroup_body) { - return new Group(name, buildGroupBody((ASTgroup_body)n2)); - } - else if (n2 instanceof ASTangle_addr) { - name = DecoderUtil.decodeEncodedWords(name); - return new NamedMailbox(name, buildAngleAddr((ASTangle_addr)n2)); - } - else { - throw new IllegalStateException(); - } - } - else { - throw new IllegalStateException(); - } - } - - - - private MailboxList buildGroupBody(ASTgroup_body node) { - ArrayList
results = new ArrayList
(); - ChildNodeIterator it = new ChildNodeIterator(node); - while (it.hasNext()) { - Node n = it.nextNode(); - if (n instanceof ASTmailbox) - results.add(buildMailbox((ASTmailbox)n)); - else - throw new IllegalStateException(); - } - return new MailboxList(results, true); - } - - private Mailbox buildMailbox(ASTmailbox node) { - ChildNodeIterator it = new ChildNodeIterator(node); - Node n = it.nextNode(); - if (n instanceof ASTaddr_spec) { - return buildAddrSpec((ASTaddr_spec)n); - } - else if (n instanceof ASTangle_addr) { - return buildAngleAddr((ASTangle_addr)n); - } - else if (n instanceof ASTname_addr) { - return buildNameAddr((ASTname_addr)n); - } - else { - throw new IllegalStateException(); - } - } - - private NamedMailbox buildNameAddr(ASTname_addr node) { - ChildNodeIterator it = new ChildNodeIterator(node); - Node n = it.nextNode(); - String name; - if (n instanceof ASTphrase) { - name = buildString((ASTphrase)n, false); - } - else { - throw new IllegalStateException(); - } - - n = it.nextNode(); - if (n instanceof ASTangle_addr) { - name = DecoderUtil.decodeEncodedWords(name); - return new NamedMailbox(name, buildAngleAddr((ASTangle_addr) n)); - } - else { - throw new IllegalStateException(); - } - } - - private Mailbox buildAngleAddr(ASTangle_addr node) { - ChildNodeIterator it = new ChildNodeIterator(node); - DomainList route = null; - Node n = it.nextNode(); - if (n instanceof ASTroute) { - route = buildRoute((ASTroute)n); - n = it.nextNode(); - } - else if (n instanceof ASTaddr_spec) - ; // do nothing - else - throw new IllegalStateException(); - - if (n instanceof ASTaddr_spec) - return buildAddrSpec(route, (ASTaddr_spec)n); - else - throw new IllegalStateException(); - } - - private DomainList buildRoute(ASTroute node) { - ArrayList results = new ArrayList(node.jjtGetNumChildren()); - ChildNodeIterator it = new ChildNodeIterator(node); - while (it.hasNext()) { - Node n = it.nextNode(); - if (n instanceof ASTdomain) - results.add(buildString((ASTdomain)n, true)); - else - throw new IllegalStateException(); - } - return new DomainList(results, true); - } - - private Mailbox buildAddrSpec(ASTaddr_spec node) { - return buildAddrSpec(null, node); - } - private Mailbox buildAddrSpec(DomainList route, ASTaddr_spec node) { - ChildNodeIterator it = new ChildNodeIterator(node); - String localPart = buildString((ASTlocal_part)it.nextNode(), true); - String domain = buildString((ASTdomain)it.nextNode(), true); - return new Mailbox(route, localPart, domain); - } - - - private String buildString(SimpleNode node, boolean stripSpaces) { - Token head = node.firstToken; - Token tail = node.lastToken; - StringBuffer out = new StringBuffer(); - - while (head != tail) { - out.append(head.image); - head = head.next; - if (!stripSpaces) - addSpecials(out, head.specialToken); - } - out.append(tail.image); - - return out.toString(); - } - - private void addSpecials(StringBuffer out, Token specialToken) { - if (specialToken != null) { - addSpecials(out, specialToken.specialToken); - out.append(specialToken.image); - } - } - - private static class ChildNodeIterator implements Iterator { - - private SimpleNode simpleNode; - private int index; - private int len; - - public ChildNodeIterator(SimpleNode simpleNode) { - this.simpleNode = simpleNode; - this.len = simpleNode.jjtGetNumChildren(); - this.index = 0; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - public boolean hasNext() { - return index < len; - } - - public Node next() { - return nextNode(); - } - - public Node nextNode() { - return simpleNode.jjtGetChild(index++); - } - - } -} diff --git a/apache/org/apache/james/mime4j/field/address/DomainList.java b/apache/org/apache/james/mime4j/field/address/DomainList.java deleted file mode 100644 index 49b0f3be5..000000000 --- a/apache/org/apache/james/mime4j/field/address/DomainList.java +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; - -/** - * An immutable, random-access list of Strings (that - * are supposedly domain names or domain literals). - * - * - */ -public class DomainList { - private ArrayList domains; - - /** - * @param domains An ArrayList that contains only String objects. - * @param dontCopy true iff it is not possible for the domains ArrayList to be modified by someone else. - */ - public DomainList(ArrayList domains, boolean dontCopy) { - if (domains != null) - this.domains = (dontCopy ? domains : new ArrayList(domains)); - else - this.domains = new ArrayList(0); - } - - /** - * The number of elements in this list. - */ - public int size() { - return domains.size(); - } - - /** - * Gets the domain name or domain literal at the - * specified index. - * @throws IndexOutOfBoundsException If index is < 0 or >= size(). - */ - public String get(int index) { - if (0 > index || size() <= index) - throw new IndexOutOfBoundsException(); - return domains.get(index); - } - - /** - * Returns the list of domains formatted as a route - * string (not including the trailing ':'). - */ - public String toRouteString() { - StringBuffer out = new StringBuffer(); - for (int i = 0; i < domains.size(); i++) { - out.append("@"); - out.append(get(i)); - if (i + 1 < domains.size()) - out.append(","); - } - return out.toString(); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/Group.java b/apache/org/apache/james/mime4j/field/address/Group.java deleted file mode 100644 index c0ab7f724..000000000 --- a/apache/org/apache/james/mime4j/field/address/Group.java +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; - -/** - * A named group of zero or more mailboxes. - * - * - */ -public class Group extends Address { - private String name; - private MailboxList mailboxList; - - /** - * @param name The group name. - * @param mailboxes The mailboxes in this group. - */ - public Group(String name, MailboxList mailboxes) { - this.name = name; - this.mailboxList = mailboxes; - } - - /** - * Returns the group name. - */ - public String getName() { - return name; - } - - /** - * Returns the mailboxes in this group. - */ - public MailboxList getMailboxes() { - return mailboxList; - } - - @Override - public String toString() { - StringBuffer buf = new StringBuffer(); - buf.append(name); - buf.append(":"); - for (int i = 0; i < mailboxList.size(); i++) { - buf.append(mailboxList.get(i).toString()); - if (i + 1 < mailboxList.size()) - buf.append(","); - } - buf.append(";"); - return buf.toString(); - } - - @Override - protected void doAddMailboxesTo(ArrayList
results) { - for (int i = 0; i < mailboxList.size(); i++) - results.add(mailboxList.get(i)); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/Mailbox.java b/apache/org/apache/james/mime4j/field/address/Mailbox.java deleted file mode 100644 index 25f2548d4..000000000 --- a/apache/org/apache/james/mime4j/field/address/Mailbox.java +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; - -/** - * Represents a single e-mail address. - * - * - */ -public class Mailbox extends Address { - private DomainList route; - private String localPart; - private String domain; - - /** - * Creates a mailbox without a route. Routes are obsolete. - * @param localPart The part of the e-mail address to the left of the "@". - * @param domain The part of the e-mail address to the right of the "@". - */ - public Mailbox(String localPart, String domain) { - this(null, localPart, domain); - } - - /** - * Creates a mailbox with a route. Routes are obsolete. - * @param route The zero or more domains that make up the route. Can be null. - * @param localPart The part of the e-mail address to the left of the "@". - * @param domain The part of the e-mail address to the right of the "@". - */ - public Mailbox(DomainList route, String localPart, String domain) { - this.route = route; - this.localPart = localPart; - this.domain = domain; - } - - /** - * Returns the route list. - */ - public DomainList getRoute() { - return route; - } - - /** - * Returns the left part of the e-mail address - * (before "@"). - */ - public String getLocalPart() { - return localPart; - } - - /** - * Returns the right part of the e-mail address - * (after "@"). - */ - public String getDomain() { - return domain; - } - - /** - * Formats the address as a string, not including - * the route. - * - * @see #getAddressString(boolean) - */ - public String getAddressString() { - return getAddressString(false); - } - - /** - * Note that this value may not be usable - * for transport purposes, only display purposes. - * - * For example, if the unparsed address was - * - * <"Joe Cheng"@joecheng.com> - * - * this method would return - * - * - * - * which is not valid for transport; the local part - * would need to be re-quoted. - * - * @param includeRoute true if the route should be included if it exists. - */ - public String getAddressString(boolean includeRoute) { - return "<" + (!includeRoute || route == null ? "" : route.toRouteString() + ":") - + localPart - + (domain == null ? "" : "@") - + domain + ">"; - } - - @Override - protected final void doAddMailboxesTo(ArrayList
results) { - results.add(this); - } - - @Override - public String toString() { - return getAddressString(); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/MailboxList.java b/apache/org/apache/james/mime4j/field/address/MailboxList.java deleted file mode 100644 index 2c9efb37f..000000000 --- a/apache/org/apache/james/mime4j/field/address/MailboxList.java +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -import java.util.ArrayList; - -/** - * An immutable, random-access list of Mailbox objects. - * - * - */ -public class MailboxList { - - private ArrayList
mailboxes; - - /** - * @param mailboxes An ArrayList that contains only Mailbox objects. - * @param dontCopy true iff it is not possible for the mailboxes ArrayList to be modified by someone else. - */ - public MailboxList(ArrayList
mailboxes, boolean dontCopy) { - if (mailboxes != null) - this.mailboxes = (dontCopy ? mailboxes : new ArrayList
(mailboxes)); - else - this.mailboxes = new ArrayList
(0); - } - - /** - * The number of elements in this list. - */ - public int size() { - return mailboxes.size(); - } - - /** - * Gets an address. - */ - public Mailbox get(int index) { - if (0 > index || size() <= index) - throw new IndexOutOfBoundsException(); - return (Mailbox)mailboxes.get(index); - } - - /** - * Dumps a representation of this mailbox list to - * stdout, for debugging purposes. - */ - public void print() { - for (int i = 0; i < size(); i++) { - Mailbox mailbox = get(i); - System.out.println(mailbox.toString()); - } - } - -} diff --git a/apache/org/apache/james/mime4j/field/address/NamedMailbox.java b/apache/org/apache/james/mime4j/field/address/NamedMailbox.java deleted file mode 100644 index 4b8306037..000000000 --- a/apache/org/apache/james/mime4j/field/address/NamedMailbox.java +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address; - -/** - * A Mailbox that has a name/description. - * - * - */ -public class NamedMailbox extends Mailbox { - private String name; - - /** - * @see Mailbox#Mailbox(String, String) - */ - public NamedMailbox(String name, String localPart, String domain) { - super(localPart, domain); - this.name = name; - } - - /** - * @see Mailbox#Mailbox(DomainList, String, String) - */ - public NamedMailbox(String name, DomainList route, String localPart, String domain) { - super(route, localPart, domain); - this.name = name; - } - - /** - * Creates a named mailbox based on an unnamed mailbox. - */ - public NamedMailbox(String name, Mailbox baseMailbox) { - super(baseMailbox.getRoute(), baseMailbox.getLocalPart(), baseMailbox.getDomain()); - this.name = name; - } - - /** - * Returns the name of the mailbox. - */ - public String getName() { - return this.name; - } - - /** - * Same features (or problems) as Mailbox.getAddressString(boolean), - * only more so. - * - * @see Mailbox#getAddressString(boolean) - */ - @Override - public String getAddressString(boolean includeRoute) { - return (name == null ? "" : name + " ") + super.getAddressString(includeRoute); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java b/apache/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java deleted file mode 100644 index 4d56d000b..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTaddr_spec.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTaddr_spec extends SimpleNode { - public ASTaddr_spec(int id) { - super(id); - } - - public ASTaddr_spec(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTaddress.java b/apache/org/apache/james/mime4j/field/address/parser/ASTaddress.java deleted file mode 100644 index 47bdeda8e..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTaddress.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTaddress.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTaddress extends SimpleNode { - public ASTaddress(int id) { - super(id); - } - - public ASTaddress(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java b/apache/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java deleted file mode 100644 index 737840e38..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTaddress_list.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTaddress_list extends SimpleNode { - public ASTaddress_list(int id) { - super(id); - } - - public ASTaddress_list(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java b/apache/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java deleted file mode 100644 index 8cb8f421f..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTangle_addr.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTangle_addr extends SimpleNode { - public ASTangle_addr(int id) { - super(id); - } - - public ASTangle_addr(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTdomain.java b/apache/org/apache/james/mime4j/field/address/parser/ASTdomain.java deleted file mode 100644 index b52664386..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTdomain.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTdomain.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTdomain extends SimpleNode { - public ASTdomain(int id) { - super(id); - } - - public ASTdomain(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java b/apache/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java deleted file mode 100644 index f6017b9fc..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTgroup_body.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTgroup_body extends SimpleNode { - public ASTgroup_body(int id) { - super(id); - } - - public ASTgroup_body(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java b/apache/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java deleted file mode 100644 index 5c244fa3e..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTlocal_part.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTlocal_part extends SimpleNode { - public ASTlocal_part(int id) { - super(id); - } - - public ASTlocal_part(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTmailbox.java b/apache/org/apache/james/mime4j/field/address/parser/ASTmailbox.java deleted file mode 100644 index aeb469da1..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTmailbox.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTmailbox.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTmailbox extends SimpleNode { - public ASTmailbox(int id) { - super(id); - } - - public ASTmailbox(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTname_addr.java b/apache/org/apache/james/mime4j/field/address/parser/ASTname_addr.java deleted file mode 100644 index 846c73167..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTname_addr.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTname_addr.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTname_addr extends SimpleNode { - public ASTname_addr(int id) { - super(id); - } - - public ASTname_addr(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTphrase.java b/apache/org/apache/james/mime4j/field/address/parser/ASTphrase.java deleted file mode 100644 index 7d711c529..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTphrase.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTphrase.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTphrase extends SimpleNode { - public ASTphrase(int id) { - super(id); - } - - public ASTphrase(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ASTroute.java b/apache/org/apache/james/mime4j/field/address/parser/ASTroute.java deleted file mode 100644 index 54ea11523..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ASTroute.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTroute.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class ASTroute extends SimpleNode { - public ASTroute(int id) { - super(id); - } - - public ASTroute(AddressListParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.java b/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.java deleted file mode 100644 index 8094df0ad..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.java +++ /dev/null @@ -1,977 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParser.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -public class AddressListParser/*@bgen(jjtree)*/implements AddressListParserTreeConstants, AddressListParserConstants {/*@bgen(jjtree)*/ - protected JJTAddressListParserState jjtree = new JJTAddressListParserState();public static void main(String args[]) throws ParseException { - while (true) { - try { - AddressListParser parser = new AddressListParser(System.in); - parser.parseLine(); - ((SimpleNode)parser.jjtree.rootNode()).dump("> "); - } catch (Exception x) { - x.printStackTrace(); - return; - } - } - } - - private static void log(String msg) { - System.out.print(msg); - } - - public ASTaddress_list parse() throws ParseException { - try { - parseAll(); - return (ASTaddress_list)jjtree.rootNode(); - } catch (TokenMgrError tme) { - throw new ParseException(tme.getMessage()); - } - } - - - void jjtreeOpenNodeScope(Node n) { - ((SimpleNode)n).firstToken = getToken(1); - } - - void jjtreeCloseNodeScope(Node n) { - ((SimpleNode)n).lastToken = getToken(0); - } - - final public void parseLine() throws ParseException { - address_list(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - jj_consume_token(1); - break; - default: - jj_la1[0] = jj_gen; - ; - } - jj_consume_token(2); - } - - final public void parseAll() throws ParseException { - address_list(); - jj_consume_token(0); - } - - final public void address_list() throws ParseException { - /*@bgen(jjtree) address_list */ - ASTaddress_list jjtn000 = new ASTaddress_list(JJTADDRESS_LIST); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - case DOTATOM: - case QUOTEDSTRING: - address(); - break; - default: - jj_la1[1] = jj_gen; - ; - } - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 3: - ; - break; - default: - jj_la1[2] = jj_gen; - break label_1; - } - jj_consume_token(3); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - case DOTATOM: - case QUOTEDSTRING: - address(); - break; - default: - jj_la1[3] = jj_gen; - ; - } - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void address() throws ParseException { - /*@bgen(jjtree) address */ - ASTaddress jjtn000 = new ASTaddress(JJTADDRESS); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - if (jj_2_1(2147483647)) { - addr_spec(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - angle_addr(); - break; - case DOTATOM: - case QUOTEDSTRING: - phrase(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - group_body(); - break; - case 6: - angle_addr(); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void mailbox() throws ParseException { - /*@bgen(jjtree) mailbox */ - ASTmailbox jjtn000 = new ASTmailbox(JJTMAILBOX); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - if (jj_2_2(2147483647)) { - addr_spec(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - angle_addr(); - break; - case DOTATOM: - case QUOTEDSTRING: - name_addr(); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void name_addr() throws ParseException { - /*@bgen(jjtree) name_addr */ - ASTname_addr jjtn000 = new ASTname_addr(JJTNAME_ADDR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - phrase(); - angle_addr(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void group_body() throws ParseException { - /*@bgen(jjtree) group_body */ - ASTgroup_body jjtn000 = new ASTgroup_body(JJTGROUP_BODY); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - jj_consume_token(4); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - case DOTATOM: - case QUOTEDSTRING: - mailbox(); - break; - default: - jj_la1[7] = jj_gen; - ; - } - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 3: - ; - break; - default: - jj_la1[8] = jj_gen; - break label_2; - } - jj_consume_token(3); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 6: - case DOTATOM: - case QUOTEDSTRING: - mailbox(); - break; - default: - jj_la1[9] = jj_gen; - ; - } - } - jj_consume_token(5); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void angle_addr() throws ParseException { - /*@bgen(jjtree) angle_addr */ - ASTangle_addr jjtn000 = new ASTangle_addr(JJTANGLE_ADDR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - jj_consume_token(6); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 8: - route(); - break; - default: - jj_la1[10] = jj_gen; - ; - } - addr_spec(); - jj_consume_token(7); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void route() throws ParseException { - /*@bgen(jjtree) route */ - ASTroute jjtn000 = new ASTroute(JJTROUTE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - jj_consume_token(8); - domain(); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 3: - case 8: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_3; - } - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 3: - ; - break; - default: - jj_la1[12] = jj_gen; - break label_4; - } - jj_consume_token(3); - } - jj_consume_token(8); - domain(); - } - jj_consume_token(4); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void phrase() throws ParseException { - /*@bgen(jjtree) phrase */ - ASTphrase jjtn000 = new ASTphrase(JJTPHRASE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOTATOM: - jj_consume_token(DOTATOM); - break; - case QUOTEDSTRING: - jj_consume_token(QUOTEDSTRING); - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOTATOM: - case QUOTEDSTRING: - ; - break; - default: - jj_la1[14] = jj_gen; - break label_5; - } - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void addr_spec() throws ParseException { - /*@bgen(jjtree) addr_spec */ - ASTaddr_spec jjtn000 = new ASTaddr_spec(JJTADDR_SPEC); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - local_part(); - jj_consume_token(8); - domain(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void local_part() throws ParseException { - /*@bgen(jjtree) local_part */ - ASTlocal_part jjtn000 = new ASTlocal_part(JJTLOCAL_PART); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOTATOM: - t = jj_consume_token(DOTATOM); - break; - case QUOTEDSTRING: - t = jj_consume_token(QUOTEDSTRING); - break; - default: - jj_la1[15] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - case DOTATOM: - case QUOTEDSTRING: - ; - break; - default: - jj_la1[16] = jj_gen; - break label_6; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - t = jj_consume_token(9); - break; - default: - jj_la1[17] = jj_gen; - ; - } - if (t.image.charAt(t.image.length() - 1) != '.' || t.kind == AddressListParserConstants.QUOTEDSTRING) - {if (true) throw new ParseException("Words in local part must be separated by '.'");} - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOTATOM: - t = jj_consume_token(DOTATOM); - break; - case QUOTEDSTRING: - t = jj_consume_token(QUOTEDSTRING); - break; - default: - jj_la1[18] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void domain() throws ParseException { - /*@bgen(jjtree) domain */ - ASTdomain jjtn000 = new ASTdomain(JJTDOMAIN); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOTATOM: - t = jj_consume_token(DOTATOM); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - case DOTATOM: - ; - break; - default: - jj_la1[19] = jj_gen; - break label_7; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - t = jj_consume_token(9); - break; - default: - jj_la1[20] = jj_gen; - ; - } - if (t.image.charAt(t.image.length() - 1) != '.') - {if (true) throw new ParseException("Atoms in domain names must be separated by '.'");} - t = jj_consume_token(DOTATOM); - } - break; - case DOMAINLITERAL: - jj_consume_token(DOMAINLITERAL); - break; - default: - jj_la1[21] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - final private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - final private boolean jj_3R_11() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_scan_token(14)) { - jj_scanpos = xsp; - if (jj_scan_token(31)) return true; - } - return false; - } - - final private boolean jj_3R_13() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) jj_scanpos = xsp; - if (jj_scan_token(DOTATOM)) return true; - return false; - } - - final private boolean jj_3R_8() { - if (jj_3R_9()) return true; - if (jj_scan_token(8)) return true; - if (jj_3R_10()) return true; - return false; - } - - final private boolean jj_3_1() { - if (jj_3R_8()) return true; - return false; - } - - final private boolean jj_3R_12() { - if (jj_scan_token(DOTATOM)) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_13()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3R_10() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_12()) { - jj_scanpos = xsp; - if (jj_scan_token(18)) return true; - } - return false; - } - - final private boolean jj_3_2() { - if (jj_3R_8()) return true; - return false; - } - - final private boolean jj_3R_9() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(14)) { - jj_scanpos = xsp; - if (jj_scan_token(31)) return true; - } - while (true) { - xsp = jj_scanpos; - if (jj_3R_11()) { jj_scanpos = xsp; break; } - } - return false; - } - - public AddressListParserTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - public boolean lookingAhead = false; - private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[22]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static { - jj_la1_0(); - jj_la1_1(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x2,0x80004040,0x8,0x80004040,0x50,0x80004040,0x80004040,0x80004040,0x8,0x80004040,0x100,0x108,0x8,0x80004000,0x80004000,0x80004000,0x80004200,0x200,0x80004000,0x4200,0x200,0x44000,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[2]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - public AddressListParser(java.io.InputStream stream) { - this(stream, null); - } - public AddressListParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new AddressListParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public AddressListParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new AddressListParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public AddressListParser(AddressListParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(AddressListParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 22; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - final private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - boolean exists = false; - for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { - int[] oldentry = e.nextElement(); - if (oldentry.length == jj_expentry.length) { - exists = true; - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; - } - } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[34]; - for (int i = 0; i < 34; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 22; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - } - } - p = p.next; - } while (p != null); - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; - } - - final private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.jj b/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.jj deleted file mode 100644 index c14277bc6..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParser.jj +++ /dev/null @@ -1,595 +0,0 @@ -/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParser.jj */ -/*@egen*//**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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. * - ****************************************************************/ - - -/** - * RFC2822 address list parser. - * - * Created 9/17/2004 - * by Joe Cheng - */ - -options { - STATIC=false; - LOOKAHEAD=1; - //DEBUG_PARSER=true; - //DEBUG_TOKEN_MANAGER=true; -} - -PARSER_BEGIN(AddressListParser) -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -public class AddressListParser/*@bgen(jjtree)*/implements AddressListParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/ - protected JJTAddressListParserState jjtree = new JJTAddressListParserState(); - -/*@egen*/ - public static void main(String args[]) throws ParseException { - while (true) { - try { - AddressListParser parser = new AddressListParser(System.in); - parser.parseLine(); - ((SimpleNode)parser.jjtree.rootNode()).dump("> "); - } catch (Exception x) { - x.printStackTrace(); - return; - } - } - } - - private static void log(String msg) { - System.out.print(msg); - } - - public ASTaddress_list parse() throws ParseException { - try { - parseAll(); - return (ASTaddress_list)jjtree.rootNode(); - } catch (TokenMgrError tme) { - throw new ParseException(tme.getMessage()); - } - } - - - void jjtreeOpenNodeScope(Node n) { - ((SimpleNode)n).firstToken = getToken(1); - } - - void jjtreeCloseNodeScope(Node n) { - ((SimpleNode)n).lastToken = getToken(0); - } -} - -PARSER_END(AddressListParser) - -void parseLine() : -{} -{ - address_list() ["\r"] "\n" -} - -void parseAll() : -{} -{ - address_list() -} - -void address_list() : -{/*@bgen(jjtree) address_list */ - ASTaddress_list jjtn000 = new ASTaddress_list(JJTADDRESS_LIST); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) address_list */ - try { -/*@egen*/ - [ address() ] - ( - "," - [ address() ] - )*/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void address() : -{/*@bgen(jjtree) address */ - ASTaddress jjtn000 = new ASTaddress(JJTADDRESS); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) address */ - try { -/*@egen*/ - LOOKAHEAD(2147483647) - addr_spec() -| angle_addr() -| ( phrase() (group_body() | angle_addr()) )/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void mailbox() : -{/*@bgen(jjtree) mailbox */ - ASTmailbox jjtn000 = new ASTmailbox(JJTMAILBOX); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) mailbox */ - try { -/*@egen*/ - LOOKAHEAD(2147483647) - addr_spec() -| angle_addr() -| name_addr()/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void name_addr() : -{/*@bgen(jjtree) name_addr */ - ASTname_addr jjtn000 = new ASTname_addr(JJTNAME_ADDR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) name_addr */ - try { -/*@egen*/ - phrase() angle_addr()/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void group_body() : -{/*@bgen(jjtree) group_body */ - ASTgroup_body jjtn000 = new ASTgroup_body(JJTGROUP_BODY); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) group_body */ - try { -/*@egen*/ - ":" - [ mailbox() ] - ( - "," - [ mailbox() ] - )* - ";"/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void angle_addr() : -{/*@bgen(jjtree) angle_addr */ - ASTangle_addr jjtn000 = new ASTangle_addr(JJTANGLE_ADDR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) angle_addr */ - try { -/*@egen*/ - "<" [ route() ] addr_spec() ">"/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void route() : -{/*@bgen(jjtree) route */ - ASTroute jjtn000 = new ASTroute(JJTROUTE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) route */ - try { -/*@egen*/ - "@" domain() ( (",")* "@" domain() )* ":"/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void phrase() : -{/*@bgen(jjtree) phrase */ - ASTphrase jjtn000 = new ASTphrase(JJTPHRASE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) phrase */ -try { -/*@egen*/ -( -| -)+/*@bgen(jjtree)*/ -} finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } -} -/*@egen*/ -} - -void addr_spec() : -{/*@bgen(jjtree) addr_spec */ - ASTaddr_spec jjtn000 = new ASTaddr_spec(JJTADDR_SPEC); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/} -{/*@bgen(jjtree) addr_spec */ - try { -/*@egen*/ - ( local_part() "@" domain() )/*@bgen(jjtree)*/ - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - throw (RuntimeException)jjte000; - } - if (jjte000 instanceof ParseException) { - throw (ParseException)jjte000; - } - throw (Error)jjte000; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void local_part() : -{/*@bgen(jjtree) local_part */ - ASTlocal_part jjtn000 = new ASTlocal_part(JJTLOCAL_PART); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/ Token t; } -{/*@bgen(jjtree) local_part */ - try { -/*@egen*/ - ( t= | t= ) - ( [t="."] - { - if (t.image.charAt(t.image.length() - 1) != '.' || t.kind == AddressListParserConstants.QUOTEDSTRING) - throw new ParseException("Words in local part must be separated by '.'"); - } - ( t= | t= ) - )*/*@bgen(jjtree)*/ - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -void domain() : -{/*@bgen(jjtree) domain */ - ASTdomain jjtn000 = new ASTdomain(JJTDOMAIN); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); -/*@egen*/ Token t; } -{/*@bgen(jjtree) domain */ - try { -/*@egen*/ - ( t= - ( [t="."] - { - if (t.image.charAt(t.image.length() - 1) != '.') - throw new ParseException("Atoms in domain names must be separated by '.'"); - } - t= - )* - ) -| /*@bgen(jjtree)*/ - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } -/*@egen*/ -} - -SPECIAL_TOKEN : -{ - < WS: ( [" ", "\t"] )+ > -} - -TOKEN : -{ - < #ALPHA: ["a" - "z", "A" - "Z"] > -| < #DIGIT: ["0" - "9"] > -| < #ATEXT: ( | - | "!" | "#" | "$" | "%" - | "&" | "'" | "*" | "+" - | "-" | "/" | "=" | "?" - | "^" | "_" | "`" | "{" - | "|" | "}" | "~" - )> -| < DOTATOM: ( | "." )* > -} - -TOKEN_MGR_DECLS : -{ - // Keeps track of how many levels of comment nesting - // we've encountered. This is only used when the 2nd - // level is reached, for example ((this)), not (this). - // This is because the outermost level must be treated - // specially anyway, because the outermost ")" has a - // different token type than inner ")" instances. - static int commentNest; -} - -MORE : -{ - // domain literal - "[" : INDOMAINLITERAL -} - - -MORE : -{ - < > { image.deleteCharAt(image.length() - 2); } -| < ~["[", "]", "\\"] > -} - - -TOKEN : -{ - < DOMAINLITERAL: "]" > { matchedToken.image = image.toString(); }: DEFAULT -} - -MORE : -{ - // starts a comment - "(" : INCOMMENT -} - - -SKIP : -{ - // ends a comment - < COMMENT: ")" > : DEFAULT - // if this is ever changed to not be a SKIP, need - // to make sure matchedToken.token = token.toString() - // is called. -} - - -MORE : -{ - < > { image.deleteCharAt(image.length() - 2); } -| "(" { commentNest = 1; } : NESTED_COMMENT -| < > -} - - -MORE : -{ - < > { image.deleteCharAt(image.length() - 2); } -| "(" { ++commentNest; } -| ")" { --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT); } -| < > -} - - -// QUOTED STRINGS - -MORE : -{ - "\"" { image.deleteCharAt(image.length() - 1); } : INQUOTEDSTRING -} - - -MORE : -{ - < > { image.deleteCharAt(image.length() - 2); } -| < (~["\"", "\\"])+ > -} - - -TOKEN : -{ - < QUOTEDSTRING: "\"" > { matchedToken.image = image.substring(0, image.length() - 1); } : DEFAULT -} - -// GLOBALS - -<*> -TOKEN : -{ - < #QUOTEDPAIR: "\\" > -| < #ANY: ~[] > -} - -// ERROR! -/* - -<*> -TOKEN : -{ - < UNEXPECTED_CHAR: > -} - -*/ \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java b/apache/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java deleted file mode 100644 index 006a082c1..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java +++ /dev/null @@ -1,76 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParserConstants.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -public interface AddressListParserConstants { - - int EOF = 0; - int WS = 10; - int ALPHA = 11; - int DIGIT = 12; - int ATEXT = 13; - int DOTATOM = 14; - int DOMAINLITERAL = 18; - int COMMENT = 20; - int QUOTEDSTRING = 31; - int QUOTEDPAIR = 32; - int ANY = 33; - - int DEFAULT = 0; - int INDOMAINLITERAL = 1; - int INCOMMENT = 2; - int NESTED_COMMENT = 3; - int INQUOTEDSTRING = 4; - - String[] tokenImage = { - "", - "\"\\r\"", - "\"\\n\"", - "\",\"", - "\":\"", - "\";\"", - "\"<\"", - "\">\"", - "\"@\"", - "\".\"", - "", - "", - "", - "", - "", - "\"[\"", - "", - "", - "\"]\"", - "\"(\"", - "\")\"", - "", - "\"(\"", - "", - "", - "\"(\"", - "\")\"", - "", - "\"\\\"\"", - "", - "", - "\"\\\"\"", - "", - "", - }; - -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java b/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java deleted file mode 100644 index d2dd88dd3..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java +++ /dev/null @@ -1,1009 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParserTokenManager.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -public class AddressListParserTokenManager implements AddressListParserConstants -{ - // Keeps track of how many levels of comment nesting - // we've encountered. This is only used when the 2nd - // level is reached, for example ((this)), not (this). - // This is because the outermost level must be treated - // specially anyway, because the outermost ")" has a - // different token type than inner ")" instances. - static int commentNest; - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 10: - return jjStopAtPos(0, 2); - case 13: - return jjStopAtPos(0, 1); - case 34: - return jjStopAtPos(0, 28); - case 40: - return jjStopAtPos(0, 19); - case 44: - return jjStopAtPos(0, 3); - case 46: - return jjStopAtPos(0, 9); - case 58: - return jjStopAtPos(0, 4); - case 59: - return jjStopAtPos(0, 5); - case 60: - return jjStopAtPos(0, 6); - case 62: - return jjStopAtPos(0, 7); - case 64: - return jjStopAtPos(0, 8); - case 91: - return jjStopAtPos(0, 15); - default : - return jjMoveNfa_0(1, 0); - } -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} -private final int jjMoveNfa_0(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 1: - if ((0xa3ffacfa00000000L & l) != 0L) - { - if (kind > 14) - kind = 14; - jjCheckNAdd(2); - } - else if ((0x100000200L & l) != 0L) - { - if (kind > 10) - kind = 10; - jjCheckNAdd(0); - } - break; - case 0: - if ((0x100000200L & l) == 0L) - break; - kind = 10; - jjCheckNAdd(0); - break; - case 2: - if ((0xa3ffecfa00000000L & l) == 0L) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 1: - case 2: - if ((0x7fffffffc7fffffeL & l) == 0L) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_2(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_2(int pos, long active0) -{ - return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_2(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_2(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 22); - case 41: - return jjStopAtPos(0, 20); - default : - return jjMoveNfa_2(0, 0); - } -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_2(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 23) - kind = 23; - break; - case 1: - if (kind > 21) - kind = 21; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 23) - kind = 23; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 21) - kind = 21; - break; - case 2: - if (kind > 23) - kind = 23; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 23) - kind = 23; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 21) - kind = 21; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_4(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_4(int pos, long active0) -{ - return jjMoveNfa_4(jjStopStringLiteralDfa_4(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_4(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_4(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_4() -{ - switch(curChar) - { - case 34: - return jjStopAtPos(0, 31); - default : - return jjMoveNfa_4(0, 0); - } -} -private final int jjMoveNfa_4(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - case 2: - if ((0xfffffffbffffffffL & l) == 0L) - break; - if (kind > 30) - kind = 30; - jjCheckNAdd(2); - break; - case 1: - if (kind > 29) - kind = 29; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffffffefffffffL & l) != 0L) - { - if (kind > 30) - kind = 30; - jjCheckNAdd(2); - } - else if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 29) - kind = 29; - break; - case 2: - if ((0xffffffffefffffffL & l) == 0L) - break; - if (kind > 30) - kind = 30; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - case 2: - if ((jjbitVec0[i2] & l2) == 0L) - break; - if (kind > 30) - kind = 30; - jjCheckNAdd(2); - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 29) - kind = 29; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_3(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_3(int pos, long active0) -{ - return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_3(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_3(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_3() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 25); - case 41: - return jjStopAtPos(0, 26); - default : - return jjMoveNfa_3(0, 0); - } -} -private final int jjMoveNfa_3(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 27) - kind = 27; - break; - case 1: - if (kind > 24) - kind = 24; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 27) - kind = 27; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 24) - kind = 24; - break; - case 2: - if (kind > 27) - kind = 27; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 27) - kind = 27; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 24) - kind = 24; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_1(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_1(int pos, long active0) -{ - return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_1(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_1(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 93: - return jjStopAtPos(0, 18); - default : - return jjMoveNfa_1(0, 0); - } -} -private final int jjMoveNfa_1(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 17) - kind = 17; - break; - case 1: - if (kind > 16) - kind = 16; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffffffc7ffffffL & l) != 0L) - { - if (kind > 17) - kind = 17; - } - else if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 16) - kind = 16; - break; - case 2: - if ((0xffffffffc7ffffffL & l) != 0L && kind > 17) - kind = 17; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 17) - kind = 17; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 16) - kind = 16; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { -}; -public static final String[] jjstrLiteralImages = { -"", "\15", "\12", "\54", "\72", "\73", "\74", "\76", "\100", "\56", null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, }; -public static final String[] lexStateNames = { - "DEFAULT", - "INDOMAINLITERAL", - "INCOMMENT", - "NESTED_COMMENT", - "INQUOTEDSTRING", -}; -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 2, 0, -1, 3, -1, -1, - -1, -1, -1, 4, -1, -1, 0, -1, -1, -}; -static final long[] jjtoToken = { - 0x800443ffL, -}; -static final long[] jjtoSkip = { - 0x100400L, -}; -static final long[] jjtoSpecial = { - 0x400L, -}; -static final long[] jjtoMore = { - 0x7feb8000L, -}; -protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[3]; -private final int[] jjstateSet = new int[6]; -StringBuffer image; -int jjimageLen; -int lengthOfMatch; -protected char curChar; -public AddressListParserTokenManager(SimpleCharStream stream){ - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public AddressListParserTokenManager(SimpleCharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} -public void ReInit(SimpleCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 3; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(SimpleCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 5 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public Token getNextToken() -{ - int kind; - Token specialToken = null; - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - image = null; - jjimageLen = 0; - - for (;;) - { - switch(curLexState) - { - case 0: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - break; - case 1: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_1(); - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - break; - case 3: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_3(); - break; - case 4: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_4(); - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - TokenLexicalActions(matchedToken); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - return matchedToken; - } - else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (specialToken == null) - specialToken = matchedToken; - else - { - matchedToken.specialToken = specialToken; - specialToken = (specialToken.next = matchedToken); - } - } - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - continue EOFLoop; - } - MoreLexicalActions(); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - curPos = 0; - jjmatchedKind = 0x7fffffff; - try { - curChar = input_stream.readChar(); - continue; - } - catch (java.io.IOException e1) { } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } - } -} - -void MoreLexicalActions() -{ - jjimageLen += (lengthOfMatch = jjmatchedPos + 1); - switch(jjmatchedKind) - { - case 16 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 21 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 22 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - commentNest = 1; - break; - case 24 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 25 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - ++commentNest; - break; - case 26 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT); - break; - case 28 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 1); - break; - case 29 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - default : - break; - } -} -void TokenLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - case 18 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - matchedToken.image = image.toString(); - break; - case 31 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - matchedToken.image = image.substring(0, image.length() - 1); - break; - default : - break; - } -} -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java b/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java deleted file mode 100644 index 5987f19d8..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java */ - -package org.apache.james.mime4j.field.address.parser; - -public interface AddressListParserTreeConstants -{ - public int JJTVOID = 0; - public int JJTADDRESS_LIST = 1; - public int JJTADDRESS = 2; - public int JJTMAILBOX = 3; - public int JJTNAME_ADDR = 4; - public int JJTGROUP_BODY = 5; - public int JJTANGLE_ADDR = 6; - public int JJTROUTE = 7; - public int JJTPHRASE = 8; - public int JJTADDR_SPEC = 9; - public int JJTLOCAL_PART = 10; - public int JJTDOMAIN = 11; - - - public String[] jjtNodeName = { - "void", - "address_list", - "address", - "mailbox", - "name_addr", - "group_body", - "angle_addr", - "route", - "phrase", - "addr_spec", - "local_part", - "domain", - }; -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java b/apache/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java deleted file mode 100644 index 8ec2fe7d2..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java */ - -package org.apache.james.mime4j.field.address.parser; - -public interface AddressListParserVisitor -{ - public Object visit(SimpleNode node, Object data); - public Object visit(ASTaddress_list node, Object data); - public Object visit(ASTaddress node, Object data); - public Object visit(ASTmailbox node, Object data); - public Object visit(ASTname_addr node, Object data); - public Object visit(ASTgroup_body node, Object data); - public Object visit(ASTangle_addr node, Object data); - public Object visit(ASTroute node, Object data); - public Object visit(ASTphrase node, Object data); - public Object visit(ASTaddr_spec node, Object data); - public Object visit(ASTlocal_part node, Object data); - public Object visit(ASTdomain node, Object data); -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/BaseNode.java b/apache/org/apache/james/mime4j/field/address/parser/BaseNode.java deleted file mode 100644 index 780974616..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/BaseNode.java +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.address.parser; - -import org.apache.james.mime4j.field.address.parser.Node; -import org.apache.james.mime4j.field.address.parser.Token; - -public abstract class BaseNode implements Node { - - public Token firstToken; - public Token lastToken; - -} \ No newline at end of file diff --git a/apache/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java b/apache/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java deleted file mode 100644 index 08b5c5bef..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java +++ /dev/null @@ -1,123 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java */ - -package org.apache.james.mime4j.field.address.parser; - -class JJTAddressListParserState { - private java.util.Stack nodes; - private java.util.Stack marks; - - private int sp; // number of nodes on stack - private int mk; // current mark - private boolean node_created; - - JJTAddressListParserState() { - nodes = new java.util.Stack(); - marks = new java.util.Stack(); - sp = 0; - mk = 0; - } - - /* Determines whether the current node was actually closed and - pushed. This should only be called in the final user action of a - node scope. */ - boolean nodeCreated() { - return node_created; - } - - /* Call this to reinitialize the node stack. It is called - automatically by the parser's ReInit() method. */ - void reset() { - nodes.removeAllElements(); - marks.removeAllElements(); - sp = 0; - mk = 0; - } - - /* Returns the root node of the AST. It only makes sense to call - this after a successful parse. */ - Node rootNode() { - return nodes.elementAt(0); - } - - /* Pushes a node on to the stack. */ - void pushNode(Node n) { - nodes.push(n); - ++sp; - } - - /* Returns the node on the top of the stack, and remove it from the - stack. */ - Node popNode() { - if (--sp < mk) { - mk = marks.pop().intValue(); - } - return nodes.pop(); - } - - /* Returns the node currently on the top of the stack. */ - Node peekNode() { - return nodes.peek(); - } - - /* Returns the number of children on the stack in the current node - scope. */ - int nodeArity() { - return sp - mk; - } - - - void clearNodeScope(Node n) { - while (sp > mk) { - popNode(); - } - mk = marks.pop().intValue(); - } - - - void openNodeScope(Node n) { - marks.push(new Integer(mk)); - mk = sp; - n.jjtOpen(); - } - - - /* A definite node is constructed from a specified number of - children. That number of nodes are popped from the stack and - made the children of the definite node. Then the definite node - is pushed on to the stack. */ - void closeNodeScope(Node n, int num) { - mk = marks.pop().intValue(); - while (num-- > 0) { - Node c = popNode(); - c.jjtSetParent(n); - n.jjtAddChild(c, num); - } - n.jjtClose(); - pushNode(n); - node_created = true; - } - - - /* A conditional node is constructed if its condition is true. All - the nodes that have been pushed since the node was opened are - made children of the the conditional node, which is then pushed - on to the stack. If the condition is false the node is not - constructed and they are left on the stack. */ - void closeNodeScope(Node n, boolean condition) { - if (condition) { - int a = nodeArity(); - mk = marks.pop().intValue(); - while (a-- > 0) { - Node c = popNode(); - c.jjtSetParent(n); - n.jjtAddChild(c, a); - } - n.jjtClose(); - pushNode(n); - node_created = true; - } else { - mk = marks.pop().intValue(); - node_created = false; - } - } -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/Node.java b/apache/org/apache/james/mime4j/field/address/parser/Node.java deleted file mode 100644 index 158892016..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/Node.java +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. Node.java */ - -package org.apache.james.mime4j.field.address.parser; - -/* All AST nodes must implement this interface. It provides basic - machinery for constructing the parent and child relationships - between nodes. */ - -public interface Node { - - /** This method is called after the node has been made the current - node. It indicates that child nodes can now be added to it. */ - public void jjtOpen(); - - /** This method is called after all the child nodes have been - added. */ - public void jjtClose(); - - /** This pair of methods are used to inform the node of its - parent. */ - public void jjtSetParent(Node n); - public Node jjtGetParent(); - - /** This method tells the node to add its argument to the node's - list of children. */ - public void jjtAddChild(Node n, int i); - - /** This method returns a child node. The children are numbered - from zero, left to right. */ - public Node jjtGetChild(int i); - - /** Return the number of children the node has. */ - public int jjtGetNumChildren(); - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data); -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/ParseException.java b/apache/org/apache/james/mime4j/field/address/parser/ParseException.java deleted file mode 100644 index e20146fb6..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/ParseException.java +++ /dev/null @@ -1,207 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java b/apache/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java deleted file mode 100644 index c9ba0b444..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java +++ /dev/null @@ -1,454 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public class SimpleCharStream -{ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; - public int bufpos = -1; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - - public char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = buffer[bufpos]; - - UpdateLineColumn(c); - return (c); - } - - /** - * @deprecated - * @see #getEndColumn - */ - @Deprecated - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - @Deprecated - public int getLine() { - return bufline[bufpos]; - } - - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - public int getEndLine() { - return bufline[bufpos]; - } - - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public int getBeginLine() { - return bufline[tokenBegin]; - } - - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/SimpleNode.java b/apache/org/apache/james/mime4j/field/address/parser/SimpleNode.java deleted file mode 100644 index 9bf537e60..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/SimpleNode.java +++ /dev/null @@ -1,87 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. SimpleNode.java */ - -package org.apache.james.mime4j.field.address.parser; - -public class SimpleNode extends org.apache.james.mime4j.field.address.parser.BaseNode implements Node { - protected Node parent; - protected Node[] children; - protected int id; - protected AddressListParser parser; - - public SimpleNode(int i) { - id = i; - } - - public SimpleNode(AddressListParser p, int i) { - this(i); - parser = p; - } - - public void jjtOpen() { - } - - public void jjtClose() { - } - - public void jjtSetParent(Node n) { parent = n; } - public Node jjtGetParent() { return parent; } - - public void jjtAddChild(Node n, int i) { - if (children == null) { - children = new Node[i + 1]; - } else if (i >= children.length) { - Node c[] = new Node[i + 1]; - System.arraycopy(children, 0, c, 0, children.length); - children = c; - } - children[i] = n; - } - - public Node jjtGetChild(int i) { - return children[i]; - } - - public int jjtGetNumChildren() { - return (children == null) ? 0 : children.length; - } - - /** Accept the visitor. **/ - public Object jjtAccept(AddressListParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } - - /** Accept the visitor. **/ - public Object childrenAccept(AddressListParserVisitor visitor, Object data) { - if (children != null) { - for (int i = 0; i < children.length; ++i) { - children[i].jjtAccept(visitor, data); - } - } - return data; - } - - /* You can override these two methods in subclasses of SimpleNode to - customize the way the node appears when the tree is dumped. If - your output uses more than one line you should override - toString(String), otherwise overriding toString() is probably all - you need to do. */ - - public String toString() { return AddressListParserTreeConstants.jjtNodeName[id]; } - public String toString(String prefix) { return prefix + toString(); } - - /* Override this method if you want to customize how the node dumps - out its children. */ - - public void dump(String prefix) { - System.out.println(toString(prefix)); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - SimpleNode n = (SimpleNode)children[i]; - if (n != null) { - n.dump(prefix + " "); - } - } - } - } -} - diff --git a/apache/org/apache/james/mime4j/field/address/parser/Token.java b/apache/org/apache/james/mime4j/field/address/parser/Token.java deleted file mode 100644 index 2382e8e92..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/Token.java +++ /dev/null @@ -1,96 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} diff --git a/apache/org/apache/james/mime4j/field/address/parser/TokenMgrError.java b/apache/org/apache/james/mime4j/field/address/parser/TokenMgrError.java deleted file mode 100644 index 0299c8523..000000000 --- a/apache/org/apache/james/mime4j/field/address/parser/TokenMgrError.java +++ /dev/null @@ -1,148 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java b/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java deleted file mode 100644 index cacf3af21..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java +++ /dev/null @@ -1,268 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ContentTypeParser.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; - -import java.util.ArrayList; -import java.util.Vector; - -public class ContentTypeParser implements ContentTypeParserConstants { - - private String type; - private String subtype; - private ArrayList paramNames = new ArrayList(); - private ArrayList paramValues = new ArrayList(); - - public String getType() { return type; } - public String getSubType() { return subtype; } - public ArrayList getParamNames() { return paramNames; } - public ArrayList getParamValues() { return paramValues; } - - public static void main(String args[]) throws ParseException { - while (true) { - try { - ContentTypeParser parser = new ContentTypeParser(System.in); - parser.parseLine(); - } catch (Exception x) { - x.printStackTrace(); - return; - } - } - } - - final public void parseLine() throws ParseException { - parse(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - jj_consume_token(1); - break; - default: - jj_la1[0] = jj_gen; - ; - } - jj_consume_token(2); - } - - final public void parseAll() throws ParseException { - parse(); - jj_consume_token(0); - } - - final public void parse() throws ParseException { - Token type; - Token subtype; - type = jj_consume_token(ATOKEN); - jj_consume_token(3); - subtype = jj_consume_token(ATOKEN); - this.type = type.image; - this.subtype = subtype.image; - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - ; - break; - default: - jj_la1[1] = jj_gen; - break label_1; - } - jj_consume_token(4); - parameter(); - } - } - - final public void parameter() throws ParseException { - Token attrib; - String val; - attrib = jj_consume_token(ATOKEN); - jj_consume_token(5); - val = value(); - paramNames.add(attrib.image); - paramValues.add(val); - } - - final public String value() throws ParseException { - Token t; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ATOKEN: - t = jj_consume_token(ATOKEN); - break; - case QUOTEDSTRING: - t = jj_consume_token(QUOTEDSTRING); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return t.image;} - throw new Error("Missing return statement in function"); - } - - public ContentTypeParserTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private int jj_gen; - final private int[] jj_la1 = new int[3]; - static private int[] jj_la1_0; - static { - jj_la1_0(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x2,0x10,0x280000,}; - } - - public ContentTypeParser(java.io.InputStream stream) { - this(stream, null); - } - public ContentTypeParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new ContentTypeParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - public ContentTypeParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new ContentTypeParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - public ContentTypeParser(ContentTypeParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - public void ReInit(ContentTypeParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private Vector jj_expentries = new Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[24]; - for (int i = 0; i < 24; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 3; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<", - "\"\\r\"", - "\"\\n\"", - "\"/\"", - "\";\"", - "\"=\"", - "", - "\"(\"", - "\")\"", - "", - "\"(\"", - "", - "", - "\"(\"", - "\")\"", - "", - "\"\\\"\"", - "", - "", - "\"\\\"\"", - "", - "", - "", - "", - }; - -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java b/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java deleted file mode 100644 index 25b7abafa..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java +++ /dev/null @@ -1,877 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ContentTypeParserTokenManager.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; -import java.util.ArrayList; - -public class ContentTypeParserTokenManager implements ContentTypeParserConstants -{ - // Keeps track of how many levels of comment nesting - // we've encountered. This is only used when the 2nd - // level is reached, for example ((this)), not (this). - // This is because the outermost level must be treated - // specially anyway, because the outermost ")" has a - // different token type than inner ")" instances. - static int commentNest; - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 10: - return jjStartNfaWithStates_0(0, 2, 2); - case 13: - return jjStartNfaWithStates_0(0, 1, 2); - case 34: - return jjStopAtPos(0, 16); - case 40: - return jjStopAtPos(0, 7); - case 47: - return jjStopAtPos(0, 3); - case 59: - return jjStopAtPos(0, 4); - case 61: - return jjStopAtPos(0, 5); - default : - return jjMoveNfa_0(3, 0); - } -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_0(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 3: - if ((0x3ff6cfafffffdffL & l) != 0L) - { - if (kind > 21) - kind = 21; - jjCheckNAdd(2); - } - else if ((0x100000200L & l) != 0L) - { - if (kind > 6) - kind = 6; - jjCheckNAdd(0); - } - if ((0x3ff000000000000L & l) != 0L) - { - if (kind > 20) - kind = 20; - jjCheckNAdd(1); - } - break; - case 0: - if ((0x100000200L & l) == 0L) - break; - kind = 6; - jjCheckNAdd(0); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 20) - kind = 20; - jjCheckNAdd(1); - break; - case 2: - if ((0x3ff6cfafffffdffL & l) == 0L) - break; - if (kind > 21) - kind = 21; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 3: - case 2: - if ((0xffffffffc7fffffeL & l) == 0L) - break; - kind = 21; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 3: - case 2: - if ((jjbitVec0[i2] & l2) == 0L) - break; - if (kind > 21) - kind = 21; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_1(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_1(int pos, long active0) -{ - return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_1(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_1(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 10); - case 41: - return jjStopAtPos(0, 8); - default : - return jjMoveNfa_1(0, 0); - } -} -private final int jjMoveNfa_1(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 11) - kind = 11; - break; - case 1: - if (kind > 9) - kind = 9; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 11) - kind = 11; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 9) - kind = 9; - break; - case 2: - if (kind > 11) - kind = 11; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 11) - kind = 11; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 9) - kind = 9; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_3(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_3(int pos, long active0) -{ - return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_3(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_3(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_3() -{ - switch(curChar) - { - case 34: - return jjStopAtPos(0, 19); - default : - return jjMoveNfa_3(0, 0); - } -} -private final int jjMoveNfa_3(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - case 2: - if ((0xfffffffbffffffffL & l) == 0L) - break; - if (kind > 18) - kind = 18; - jjCheckNAdd(2); - break; - case 1: - if (kind > 17) - kind = 17; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffffffefffffffL & l) != 0L) - { - if (kind > 18) - kind = 18; - jjCheckNAdd(2); - } - else if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 17) - kind = 17; - break; - case 2: - if ((0xffffffffefffffffL & l) == 0L) - break; - if (kind > 18) - kind = 18; - jjCheckNAdd(2); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - case 2: - if ((jjbitVec0[i2] & l2) == 0L) - break; - if (kind > 18) - kind = 18; - jjCheckNAdd(2); - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 17) - kind = 17; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_2(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_2(int pos, long active0) -{ - return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_2(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_2(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 13); - case 41: - return jjStopAtPos(0, 14); - default : - return jjMoveNfa_2(0, 0); - } -} -private final int jjMoveNfa_2(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 15) - kind = 15; - break; - case 1: - if (kind > 12) - kind = 12; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 15) - kind = 15; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 12) - kind = 12; - break; - case 2: - if (kind > 15) - kind = 15; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 15) - kind = 15; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 12) - kind = 12; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { -}; -public static final String[] jjstrLiteralImages = { -"", "\15", "\12", "\57", "\73", "\75", null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, }; -public static final String[] lexStateNames = { - "DEFAULT", - "INCOMMENT", - "NESTED_COMMENT", - "INQUOTEDSTRING", -}; -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0x38003fL, -}; -static final long[] jjtoSkip = { - 0x140L, -}; -static final long[] jjtoSpecial = { - 0x40L, -}; -static final long[] jjtoMore = { - 0x7fe80L, -}; -protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[3]; -private final int[] jjstateSet = new int[6]; -StringBuffer image; -int jjimageLen; -int lengthOfMatch; -protected char curChar; -public ContentTypeParserTokenManager(SimpleCharStream stream){ - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public ContentTypeParserTokenManager(SimpleCharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} -public void ReInit(SimpleCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 3; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(SimpleCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 4 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public Token getNextToken() -{ - int kind; - Token specialToken = null; - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - image = null; - jjimageLen = 0; - - for (;;) - { - switch(curLexState) - { - case 0: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - break; - case 1: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_1(); - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - break; - case 3: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_3(); - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - TokenLexicalActions(matchedToken); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - return matchedToken; - } - else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (specialToken == null) - specialToken = matchedToken; - else - { - matchedToken.specialToken = specialToken; - specialToken = (specialToken.next = matchedToken); - } - } - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - continue EOFLoop; - } - MoreLexicalActions(); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - curPos = 0; - jjmatchedKind = 0x7fffffff; - try { - curChar = input_stream.readChar(); - continue; - } - catch (java.io.IOException e1) { } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } - } -} - -void MoreLexicalActions() -{ - jjimageLen += (lengthOfMatch = jjmatchedPos + 1); - switch(jjmatchedKind) - { - case 9 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 10 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - commentNest = 1; - break; - case 12 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 13 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - ++commentNest; - break; - case 14 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT); - break; - case 16 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 1); - break; - case 17 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - default : - break; - } -} -void TokenLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - case 19 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - matchedToken.image = image.substring(0, image.length() - 1); - break; - default : - break; - } -} -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/ParseException.java b/apache/org/apache/james/mime4j/field/contenttype/parser/ParseException.java deleted file mode 100644 index d9b69b25c..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/ParseException.java +++ /dev/null @@ -1,207 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java b/apache/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java deleted file mode 100644 index ae035b717..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java +++ /dev/null @@ -1,454 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public class SimpleCharStream -{ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; - public int bufpos = -1; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - - public char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = buffer[bufpos]; - - UpdateLineColumn(c); - return (c); - } - - /** - * @deprecated - * @see #getEndColumn - */ - @Deprecated - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - @Deprecated - public int getLine() { - return bufline[bufpos]; - } - - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - public int getEndLine() { - return bufline[bufpos]; - } - - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public int getBeginLine() { - return bufline[tokenBegin]; - } - - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/Token.java b/apache/org/apache/james/mime4j/field/contenttype/parser/Token.java deleted file mode 100644 index 34e65eec0..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/Token.java +++ /dev/null @@ -1,96 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} diff --git a/apache/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java b/apache/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java deleted file mode 100644 index ea5a7826e..000000000 --- a/apache/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java +++ /dev/null @@ -1,148 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} diff --git a/apache/org/apache/james/mime4j/field/datetime/DateTime.java b/apache/org/apache/james/mime4j/field/datetime/DateTime.java deleted file mode 100644 index 506ff54e5..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/DateTime.java +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.field.datetime; - -import org.apache.james.mime4j.field.datetime.parser.DateTimeParser; -import org.apache.james.mime4j.field.datetime.parser.ParseException; -import org.apache.james.mime4j.field.datetime.parser.TokenMgrError; - -import java.util.Date; -import java.util.Calendar; -import java.util.TimeZone; -import java.util.GregorianCalendar; -import java.io.StringReader; - -public class DateTime { - private final Date date; - private final int year; - private final int month; - private final int day; - private final int hour; - private final int minute; - private final int second; - private final int timeZone; - - public DateTime(String yearString, int month, int day, int hour, int minute, int second, int timeZone) { - this.year = convertToYear(yearString); - this.date = convertToDate(year, month, day, hour, minute, second, timeZone); - this.month = month; - this.day = day; - this.hour = hour; - this.minute = minute; - this.second = second; - this.timeZone = timeZone; - } - - private int convertToYear(String yearString) { - int year = Integer.parseInt(yearString); - switch (yearString.length()) { - case 1: - case 2: - if (year >= 0 && year < 50) - return 2000 + year; - else - return 1900 + year; - case 3: - return 1900 + year; - default: - return year; - } - } - - public static Date convertToDate(int year, int month, int day, int hour, int minute, int second, int timeZone) { - Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT+0")); - c.set(year, month - 1, day, hour, minute, second); - c.set(Calendar.MILLISECOND, 0); - - if (timeZone != Integer.MIN_VALUE) { - int minutes = ((timeZone / 100) * 60) + timeZone % 100; - c.add(Calendar.MINUTE, -1 * minutes); - } - - return c.getTime(); - } - - public Date getDate() { - return date; - } - - public int getYear() { - return year; - } - - public int getMonth() { - return month; - } - - public int getDay() { - return day; - } - - public int getHour() { - return hour; - } - - public int getMinute() { - return minute; - } - - public int getSecond() { - return second; - } - - public int getTimeZone() { - return timeZone; - } - - public void print() { - System.out.println(getYear() + " " + getMonth() + " " + getDay() + "; " + getHour() + " " + getMinute() + " " + getSecond() + " " + getTimeZone()); - } - - - public static DateTime parse(String dateString) throws ParseException { - try { - return new DateTimeParser(new StringReader(dateString)).parseAll(); - } - catch (TokenMgrError err) { - throw new ParseException(err.getMessage()); - } - } -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java b/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java deleted file mode 100644 index 43edebb5c..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java +++ /dev/null @@ -1,570 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. DateTimeParser.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; - -import org.apache.james.mime4j.field.datetime.DateTime; - -import java.util.Vector; - -public class DateTimeParser implements DateTimeParserConstants { - private static final boolean ignoreMilitaryZoneOffset = true; - - public static void main(String args[]) throws ParseException { - while (true) { - try { - DateTimeParser parser = new DateTimeParser(System.in); - parser.parseLine(); - } catch (Exception x) { - x.printStackTrace(); - return; - } - } - } - - private static int parseDigits(Token token) { - return Integer.parseInt(token.image, 10); - } - - private static int getMilitaryZoneOffset(char c) { - if (ignoreMilitaryZoneOffset) - return 0; - - c = Character.toUpperCase(c); - - switch (c) { - case 'A': return 1; - case 'B': return 2; - case 'C': return 3; - case 'D': return 4; - case 'E': return 5; - case 'F': return 6; - case 'G': return 7; - case 'H': return 8; - case 'I': return 9; - case 'K': return 10; - case 'L': return 11; - case 'M': return 12; - - case 'N': return -1; - case 'O': return -2; - case 'P': return -3; - case 'Q': return -4; - case 'R': return -5; - case 'S': return -6; - case 'T': return -7; - case 'U': return -8; - case 'V': return -9; - case 'W': return -10; - case 'X': return -11; - case 'Y': return -12; - - case 'Z': return 0; - default: return 0; - } - } - - private static class Time { - private int hour; - private int minute; - private int second; - private int zone; - - public Time(int hour, int minute, int second, int zone) { - this.hour = hour; - this.minute = minute; - this.second = second; - this.zone = zone; - } - - public int getHour() { return hour; } - public int getMinute() { return minute; } - public int getSecond() { return second; } - public int getZone() { return zone; } - } - - private static class Date { - private String year; - private int month; - private int day; - - public Date(String year, int month, int day) { - this.year = year; - this.month = month; - this.day = day; - } - - public String getYear() { return year; } - public int getMonth() { return month; } - public int getDay() { return day; } - } - - final public DateTime parseLine() throws ParseException { - DateTime dt; - dt = date_time(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - jj_consume_token(1); - break; - default: - jj_la1[0] = jj_gen; - ; - } - jj_consume_token(2); - {if (true) return dt;} - throw new Error("Missing return statement in function"); - } - - final public DateTime parseAll() throws ParseException { - DateTime dt; - dt = date_time(); - jj_consume_token(0); - {if (true) return dt;} - throw new Error("Missing return statement in function"); - } - - final public DateTime date_time() throws ParseException { - Date d; Time t; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - day_of_week(); - jj_consume_token(3); - break; - default: - jj_la1[1] = jj_gen; - ; - } - d = date(); - t = time(); - {if (true) return new DateTime( - d.getYear(), - d.getMonth(), - d.getDay(), - t.getHour(), - t.getMinute(), - t.getSecond(), - t.getZone());} // time zone offset - - throw new Error("Missing return statement in function"); - } - - final public String day_of_week() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - jj_consume_token(4); - break; - case 5: - jj_consume_token(5); - break; - case 6: - jj_consume_token(6); - break; - case 7: - jj_consume_token(7); - break; - case 8: - jj_consume_token(8); - break; - case 9: - jj_consume_token(9); - break; - case 10: - jj_consume_token(10); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return token.image;} - throw new Error("Missing return statement in function"); - } - - final public Date date() throws ParseException { - int d, m; String y; - d = day(); - m = month(); - y = year(); - {if (true) return new Date(y, m, d);} - throw new Error("Missing return statement in function"); - } - - final public int day() throws ParseException { - Token t; - t = jj_consume_token(DIGITS); - {if (true) return parseDigits(t);} - throw new Error("Missing return statement in function"); - } - - final public int month() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 11: - jj_consume_token(11); - {if (true) return 1;} - break; - case 12: - jj_consume_token(12); - {if (true) return 2;} - break; - case 13: - jj_consume_token(13); - {if (true) return 3;} - break; - case 14: - jj_consume_token(14); - {if (true) return 4;} - break; - case 15: - jj_consume_token(15); - {if (true) return 5;} - break; - case 16: - jj_consume_token(16); - {if (true) return 6;} - break; - case 17: - jj_consume_token(17); - {if (true) return 7;} - break; - case 18: - jj_consume_token(18); - {if (true) return 8;} - break; - case 19: - jj_consume_token(19); - {if (true) return 9;} - break; - case 20: - jj_consume_token(20); - {if (true) return 10;} - break; - case 21: - jj_consume_token(21); - {if (true) return 11;} - break; - case 22: - jj_consume_token(22); - {if (true) return 12;} - break; - default: - jj_la1[3] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - final public String year() throws ParseException { - Token t; - t = jj_consume_token(DIGITS); - {if (true) return t.image;} - throw new Error("Missing return statement in function"); - } - - final public Time time() throws ParseException { - int h, m, s=0, z; - h = hour(); - jj_consume_token(23); - m = minute(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 23: - jj_consume_token(23); - s = second(); - break; - default: - jj_la1[4] = jj_gen; - ; - } - z = zone(); - {if (true) return new Time(h, m, s, z);} - throw new Error("Missing return statement in function"); - } - - final public int hour() throws ParseException { - Token t; - t = jj_consume_token(DIGITS); - {if (true) return parseDigits(t);} - throw new Error("Missing return statement in function"); - } - - final public int minute() throws ParseException { - Token t; - t = jj_consume_token(DIGITS); - {if (true) return parseDigits(t);} - throw new Error("Missing return statement in function"); - } - - final public int second() throws ParseException { - Token t; - t = jj_consume_token(DIGITS); - {if (true) return parseDigits(t);} - throw new Error("Missing return statement in function"); - } - - final public int zone() throws ParseException { - Token t, u; int z; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OFFSETDIR: - t = jj_consume_token(OFFSETDIR); - u = jj_consume_token(DIGITS); - z=parseDigits(u)*(t.image.equals("-") ? -1 : 1); - break; - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case MILITARY_ZONE: - z = obs_zone(); - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return z;} - throw new Error("Missing return statement in function"); - } - - final public int obs_zone() throws ParseException { - Token t; int z; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 25: - jj_consume_token(25); - z=0; - break; - case 26: - jj_consume_token(26); - z=0; - break; - case 27: - jj_consume_token(27); - z=-5; - break; - case 28: - jj_consume_token(28); - z=-4; - break; - case 29: - jj_consume_token(29); - z=-6; - break; - case 30: - jj_consume_token(30); - z=-5; - break; - case 31: - jj_consume_token(31); - z=-7; - break; - case 32: - jj_consume_token(32); - z=-6; - break; - case 33: - jj_consume_token(33); - z=-8; - break; - case 34: - jj_consume_token(34); - z=-7; - break; - case MILITARY_ZONE: - t = jj_consume_token(MILITARY_ZONE); - z=getMilitaryZoneOffset(t.image.charAt(0)); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return z * 100;} - throw new Error("Missing return statement in function"); - } - - public DateTimeParserTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private int jj_gen; - final private int[] jj_la1 = new int[7]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static { - jj_la1_0(); - jj_la1_1(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x2,0x7f0,0x7f0,0x7ff800,0x800000,0xff000000,0xfe000000,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0xf,0xf,}; - } - - public DateTimeParser(java.io.InputStream stream) { - this(stream, null); - } - public DateTimeParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new DateTimeParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - public DateTimeParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new DateTimeParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - public DateTimeParser(DateTimeParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - public void ReInit(DateTimeParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 7; i++) jj_la1[i] = -1; - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private Vector jj_expentries = new Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[49]; - for (int i = 0; i < 49; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 7; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<", - "\"\\r\"", - "\"\\n\"", - "\",\"", - "\"Mon\"", - "\"Tue\"", - "\"Wed\"", - "\"Thu\"", - "\"Fri\"", - "\"Sat\"", - "\"Sun\"", - "\"Jan\"", - "\"Feb\"", - "\"Mar\"", - "\"Apr\"", - "\"May\"", - "\"Jun\"", - "\"Jul\"", - "\"Aug\"", - "\"Sep\"", - "\"Oct\"", - "\"Nov\"", - "\"Dec\"", - "\":\"", - "", - "\"UT\"", - "\"GMT\"", - "\"EST\"", - "\"EDT\"", - "\"CST\"", - "\"CDT\"", - "\"MST\"", - "\"MDT\"", - "\"PST\"", - "\"PDT\"", - "", - "", - "\"(\"", - "\")\"", - "", - "\"(\"", - "", - "", - "\"(\"", - "\")\"", - "", - "", - "", - "", - }; - -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java b/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java deleted file mode 100644 index 4b2d2fd95..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java +++ /dev/null @@ -1,882 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. DateTimeParserTokenManager.java */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; -import org.apache.james.mime4j.field.datetime.DateTime; -import java.util.Calendar; - -public class DateTimeParserTokenManager implements DateTimeParserConstants -{ - // Keeps track of how many levels of comment nesting - // we've encountered. This is only used when the 2nd - // level is reached, for example ((this)), not (this). - // This is because the outermost level must be treated - // specially anyway, because the outermost ")" has a - // different token type than inner ")" instances. - static int commentNest; - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - case 0: - if ((active0 & 0x7fe7cf7f0L) != 0L) - { - jjmatchedKind = 35; - return -1; - } - return -1; - case 1: - if ((active0 & 0x7fe7cf7f0L) != 0L) - { - if (jjmatchedPos == 0) - { - jjmatchedKind = 35; - jjmatchedPos = 0; - } - return -1; - } - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 10: - return jjStopAtPos(0, 2); - case 13: - return jjStopAtPos(0, 1); - case 40: - return jjStopAtPos(0, 37); - case 44: - return jjStopAtPos(0, 3); - case 58: - return jjStopAtPos(0, 23); - case 65: - return jjMoveStringLiteralDfa1_0(0x44000L); - case 67: - return jjMoveStringLiteralDfa1_0(0x60000000L); - case 68: - return jjMoveStringLiteralDfa1_0(0x400000L); - case 69: - return jjMoveStringLiteralDfa1_0(0x18000000L); - case 70: - return jjMoveStringLiteralDfa1_0(0x1100L); - case 71: - return jjMoveStringLiteralDfa1_0(0x4000000L); - case 74: - return jjMoveStringLiteralDfa1_0(0x30800L); - case 77: - return jjMoveStringLiteralDfa1_0(0x18000a010L); - case 78: - return jjMoveStringLiteralDfa1_0(0x200000L); - case 79: - return jjMoveStringLiteralDfa1_0(0x100000L); - case 80: - return jjMoveStringLiteralDfa1_0(0x600000000L); - case 83: - return jjMoveStringLiteralDfa1_0(0x80600L); - case 84: - return jjMoveStringLiteralDfa1_0(0xa0L); - case 85: - return jjMoveStringLiteralDfa1_0(0x2000000L); - case 87: - return jjMoveStringLiteralDfa1_0(0x40L); - default : - return jjMoveNfa_0(0, 0); - } -} -private final int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0); - return 1; - } - switch(curChar) - { - case 68: - return jjMoveStringLiteralDfa2_0(active0, 0x550000000L); - case 77: - return jjMoveStringLiteralDfa2_0(active0, 0x4000000L); - case 83: - return jjMoveStringLiteralDfa2_0(active0, 0x2a8000000L); - case 84: - if ((active0 & 0x2000000L) != 0L) - return jjStopAtPos(1, 25); - break; - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0xaa00L); - case 99: - return jjMoveStringLiteralDfa2_0(active0, 0x100000L); - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x481040L); - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x80L); - case 111: - return jjMoveStringLiteralDfa2_0(active0, 0x200010L); - case 112: - return jjMoveStringLiteralDfa2_0(active0, 0x4000L); - case 114: - return jjMoveStringLiteralDfa2_0(active0, 0x100L); - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x70420L); - default : - break; - } - return jjStartNfa_0(0, active0); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0); - return 2; - } - switch(curChar) - { - case 84: - if ((active0 & 0x4000000L) != 0L) - return jjStopAtPos(2, 26); - else if ((active0 & 0x8000000L) != 0L) - return jjStopAtPos(2, 27); - else if ((active0 & 0x10000000L) != 0L) - return jjStopAtPos(2, 28); - else if ((active0 & 0x20000000L) != 0L) - return jjStopAtPos(2, 29); - else if ((active0 & 0x40000000L) != 0L) - return jjStopAtPos(2, 30); - else if ((active0 & 0x80000000L) != 0L) - return jjStopAtPos(2, 31); - else if ((active0 & 0x100000000L) != 0L) - return jjStopAtPos(2, 32); - else if ((active0 & 0x200000000L) != 0L) - return jjStopAtPos(2, 33); - else if ((active0 & 0x400000000L) != 0L) - return jjStopAtPos(2, 34); - break; - case 98: - if ((active0 & 0x1000L) != 0L) - return jjStopAtPos(2, 12); - break; - case 99: - if ((active0 & 0x400000L) != 0L) - return jjStopAtPos(2, 22); - break; - case 100: - if ((active0 & 0x40L) != 0L) - return jjStopAtPos(2, 6); - break; - case 101: - if ((active0 & 0x20L) != 0L) - return jjStopAtPos(2, 5); - break; - case 103: - if ((active0 & 0x40000L) != 0L) - return jjStopAtPos(2, 18); - break; - case 105: - if ((active0 & 0x100L) != 0L) - return jjStopAtPos(2, 8); - break; - case 108: - if ((active0 & 0x20000L) != 0L) - return jjStopAtPos(2, 17); - break; - case 110: - if ((active0 & 0x10L) != 0L) - return jjStopAtPos(2, 4); - else if ((active0 & 0x400L) != 0L) - return jjStopAtPos(2, 10); - else if ((active0 & 0x800L) != 0L) - return jjStopAtPos(2, 11); - else if ((active0 & 0x10000L) != 0L) - return jjStopAtPos(2, 16); - break; - case 112: - if ((active0 & 0x80000L) != 0L) - return jjStopAtPos(2, 19); - break; - case 114: - if ((active0 & 0x2000L) != 0L) - return jjStopAtPos(2, 13); - else if ((active0 & 0x4000L) != 0L) - return jjStopAtPos(2, 14); - break; - case 116: - if ((active0 & 0x200L) != 0L) - return jjStopAtPos(2, 9); - else if ((active0 & 0x100000L) != 0L) - return jjStopAtPos(2, 20); - break; - case 117: - if ((active0 & 0x80L) != 0L) - return jjStopAtPos(2, 7); - break; - case 118: - if ((active0 & 0x200000L) != 0L) - return jjStopAtPos(2, 21); - break; - case 121: - if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(2, 15); - break; - default : - break; - } - return jjStartNfa_0(1, active0); -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} -private final int jjMoveNfa_0(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 4; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x3ff000000000000L & l) != 0L) - { - if (kind > 46) - kind = 46; - jjCheckNAdd(3); - } - else if ((0x100000200L & l) != 0L) - { - if (kind > 36) - kind = 36; - jjCheckNAdd(2); - } - else if ((0x280000000000L & l) != 0L) - { - if (kind > 24) - kind = 24; - } - break; - case 2: - if ((0x100000200L & l) == 0L) - break; - kind = 36; - jjCheckNAdd(2); - break; - case 3: - if ((0x3ff000000000000L & l) == 0L) - break; - kind = 46; - jjCheckNAdd(3); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x7fffbfe07fffbfeL & l) != 0L) - kind = 35; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 4 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_1(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_1(int pos, long active0) -{ - return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_1(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_1(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 40); - case 41: - return jjStopAtPos(0, 38); - default : - return jjMoveNfa_1(0, 0); - } -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_1(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 41) - kind = 41; - break; - case 1: - if (kind > 39) - kind = 39; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 41) - kind = 41; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 39) - kind = 39; - break; - case 2: - if (kind > 41) - kind = 41; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 41) - kind = 41; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 39) - kind = 39; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_2(int pos, long active0) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_2(int pos, long active0) -{ - return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1); -} -private final int jjStartNfaWithStates_2(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_2(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 43); - case 41: - return jjStopAtPos(0, 44); - default : - return jjMoveNfa_2(0, 0); - } -} -private final int jjMoveNfa_2(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 3; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 45) - kind = 45; - break; - case 1: - if (kind > 42) - kind = 42; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 45) - kind = 45; - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 1; - break; - case 1: - if (kind > 42) - kind = 42; - break; - case 2: - if (kind > 45) - kind = 45; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 45) - kind = 45; - break; - case 1: - if ((jjbitVec0[i2] & l2) != 0L && kind > 42) - kind = 42; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { -}; -public static final String[] jjstrLiteralImages = { -"", "\15", "\12", "\54", "\115\157\156", "\124\165\145", "\127\145\144", -"\124\150\165", "\106\162\151", "\123\141\164", "\123\165\156", "\112\141\156", -"\106\145\142", "\115\141\162", "\101\160\162", "\115\141\171", "\112\165\156", -"\112\165\154", "\101\165\147", "\123\145\160", "\117\143\164", "\116\157\166", -"\104\145\143", "\72", null, "\125\124", "\107\115\124", "\105\123\124", "\105\104\124", -"\103\123\124", "\103\104\124", "\115\123\124", "\115\104\124", "\120\123\124", -"\120\104\124", null, null, null, null, null, null, null, null, null, null, null, null, null, -null, }; -public static final String[] lexStateNames = { - "DEFAULT", - "INCOMMENT", - "NESTED_COMMENT", -}; -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0x400fffffffffL, -}; -static final long[] jjtoSkip = { - 0x5000000000L, -}; -static final long[] jjtoSpecial = { - 0x1000000000L, -}; -static final long[] jjtoMore = { - 0x3fa000000000L, -}; -protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[4]; -private final int[] jjstateSet = new int[8]; -StringBuffer image; -int jjimageLen; -int lengthOfMatch; -protected char curChar; -public DateTimeParserTokenManager(SimpleCharStream stream){ - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public DateTimeParserTokenManager(SimpleCharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} -public void ReInit(SimpleCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 4; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(SimpleCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 3 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public Token getNextToken() -{ - int kind; - Token specialToken = null; - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - image = null; - jjimageLen = 0; - - for (;;) - { - switch(curLexState) - { - case 0: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - break; - case 1: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_1(); - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - return matchedToken; - } - else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (specialToken == null) - specialToken = matchedToken; - else - { - matchedToken.specialToken = specialToken; - specialToken = (specialToken.next = matchedToken); - } - } - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - continue EOFLoop; - } - MoreLexicalActions(); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - curPos = 0; - jjmatchedKind = 0x7fffffff; - try { - curChar = input_stream.readChar(); - continue; - } - catch (java.io.IOException e1) { } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } - } -} - -void MoreLexicalActions() -{ - jjimageLen += (lengthOfMatch = jjmatchedPos + 1); - switch(jjmatchedKind) - { - case 39 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 40 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - commentNest = 1; - break; - case 42 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - image.deleteCharAt(image.length() - 2); - break; - case 43 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - ++commentNest; - break; - case 44 : - if (image == null) - image = new StringBuffer(); - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT); - break; - default : - break; - } -} -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/ParseException.java b/apache/org/apache/james/mime4j/field/datetime/parser/ParseException.java deleted file mode 100644 index 13b3ff097..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/ParseException.java +++ /dev/null @@ -1,207 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java b/apache/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java deleted file mode 100644 index 2724529f7..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java +++ /dev/null @@ -1,454 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public class SimpleCharStream -{ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; - public int bufpos = -1; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - - public char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = buffer[bufpos]; - - UpdateLineColumn(c); - return (c); - } - - /** - * @deprecated - * @see #getEndColumn - */ - @Deprecated - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - @Deprecated - public int getLine() { - return bufline[bufpos]; - } - - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - public int getEndLine() { - return bufline[bufpos]; - } - - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public int getBeginLine() { - return bufline[tokenBegin]; - } - - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/Token.java b/apache/org/apache/james/mime4j/field/datetime/parser/Token.java deleted file mode 100644 index 0927a0921..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/Token.java +++ /dev/null @@ -1,96 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} diff --git a/apache/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java b/apache/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java deleted file mode 100644 index e7043c1b7..000000000 --- a/apache/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java +++ /dev/null @@ -1,148 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -/* - * Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} diff --git a/apache/org/apache/james/mime4j/util/CharsetUtil.java b/apache/org/apache/james/mime4j/util/CharsetUtil.java deleted file mode 100644 index 4e712fcdd..000000000 --- a/apache/org/apache/james/mime4j/util/CharsetUtil.java +++ /dev/null @@ -1,1249 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you 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 org.apache.james.mime4j.util; - -import java.io.UnsupportedEncodingException; -import java.nio.charset.IllegalCharsetNameException; -import java.nio.charset.UnsupportedCharsetException; -import java.util.HashMap; -import java.util.Locale; -import java.util.TreeSet; - -//BEGIN android-changed: Stubbing out logging -import org.apache.james.mime4j.Log; -import org.apache.james.mime4j.LogFactory; -//END android-changed - -/** - * Utility class for working with character sets. It is somewhat similar to - * the Java 1.4 java.nio.charset.Charset class but knows many - * more aliases and is compatible with Java 1.3. It will use a simple detection - * mechanism to detect what character sets the current VM supports. This will - * be a sub-set of the character sets listed in the - * - * Java 1.5 (J2SE5.0) Supported Encodings document. - *

- * The - * IANA Character Sets document has been used to determine the preferred - * MIME character set names and to get a list of known aliases. - *

- * This is a complete list of the character sets known to this class: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Canonical (Java) nameMIME preferredAliases
ASCIIUS-ASCIIANSI_X3.4-1968 iso-ir-6 ANSI_X3.4-1986 ISO_646.irv:1991 ISO646-US us IBM367 cp367 csASCII ascii7 646 iso_646.irv:1983
Big5Big5csBig5 CN-Big5 BIG-FIVE BIGFIVE
Big5_HKSCSBig5-HKSCSbig5hkscs
Big5_Solaris?
Cp037IBM037ebcdic-cp-us ebcdic-cp-ca ebcdic-cp-wt ebcdic-cp-nl csIBM037
Cp1006?
Cp1025?
Cp1026IBM1026csIBM1026
Cp1046?
Cp1047IBM1047IBM-1047
Cp1097?
Cp1098?
Cp1112?
Cp1122?
Cp1123?
Cp1124?
Cp1140IBM01140CCSID01140 CP01140 ebcdic-us-37+euro
Cp1141IBM01141CCSID01141 CP01141 ebcdic-de-273+euro
Cp1142IBM01142CCSID01142 CP01142 ebcdic-dk-277+euro ebcdic-no-277+euro
Cp1143IBM01143CCSID01143 CP01143 ebcdic-fi-278+euro ebcdic-se-278+euro
Cp1144IBM01144CCSID01144 CP01144 ebcdic-it-280+euro
Cp1145IBM01145CCSID01145 CP01145 ebcdic-es-284+euro
Cp1146IBM01146CCSID01146 CP01146 ebcdic-gb-285+euro
Cp1147IBM01147CCSID01147 CP01147 ebcdic-fr-297+euro
Cp1148IBM01148CCSID01148 CP01148 ebcdic-international-500+euro
Cp1149IBM01149CCSID01149 CP01149 ebcdic-is-871+euro
Cp1250windows-1250
Cp1251windows-1251
Cp1252windows-1252
Cp1253windows-1253
Cp1254windows-1254
Cp1255windows-1255
Cp1256windows-1256
Cp1257windows-1257
Cp1258windows-1258
Cp1381?
Cp1383?
Cp273IBM273csIBM273
Cp277IBM277EBCDIC-CP-DK EBCDIC-CP-NO csIBM277
Cp278IBM278CP278 ebcdic-cp-fi ebcdic-cp-se csIBM278
Cp280IBM280ebcdic-cp-it csIBM280
Cp284IBM284ebcdic-cp-es csIBM284
Cp285IBM285ebcdic-cp-gb csIBM285
Cp297IBM297ebcdic-cp-fr csIBM297
Cp33722?
Cp420IBM420ebcdic-cp-ar1 csIBM420
Cp424IBM424ebcdic-cp-he csIBM424
Cp437IBM437437 csPC8CodePage437
Cp500IBM500ebcdic-cp-be ebcdic-cp-ch csIBM500
Cp737?
Cp775IBM775csPC775Baltic
Cp838IBM-Thai
Cp850IBM850850 csPC850Multilingual
Cp852IBM852852 csPCp852
Cp855IBM855855 csIBM855
Cp856?
Cp857IBM857857 csIBM857
Cp858IBM00858CCSID00858 CP00858 PC-Multilingual-850+euro
Cp860IBM860860 csIBM860
Cp861IBM861861 cp-is csIBM861
Cp862IBM862862 csPC862LatinHebrew
Cp863IBM863863 csIBM863
Cp864IBM864cp864 csIBM864
Cp865IBM865865 csIBM865
Cp866IBM866866 csIBM866
Cp868IBM868cp-ar csIBM868
Cp869IBM869cp-gr csIBM869
Cp870IBM870ebcdic-cp-roece ebcdic-cp-yu csIBM870
Cp871IBM871ebcdic-cp-is csIBM871
Cp875?
Cp918IBM918ebcdic-cp-ar2 csIBM918
Cp921?
Cp922?
Cp930?
Cp933?
Cp935?
Cp937?
Cp939?
Cp942?
Cp942C?
Cp943?
Cp943C?
Cp948?
Cp949?
Cp949C?
Cp950?
Cp964?
Cp970?
EUC_CNGB2312x-EUC-CN csGB2312 euccn euc-cn gb2312-80 gb2312-1980 CN-GB CN-GB-ISOIR165
EUC_JPEUC-JPcsEUCPkdFmtJapanese Extended_UNIX_Code_Packed_Format_for_Japanese eucjis x-eucjp eucjp x-euc-jp
EUC_JP_LINUX?
EUC_JP_Solaris?
EUC_KREUC-KRcsEUCKR ksc5601 5601 ksc5601_1987 ksc_5601 ksc5601-1987 ks_c_5601-1987 euckr
EUC_TWEUC-TWx-EUC-TW cns11643 euctw
GB18030GB18030gb18030-2000
GBKwindows-936CP936 MS936 ms_936 x-mswin-936
ISCII91?x-ISCII91 iscii
ISO2022CNISO-2022-CN
ISO2022JPISO-2022-JPcsISO2022JP JIS jis_encoding csjisencoding
ISO2022KRISO-2022-KRcsISO2022KR
ISO2022_CN_CNS?
ISO2022_CN_GB?
ISO8859_1ISO-8859-1ISO_8859-1:1987 iso-ir-100 ISO_8859-1 latin1 l1 IBM819 CP819 csISOLatin1 8859_1 819 IBM-819 ISO8859-1 ISO_8859_1
ISO8859_13ISO-8859-13
ISO8859_15ISO-8859-15ISO_8859-15 Latin-9 8859_15 csISOlatin9 IBM923 cp923 923 L9 IBM-923 ISO8859-15 LATIN9 LATIN0 csISOlatin0 ISO8859_15_FDIS
ISO8859_2ISO-8859-2ISO_8859-2:1987 iso-ir-101 ISO_8859-2 latin2 l2 csISOLatin2 8859_2 iso8859_2
ISO8859_3ISO-8859-3ISO_8859-3:1988 iso-ir-109 ISO_8859-3 latin3 l3 csISOLatin3 8859_3
ISO8859_4ISO-8859-4ISO_8859-4:1988 iso-ir-110 ISO_8859-4 latin4 l4 csISOLatin4 8859_4
ISO8859_5ISO-8859-5ISO_8859-5:1988 iso-ir-144 ISO_8859-5 cyrillic csISOLatinCyrillic 8859_5
ISO8859_6ISO-8859-6ISO_8859-6:1987 iso-ir-127 ISO_8859-6 ECMA-114 ASMO-708 arabic csISOLatinArabic 8859_6
ISO8859_7ISO-8859-7ISO_8859-7:1987 iso-ir-126 ISO_8859-7 ELOT_928 ECMA-118 greek greek8 csISOLatinGreek 8859_7 sun_eu_greek
ISO8859_8ISO-8859-8ISO_8859-8:1988 iso-ir-138 ISO_8859-8 hebrew csISOLatinHebrew 8859_8
ISO8859_9ISO-8859-9ISO_8859-9:1989 iso-ir-148 ISO_8859-9 latin5 l5 csISOLatin5 8859_9
JISAutoDetect?
JIS_C6626-1983JIS_C6626-1983x-JIS0208 JIS0208 csISO87JISX0208 x0208 JIS_X0208-1983 iso-ir-87
JIS_X0201JIS_X0201X0201 JIS0201 csHalfWidthKatakana
JIS_X0212-1990JIS_X0212-1990iso-ir-159 x0212 JIS0212 csISO159JISX02121990
KOI8_RKOI8-RcsKOI8R koi8
MS874windows-874cp874
MS932Windows-31Jwindows-932 csWindows31J x-ms-cp932
MS949windows-949windows949 ms_949 x-windows-949
MS950windows-950x-windows-950
MS950_HKSCS
MacArabic?
MacCentralEurope?
MacCroatian?
MacCyrillic?
MacDingbat?
MacGreekMacGreek
MacHebrew?
MacIceland?
MacRomanMacRomanMacintosh MAC csMacintosh
MacRomania?
MacSymbol?
MacThai?
MacTurkish?
MacUkraine?
SJISShift_JISMS_Kanji csShiftJIS shift-jis x-sjis pck
TIS620TIS-620
UTF-16UTF-16UTF_16
UTF8UTF-8
UnicodeBig?
UnicodeBigUnmarkedUTF-16BEX-UTF-16BE UTF_16BE ISO-10646-UCS-2
UnicodeLittle?
UnicodeLittleUnmarkedUTF-16LEUTF_16LE X-UTF-16LE
x-Johabjohabjohab cp1361 ms1361 ksc5601-1992 ksc5601_1992
x-iso-8859-11?
- * - * - * @version $Id: CharsetUtil.java,v 1.1 2004/10/25 07:26:46 ntherning Exp $ - */ -public class CharsetUtil { - private static Log log = LogFactory.getLog(CharsetUtil.class); - - private static class Charset implements Comparable { - private String canonical = null; - private String mime = null; - private String[] aliases = null; - - private Charset(String canonical, String mime, String[] aliases) { - this.canonical = canonical; - this.mime = mime; - this.aliases = aliases; - } - - public int compareTo(Charset c) { - return this.canonical.compareTo(c.canonical); - } - } - - private static Charset[] JAVA_CHARSETS = { - new Charset("ISO8859_1", "ISO-8859-1", - new String[] {"ISO_8859-1:1987", "iso-ir-100", "ISO_8859-1", - "latin1", "l1", "IBM819", "CP819", - "csISOLatin1", "8859_1", "819", "IBM-819", - "ISO8859-1", "ISO_8859_1"}), - new Charset("ISO8859_2", "ISO-8859-2", - new String[] {"ISO_8859-2:1987", "iso-ir-101", "ISO_8859-2", - "latin2", "l2", "csISOLatin2", "8859_2", - "iso8859_2"}), - new Charset("ISO8859_3", "ISO-8859-3", new String[] {"ISO_8859-3:1988", "iso-ir-109", "ISO_8859-3", "latin3", "l3", "csISOLatin3", "8859_3"}), - new Charset("ISO8859_4", "ISO-8859-4", - new String[] {"ISO_8859-4:1988", "iso-ir-110", "ISO_8859-4", - "latin4", "l4", "csISOLatin4", "8859_4"}), - new Charset("ISO8859_5", "ISO-8859-5", - new String[] {"ISO_8859-5:1988", "iso-ir-144", "ISO_8859-5", - "cyrillic", "csISOLatinCyrillic", "8859_5"}), - new Charset("ISO8859_6", "ISO-8859-6", new String[] {"ISO_8859-6:1987", "iso-ir-127", "ISO_8859-6", "ECMA-114", "ASMO-708", "arabic", "csISOLatinArabic", "8859_6"}), - new Charset("ISO8859_7", "ISO-8859-7", - new String[] {"ISO_8859-7:1987", "iso-ir-126", "ISO_8859-7", - "ELOT_928", "ECMA-118", "greek", "greek8", - "csISOLatinGreek", "8859_7", "sun_eu_greek"}), - new Charset("ISO8859_8", "ISO-8859-8", new String[] {"ISO_8859-8:1988", "iso-ir-138", "ISO_8859-8", "hebrew", "csISOLatinHebrew", "8859_8"}), - new Charset("ISO8859_9", "ISO-8859-9", - new String[] {"ISO_8859-9:1989", "iso-ir-148", "ISO_8859-9", - "latin5", "l5", "csISOLatin5", "8859_9"}), - - new Charset("ISO8859_13", "ISO-8859-13", new String[] {}), - new Charset("ISO8859_15", "ISO-8859-15", - new String[] {"ISO_8859-15", "Latin-9", "8859_15", - "csISOlatin9", "IBM923", "cp923", "923", "L9", - "IBM-923", "ISO8859-15", "LATIN9", "LATIN0", - "csISOlatin0", "ISO8859_15_FDIS"}), - new Charset("KOI8_R", "KOI8-R", new String[] {"csKOI8R", "koi8"}), - new Charset("ASCII", "US-ASCII", - new String[] {"ANSI_X3.4-1968", "iso-ir-6", - "ANSI_X3.4-1986", "ISO_646.irv:1991", - "ISO646-US", "us", "IBM367", "cp367", - "csASCII", "ascii7", "646", "iso_646.irv:1983"}), - new Charset("UTF8", "UTF-8", new String[] {}), - new Charset("UTF-16", "UTF-16", new String[] {"UTF_16"}), - new Charset("UnicodeBigUnmarked", "UTF-16BE", new String[] {"X-UTF-16BE", "UTF_16BE", "ISO-10646-UCS-2"}), - new Charset("UnicodeLittleUnmarked", "UTF-16LE", new String[] {"UTF_16LE", "X-UTF-16LE"}), - new Charset("Big5", "Big5", new String[] {"csBig5", "CN-Big5", "BIG-FIVE", "BIGFIVE"}), - new Charset("Big5_HKSCS", "Big5-HKSCS", new String[] {"big5hkscs"}), - new Charset("EUC_JP", "EUC-JP", - new String[] {"csEUCPkdFmtJapanese", - "Extended_UNIX_Code_Packed_Format_for_Japanese", - "eucjis", "x-eucjp", "eucjp", "x-euc-jp"}), - new Charset("EUC_KR", "EUC-KR", - new String[] {"csEUCKR", "ksc5601", "5601", "ksc5601_1987", - "ksc_5601", "ksc5601-1987", "ks_c_5601-1987", - "euckr"}), - new Charset("GB18030", "GB18030", new String[] {"gb18030-2000"}), - new Charset("EUC_CN", "GB2312", new String[] {"x-EUC-CN", "csGB2312", "euccn", "euc-cn", "gb2312-80", "gb2312-1980", "CN-GB", "CN-GB-ISOIR165"}), - new Charset("GBK", "windows-936", new String[] {"CP936", "MS936", "ms_936", "x-mswin-936"}), - - new Charset("Cp037", "IBM037", new String[] {"ebcdic-cp-us", "ebcdic-cp-ca", "ebcdic-cp-wt", "ebcdic-cp-nl", "csIBM037"}), - new Charset("Cp273", "IBM273", new String[] {"csIBM273"}), - new Charset("Cp277", "IBM277", new String[] {"EBCDIC-CP-DK", "EBCDIC-CP-NO", "csIBM277"}), - new Charset("Cp278", "IBM278", new String[] {"CP278", "ebcdic-cp-fi", "ebcdic-cp-se", "csIBM278"}), - new Charset("Cp280", "IBM280", new String[] {"ebcdic-cp-it", "csIBM280"}), - new Charset("Cp284", "IBM284", new String[] {"ebcdic-cp-es", "csIBM284"}), - new Charset("Cp285", "IBM285", new String[] {"ebcdic-cp-gb", "csIBM285"}), - new Charset("Cp297", "IBM297", new String[] {"ebcdic-cp-fr", "csIBM297"}), - new Charset("Cp420", "IBM420", new String[] {"ebcdic-cp-ar1", "csIBM420"}), - new Charset("Cp424", "IBM424", new String[] {"ebcdic-cp-he", "csIBM424"}), - new Charset("Cp437", "IBM437", new String[] {"437", "csPC8CodePage437"}), - new Charset("Cp500", "IBM500", new String[] {"ebcdic-cp-be", "ebcdic-cp-ch", "csIBM500"}), - new Charset("Cp775", "IBM775", new String[] {"csPC775Baltic"}), - new Charset("Cp838", "IBM-Thai", new String[] {}), - new Charset("Cp850", "IBM850", new String[] {"850", "csPC850Multilingual"}), - new Charset("Cp852", "IBM852", new String[] {"852", "csPCp852"}), - new Charset("Cp855", "IBM855", new String[] {"855", "csIBM855"}), - new Charset("Cp857", "IBM857", new String[] {"857", "csIBM857"}), - new Charset("Cp858", "IBM00858", - new String[] {"CCSID00858", "CP00858", - "PC-Multilingual-850+euro"}), - new Charset("Cp860", "IBM860", new String[] {"860", "csIBM860"}), - new Charset("Cp861", "IBM861", new String[] {"861", "cp-is", "csIBM861"}), - new Charset("Cp862", "IBM862", new String[] {"862", "csPC862LatinHebrew"}), - new Charset("Cp863", "IBM863", new String[] {"863", "csIBM863"}), - new Charset("Cp864", "IBM864", new String[] {"cp864", "csIBM864"}), - new Charset("Cp865", "IBM865", new String[] {"865", "csIBM865"}), - new Charset("Cp866", "IBM866", new String[] {"866", "csIBM866"}), - new Charset("Cp868", "IBM868", new String[] {"cp-ar", "csIBM868"}), - new Charset("Cp869", "IBM869", new String[] {"cp-gr", "csIBM869"}), - new Charset("Cp870", "IBM870", new String[] {"ebcdic-cp-roece", "ebcdic-cp-yu", "csIBM870"}), - new Charset("Cp871", "IBM871", new String[] {"ebcdic-cp-is", "csIBM871"}), - new Charset("Cp918", "IBM918", new String[] {"ebcdic-cp-ar2", "csIBM918"}), - new Charset("Cp1026", "IBM1026", new String[] {"csIBM1026"}), - new Charset("Cp1047", "IBM1047", new String[] {"IBM-1047"}), - new Charset("Cp1140", "IBM01140", - new String[] {"CCSID01140", "CP01140", - "ebcdic-us-37+euro"}), - new Charset("Cp1141", "IBM01141", - new String[] {"CCSID01141", "CP01141", - "ebcdic-de-273+euro"}), - new Charset("Cp1142", "IBM01142", new String[] {"CCSID01142", "CP01142", "ebcdic-dk-277+euro", "ebcdic-no-277+euro"}), - new Charset("Cp1143", "IBM01143", new String[] {"CCSID01143", "CP01143", "ebcdic-fi-278+euro", "ebcdic-se-278+euro"}), - new Charset("Cp1144", "IBM01144", new String[] {"CCSID01144", "CP01144", "ebcdic-it-280+euro"}), - new Charset("Cp1145", "IBM01145", new String[] {"CCSID01145", "CP01145", "ebcdic-es-284+euro"}), - new Charset("Cp1146", "IBM01146", new String[] {"CCSID01146", "CP01146", "ebcdic-gb-285+euro"}), - new Charset("Cp1147", "IBM01147", new String[] {"CCSID01147", "CP01147", "ebcdic-fr-297+euro"}), - new Charset("Cp1148", "IBM01148", new String[] {"CCSID01148", "CP01148", "ebcdic-international-500+euro"}), - new Charset("Cp1149", "IBM01149", new String[] {"CCSID01149", "CP01149", "ebcdic-is-871+euro"}), - new Charset("Cp1250", "windows-1250", new String[] {}), - new Charset("Cp1251", "windows-1251", new String[] {}), - new Charset("Cp1252", "windows-1252", new String[] {}), - new Charset("Cp1253", "windows-1253", new String[] {}), - new Charset("Cp1254", "windows-1254", new String[] {}), - new Charset("Cp1255", "windows-1255", new String[] {}), - new Charset("Cp1256", "windows-1256", new String[] {}), - new Charset("Cp1257", "windows-1257", new String[] {}), - new Charset("Cp1258", "windows-1258", new String[] {}), - new Charset("ISO2022CN", "ISO-2022-CN", new String[] {}), - new Charset("ISO2022JP", "ISO-2022-JP", new String[] {"csISO2022JP", "JIS", "jis_encoding", "csjisencoding"}), - new Charset("ISO2022KR", "ISO-2022-KR", new String[] {"csISO2022KR"}), - new Charset("JIS_X0201", "JIS_X0201", new String[] {"X0201", "JIS0201", "csHalfWidthKatakana"}), - new Charset("JIS_X0212-1990", "JIS_X0212-1990", new String[] {"iso-ir-159", "x0212", "JIS0212", "csISO159JISX02121990"}), - new Charset("JIS_C6626-1983", "JIS_C6626-1983", new String[] {"x-JIS0208", "JIS0208", "csISO87JISX0208", "x0208", "JIS_X0208-1983", "iso-ir-87"}), - new Charset("SJIS", "Shift_JIS", new String[] {"MS_Kanji", "csShiftJIS", "shift-jis", "x-sjis", "pck"}), - new Charset("TIS620", "TIS-620", new String[] {}), - new Charset("MS932", "Windows-31J", new String[] {"windows-932", "csWindows31J", "x-ms-cp932"}), - new Charset("EUC_TW", "EUC-TW", new String[] {"x-EUC-TW", "cns11643", "euctw"}), - new Charset("x-Johab", "johab", new String[] {"johab", "cp1361", "ms1361", "ksc5601-1992", "ksc5601_1992"}), - new Charset("MS950_HKSCS", "", new String[] {}), - new Charset("MS874", "windows-874", new String[] {"cp874"}), - new Charset("MS949", "windows-949", new String[] {"windows949", "ms_949", "x-windows-949"}), - new Charset("MS950", "windows-950", new String[] {"x-windows-950"}), - - new Charset("Cp737", null, new String[] {}), - new Charset("Cp856", null, new String[] {}), - new Charset("Cp875", null, new String[] {}), - new Charset("Cp921", null, new String[] {}), - new Charset("Cp922", null, new String[] {}), - new Charset("Cp930", null, new String[] {}), - new Charset("Cp933", null, new String[] {}), - new Charset("Cp935", null, new String[] {}), - new Charset("Cp937", null, new String[] {}), - new Charset("Cp939", null, new String[] {}), - new Charset("Cp942", null, new String[] {}), - new Charset("Cp942C", null, new String[] {}), - new Charset("Cp943", null, new String[] {}), - new Charset("Cp943C", null, new String[] {}), - new Charset("Cp948", null, new String[] {}), - new Charset("Cp949", null, new String[] {}), - new Charset("Cp949C", null, new String[] {}), - new Charset("Cp950", null, new String[] {}), - new Charset("Cp964", null, new String[] {}), - new Charset("Cp970", null, new String[] {}), - new Charset("Cp1006", null, new String[] {}), - new Charset("Cp1025", null, new String[] {}), - new Charset("Cp1046", null, new String[] {}), - new Charset("Cp1097", null, new String[] {}), - new Charset("Cp1098", null, new String[] {}), - new Charset("Cp1112", null, new String[] {}), - new Charset("Cp1122", null, new String[] {}), - new Charset("Cp1123", null, new String[] {}), - new Charset("Cp1124", null, new String[] {}), - new Charset("Cp1381", null, new String[] {}), - new Charset("Cp1383", null, new String[] {}), - new Charset("Cp33722", null, new String[] {}), - new Charset("Big5_Solaris", null, new String[] {}), - new Charset("EUC_JP_LINUX", null, new String[] {}), - new Charset("EUC_JP_Solaris", null, new String[] {}), - new Charset("ISCII91", null, new String[] {"x-ISCII91", "iscii"}), - new Charset("ISO2022_CN_CNS", null, new String[] {}), - new Charset("ISO2022_CN_GB", null, new String[] {}), - new Charset("x-iso-8859-11", null, new String[] {}), - new Charset("JISAutoDetect", null, new String[] {}), - new Charset("MacArabic", null, new String[] {}), - new Charset("MacCentralEurope", null, new String[] {}), - new Charset("MacCroatian", null, new String[] {}), - new Charset("MacCyrillic", null, new String[] {}), - new Charset("MacDingbat", null, new String[] {}), - new Charset("MacGreek", "MacGreek", new String[] {}), - new Charset("MacHebrew", null, new String[] {}), - new Charset("MacIceland", null, new String[] {}), - new Charset("MacRoman", "MacRoman", new String[] {"Macintosh", "MAC", "csMacintosh"}), - new Charset("MacRomania", null, new String[] {}), - new Charset("MacSymbol", null, new String[] {}), - new Charset("MacThai", null, new String[] {}), - new Charset("MacTurkish", null, new String[] {}), - new Charset("MacUkraine", null, new String[] {}), - new Charset("UnicodeBig", null, new String[] {}), - new Charset("UnicodeLittle", null, new String[] {}) - }; - - /** - * Contains the canonical names of character sets which can be used to - * decode bytes into Java chars. - */ - private static TreeSet decodingSupported = null; - - /** - * Contains the canonical names of character sets which can be used to - * encode Java chars into bytes. - */ - private static TreeSet encodingSupported = null; - - /** - * Maps character set names to Charset objects. All possible names of - * a charset will be mapped to the Charset. - */ - private static HashMap charsetMap = null; - - static { - decodingSupported = new TreeSet(); - encodingSupported = new TreeSet(); - byte[] dummy = new byte[] {'d', 'u', 'm', 'm', 'y'}; - for (int i = 0; i < JAVA_CHARSETS.length; i++) { - try { - String s = new String(dummy, JAVA_CHARSETS[i].canonical); - decodingSupported.add(JAVA_CHARSETS[i].canonical.toLowerCase(Locale.US)); - } catch (UnsupportedOperationException e) { - } catch (UnsupportedEncodingException e) { - } - try { - "dummy".getBytes(JAVA_CHARSETS[i].canonical); - encodingSupported.add(JAVA_CHARSETS[i].canonical.toLowerCase(Locale.US)); - } catch (UnsupportedOperationException e) { - } catch (UnsupportedEncodingException e) { - } - } - - charsetMap = new HashMap(); - for (int i = 0; i < JAVA_CHARSETS.length; i++) { - Charset c = JAVA_CHARSETS[i]; - charsetMap.put(c.canonical.toLowerCase(Locale.US), c); - if (c.mime != null) { - charsetMap.put(c.mime.toLowerCase(Locale.US), c); - } - if (c.aliases != null) { - for (int j = 0; j < c.aliases.length; j++) { - charsetMap.put(c.aliases[j].toLowerCase(Locale.US), c); - } - } - } - - if (log.isDebugEnabled()) { - log.debug("Character sets which support decoding: " - + decodingSupported); - log.debug("Character sets which support encoding: " - + encodingSupported); - } - } - - /** - * ANDROID: THE FOLLOWING SET OF STATIC STRINGS ARE COPIED FROM A NEWER VERSION OF MIME4J - */ - - /** carriage return - line feed sequence */ - public static final String CRLF = "\r\n"; - - /** US-ASCII CR, carriage return (13) */ - public static final int CR = '\r'; - - /** US-ASCII LF, line feed (10) */ - public static final int LF = '\n'; - - /** US-ASCII SP, space (32) */ - public static final int SP = ' '; - - /** US-ASCII HT, horizontal-tab (9)*/ - public static final int HT = '\t'; - - public static final java.nio.charset.Charset US_ASCII = java.nio.charset.Charset - .forName("US-ASCII"); - - public static final java.nio.charset.Charset ISO_8859_1 = java.nio.charset.Charset - .forName("ISO-8859-1"); - - public static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset - .forName("UTF-8"); - - /** - * Returns true if the specified character is a whitespace - * character (CR, LF, SP or HT). - * - * ANDROID: COPIED FROM A NEWER VERSION OF MIME4J - * - * @param ch - * character to test. - * @return true if the specified character is a whitespace - * character, false otherwise. - */ - public static boolean isWhitespace(char ch) { - return ch == SP || ch == HT || ch == CR || ch == LF; - } - - /** - * Returns true if the specified string consists entirely of - * whitespace characters. - * - * ANDROID: COPIED FROM A NEWER VERSION OF MIME4J - * - * @param s - * string to test. - * @return true if the specified string consists entirely of - * whitespace characters, false otherwise. - */ - public static boolean isWhitespace(final String s) { - if (s == null) { - throw new IllegalArgumentException("String may not be null"); - } - final int len = s.length(); - for (int i = 0; i < len; i++) { - if (!isWhitespace(s.charAt(i))) { - return false; - } - } - return true; - } - - /** - * Determines if the VM supports encoding (chars to bytes) the - * specified character set. NOTE: the given character set name may - * not be known to the VM even if this method returns true. - * Use {@link #toJavaCharset(String)} to get the canonical Java character - * set name. - * - * @param charsetName the characters set name. - * @return true if encoding is supported, false - * otherwise. - */ - public static boolean isEncodingSupported(String charsetName) { - return encodingSupported.contains(charsetName.toLowerCase(Locale.US)); - } - - /** - * Determines if the VM supports decoding (bytes to chars) the - * specified character set. NOTE: the given character set name may - * not be known to the VM even if this method returns true. - * Use {@link #toJavaCharset(String)} to get the canonical Java character - * set name. - * - * @param charsetName the characters set name. - * @return true if decoding is supported, false - * otherwise. - */ - public static boolean isDecodingSupported(String charsetName) { - return decodingSupported.contains(charsetName.toLowerCase(Locale.US)); - } - - /** - * Gets the preferred MIME character set name for the specified - * character set or null if not known. - * - * @param charsetName the character set name to look for. - * @return the MIME preferred name or null if not known. - */ - public static String toMimeCharset(String charsetName) { - Charset c = charsetMap.get(charsetName.toLowerCase(Locale.US)); - if (c != null) { - return c.mime; - } - return null; - } - - /** - * Gets the canonical Java character set name for the specified - * character set or null if not known. This should be - * called before doing any conversions using the Java API. NOTE: - * you must use {@link #isEncodingSupported(String)} or - * {@link #isDecodingSupported(String)} to make sure the returned - * Java character set is supported by the current VM. - * - * @param charsetName the character set name to look for. - * @return the canonical Java name or null if not known. - */ - public static String toJavaCharset(String charsetName) { - Charset c = charsetMap.get(charsetName.toLowerCase(Locale.US)); - if (c != null) { - return c.canonical; - } - return null; - } - - public static java.nio.charset.Charset getCharset(String charsetName) { - String defaultCharset = "ISO-8859-1"; - - // Use the default chareset if given charset is null - if(charsetName == null) charsetName = defaultCharset; - - try { - return java.nio.charset.Charset.forName(charsetName); - } catch (IllegalCharsetNameException e) { - log.info("Illegal charset " + charsetName + ", fallback to " + - defaultCharset + ": " + e); - // Use default charset on exception - return java.nio.charset.Charset.forName(defaultCharset); - } catch (UnsupportedCharsetException ex) { - log.info("Unsupported charset " + charsetName + ", fallback to " + - defaultCharset + ": " + ex); - // Use default charset on exception - return java.nio.charset.Charset.forName(defaultCharset); - } - - } - /* - * Uncomment the code below and run the main method to regenerate the - * Javadoc table above when the known charsets change. - */ - - /* - private static String dumpHtmlTable() { - LinkedList l = new LinkedList(Arrays.asList(JAVA_CHARSETS)); - Collections.sort(l); - StringBuffer sb = new StringBuffer(); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - - for (Iterator it = l.iterator(); it.hasNext();) { - Charset c = (Charset) it.next(); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - sb.append(" * \n"); - } - sb.append(" *
Canonical (Java) nameMIME preferredAliases
" + c.canonical + "" + (c.mime == null ? "?" : c.mime)+ ""); - for (int i = 0; c.aliases != null && i < c.aliases.length; i++) { - sb.append(c.aliases[i] + " "); - } - sb.append("
\n"); - return sb.toString(); - } - - public static void main(String[] args) { - System.out.println(dumpHtmlTable()); - }*/ -} \ No newline at end of file diff --git a/assets/quantum/res/drawable/quantum_ic_business_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_business_vd_theme_24.xml new file mode 100644 index 000000000..5fc1cef03 --- /dev/null +++ b/assets/quantum/res/drawable/quantum_ic_business_vd_theme_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/assets/quantum/res/drawable/quantum_ic_report_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_report_vd_theme_24.xml new file mode 100644 index 000000000..d8544cb9b --- /dev/null +++ b/assets/quantum/res/drawable/quantum_ic_report_vd_theme_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/assets/quantum/res/drawable/quantum_ic_voicemail_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_voicemail_vd_theme_24.xml new file mode 100644 index 000000000..d7e79d799 --- /dev/null +++ b/assets/quantum/res/drawable/quantum_ic_voicemail_vd_theme_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/java/com/android/contacts/common/ContactPhotoManager.java b/java/com/android/contacts/common/ContactPhotoManager.java index 9e627ae1f..652e93637 100644 --- a/java/com/android/contacts/common/ContactPhotoManager.java +++ b/java/com/android/contacts/common/ContactPhotoManager.java @@ -39,6 +39,7 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { /** Contact type constants used for default letter images */ public static final int TYPE_PERSON = LetterTileDrawable.TYPE_PERSON; + public static final int TYPE_SPAM = LetterTileDrawable.TYPE_SPAM; public static final int TYPE_BUSINESS = LetterTileDrawable.TYPE_BUSINESS; public static final int TYPE_VOICEMAIL = LetterTileDrawable.TYPE_VOICEMAIL; public static final int TYPE_DEFAULT = LetterTileDrawable.TYPE_DEFAULT; @@ -235,8 +236,13 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { loadThumbnail(view, photoId, darkTheme, isCircular, defaultImageRequest, DEFAULT_AVATAR); } - public final void loadDialerThumbnail( - QuickContactBadge badge, Uri contactUri, long photoId, String displayName, int contactType) { + public final void loadDialerThumbnailOrPhoto( + QuickContactBadge badge, + Uri contactUri, + long photoId, + Uri photoUri, + String displayName, + int contactType) { badge.assignContactUri(contactUri); badge.setOverlay(null); @@ -244,8 +250,11 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { ContactPhotoManager.DefaultImageRequest request = new ContactPhotoManager.DefaultImageRequest( displayName, lookupKey, contactType, true /* isCircular */); - loadThumbnail( - badge, photoId, false /* darkTheme */, true /* isCircular */, request, DEFAULT_AVATAR); + if (photoId == 0 && photoUri != null) { + loadDirectoryPhoto(badge, photoUri, false /* darkTheme */, true /* isCircular */, request); + } else { + loadThumbnail(badge, photoId, false /* darkTheme */, true /* isCircular */, request); + } } /** @@ -500,4 +509,3 @@ public abstract class ContactPhotoManager implements ComponentCallbacks2 { } } } - diff --git a/java/com/android/contacts/common/dialog/CallSubjectDialog.java b/java/com/android/contacts/common/dialog/CallSubjectDialog.java index 5e0d6b58a..117ac5e4e 100644 --- a/java/com/android/contacts/common/dialog/CallSubjectDialog.java +++ b/java/com/android/contacts/common/dialog/CallSubjectDialog.java @@ -47,8 +47,8 @@ import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.R; import com.android.contacts.common.compat.telecom.TelecomManagerCompat; import com.android.dialer.animation.AnimUtils; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; -import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.common.LogUtil; import com.android.dialer.util.ViewUtil; import java.nio.charset.Charset; @@ -65,7 +65,7 @@ public class CallSubjectDialog extends Activity { public static final String PREF_KEY_SUBJECT_HISTORY_ITEM = "subject_history_item"; /** Activity intent argument bundle keys: */ public static final String ARG_PHOTO_ID = "PHOTO_ID"; - + public static final String ARG_PHOTO_URI = "PHOTO_URI"; public static final String ARG_CONTACT_URI = "CONTACT_URI"; public static final String ARG_NAME_OR_NUMBER = "NAME_OR_NUMBER"; public static final String ARG_NUMBER = "NUMBER"; @@ -134,6 +134,7 @@ public class CallSubjectDialog extends Activity { }; private long mPhotoID; + private Uri mPhotoUri; private Uri mContactUri; private String mNameOrNumber; private String mNumber; @@ -195,6 +196,7 @@ public class CallSubjectDialog extends Activity { start( activity, -1 /* photoId */, + null /* photoUri */, null /* contactUri */, number /* nameOrNumber */, number /* number */, @@ -220,6 +222,7 @@ public class CallSubjectDialog extends Activity { public static void start( Activity activity, long photoId, + Uri photoUri, Uri contactUri, String nameOrNumber, String number, @@ -229,6 +232,7 @@ public class CallSubjectDialog extends Activity { PhoneAccountHandle phoneAccountHandle) { Bundle arguments = new Bundle(); arguments.putLong(ARG_PHOTO_ID, photoId); + arguments.putParcelable(ARG_PHOTO_URI, photoUri); arguments.putParcelable(ARG_CONTACT_URI, contactUri); arguments.putString(ARG_NAME_OR_NUMBER, nameOrNumber); arguments.putString(ARG_NUMBER, number); @@ -320,7 +324,8 @@ public class CallSubjectDialog extends Activity { private void updateContactInfo() { if (mContactUri != null) { ContactPhotoManager.getInstance(this) - .loadDialerThumbnail(mContactPhoto, mContactUri, mPhotoID, mNameOrNumber, mContactType); + .loadDialerThumbnailOrPhoto( + mContactPhoto, mContactUri, mPhotoID, mPhotoUri, mNameOrNumber, mContactType); } else { mContactPhoto.setVisibility(View.GONE); } @@ -343,6 +348,7 @@ public class CallSubjectDialog extends Activity { return; } mPhotoID = arguments.getLong(ARG_PHOTO_ID); + mPhotoUri = arguments.getParcelable(ARG_PHOTO_URI); mContactUri = arguments.getParcelable(ARG_CONTACT_URI); mNameOrNumber = arguments.getString(ARG_NAME_OR_NUMBER); mNumber = arguments.getString(ARG_NUMBER); diff --git a/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java b/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java index ca12f1812..f8ea140b3 100644 --- a/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java +++ b/java/com/android/contacts/common/lettertiles/LetterTileDrawable.java @@ -20,7 +20,6 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; -import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Outline; @@ -49,7 +48,7 @@ public class LetterTileDrawable extends Drawable { * #TYPE_BUSINESS}, and voicemail contacts should use {@link #TYPE_VOICEMAIL}. */ @Retention(RetentionPolicy.SOURCE) - @IntDef({TYPE_PERSON, TYPE_BUSINESS, TYPE_VOICEMAIL, TYPE_GENERIC_AVATAR}) + @IntDef({TYPE_PERSON, TYPE_BUSINESS, TYPE_VOICEMAIL, TYPE_GENERIC_AVATAR, TYPE_SPAM}) public @interface ContactType {} /** Contact type constants */ @@ -61,6 +60,7 @@ public class LetterTileDrawable extends Drawable { * situations where a contact is anonymous. */ public static final int TYPE_GENERIC_AVATAR = 4; + public static final int TYPE_SPAM = 5; @ContactType public static final int TYPE_DEFAULT = TYPE_PERSON; /** @@ -78,6 +78,10 @@ public class LetterTileDrawable extends Drawable { /** 54% opacity */ private static final int ALPHA = 138; + /** 100% opacity */ + private static final int SPAM_ALPHA = 255; + /** Default icon scale for vector drawable. */ + private static final float VECTOR_ICON_SCALE = 0.7f; /** Reusable components to avoid new allocations */ private static final Paint sPaint = new Paint(); @@ -87,14 +91,16 @@ public class LetterTileDrawable extends Drawable { /** Letter tile */ private static TypedArray sColors; + private static int sSpamColor; private static int sDefaultColor; private static int sTileFontColor; private static float sLetterToTileRatio; - private static Bitmap sDefaultPersonAvatar; - private static Bitmap sDefaultBusinessAvatar; - private static Bitmap sDefaultVoicemailAvatar; + private static Drawable sDefaultPersonAvatar; + private static Drawable sDefaultBusinessAvatar; + private static Drawable sDefaultVoicemailAvatar; + private static Drawable sDefaultSpamAvatar; private final Paint mPaint; - private int mContactType = TYPE_DEFAULT; + @ContactType private int mContactType = TYPE_DEFAULT; private float mScale = 1.0f; private float mOffset = 0.0f; private boolean mIsCircle = false; @@ -102,21 +108,20 @@ public class LetterTileDrawable extends Drawable { private int mColor; private Character mLetter = null; - @ContactType private int mAvatarType = TYPE_DEFAULT; private String mDisplayName; public LetterTileDrawable(final Resources res) { if (sColors == null) { sColors = res.obtainTypedArray(R.array.letter_tile_colors); + sSpamColor = res.getColor(R.color.spam_contact_background); sDefaultColor = res.getColor(R.color.letter_tile_default_color); sTileFontColor = res.getColor(R.color.letter_tile_font_color); sLetterToTileRatio = res.getFraction(R.dimen.letter_to_tile_ratio, 1, 1); sDefaultPersonAvatar = - BitmapFactory.decodeResource( - res, R.drawable.product_logo_avatar_anonymous_white_color_120); - sDefaultBusinessAvatar = - BitmapFactory.decodeResource(res, R.drawable.ic_business_white_120dp); - sDefaultVoicemailAvatar = BitmapFactory.decodeResource(res, R.drawable.ic_voicemail_avatar); + res.getDrawable(R.drawable.product_logo_avatar_anonymous_white_color_120, null); + sDefaultBusinessAvatar = res.getDrawable(R.drawable.quantum_ic_business_vd_theme_24, null); + sDefaultVoicemailAvatar = res.getDrawable(R.drawable.quantum_ic_voicemail_vd_theme_24, null); + sDefaultSpamAvatar = res.getDrawable(R.drawable.quantum_ic_report_vd_theme_24, null); sPaint.setTypeface( Typeface.create(res.getString(R.string.letter_tile_letter_font_family), Typeface.NORMAL)); sPaint.setTextAlign(Align.CENTER); @@ -128,12 +133,32 @@ public class LetterTileDrawable extends Drawable { mColor = sDefaultColor; } - private static Bitmap getBitmapForContactType(int contactType) { + private Rect getScaledBounds(float scale, float offset) { + // The drawable should be drawn in the middle of the canvas without changing its width to + // height ratio. + final Rect destRect = copyBounds(); + // Crop the destination bounds into a square, scaled and offset as appropriate + final int halfLength = (int) (scale * Math.min(destRect.width(), destRect.height()) / 2); + + destRect.set( + destRect.centerX() - halfLength, + (int) (destRect.centerY() - halfLength + offset * destRect.height()), + destRect.centerX() + halfLength, + (int) (destRect.centerY() + halfLength + offset * destRect.height())); + return destRect; + } + + private Drawable getDrawableForContactType(int contactType) { switch (contactType) { case TYPE_BUSINESS: + mScale = VECTOR_ICON_SCALE; return sDefaultBusinessAvatar; case TYPE_VOICEMAIL: + mScale = VECTOR_ICON_SCALE; return sDefaultVoicemailAvatar; + case TYPE_SPAM: + mScale = VECTOR_ICON_SCALE; + return sDefaultSpamAvatar; case TYPE_PERSON: case TYPE_GENERIC_AVATAR: default: @@ -163,39 +188,11 @@ public class LetterTileDrawable extends Drawable { return bitmap; } - /** - * Draw the bitmap onto the canvas at the current bounds taking into account the current scale. - */ - private void drawBitmap( - final Bitmap bitmap, final int width, final int height, final Canvas canvas) { - // The bitmap should be drawn in the middle of the canvas without changing its width to - // height ratio. - final Rect destRect = copyBounds(); - - // Crop the destination bounds into a square, scaled and offset as appropriate - final int halfLength = (int) (mScale * Math.min(destRect.width(), destRect.height()) / 2); - - destRect.set( - destRect.centerX() - halfLength, - (int) (destRect.centerY() - halfLength + mOffset * destRect.height()), - destRect.centerX() + halfLength, - (int) (destRect.centerY() + halfLength + mOffset * destRect.height())); - - // Source rectangle remains the entire bounds of the source bitmap. - sRect.set(0, 0, width, height); - - sPaint.setTextAlign(Align.CENTER); - sPaint.setAntiAlias(true); - sPaint.setAlpha(ALPHA); - - canvas.drawBitmap(bitmap, sRect, destRect, sPaint); - } - private void drawLetterTile(final Canvas canvas) { // Draw background color. sPaint.setColor(mColor); - sPaint.setAlpha(mPaint.getAlpha()); + final Rect bounds = getBounds(); final int minDimension = Math.min(bounds.width(), bounds.height()); @@ -206,7 +203,6 @@ public class LetterTileDrawable extends Drawable { } // Draw letter/digit only if the first character is an english letter or there's a override - if (mLetter != null) { // Draw letter or digit. sFirstChar[0] = mLetter; @@ -229,8 +225,10 @@ public class LetterTileDrawable extends Drawable { sPaint); } else { // Draw the default image if there is no letter/digit to be drawn - final Bitmap bitmap = getBitmapForContactType(mContactType); - drawBitmap(bitmap, bitmap.getWidth(), bitmap.getHeight(), canvas); + Drawable drawable = getDrawableForContactType(mContactType); + drawable.setBounds(getScaledBounds(mScale, mOffset)); + drawable.setAlpha(drawable == sDefaultSpamAvatar ? SPAM_ALPHA : ALPHA); + drawable.draw(canvas); } } @@ -245,11 +243,16 @@ public class LetterTileDrawable extends Drawable { /** Returns a deterministic color based on the provided contact identifier string. */ private int pickColor(final String identifier) { + if (mContactType == TYPE_SPAM) { + return sSpamColor; + } + if (mContactType == TYPE_VOICEMAIL || mContactType == TYPE_BUSINESS || TextUtils.isEmpty(identifier)) { return sDefaultColor; } + // String.hashCode() implementation is not supposed to change across java versions, so // this should guarantee the same email address always maps to the same color. // The email should already have been normalized by the ContactRequest. @@ -321,7 +324,7 @@ public class LetterTileDrawable extends Drawable { private LetterTileDrawable setLetterAndColorFromContactDetails( final String displayName, final String identifier) { - if (displayName != null && displayName.length() > 0 && isEnglishLetter(displayName.charAt(0))) { + if (!TextUtils.isEmpty(displayName) && isEnglishLetter(displayName.charAt(0))) { mLetter = Character.toUpperCase(displayName.charAt(0)); } else { mLetter = null; @@ -382,11 +385,10 @@ public class LetterTileDrawable extends Drawable { } this.mDisplayName = displayName; - this.mAvatarType = contactType; - setContactType(this.mAvatarType); + setContactType(contactType); // Special contact types receive default color and no letter tile, but special iconography. - if (this.mAvatarType != TYPE_PERSON) { + if (contactType != TYPE_PERSON) { this.setLetterAndColorFromContactDetails(null, null); } else { if (identifierForTileColor != null) { diff --git a/java/com/android/contacts/common/list/OnPhoneNumberPickerActionListener.java b/java/com/android/contacts/common/list/OnPhoneNumberPickerActionListener.java index 89bd889e6..c75e0a730 100644 --- a/java/com/android/contacts/common/list/OnPhoneNumberPickerActionListener.java +++ b/java/com/android/contacts/common/list/OnPhoneNumberPickerActionListener.java @@ -17,13 +17,11 @@ package com.android.contacts.common.list; import android.app.ActionBar; import android.net.Uri; -import com.android.dialer.callintent.nano.CallSpecificAppData; +import com.android.dialer.callintent.CallSpecificAppData; /** Action callbacks that can be sent by a phone number picker. */ public interface OnPhoneNumberPickerActionListener { - int CALL_INITIATION_UNKNOWN = 0; - /** Returns the selected phone number uri to the requester. */ void onPickDataUri(Uri dataUri, boolean isVideoCall, CallSpecificAppData callSpecificAppData); diff --git a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java index 4ae81529b..99c41f92d 100644 --- a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java +++ b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java @@ -28,7 +28,9 @@ import android.view.View; import android.view.ViewGroup; import com.android.contacts.common.R; import com.android.contacts.common.util.AccountFilterUtil; -import com.android.dialer.callintent.nano.CallSpecificAppData; +import com.android.dialer.callintent.CallInitiationType; +import com.android.dialer.callintent.CallInitiationType.Type; +import com.android.dialer.callintent.CallSpecificAppData; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.logging.Logger; @@ -181,11 +183,12 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment + + + + "Tekst je kopiran" + "Kopiraj u priv. memoriju" + "Pozovi %s" + "Pozovi kućni telefon" + "Pozovi mobilni telefon" + "Pozovi poslovni telefon" + "Pozovi poslovni faks" + "Pozovi kućni faks" + "Pozovi pejdžer" + "Pozovi" + "Pozovi za povratni poziv" + "Pozovi telefon u automobilu" + "Pozovi glavni telefon preduzeća" + "Pozovi ISDN" + "Pozovi glavni telefon" + "Pozovi faks" + "Pozovi radio" + "Pozovi teleks" + "Pozovi TTY/TDD" + "Pozovi poslovni mobilni telefon" + "Pozovi poslovni pejdžer" + "Pozovi %s" + "Pozovi broj za MMS" + "%s (pozovi)" + "Pošalji SMS na %s" + "Pošalji SMS na kućni telefon" + "Pošalji SMS na mobilni telefon" + "Pošalji SMS na poslovni telefon" + "Pošalji SMS na poslovni faks" + "Pošalji SMS na kućni faks" + "Pošalji SMS na pejdžer" + "Pošalji SMS" + "Pošalji SMS za povratni poziv" + "Pošalji SMS na telefon u automobilu" + "Pošalji SMS na glavni broj telefona preduzeća" + "Pošalji SMS na ISDN" + "Pošalji SMS na glavni telefon" + "Pošalji SMS na faks" + "Pošalji SMS na radio" + "Pošalji SMS na teleks" + "Pošalji SMS na TTY/TDD" + "Pošalji SMS na poslovni mobilni telefon" + "Pošalji SMS na poslovni pejdžer" + "Pošalji SMS na %s" + "Pošalji SMS na broj za MMS" + "%s (pošalji SMS)" + "Brišete često kontaktirane?" + "Obrisaćete listu često kontaktiranih u aplikacijama Kontakti i Telefon, pa će imejl aplikacije morati ponovo da prikupe informacije o adresiranju." + "Brisanje često kontaktiranih..." + "Dostupan/na" + "Odsutan/na" + "Zauzet/a" + "Kontakti" + "Drugo" + "Direktorijum" + "Direktorijum za Work" + "Svi kontakti" + "Ja" + "Pretražuje se…" + "Pronađeno je više od %d." + "Nema kontakata" + + Pronađen je %d + Pronađena su %d + Pronađeno je %d + + "Brzi kontakt za korisnika %1$s" + "(Nema imena)" + "Često pozivani" + "Često kontaktirani" + "Prikaži kontakt" + "Svi kontakti sa brojevima telefona" + "Kontakti sa profila za Work" + "Prikaži ažuriranja" + "Samo na uređaju, ne sinhronizuje se" + "Ime" + "Nadimak" + "Ime" + "Imenu" + "Prezimenu" + "Prefiks za ime" + "Srednje ime" + "Sufiks imena" + "Ime – fonetski" + "Ime – fonetski" + "Srednje ime – fonetski" + "Prezime – fonetski" + "Telefon" + "Pošalji imejl" + "Adresa" + "Razmena trenutnih poruka" + "Organizacija" + "Odnos" + "Poseban dan" + "SMS" + "Adresa" + "Preduzeće" + "Naziv" + "Beleške" + "SIP" + "Veb-sajt" + "Grupe" + "Pošalji imejl na kućnu imejl adresu" + "Pošalji imejl na mobilni telefon" + "Pošalji imejl na poslovnu imejl adresu" + "Pošalji imejl" + "Pošalji imejl na %s" + "Pošalji imejl" + "Ulica" + "Poštanski fah" + "Kraj" + "Grad" + "Država" + "Poštanski broj" + "Zemlja" + "Prikaži kućnu adresu" + "Prikaži poslovnu adresu" + "Prikaži adresu" + "Prikaži adresu %s" + "Započni ćaskanje preko AIM-a" + "Započni ćaskanje preko Windows Live-a" + "Započni ćaskanje preko Yahoo-a" + "Započni ćaskanje preko Skype-a" + "Započni ćaskanje preko QQ-a" + "Započni ćaskanje preko Google Talk-a" + "Započni ćaskanje preko ICQ-a" + "Započni ćaskanje preko Jabber-a" + "Ćaskanje" + "izbriši" + "Proširivanje ili skupljanje polja za nazive" + "Proširi ili skupi polja za fonetsko ime" + "Svi kontakti" + "Gotovo" + "Otkaži" + "Kontakti u grupi %s" + "Kontakti u prilagođenom prikazu" + "Pojedinačni kontakt" + "Sačuvajte uvezene kontakte na:" + "Uvezi sa SIM kartice" + "Uvoz sa SIM kartice ^1^2" + "Uvoz sa SIM kartice %1$s" + "Uvezi iz .vcf datoteke" + "Želite li da otkažete uvoz datoteke %s?" + "Želite li da otkažete izvoz datoteke %s?" + "Nije moguće otkazati vCard uvoz/izvoz" + "Nepoznata greška." + "Nismo uspeli da otvorimo datoteku „%s“: %s." + "Nije moguće pokrenuti program za izvoz: „%s“" + "Nema kontakata za izvoz." + "Onemogućili ste obaveznu dozvolu." + "Došlo je do greške pri izvozu: „%s“" + "Zahtevani naziv datoteke je predugačak („%s“)." + "U/I greška" + "Nema dovoljno memorije. Datoteka je možda prevelika." + "Iz neočekivanog razloga nije moguće raščlaniti vCard datoteku." + "Format nije podržan." + "Nije moguće prikupiti metapodatke navedenih vCard datoteka." + "Nije moguć uvoz jedne ili više datoteka (%s)." + "Izvoz datoteke %s je završen." + "Izvoz kontakata je završen." + "Izvoz kontakata je završen. Kliknite na obaveštenje da biste ih delili." + "Dodirnite da biste delili kontakte." + "Izvoz datoteke %s je otkazan." + "Izvoz podataka o kontaktima je u toku" + "Podaci o kontaktima se izvoze." + "Preuzimanje informacija iz baze podataka nije moguće." + "Nema kontakata za izvoz. Ako imate kontakte na uređaju, neki dobavljači podataka možda ne dozvoljavaju izvoz kontakata sa uređaja." + "Program za izradu vCard datoteka se nije ispravno pokrenuo." + "Izvoz nije moguć" + "Podaci o kontaktima nizu izvezeni.\nRazlog: „%s“" + "Uvoz kontakta %s" + "Čitanje vCard podataka nije moguće" + "Čitanje vCard podataka je otkazano" + "Uvoz vCard datoteke %s je završen" + "Uvoz datoteke %s je otkazan" + "Datoteka %s će uskoro biti uvezena." + "Datoteka će uskoro biti uvezena." + "Zahtev za uvoz vCard datoteke je odbijen. Probajte ponovo kasnije." + "Datoteka %s će uskoro biti izvezena." + "Datoteka će uskoro biti izvezena." + "Kontakti će uskoro biti izvezeni." + "Zahtev za izvoz vCard datoteke je odbijen. Probajte ponovo kasnije." + "kontakt" + "Keširanje vCard datoteka u lokalnu privremenu memoriju. Uvoz će uskoro započeti." + "Uvoz vCard datoteke nije moguć." + "Kontakt preko NFC-a" + "Želite li da izvezete kontakte?" + "Keširanje" + "Uvozimo %s/%s: %s" + "Izvezi u .vcf datoteku" + "Sortiraj prema" + "Imenu" + "Prezimenu" + "Format imena i prezimena" + "Prvo ime" + "Prvo prezime" + "Podrazumevani nalog za nove kontakte" + "Sinhronizujte metapodatke kontakata" + "O Kontaktima" + "Podešavanja" + "Deli vidljive kontakte" + "Nije uspelo deljenje vidljivih kontakata." + "Deli omiljene kontakte" + "Deli sve kontakte" + "Deljenje kontakata nije uspelo." + "Uvoz/izvoz kontakata" + "Uvezi kontakte" + "Ovaj kontakt ne može da se deli." + "Nema kontakata za deljenje." + "Pretraži" + "Pronađite kontakte" + "Omiljeno" + "Nema kontakata." + "Nema vidljivih kontakata." + "Nema omiljenih" + "Nema kontakata u grupi %s" + "Obriši često kontaktirane" + "Izaberite SIM karticu" + "Upravljaj nalozima" + "Uvezi/izvezi" + "preko %1$s" + "%1$s preko %2$s" + "zaustavljanje pretraživanja" + "Brisanje pretrage" + "Opcije prikazivanja kontakata" + "Nalog" + "Uvek koristi ovo za pozive" + "Pozovi pomoću" + "Poziv sa beleškom" + "Unesite belešku koju ćete poslati uz poziv..." + "POŠALJI I POZOVI" + "%1$s/%2$s" + "%1$s%2$s" + "Kartica %1$s." + + Kartica %1$s. %2$d nepročitana stavka. + Kartica %1$s. %2$d nepročitane stavke. + Kartica %1$s. %2$d nepročitanih stavki. + + "Verzija" + "Licence otvorenog koda" + "Detalji licence za softver otvorenog koda" + "Politika privatnosti" + "Uslovi korišćenja usluge" + "Licence otvorenog koda" + "Otvaranje URL-a nije uspelo." + "Uputi video poziv" + diff --git a/java/com/android/contacts/common/res/values/colors.xml b/java/com/android/contacts/common/res/values/colors.xml index 7524eff58..434d193c7 100644 --- a/java/com/android/contacts/common/res/values/colors.xml +++ b/java/com/android/contacts/common/res/values/colors.xml @@ -20,6 +20,8 @@ #44ff0000 + #A52714 + #a0ffffff diff --git a/java/com/android/dialer/app/AndroidManifest.xml b/java/com/android/dialer/app/AndroidManifest.xml index 67290b591..5b7e75751 100644 --- a/java/com/android/dialer/app/AndroidManifest.xml +++ b/java/com/android/dialer/app/AndroidManifest.xml @@ -109,6 +109,16 @@ + + + + + + + + + selectedItems = new SparseArray<>(); private final ActionMode.Callback mActionModeCallback = new ActionMode.Callback() { @@ -155,7 +157,15 @@ public class CallLogAdapter extends GroupingListAdapter // Called when the user selects a contextual menu item @Override public boolean onActionItemClicked(ActionMode mode, MenuItem item) { - return false; + if (item.getItemId() == R.id.action_bar_delete_menu_item) { + if (selectedItems.size() > 0) { + showDeleteSelectedItemsDialog(); + } + mode.finish(); + return true; + } else { + return false; + } } // Called when the user exits the action mode @@ -167,14 +177,66 @@ public class CallLogAdapter extends GroupingListAdapter } }; + private void showDeleteSelectedItemsDialog() { + AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); + Assert.checkArgument(selectedItems.size() > 0); + String voicemailString = + selectedItems.size() == 1 + ? mActivity.getResources().getString(R.string.voicemailMultiSelectVoicemail) + : mActivity.getResources().getString(R.string.voicemailMultiSelectVoicemail); + String deleteVoicemailTitle = + mActivity + .getResources() + .getString(R.string.voicemailMultiSelectDialogTitle, voicemailString); + SparseArray voicemailsToDeleteOnConfirmation = selectedItems.clone(); + builder.setTitle(deleteVoicemailTitle); + + builder.setPositiveButton( + mActivity.getResources().getString(R.string.voicemailMultiSelectDeleteConfirm), + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int id) { + deleteSelectedItems(voicemailsToDeleteOnConfirmation); + dialog.cancel(); + } + }); + + builder.setNegativeButton( + mActivity.getResources().getString(R.string.voicemailMultiSelectDeleteCancel), + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }); + + AlertDialog dialog = builder.create(); + dialog.show(); + } + + private void deleteSelectedItems(SparseArray voicemailsToDelete) { + for (int i = 0; i < voicemailsToDelete.size(); i++) { + String voicemailUri = voicemailsToDelete.get(voicemailsToDelete.keyAt(i)); + CallLogAsyncTaskUtil.deleteVoicemail(mActivity, Uri.parse(voicemailUri), null); + } + } + 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; + .getBoolean("enable_call_log_multiselect", true) + && mVoicemailPlaybackPresenter != null) { + if (v.getId() == R.id.primary_action_view) { + if (mActionMode == null) { + mActionMode = v.startActionMode(mActionModeCallback); + } + CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) v.getTag(); + viewHolder.quickContactView.setVisibility(View.GONE); + viewHolder.checkBoxView.setVisibility(View.VISIBLE); + return false; + } } return true; } @@ -190,15 +252,20 @@ public class CallLogAdapter extends GroupingListAdapter 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))); + int id = getVoicemailId(viewHolder.voicemailUri); + if (selectedItems.get(id) != null) { + selectedItems.delete(id); 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); + selectedItems.put(getVoicemailId(viewHolder.voicemailUri), viewHolder.voicemailUri); + } + + if (selectedItems.size() == 0) { + mActionMode.finish(); + return; } mActionMode.setTitle(Integer.toString(selectedItems.size())); return; @@ -216,12 +283,10 @@ public class CallLogAdapter extends GroupingListAdapter getEnrichedCallManager().getCapabilities(viewHolder.number); viewHolder.isCallComposerCapable = capabilities != null && capabilities.supportsCallComposer(); - - CallDetailsEntries callDetailsEntries = viewHolder.getDetailedPhoneDetails(); - setCallDetailsEntriesHistoryResults( + generateAndMapNewCallDetailsEntriesHistoryResults( viewHolder.number, - callDetailsEntries, - getAllHistoricalData(viewHolder.number, callDetailsEntries)); + viewHolder.getDetailedPhoneDetails(), + getAllHistoricalData(viewHolder.number, viewHolder.getDetailedPhoneDetails())); if (viewHolder.rowId == mCurrentlyExpandedRowId) { // Hide actions, if the clicked item is the expanded item. @@ -241,6 +306,12 @@ public class CallLogAdapter extends GroupingListAdapter } }; + private static int getVoicemailId(String voicemailUri) { + Assert.checkArgument(voicemailUri != null); + Assert.checkArgument(voicemailUri.length() > 0); + return (int) ContentUris.parseId(Uri.parse(voicemailUri)); + } + /** * A list of {@link CallLogQuery#ID} that will be hidden. The hide might be temporary so instead * if removing an item, it will be shown as an invisible view. This simplifies the calculation of @@ -547,9 +618,12 @@ public class CallLogAdapter extends GroupingListAdapter // the value will be false while capabilities are requested. mExpandCollapseListener will // attempt to set the field properly in that case views.isCallComposerCapable = isCallComposerCapable(views.number); - setCallDetailsEntriesHistoryResults( - views.number, callDetailsEntries, getAllHistoricalData(views.number, callDetailsEntries)); - views.setDetailedPhoneDetails(callDetailsEntries); + CallDetailsEntries updatedCallDetailsEntries = + generateAndMapNewCallDetailsEntriesHistoryResults( + views.number, + callDetailsEntries, + getAllHistoricalData(views.number, callDetailsEntries)); + views.setDetailedPhoneDetails(updatedCallDetailsEntries); views.lightbringerReady = getLightbringer().isReachable(mActivity, views.number); final AsyncTask loadDataTask = new AsyncTask() { @@ -625,23 +699,27 @@ public class CallLogAdapter extends GroupingListAdapter return historicalData; } - private void setCallDetailsEntriesHistoryResults( + private static CallDetailsEntries generateAndMapNewCallDetailsEntriesHistoryResults( @Nullable String number, @NonNull CallDetailsEntries callDetailsEntries, @NonNull Map> mappedResults) { if (number == null) { - return; + return callDetailsEntries; } - for (CallDetailsEntry entry : callDetailsEntries.entries) { + CallDetailsEntries.Builder mutableCallDetailsEntries = CallDetailsEntries.newBuilder(); + for (CallDetailsEntry entry : callDetailsEntries.getEntriesList()) { + CallDetailsEntry.Builder newEntry = CallDetailsEntry.newBuilder().mergeFrom(entry); List results = mappedResults.get(entry); if (results != null) { - entry.historyResults = mappedResults.get(entry).toArray(new HistoryResult[0]); + newEntry.addAllHistoryResults(mappedResults.get(entry)); LogUtil.v( - "CallLogAdapter.setCallDetailsEntriesHistoryResults", + "CallLogAdapter.generateAndMapNewCallDetailsEntriesHistoryResults", "mapped %d results", - entry.historyResults.length); + newEntry.getHistoryResultsList().size()); } + mutableCallDetailsEntries.addEntries(newEntry.build()); } + return mutableCallDetailsEntries.build(); } /** @@ -703,21 +781,21 @@ public class CallLogAdapter extends GroupingListAdapter private static CallDetailsEntries createCallDetailsEntries(Cursor cursor, int count) { Assert.isMainThread(); int position = cursor.getPosition(); - CallDetailsEntries entries = new CallDetailsEntries(); - entries.entries = new CallDetailsEntry[count]; + CallDetailsEntries.Builder entries = CallDetailsEntries.newBuilder(); for (int i = 0; i < count; i++) { - CallDetailsEntry entry = new CallDetailsEntry(); - entry.callId = cursor.getLong(CallLogQuery.ID); - entry.callType = cursor.getInt(CallLogQuery.CALL_TYPE); - entry.dataUsage = cursor.getLong(CallLogQuery.DATA_USAGE); - entry.date = cursor.getLong(CallLogQuery.DATE); - entry.duration = cursor.getLong(CallLogQuery.DURATION); - entry.features |= cursor.getInt(CallLogQuery.FEATURES); - entries.entries[i] = entry; + CallDetailsEntry.Builder entry = + CallDetailsEntry.newBuilder() + .setCallId(cursor.getLong(CallLogQuery.ID)) + .setCallType(cursor.getInt(CallLogQuery.CALL_TYPE)) + .setDataUsage(cursor.getLong(CallLogQuery.DATA_USAGE)) + .setDate(cursor.getLong(CallLogQuery.DATE)) + .setDuration(cursor.getLong(CallLogQuery.DURATION)) + .setFeatures(cursor.getInt(CallLogQuery.FEATURES)); + entries.addEntries(entry.build()); cursor.moveToNext(); } cursor.moveToPosition(position); - return entries; + return entries.build(); } /** @@ -822,7 +900,7 @@ public class CallLogAdapter extends GroupingListAdapter details.contactUserType == ContactsUtils.USER_TYPE_WORK ? View.VISIBLE : View.GONE); if (views.voicemailUri != null - && selectedItems.get((int) ContentUris.parseId(Uri.parse(views.voicemailUri)))) { + && selectedItems.get(getVoicemailId(views.voicemailUri)) != null) { views.checkBoxView.setVisibility(View.VISIBLE); views.quickContactView.setVisibility(View.GONE); } else if (views.voicemailUri != null) { diff --git a/java/com/android/dialer/app/calllog/CallLogListItemHelper.java b/java/com/android/dialer/app/calllog/CallLogListItemHelper.java index a5df8cca1..ac43b9ea7 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemHelper.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemHelper.java @@ -269,7 +269,7 @@ import com.android.dialer.compat.AppCompatConstants; if (!TextUtils.isEmpty(details.getPreferredName())) { recipient = details.getPreferredName(); } else { - recipient = details.displayNumber + details.postDialDigits; + recipient = details.displayNumber; } return recipient; } diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 9adcddb3c..b57f9b04a 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -22,6 +22,7 @@ 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; @@ -31,7 +32,10 @@ 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; @@ -41,7 +45,7 @@ import android.widget.QuickContactBadge; 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; @@ -53,14 +57,16 @@ import com.android.dialer.blocking.BlockedNumbersMigrator; import com.android.dialer.blocking.FilteredNumberCompat; import com.android.dialer.blocking.FilteredNumbersUtil; import com.android.dialer.callcomposer.CallComposerActivity; -import com.android.dialer.callcomposer.nano.CallComposerContact; -import com.android.dialer.calldetails.nano.CallDetailsEntries; +import com.android.dialer.callcomposer.CallComposerContact; +import com.android.dialer.calldetails.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.ContactSource; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.ScreenEvent; import com.android.dialer.phonenumbercache.CachedNumberLookupService; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.phonenumbercache.PhoneNumberCache; @@ -76,7 +82,9 @@ import com.android.dialer.util.DialerUtils; * CallLogAdapter. */ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder - implements View.OnClickListener, MenuItem.OnMenuItemClickListener { + implements View.OnClickListener, + MenuItem.OnMenuItemClickListener, + View.OnCreateContextMenuListener { /** The root view of the call log list item */ public final View rootView; /** The quick contact badge for the contact. */ @@ -98,7 +106,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder private final CachedNumberLookupService mCachedNumberLookupService; private final VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; private final OnClickListener mBlockReportListener; - private final int mPhotoSize; /** Whether the data fields are populated by the worker thread, ready to be shown. */ public boolean isLoaded; /** The view containing call log item actions. Null until the ViewStub is inflated. */ @@ -237,7 +244,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder 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. phoneCallDetailsViews.nameView.setElegantTextHeight(false); @@ -249,7 +255,11 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder } primaryActionButtonView.setOnClickListener(this); primaryActionView.setOnClickListener(mExpandCollapseListener); - primaryActionView.setOnLongClickListener(longPressListener); + if (mVoicemailPlaybackPresenter != null) { + primaryActionView.setOnLongClickListener(longPressListener); + } else { + primaryActionView.setOnCreateContextMenuListener(this); + } } public static CallLogListItemViewHolder create( @@ -689,36 +699,23 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder return; } - final String lookupKey = - info.lookupUri != null ? UriUtils.getLookupKeyFromUri(info.lookupUri) : null; final String displayName = TextUtils.isEmpty(info.name) ? displayNumber : info.name; - final DefaultImageRequest request = - new DefaultImageRequest(displayName, lookupKey, getContactType(), true /* isCircular */); - - if (info.photoId == 0 && info.photoUri != null) { - ContactPhotoManager.getInstance(mContext) - .loadPhoto( - quickContactView, - info.photoUri, - mPhotoSize, - false /* darkTheme */, - true /* isCircular */, - request); - } else { - ContactPhotoManager.getInstance(mContext) - .loadThumbnail( - quickContactView, - info.photoId, - false /* darkTheme */, - true /* isCircular */, - request); - } + ContactPhotoManager.getInstance(mContext) + .loadDialerThumbnailOrPhoto( + quickContactView, + info.lookupUri, + info.photoId, + info.photoUri, + displayName, + getContactType()); } private int getContactType() { int contactType = ContactPhotoManager.TYPE_DEFAULT; if (mCallLogCache.isVoicemailNumber(accountHandle, number)) { contactType = ContactPhotoManager.TYPE_VOICEMAIL; + } else if (isSpam) { + contactType = ContactPhotoManager.TYPE_SPAM; } else if (mCachedNumberLookupService != null && mCachedNumberLookupService.isBusiness(info.sourceType)) { contactType = ContactPhotoManager.TYPE_BUSINESS; @@ -742,6 +739,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder CallSubjectDialog.start( (Activity) mContext, info.photoId, + info.photoUri, info.lookupUri, (String) nameOrNumber /* top line of contact view in call subject dialog */, number, @@ -802,18 +800,24 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder } private CallComposerContact buildContact() { - CallComposerContact contact = new CallComposerContact(); - contact.photoId = info.photoId; - contact.photoUri = info.photoUri == null ? null : info.photoUri.toString(); - contact.contactUri = info.lookupUri == null ? null : info.lookupUri.toString(); - contact.nameOrNumber = (String) nameOrNumber; - contact.contactType = getContactType(); - contact.number = number; + CallComposerContact.Builder contact = CallComposerContact.newBuilder(); + contact.setPhotoId(info.photoId); + if (info.photoUri != null) { + contact.setPhotoUri(info.photoUri.toString()); + } + if (info.lookupUri != null) { + contact.setContactUri(info.lookupUri.toString()); + } + contact.setNameOrNumber((String) nameOrNumber); + contact.setContactType(getContactType()); + contact.setNumber(number); /* second line of contact view. */ - contact.displayNumber = TextUtils.isEmpty(info.name) ? null : displayNumber; + if (!TextUtils.isEmpty(info.name)) { + contact.setDisplayNumber(displayNumber); + } /* phone number type (e.g. mobile) in second line of contact view */ - contact.numberLabel = numberType; - return contact; + contact.setNumberLabel(numberType); + return contact.build(); } private void logCallLogAction(int id) { @@ -876,6 +880,104 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder return LightbringerComponent.get(mContext).getLightbringer(); } + @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); + } + public interface OnClickListener { void onBlockReportSpam( @@ -883,21 +985,21 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder String number, String countryIso, int callType, - int contactSourceType); + ContactSource.Type contactSourceType); void onBlock( String displayNumber, String number, String countryIso, int callType, - int contactSourceType); + ContactSource.Type contactSourceType); void onUnblock( String displayNumber, String number, String countryIso, int callType, - int contactSourceType, + ContactSource.Type contactSourceType, boolean isSpam, Integer blockId); @@ -906,6 +1008,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder String number, String countryIso, int callType, - int contactSourceType); + ContactSource.Type contactSourceType); } } diff --git a/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java b/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java index dfe5776d8..0007d1863 100644 --- a/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java +++ b/java/com/android/dialer/app/calllog/DefaultVoicemailNotifier.java @@ -16,6 +16,7 @@ package com.android.dialer.app.calllog; +import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -26,11 +27,17 @@ import android.graphics.Bitmap; import android.net.Uri; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; +import android.os.PersistableBundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; +import android.support.v4.os.BuildCompat; import android.support.v4.util.Pair; +import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; +import android.telephony.CarrierConfigManager; +import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.ArrayMap; @@ -42,9 +49,11 @@ import com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall; import com.android.dialer.app.contactinfo.ContactPhotoLoader; import com.android.dialer.app.list.DialtactsPagerAdapter; import com.android.dialer.blocking.FilteredNumbersUtil; +import com.android.dialer.calllogutils.PhoneAccountUtils; +import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.notification.NotificationChannelManager.Channel; import com.android.dialer.phonenumbercache.ContactInfo; @@ -58,9 +67,12 @@ public class DefaultVoicemailNotifier { public static final String TAG = "VoicemailNotifier"; /** The tag used to identify notifications from this class. */ - static final String NOTIFICATION_TAG = "DefaultVoicemailNotifier"; + static final String VISUAL_VOICEMAIL_NOTIFICATION_TAG = "DefaultVoicemailNotifier"; /** The identifier of the notification of new voicemails. */ - private static final int NOTIFICATION_ID = R.id.notification_voicemail; + private static final int VISUAL_VOICEMAIL_NOTIFICATION_ID = R.id.notification_visual_voicemail; + + private static final int LEGACY_VOICEMAIL_NOTIFICATION_ID = R.id.notification_legacy_voicemail; + private static final String LEGACY_VOICEMAIL_NOTIFICATION_TAG = "legacy_voicemail"; private final Context context; private final CallLogNotificationsQueryHelper queryHelper; @@ -159,18 +171,102 @@ public class DefaultVoicemailNotifier { Channel.VOICEMAIL, PhoneAccountHandles.getAccount(context, newCalls.get(0))); - LogUtil.i(TAG, "Creating voicemail notification"); - getNotificationManager().notify(NOTIFICATION_TAG, NOTIFICATION_ID, groupSummary.build()); + LogUtil.i(TAG, "Creating visual voicemail notification"); + getNotificationManager() + .notify( + VISUAL_VOICEMAIL_NOTIFICATION_TAG, + VISUAL_VOICEMAIL_NOTIFICATION_ID, + groupSummary.build()); for (NewCall voicemail : newCalls) { getNotificationManager() .notify( voicemail.callsUri.toString(), - NOTIFICATION_ID, + VISUAL_VOICEMAIL_NOTIFICATION_ID, createNotificationForVoicemail(voicemail, contactInfos)); } } + /** + * Replicates how packages/services/Telephony/NotificationMgr.java handles legacy voicemail + * notification. The notification will not be stackable because no information is available for + * individual voicemails. + */ + @TargetApi(VERSION_CODES.O) + public void notifyLegacyVoicemail( + @NonNull PhoneAccountHandle phoneAccountHandle, + int count, + String voicemailNumber, + PendingIntent callVoicemailIntent, + PendingIntent voicemailSettingIntent) { + Assert.isNotNull(phoneAccountHandle); + Assert.checkArgument(BuildCompat.isAtLeastO()); + TelephonyManager telephonyManager = + context + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(phoneAccountHandle); + Assert.isNotNull(telephonyManager); + LogUtil.i(TAG, "Creating legacy voicemail notification"); + + PersistableBundle carrierConfig = telephonyManager.getCarrierConfig(); + + String notificationTitle = + context + .getResources() + .getQuantityString(R.plurals.notification_voicemail_title, count, count); + + TelecomManager telecomManager = context.getSystemService(TelecomManager.class); + PhoneAccount phoneAccount = telecomManager.getPhoneAccount(phoneAccountHandle); + + String notificationText; + PendingIntent pendingIntent; + + if (voicemailSettingIntent != null) { + // If the voicemail number if unknown, instead of calling voicemail, take the user + // to the voicemail settings. + notificationText = context.getString(R.string.notification_voicemail_no_vm_number); + pendingIntent = voicemailSettingIntent; + } else { + if (PhoneAccountUtils.getSubscriptionPhoneAccounts(context).size() > 1) { + notificationText = phoneAccount.getShortDescription().toString(); + } else { + notificationText = + String.format( + context.getString(R.string.notification_voicemail_text_format), + PhoneNumberUtils.formatNumber(voicemailNumber)); + } + pendingIntent = callVoicemailIntent; + } + Notification.Builder builder = new Notification.Builder(context); + builder + .setSmallIcon(android.R.drawable.stat_notify_voicemail) + .setColor(context.getColor(R.color.dialer_theme_color)) + .setWhen(System.currentTimeMillis()) + .setContentTitle(notificationTitle) + .setContentText(notificationText) + .setContentIntent(pendingIntent) + .setSound(telephonyManager.getVoicemailRingtoneUri(phoneAccountHandle)) + .setOngoing( + carrierConfig.getBoolean( + CarrierConfigManager.KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL)); + + if (telephonyManager.isVoicemailVibrationEnabled(phoneAccountHandle)) { + builder.setDefaults(Notification.DEFAULT_VIBRATE); + } + + NotificationChannelManager.applyChannel( + builder, context, Channel.VOICEMAIL, phoneAccountHandle); + Notification notification = builder.build(); + getNotificationManager() + .notify(LEGACY_VOICEMAIL_NOTIFICATION_TAG, LEGACY_VOICEMAIL_NOTIFICATION_ID, notification); + } + + public void cancelLegacyNotification() { + LogUtil.i(TAG, "Clearing legacy voicemail notification"); + getNotificationManager() + .cancel(LEGACY_VOICEMAIL_NOTIFICATION_TAG, LEGACY_VOICEMAIL_NOTIFICATION_ID); + } + /** * Determines which ringtone Uri and Notification defaults to use when updating the notification * for the given call. @@ -268,7 +364,7 @@ public class DefaultVoicemailNotifier { return new Notification.Builder(context) .setSmallIcon(android.R.drawable.stat_notify_voicemail) .setColor(context.getColor(R.color.dialer_theme_color)) - .setGroup(NOTIFICATION_TAG) + .setGroup(VISUAL_VOICEMAIL_NOTIFICATION_TAG) .setOnlyAlertOnce(true) .setAutoCancel(true); } diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index 8b77c3f51..a94c6781e 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -24,11 +24,11 @@ import android.provider.ContactsContract; import android.telecom.PhoneAccountHandle; import com.android.contacts.common.model.Contact; import com.android.contacts.common.model.ContactLoader; -import com.android.dialer.callcomposer.nano.CallComposerContact; +import com.android.dialer.callcomposer.CallComposerContact; import com.android.dialer.calldetails.CallDetailsActivity; -import com.android.dialer.calldetails.nano.CallDetailsEntries; +import com.android.dialer.calldetails.CallDetailsEntries; +import com.android.dialer.callintent.CallInitiationType; 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; diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index aa04d81eb..de07bb437 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -41,8 +41,8 @@ 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.DialtactsPagerAdapter; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; -import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.common.LogUtil; import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.notification.NotificationChannelManager.Channel; diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java index bc78eda02..0c720775a 100644 --- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java +++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java @@ -25,13 +25,14 @@ import android.support.v4.content.ContextCompat; import android.telecom.PhoneAccount; import android.text.TextUtils; import android.text.format.DateUtils; +import android.text.util.Linkify; import android.view.View; import android.widget.TextView; import com.android.dialer.app.R; import com.android.dialer.app.calllog.calllogcache.CallLogCache; import com.android.dialer.calllogutils.PhoneCallDetails; +import com.android.dialer.logging.ContactSource; 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; @@ -142,6 +143,8 @@ public class PhoneCallDetailsHelper { views.nameView.setText(nameText); if (isVoicemail) { + int relevantLinkTypes = Linkify.EMAIL_ADDRESSES | Linkify.PHONE_NUMBERS | Linkify.WEB_URLS; + views.voicemailTranscriptionView.setAutoLinkMask(relevantLinkTypes); views.voicemailTranscriptionView.setText( TextUtils.isEmpty(details.transcription) ? null : details.transcription); } @@ -230,7 +233,7 @@ public class PhoneCallDetailsHelper { return false; } // For caller ID provided by Cequint we want to show the geo location. - if (details.sourceType == CachedContactInfo.SOURCE_TYPE_CEQUINT_CALLER_ID) { + if (details.sourceType == ContactSource.Type.SOURCE_TYPE_CEQUINT_CALLER_ID) { return true; } // Don't bother showing geo location for contacts. diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java index 5e820a750..7c25e7d39 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java @@ -31,15 +31,15 @@ import com.android.dialer.app.voicemail.VoicemailAudioManager; import com.android.dialer.app.voicemail.VoicemailErrorManager; import com.android.dialer.app.voicemail.VoicemailPlaybackPresenter; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; public class VisualVoicemailCallLogFragment extends CallLogFragment { private final ContentObserver mVoicemailStatusObserver = new CustomContentObserver(); private VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; - private VoicemailErrorManager mVoicemailAlertManager; + private VoicemailErrorManager mVoicemailErrorManager; public VisualVoicemailCallLogFragment() { super(CallLog.Calls.VOICEMAIL_TYPE); @@ -63,14 +63,14 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - mVoicemailAlertManager = + mVoicemailErrorManager = new VoicemailErrorManager(getContext(), getAdapter().getAlertManager(), mModalAlertManager); getActivity() .getContentResolver() .registerContentObserver( VoicemailContract.Status.CONTENT_URI, true, - mVoicemailAlertManager.getContentObserver()); + mVoicemailErrorManager.getContentObserver()); } @Override @@ -84,13 +84,13 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onResume() { super.onResume(); mVoicemailPlaybackPresenter.onResume(); - mVoicemailAlertManager.onResume(); + mVoicemailErrorManager.onResume(); } @Override public void onPause() { mVoicemailPlaybackPresenter.onPause(); - mVoicemailAlertManager.onPause(); + mVoicemailErrorManager.onPause(); super.onPause(); } @@ -98,8 +98,9 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onDestroy() { getActivity() .getContentResolver() - .unregisterContentObserver(mVoicemailAlertManager.getContentObserver()); + .unregisterContentObserver(mVoicemailErrorManager.getContentObserver()); mVoicemailPlaybackPresenter.onDestroy(); + mVoicemailErrorManager.onDestroy(); getActivity().getContentResolver().unregisterContentObserver(mVoicemailStatusObserver); super.onDestroy(); } @@ -131,6 +132,9 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onNotVisible() { LogUtil.enterBlock("VisualVoicemailCallLogFragment.onPageUnselected"); super.onNotVisible(); + if (getAdapter() != null && getAdapter().mActionMode != null) { + getAdapter().mActionMode.finish(); + } if (getActivity() != null) { getActivity().setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); } diff --git a/java/com/android/dialer/app/calllog/VoicemailQueryHandler.java b/java/com/android/dialer/app/calllog/VoicemailQueryHandler.java index 2aa3fb282..024394728 100644 --- a/java/com/android/dialer/app/calllog/VoicemailQueryHandler.java +++ b/java/com/android/dialer/app/calllog/VoicemailQueryHandler.java @@ -76,8 +76,8 @@ public class VoicemailQueryHandler extends AsyncQueryHandler { GroupedNotificationUtil.removeNotification( mContext.getSystemService(NotificationManager.class), voicemailUri != null ? voicemailUri.toString() : null, - R.id.notification_voicemail, - DefaultVoicemailNotifier.NOTIFICATION_TAG); + R.id.notification_visual_voicemail, + DefaultVoicemailNotifier.VISUAL_VOICEMAIL_NOTIFICATION_TAG); } @Override diff --git a/java/com/android/dialer/app/contactinfo/ContactInfoCache.java b/java/com/android/dialer/app/contactinfo/ContactInfoCache.java index 85a9c3ef1..7a5db19f2 100644 --- a/java/com/android/dialer/app/contactinfo/ContactInfoCache.java +++ b/java/com/android/dialer/app/contactinfo/ContactInfoCache.java @@ -23,6 +23,7 @@ import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import android.text.TextUtils; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.ContactSource.Type; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.phonenumbercache.ContactInfoHelper; import com.android.dialer.util.ExpirableCache; @@ -183,7 +184,7 @@ public class ContactInfoCache { new NumberWithCountryIso(request.number, request.countryIso); ContactInfo existingInfo = mCache.getPossiblyExpired(numberCountryIso); - final boolean isRemoteSource = info.sourceType != 0; + final boolean isRemoteSource = info.sourceType != Type.UNKNOWN_SOURCE_TYPE; // Don't force redraw if existing info in the cache is equal to {@link ContactInfo#EMPTY} // to avoid updating the data set for every new row that is scrolled into view. @@ -346,7 +347,7 @@ public class ContactInfoCache { shouldRedraw |= queryContactInfo(request); if (shouldRedraw && (mUpdateRequests.isEmpty() - || request.isLocalRequest() && !mUpdateRequests.peek().isLocalRequest())) { + || (request.isLocalRequest() && !mUpdateRequests.peek().isLocalRequest()))) { shouldRedraw = false; mHandler.sendEmptyMessage(REDRAW); } diff --git a/java/com/android/dialer/app/dialpad/DialpadFragment.java b/java/com/android/dialer/app/dialpad/DialpadFragment.java index 80be8fe05..271f62199 100644 --- a/java/com/android/dialer/app/dialpad/DialpadFragment.java +++ b/java/com/android/dialer/app/dialpad/DialpadFragment.java @@ -78,8 +78,8 @@ import com.android.dialer.app.DialtactsActivity; import com.android.dialer.app.R; import com.android.dialer.app.SpecialCharSequenceMgr; import com.android.dialer.app.calllog.CallLogAsync; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; -import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.calllogutils.PhoneAccountUtils; import com.android.dialer.common.LogUtil; import com.android.dialer.dialpadview.DialpadKeyButton; diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersAdapter.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersAdapter.java index b9381331c..ac4903c31 100644 --- a/java/com/android/dialer/app/filterednumber/BlockedNumbersAdapter.java +++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersAdapter.java @@ -25,8 +25,8 @@ import com.android.contacts.common.GeoUtil; import com.android.dialer.app.R; import com.android.dialer.blocking.BlockNumberDialogFragment; import com.android.dialer.database.FilteredNumberContract.FilteredNumberColumns; +import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.InteractionEvent; import com.android.dialer.phonenumbercache.ContactInfoHelper; public class BlockedNumbersAdapter extends NumbersAdapter { @@ -55,8 +55,6 @@ public class BlockedNumbersAdapter extends NumbersAdapter { final String countryIso = cursor.getString(cursor.getColumnIndex(FilteredNumberColumns.COUNTRY_ISO)); final String number = cursor.getString(cursor.getColumnIndex(FilteredNumberColumns.NUMBER)); - final String normalizedNumber = - cursor.getString(cursor.getColumnIndex(FilteredNumberColumns.NORMALIZED_NUMBER)); final View deleteButton = view.findViewById(R.id.delete_button); deleteButton.setOnClickListener( diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java index 9ec6042c0..9310fcb22 100644 --- a/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java +++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java @@ -22,7 +22,7 @@ import com.android.dialer.app.R; import com.android.dialer.app.list.BlockedListSearchFragment; import com.android.dialer.app.list.SearchFragment; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.ScreenEvent; +import com.android.dialer.logging.ScreenEvent; public class BlockedNumbersSettingsActivity extends AppCompatActivity implements SearchFragment.HostInterface { diff --git a/java/com/android/dialer/app/list/BlockedListSearchFragment.java b/java/com/android/dialer/app/list/BlockedListSearchFragment.java index 2129981c0..0f96e2d6e 100644 --- a/java/com/android/dialer/app/list/BlockedListSearchFragment.java +++ b/java/com/android/dialer/app/list/BlockedListSearchFragment.java @@ -23,7 +23,6 @@ import android.telephony.PhoneNumberUtils; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; -import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.AdapterView; @@ -37,14 +36,13 @@ import com.android.dialer.app.widget.SearchEditTextLayout; import com.android.dialer.blocking.BlockNumberDialogFragment; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; +import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.InteractionEvent; public class BlockedListSearchFragment extends RegularSearchFragment implements BlockNumberDialogFragment.Callback { - private static final String TAG = BlockedListSearchFragment.class.getSimpleName(); - private final TextWatcher mPhoneSearchQueryTextListener = new TextWatcher() { @Override @@ -152,7 +150,9 @@ public class BlockedListSearchFragment extends RegularSearchFragment blockNumber(number); break; default: - Log.w(TAG, "Ignoring unsupported shortcut type: " + shortcutType); + LogUtil.w( + "BlockedListSearchFragment.onItemClick", + "ignoring unsupported shortcut type: " + shortcutType); break; } } @@ -205,7 +205,9 @@ public class BlockedListSearchFragment extends RegularSearchFragment @Override public void onUnfilterNumberSuccess() { - Log.wtf(TAG, "Unblocked a number from the BlockedListSearchFragment"); + LogUtil.e( + "BlockedListSearchFragment.onUnfilterNumberSuccess", + "unblocked a number from the BlockedListSearchFragment"); goBack(); } diff --git a/java/com/android/dialer/app/list/DialtactsPagerAdapter.java b/java/com/android/dialer/app/list/DialtactsPagerAdapter.java index 3b700d81b..dba3d3a93 100644 --- a/java/com/android/dialer/app/list/DialtactsPagerAdapter.java +++ b/java/com/android/dialer/app/list/DialtactsPagerAdapter.java @@ -24,9 +24,13 @@ import android.support.v13.app.FragmentPagerAdapter; import android.view.ViewGroup; import com.android.dialer.app.calllog.CallLogFragment; import com.android.dialer.app.calllog.VisualVoicemailCallLogFragment; +import com.android.dialer.calllog.CallLogComponent; +import com.android.dialer.calllog.CallLogFramework; +import com.android.dialer.calllog.ui.NewCallLogFragment; import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; +import com.android.dialer.contactsfragment.ContactsFragment; import com.android.dialer.database.CallLogQueryHandler; import com.android.dialer.speeddial.SpeedDialFragment; import com.android.dialer.util.ViewUtil; @@ -54,11 +58,14 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { private final List fragments = new ArrayList<>(); private final String[] tabTitles; private final boolean useNewSpeedDialTab; - + private final boolean useNewCallLogTab; + private final boolean useNewContactsTab; private OldSpeedDialFragment oldSpeedDialFragment; private SpeedDialFragment speedDialFragment; private CallLogFragment callLogFragment; - private AllContactsFragment contactsFragment; + private NewCallLogFragment newCallLogFragment; + private AllContactsFragment oldContactsFragment; + private ContactsFragment contactsFragment; private CallLogFragment voicemailFragment; public boolean hasActiveVoicemailProvider; @@ -68,6 +75,10 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { super(fm); useNewSpeedDialTab = ConfigProviderBindings.get(context).getBoolean("enable_new_favorites_tab", false); + CallLogFramework callLogFramework = CallLogComponent.get(context).callLogFramework(); + useNewCallLogTab = callLogFramework.isNewCallLogEnabled(context); + useNewContactsTab = + ConfigProviderBindings.get(context).getBoolean("enable_new_contacts_tab", false); this.tabTitles = tabTitles; hasActiveVoicemailProvider = hasVoicemailProvider; fragments.addAll(Collections.nCopies(TAB_COUNT_WITH_VOICEMAIL, null)); @@ -95,15 +106,29 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { return oldSpeedDialFragment; } case TAB_INDEX_HISTORY: - if (callLogFragment == null) { - callLogFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); + if (useNewCallLogTab) { + if (newCallLogFragment == null) { + newCallLogFragment = new NewCallLogFragment(); + } + return newCallLogFragment; + } else { + if (callLogFragment == null) { + callLogFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL); + } + return callLogFragment; } - return callLogFragment; case TAB_INDEX_ALL_CONTACTS: - if (contactsFragment == null) { - contactsFragment = new AllContactsFragment(); + if (useNewContactsTab) { + if (contactsFragment == null) { + contactsFragment = new ContactsFragment(); + } + return contactsFragment; + } else { + if (oldContactsFragment == null) { + oldContactsFragment = new AllContactsFragment(); + } + return oldContactsFragment; } - return contactsFragment; case TAB_INDEX_VOICEMAIL: if (voicemailFragment == null) { voicemailFragment = new VisualVoicemailCallLogFragment(); @@ -131,8 +156,12 @@ public class DialtactsPagerAdapter extends FragmentPagerAdapter { speedDialFragment = (SpeedDialFragment) fragment; } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { callLogFragment = (CallLogFragment) fragment; + } else if (fragment instanceof NewCallLogFragment) { + newCallLogFragment = (NewCallLogFragment) fragment; + } else if (fragment instanceof ContactsFragment) { + contactsFragment = (ContactsFragment) fragment; } else if (fragment instanceof AllContactsFragment) { - contactsFragment = (AllContactsFragment) fragment; + oldContactsFragment = (AllContactsFragment) fragment; } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_VOICEMAIL) { voicemailFragment = (CallLogFragment) fragment; LogUtil.v("ViewPagerAdapter.instantiateItem", voicemailFragment.toString()); diff --git a/java/com/android/dialer/app/list/ListsFragment.java b/java/com/android/dialer/app/list/ListsFragment.java index bf29ef310..02498939c 100644 --- a/java/com/android/dialer/app/list/ListsFragment.java +++ b/java/com/android/dialer/app/list/ListsFragment.java @@ -44,9 +44,9 @@ import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler; import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler.Source; import com.android.dialer.common.LogUtil; import com.android.dialer.database.CallLogQueryHandler; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; -import com.android.dialer.logging.nano.ScreenEvent; +import com.android.dialer.logging.ScreenEvent; import com.android.dialer.speeddial.SpeedDialFragment; import com.android.dialer.voicemailstatus.VisualVoicemailEnabledChecker; import com.android.dialer.voicemailstatus.VoicemailStatusHelper; @@ -76,6 +76,7 @@ public class ListsFragment extends Fragment private final ArrayList mOnPageChangeListeners = new ArrayList<>(); /** The position of the currently selected tab. */ private int mTabIndex = TAB_INDEX_SPEED_DIAL; + private boolean mPaused; private CallLogQueryHandler mCallLogQueryHandler; @@ -104,6 +105,8 @@ public class ListsFragment extends Fragment Trace.beginSection(TAG + " onResume"); super.onResume(); + mPaused = false; + if (getUserVisibleHint()) { sendScreenViewForCurrentPosition(); } @@ -127,6 +130,8 @@ public class ListsFragment extends Fragment ((CallLogFragment) mCurrentPage).onNotVisible(); } super.onPause(); + + mPaused = true; } @Override @@ -263,7 +268,7 @@ public class ListsFragment extends Fragment public void onVoicemailStatusFetched(Cursor statusCursor) { mHasFetchedVoicemailStatus = true; - if (getActivity() == null || getActivity().isFinishing()) { + if (getActivity() == null || mPaused) { return; } @@ -394,7 +399,7 @@ public class ListsFragment extends Fragment return; } - int screenType; + ScreenEvent.Type screenType; switch (getCurrentTabIndex()) { case TAB_INDEX_SPEED_DIAL: screenType = ScreenEvent.Type.SPEED_DIAL; diff --git a/java/com/android/dialer/app/list/OldSpeedDialFragment.java b/java/com/android/dialer/app/list/OldSpeedDialFragment.java index 4aafd9625..4ae84b6d9 100644 --- a/java/com/android/dialer/app/list/OldSpeedDialFragment.java +++ b/java/com/android/dialer/app/list/OldSpeedDialFragment.java @@ -51,8 +51,8 @@ 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.callintent.CallInitiationType; +import com.android.dialer.callintent.CallSpecificAppData; import com.android.dialer.common.LogUtil; import com.android.dialer.util.PermissionsUtil; import com.android.dialer.util.ViewUtil; @@ -462,8 +462,10 @@ public class OldSpeedDialFragment extends Fragment @Override public void onContactSelected(Uri contactUri, Rect targetRect) { if (mPhoneNumberPickerActionListener != null) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(CallInitiationType.Type.SPEED_DIAL) + .build(); mPhoneNumberPickerActionListener.onPickDataUri( contactUri, false /* isVideoCall */, callSpecificAppData); } @@ -472,8 +474,10 @@ public class OldSpeedDialFragment extends Fragment @Override public void onCallNumberDirectly(String phoneNumber) { if (mPhoneNumberPickerActionListener != null) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = CallInitiationType.Type.SPEED_DIAL; + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(CallInitiationType.Type.SPEED_DIAL) + .build(); mPhoneNumberPickerActionListener.onPickPhoneNumber( phoneNumber, false /* isVideoCall */, callSpecificAppData); } diff --git a/java/com/android/dialer/app/list/RegularSearchFragment.java b/java/com/android/dialer/app/list/RegularSearchFragment.java index 26959539b..02896793b 100644 --- a/java/com/android/dialer/app/list/RegularSearchFragment.java +++ b/java/com/android/dialer/app/list/RegularSearchFragment.java @@ -27,7 +27,7 @@ import com.android.contacts.common.list.PinnedHeaderListView; import com.android.dialer.app.R; import com.android.dialer.app.widget.EmptyContentView; import com.android.dialer.app.widget.EmptyContentView.OnEmptyViewActionButtonClickedListener; -import com.android.dialer.callintent.nano.CallInitiationType; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.phonenumbercache.CachedNumberLookupService; import com.android.dialer.phonenumbercache.PhoneNumberCache; import com.android.dialer.util.PermissionsUtil; @@ -133,7 +133,7 @@ public class RegularSearchFragment extends SearchFragment } @Override - protected int getCallInitiationType(boolean isRemoteDirectory) { + protected CallInitiationType.Type getCallInitiationType(boolean isRemoteDirectory) { return isRemoteDirectory ? CallInitiationType.Type.REMOTE_DIRECTORY : CallInitiationType.Type.REGULAR_SEARCH; diff --git a/java/com/android/dialer/app/list/SearchFragment.java b/java/com/android/dialer/app/list/SearchFragment.java index 4128300df..264bdf81b 100644 --- a/java/com/android/dialer/app/list/SearchFragment.java +++ b/java/com/android/dialer/app/list/SearchFragment.java @@ -42,7 +42,7 @@ import com.android.dialer.app.R; import com.android.dialer.app.dialpad.DialpadFragment.ErrorDialogFragment; import com.android.dialer.app.widget.DialpadSearchEmptyContentView; import com.android.dialer.app.widget.EmptyContentView; -import com.android.dialer.callintent.nano.CallSpecificAppData; +import com.android.dialer.callintent.CallSpecificAppData; import com.android.dialer.common.LogUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; @@ -238,12 +238,13 @@ public class SearchFragment extends PhoneNumberPickerFragment { number = adapter.getQueryString(); listener = getOnPhoneNumberPickerListener(); if (listener != null && !checkForProhibitedPhoneNumber(number)) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = - getCallInitiationType(false /* isRemoteDirectory */); - callSpecificAppData.positionOfSelectedSearchResult = position; - callSpecificAppData.charactersInSearchString = - getQueryString() == null ? 0 : getQueryString().length(); + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(getCallInitiationType(false /* isRemoteDirectory */)) + .setPositionOfSelectedSearchResult(position) + .setCharactersInSearchString( + getQueryString() == null ? 0 : getQueryString().length()) + .build(); listener.onPickPhoneNumber(number, false /* isVideoCall */, callSpecificAppData); } break; @@ -274,12 +275,13 @@ public class SearchFragment extends PhoneNumberPickerFragment { TextUtils.isEmpty(mAddToContactNumber) ? adapter.getQueryString() : mAddToContactNumber; listener = getOnPhoneNumberPickerListener(); if (listener != null && !checkForProhibitedPhoneNumber(number)) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = - getCallInitiationType(false /* isRemoteDirectory */); - callSpecificAppData.positionOfSelectedSearchResult = position; - callSpecificAppData.charactersInSearchString = - getQueryString() == null ? 0 : getQueryString().length(); + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(getCallInitiationType(false /* isRemoteDirectory */)) + .setPositionOfSelectedSearchResult(position) + .setCharactersInSearchString( + getQueryString() == null ? 0 : getQueryString().length()) + .build(); listener.onPickPhoneNumber(number, true /* isVideoCall */, callSpecificAppData); } break; diff --git a/java/com/android/dialer/app/list/SmartDialSearchFragment.java b/java/com/android/dialer/app/list/SmartDialSearchFragment.java index c783d3ac3..5d72ee615 100644 --- a/java/com/android/dialer/app/list/SmartDialSearchFragment.java +++ b/java/com/android/dialer/app/list/SmartDialSearchFragment.java @@ -26,7 +26,7 @@ import com.android.contacts.common.list.ContactEntryListAdapter; import com.android.dialer.app.R; import com.android.dialer.app.dialpad.SmartDialCursorLoader; import com.android.dialer.app.widget.EmptyContentView; -import com.android.dialer.callintent.nano.CallInitiationType; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.util.PermissionsUtil; /** Implements a fragment to load and display SmartDial search results. */ @@ -102,7 +102,7 @@ public class SmartDialSearchFragment extends SearchFragment } @Override - protected int getCallInitiationType(boolean isRemoteDirectory) { + protected CallInitiationType.Type getCallInitiationType(boolean isRemoteDirectory) { return CallInitiationType.Type.SMART_DIAL; } 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 new file mode 100644 index 000000000..d6f6daaab Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/empty_call_log.png 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 new file mode 100644 index 000000000..d3c0378f5 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/empty_contacts.png 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 new file mode 100644 index 000000000..3e9232fc9 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/empty_speed_dial.png 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 new file mode 100644 index 000000000..bb72e890f Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_archive_white_24dp.png 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 new file mode 100644 index 000000000..70eb07378 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_content_copy_24dp.png 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 new file mode 100644 index 000000000..9fb43b066 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_delete_24dp.png 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 new file mode 100644 index 000000000..4e0d5649e Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png 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 new file mode 100644 index 000000000..2cf41d598 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png 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 new file mode 100644 index 000000000..043685fd9 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png 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 new file mode 100644 index 000000000..86eecdd4a Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_grade_24dp.png 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 new file mode 100644 index 000000000..34310aa49 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png 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 new file mode 100644 index 000000000..a36323ca9 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_menu_history_lt.png 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 new file mode 100644 index 000000000..4b67cf71a Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_mic_grey600.png 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 new file mode 100644 index 000000000..67f07e473 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_more_vert_24dp.png 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 new file mode 100644 index 000000000..26a26f911 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_not_interested_googblue_24dp.png 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 new file mode 100644 index 000000000..bf413f912 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_not_spam.png 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 new file mode 100644 index 000000000..4d2ea05c4 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_pause_24dp.png 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 new file mode 100644 index 000000000..ff698afc0 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_people_24dp.png 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 new file mode 100644 index 000000000..b27dfba06 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_phone_24dp.png 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 new file mode 100644 index 000000000..57c9fa546 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_play_arrow_24dp.png 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 new file mode 100644 index 000000000..1ee6adf8d Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_remove.png 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 new file mode 100644 index 000000000..3a1a7a790 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_results_phone.png 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 new file mode 100644 index 000000000..f3581d104 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_schedule_24dp.png 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 new file mode 100644 index 000000000..b09a6926d Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_share_white_24dp.png 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 new file mode 100644 index 000000000..62e1f8a6d Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_star.png 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 new file mode 100644 index 000000000..03643b20d Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_unblock.png 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 new file mode 100644 index 000000000..47e32492c Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dis.png 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 new file mode 100644 index 000000000..2bfe0c0cf Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_off_dk.png 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 new file mode 100644 index 000000000..90b5238f3 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dis.png 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 new file mode 100644 index 000000000..7556637fc Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_vm_sound_on_dk.png 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 new file mode 100644 index 000000000..03a62e15f Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_voicemail_24dp.png 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 new file mode 100644 index 000000000..e22e92c85 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_down_24dp.png 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 new file mode 100644 index 000000000..57d787163 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/ic_volume_up_24dp.png 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 new file mode 100644 index 000000000..3dc1c17f6 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/search_shadow.9.png 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 new file mode 100644 index 000000000..44b06f261 Binary files /dev/null and b/java/com/android/dialer/app/res/drawable-hdpi/shadow_contact_photo.png differ diff --git a/java/com/android/dialer/app/res/layout/all_contacts_fragment.xml b/java/com/android/dialer/app/res/layout/all_contacts_fragment.xml index f59847825..17a45208d 100644 --- a/java/com/android/dialer/app/res/layout/all_contacts_fragment.xml +++ b/java/com/android/dialer/app/res/layout/all_contacts_fragment.xml @@ -41,7 +41,9 @@ android:paddingTop="18dp" android:fadingEdge="none" android:fastScrollEnabled="true" - android:nestedScrollingEnabled="true"/> + android:nestedScrollingEnabled="true" + android:cropToPadding="false" + android:clipToPadding="false"/> 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 new file mode 100644 index 000000000..15c41423b Binary files /dev/null and b/java/com/android/dialer/app/res/mipmap-hdpi/ic_launcher_phone.png differ diff --git a/java/com/android/dialer/app/res/values-af/strings.xml b/java/com/android/dialer/app/res/values-af/strings.xml index 6188a5983..0245a2d1d 100644 --- a/java/com/android/dialer/app/res/values-af/strings.xml +++ b/java/com/android/dialer/app/res/values-af/strings.xml @@ -42,6 +42,8 @@ "Bel terug" "Boodskap" "%1$s: %2$s" + "Bel %s" + "Stemboodskapnommer onbekend" %1$d Stemboodskappe Stemboodskap @@ -97,6 +99,11 @@ "Stemboodskap" "%s sek." "%s min. %s sek." + "stemboodskap" + "stemboodskappe" + "Ja" + "Nee" + "Vee geselekteerde %1$s uit?" @string/call_log_header_today "%1$s om %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-am/strings.xml b/java/com/android/dialer/app/res/values-am/strings.xml index 228fe94c6..befa4c45c 100644 --- a/java/com/android/dialer/app/res/values-am/strings.xml +++ b/java/com/android/dialer/app/res/values-am/strings.xml @@ -42,6 +42,8 @@ "መልሰህ ደውል" "መልእክት" "%1$s:%2$s" + "%s ይደውሉ" + "የማይታወቅ የድምፅ መልዕክት ቁጥር" %1$d የድምፅ መልዕክቶች %1$d የድምፅ መልዕክቶች @@ -97,6 +99,12 @@ "የድምፅ መልዕክት" "%s ሰከንድ" "%s ደቂቃ %s ሴከ" + "የድምፅ መልዕክት" + "የድምፅ መልዕክቶች" + "አዎ" + "አይ" + + @string/call_log_header_today "%1$s %2$s ላይ" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ar/strings.xml b/java/com/android/dialer/app/res/values-ar/strings.xml index 2d9c7e8e0..961e4833e 100644 --- a/java/com/android/dialer/app/res/values-ar/strings.xml +++ b/java/com/android/dialer/app/res/values-ar/strings.xml @@ -42,6 +42,8 @@ "معاودة الاتصال" "رسالة" "%1$s: %2$s" + "طلب %s" + "رقم البريد الصوتي غير معروف" لا تتوفر رسائل بريد صوتي (%1$d) رسالتا بريد صوتي (%1$d) @@ -101,6 +103,11 @@ "البريد الصوتي" "%s ثانية" "%s دقيقة %s ثانية" + "البريد الصوتي" + "رسائل البريد الصوتي" + "نعم" + "لا" + "حذف رسائل %1$s المحددة؟" @string/call_log_header_today "%1$s في %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-az/strings.xml b/java/com/android/dialer/app/res/values-az/strings.xml index e2e9bea50..78440fd24 100644 --- a/java/com/android/dialer/app/res/values-az/strings.xml +++ b/java/com/android/dialer/app/res/values-az/strings.xml @@ -42,6 +42,8 @@ "Geriyə zəng" "Mesaj" "%1$s: %2$s" + "%s nömrəsini yığın" + "Səsli e-poçt nömrəsi naməlumdur" %1$d Səsli poçt Səsli poçt @@ -97,6 +99,12 @@ "Səsli poçt" "%s san" "%s dəq %s san" + "səsli e-məktub" + "səsli e-məktublar" + "Bəli" + "Xeyr" + + @string/call_log_header_today "%1$s tarixində %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/app/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..ddb311266 --- /dev/null +++ b/java/com/android/dialer/app/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,234 @@ + + + + + "Telefon" + "Telefonska tastatura" + "Telefon" + "Istorija poziva" + "Prijavi netačan broj" + "Kopiraj broj" + "Kopiraj transkripciju" + "Blokiraj broj" + "Deblokiraj broj" + "Izmeni broj pre poziva" + "Obriši istoriju poziva" + "Izbriši govornu poruku" + "Gov. pošta je izbrisana" + "OPOZOVI" + "Želite da obrišete istoriju poziva?" + "Ovo će izbrisati sve pozive iz istorije" + "Briše se istorija poziva…" + "Telefon" + "Propušten poziv" + "Propušten poziv za Work" + "Propušteni pozivi" + "Broj propuštenih poziva: %d" + "Uzvrati poziv" + "Pošalji SMS" + "%1$s: %2$s" + "Pozovi %s" + "Nepoznat broj govorne pošte" + + %1$d govorna poruka + %1$d govorne poruke + %1$d govornih poruka + + "Pusti" + "%1$s, %2$s" + "Nova govorna poruka od %1$s" + "Puštanje govorne pošte nije uspelo" + "Govorna pošta se učitava…" + "Govorna pošta se arhivira…" + "Učitavanje govorne pošte nije uspelo" + "Samo pozivi sa govornom poštom" + "Samo dolazni pozivi" + "Samo odlazni pozivi" + "Samo propušteni pozivi" + "(%1$d) %2$s" + "pretraži" + "biranje" + "broj za biranje" + "Pokretanje ili zaustavljanje reprodukcije" + "Uključivanje ili isključivanje spikerfona" + "Traženje pozicije u reprodukciji" + "Smanjivanje brzine reprodukcije" + "Povećavanje brzine reprodukcije" + "Istorija poziva" + "Još opcija" + "tastatura" + "Prikaži samo odlazne" + "Prikaži samo dolazne" + "Prikaži samo propuštene" + "Prikaži samo govorne poruke" + "Prikaži sve pozive" + "Dodaj pauzu od 2 sekunde" + "Dodaj čekanje" + "Podešavanja" + "Simulator" + "Svi kontakti" + "Upotrebite brojčanik za tonsko biranje" + "Vrati se na poziv koji je u toku" + "Dodaj poziv" + "Dolazni pozivi" + "Puštanje govorne pošte" + "Prikaži kontakt %1$s" + "Pozovi %1$s" + "Detalji o kontaktu za %1$s" + "Kontakt informacije potencijalnog nepoželjnog pozivaoca %1$s" + "%1$s poziva." + "Video poziv." + "Slanje SMS-a za %1$s" + "Nepreslušana govorna pošta" + "Pokretanje glasovne pretrage" + "Pozovi %s" + "Govorna pošta" + "%s sek" + "%s min %s sek" + "govornu poruku" + "govorne poruke" + "Da" + "Ne" + + + @string/call_log_header_today + "%1$s u %2$s" + "%1$02d:%2$02d" + "%1$s%2$s" + "Nije moguće pozvati ovaj broj" + "Da biste podesili govornu poštu, idite u Meni > Podešavanja." + "Da biste pozvali govornu poštu, prvo isključite režim rada u avionu." + "Učitava se…" + "IMEI" + "MEID" + "Učitava se sa SIM kartice…" + "Kontakti na SIM kartici" + "Nema dostupne aplikacije za kontakte" + "Glasovna pretraga nije dostupna" + "Nije moguće uputiti telefonski poziv jer je aplikacija Telefon onemogućena." + "Pretraži kontakte" + "Dodajte broj ili pretražite kontakte" + "Istorija poziva je prazna" + "Pozovi" + "Nemate nijedan propušten poziv." + "Prijemno sanduče govorne pošte je prazno." + "Prikaži samo omiljene" + "Istorija poziva" + "Svi" + "Propušteni" + "Govorna pošta" + "Brzo biranje" + "Istorija poziva" + "Kontakti" + "Govorna pošta" + "Uklonjeno je iz omiljenih" + "Opozovi" + "Pozovi %s" + "Napravi novi kontakt" + "Dodaj u kontakt" + "Pošalji SMS" + "Uputi video poziv" + "Blokiraj broj" + "Novih propuštenih poziva: %s" + "Nemate nijedan kontakt na brzom biranju" + "Dodaj omiljen kontakt" + "Još uvek nemate nijedan kontakt" + "Dodaj kontakt" + "Dodirnite sliku da biste videli sve brojeve ili dodirnite i zadržite da biste im promenili raspored" + "Ukloni" + "Video poziv" + "Pošalji poruku" + "Detalji poziva" + "Pošalji u…" + "Pozovi ^1" + "Propušteni poziv: ^1, ^2, ^3, ^4." + "Primljeni poziv: ^1, ^2, ^3, ^4." + "Nepročitana govorna poruka od ^1, ^2, ^3, ^4." + "Govorna poruka od ^1, ^2, ^3, ^4." + "Pozvali ste: ^1, ^2, ^3, ^4." + "preko %1$s" + "%1$s preko %2$s" + "Pozovi ^1" + "Uputite video poziv kontaktu ^1." + "Pusti govornu poštu od ^1" + "Reprodukuj govornu poštu kontakta ^1" + "Pauziraj govornu poštu kontakta ^1" + "Izbriši govornu poštu kontakta ^1" + + %d nova poruka govorne pošte + %d nove poruke govorne pošte + %d novih poruka govorne pošte + + "Napravite kontakt za ^1" + "Dodajte ^1 postojećem kontaktu" + "Detalji poziva za ^1" + "Izbrisano iz istorije poziva" + "Danas" + "Juče" + "Stariji" + "Lista poziva" + "Uključite zvučnik." + "Isključite zvučnik." + "Brža reprodukcija." + "Sporija reprodukcija." + "Započnite ili pauzirajte reprodukciju." + "Opcije prikaza" + "Zvuci i vibracija" + "Pristupačnost" + "Zvuk zvona telefona" + "Vibriraj i za pozive" + "Tonovi tastature" + "Dužina trajanja tona tastature" + + "Normalno" + "Dugačak" + + "Brzi odgovori" + "Pozivi" + "Blokiranje poziva" + "Govorna pošta" + "Blokiranje poziva je privremeno isključeno" + "Blokiranje poziva je onemogućeno zato što ste kontaktirali službe za pomoć u hitnim slučajevima sa ovog telefona u poslednjih 48 sati. Automatski će biti ponovo omogućeno kada istekne period od 48 sati." + "Uvezi brojeve" + "Ranije ste označili neke pozivaoce koje automatski treba preusmeriti na govornu poštu preko drugih aplikacija." + "Prikaži brojeve" + "Uvezi" + "Deblokiraj broj" + "Dodaj broj" + "Pozivi sa ovih brojeva će biti blokirani i poruke govorne pošte će se automatski brisati." + "Pozivi sa ovih brojeva će biti blokirani, ali pozivaoci sa ovih brojeva će i dalje moći da vam ostavljaju poruke govorne pošte." + "Blokirani brojevi" + "%1$s je već blokiran." + "Nalozi za pozivanje" + "Uključi" + "Podesi dozvole" + "Da biste omogućili brzo biranje, uključite dozvolu za Kontakte." + "Da biste videli evidenciju poziva, uključite dozvolu za Telefon." + "Da biste videli kontakte, uključite dozvolu za Kontakte." + "Da biste pristupili govornoj pošti, uključite dozvolu za Telefon." + "Da biste pretražili kontakte, uključite dozvole za Kontakte." + "Da biste uputili poziv, uključite dozvolu za Telefon." + "Aplikacija Telefon nema dozvolu za upisivanje u sistemska podešavanja." + "Blokirano" + "Blokiraj/prijavi kao nepoželjan" + "Blokiraj broj" + "Nije nepoželjan" + "Deblokiraj broj" + "Nepoželjan" + "%1$s je oflajn i ne možete da ga/je kontaktirate" + diff --git a/java/com/android/dialer/app/res/values-be/strings.xml b/java/com/android/dialer/app/res/values-be/strings.xml index 337a62617..54d7d8384 100644 --- a/java/com/android/dialer/app/res/values-be/strings.xml +++ b/java/com/android/dialer/app/res/values-be/strings.xml @@ -42,6 +42,8 @@ "Адказаць" "Паведамленне" "%1$s: %2$s" + "Набраць %s" + "Невядомы нумар галасавой пошты" %1$d Паведамленне галасавой пошты %1$d Паведамленні галасавой пошты @@ -99,6 +101,12 @@ "Галасавая пошта" "%s с" "%s хв %s с" + "галасавая пошта" + "галасавая пошта" + "Так" + "Не" + + @string/call_log_header_today "%1$s у %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-bg/strings.xml b/java/com/android/dialer/app/res/values-bg/strings.xml index 510b4a2d0..0fb06c165 100644 --- a/java/com/android/dialer/app/res/values-bg/strings.xml +++ b/java/com/android/dialer/app/res/values-bg/strings.xml @@ -42,6 +42,8 @@ "Обратно обаждане" "Съобщение" "%1$s: %2$s" + "Набиране на %s" + "Неизвестен номер за гласова поща" %1$d гласови съобщения Гласово съобщение @@ -97,6 +99,11 @@ "Гласова поща" "%s сек" "%s мин %s сек" + "гласово съобщение" + "гласови съобщения" + "Да" + "Не" + "Избрахте %1$s – да се изтрие ли избраното?" @string/call_log_header_today "%1$s в %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-bn/strings.xml b/java/com/android/dialer/app/res/values-bn/strings.xml index ece833ce7..45787cc0f 100644 --- a/java/com/android/dialer/app/res/values-bn/strings.xml +++ b/java/com/android/dialer/app/res/values-bn/strings.xml @@ -42,6 +42,8 @@ "কল ব্যাক করুন" "বার্তা" "%1$s: %2$s" + "%s এ ডায়াল করুন" + "ভয়েসমেল নম্বর অজানা" %1$dটি ভয়েসমেল %1$dটি ভয়েসমেল @@ -97,6 +99,12 @@ "ভয়েসমেল" "%s সেকেন্ড" "%s মিনিট %s সেকেন্ড" + "ভয়েসমেল" + "ভয়েসমেলগুলি" + "হ্যাঁ" + "না" + + @string/call_log_header_today "%1$s তারিখে %2$s\'টায়" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-bs/strings.xml b/java/com/android/dialer/app/res/values-bs/strings.xml index 98506dc45..8c19cb719 100644 --- a/java/com/android/dialer/app/res/values-bs/strings.xml +++ b/java/com/android/dialer/app/res/values-bs/strings.xml @@ -42,6 +42,8 @@ "Povr. poziv" "Poruka" "%1$s: %2$s" + "Pozovi %s" + "Nepoznat broj govorne pošte" %1$d Poruka govorne pošte %1$d Poruke govorne pošte @@ -98,6 +100,12 @@ "Govorna pošta" "%s sek." "%s min. %s sek." + "poruka govorne pošte" + "poruke govorne pošte" + "Da" + "Ne" + + @string/call_log_header_today "%1$s u %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ca/strings.xml b/java/com/android/dialer/app/res/values-ca/strings.xml index 781c6064e..a333e5389 100644 --- a/java/com/android/dialer/app/res/values-ca/strings.xml +++ b/java/com/android/dialer/app/res/values-ca/strings.xml @@ -42,6 +42,8 @@ "Torna la trucada" "Missatge" "%1$s: %2$s" + "Marca el número %s" + "Número de la bústia de veu desconegut" %1$d bústies de veu Bústia de veu @@ -97,6 +99,12 @@ "Bústia de veu" "%s s" "%s min %s s" + "missatge de veu" + "missatges de veu" + "Sí" + "No" + + @string/call_log_header_today "%1$s a les %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-cs/strings.xml b/java/com/android/dialer/app/res/values-cs/strings.xml index 4f35d9cff..cc71441da 100644 --- a/java/com/android/dialer/app/res/values-cs/strings.xml +++ b/java/com/android/dialer/app/res/values-cs/strings.xml @@ -42,6 +42,8 @@ "Zavolat zpět" "Zpráva" "%1$s: %2$s" + "Volat hlasovou schránku %s" + "Číslo hlasové schránky není známé" %1$d hlasové zprávy %1$d hlasové zprávy @@ -99,6 +101,12 @@ "Hlasová schránka" "%s s" "%s min %s s" + "vybranou hlasovou zprávu" + "vybrané hlasové zprávy" + "Ano" + "Ne" + + @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-da/strings.xml b/java/com/android/dialer/app/res/values-da/strings.xml index c3d44c01f..5315bee5e 100644 --- a/java/com/android/dialer/app/res/values-da/strings.xml +++ b/java/com/android/dialer/app/res/values-da/strings.xml @@ -42,6 +42,8 @@ "Ring tilbage" "Besked" "%1$s: %2$s" + "Ring til %s" + "Nummeret for talebeskeden er ukendt" %1$d talebeskeder %1$d talebeskeder @@ -97,6 +99,12 @@ "Telefonsvarer" "%s sek." "%s min. %s sek." + "talebesked" + "talebeskeder" + "Ja" + "Nej" + + @string/call_log_header_today "%1$s kl. %2$s" "%1$02d:%2$02d" 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 25bc8a6df..a50a8cd93 100644 --- a/java/com/android/dialer/app/res/values-de/strings.xml +++ b/java/com/android/dialer/app/res/values-de/strings.xml @@ -42,6 +42,10 @@ "Zurückrufen" "Nachricht" "%1$s: %2$s" + + + + %1$d Mailboxnachrichten Mailboxnachricht @@ -97,6 +101,12 @@ "Mailbox" "%s s" "%s min %s s" + "Mailboxnachricht" + "Mailboxnachrichten" + "Ja" + "Nein" + + @string/call_log_header_today "%1$s um %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-el/strings.xml b/java/com/android/dialer/app/res/values-el/strings.xml index 620ae1130..9978eac96 100644 --- a/java/com/android/dialer/app/res/values-el/strings.xml +++ b/java/com/android/dialer/app/res/values-el/strings.xml @@ -42,6 +42,8 @@ "Επανάκληση" "Μήνυμα" "%1$s: %2$s" + "Κλήση %s" + "Ο αριθμός αυτόματου τηλεφωνητή είναι άγνωστος" %1$d Μηνύματα αυτόμ. τηλεφωνητή Μήνυμα αυτόματου τηλεφωνητή @@ -97,6 +99,12 @@ "Αυτόματος τηλεφωνητής" "%s δευτερόλεπτα" "%s λεπτά %s δευτερόλεπτα" + "φωνητικού μηνύματος αυτόματου τηλεφωνητή" + "φωνητικών μηνυμάτων αυτόματου τηλεφωνητή" + "Ναι" + "Όχι" + + @string/call_log_header_today "%1$s στις %2$s" "%1$02d:%2$02d" 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 36d25346d..6525bb672 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 @@ -42,6 +42,8 @@ "Call back" "Message" "%1$s: %2$s" + "Dial %s" + "Voicemail number unknown" %1$d Voicemails Voicemail @@ -97,6 +99,12 @@ "Voicemail" "%s sec" "%s min %s sec" + "voicemail" + "voicemails" + "Yes" + "No" + + @string/call_log_header_today "%1$s at %2$s" "%1$02d:%2$02d" 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 36d25346d..6525bb672 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 @@ -42,6 +42,8 @@ "Call back" "Message" "%1$s: %2$s" + "Dial %s" + "Voicemail number unknown" %1$d Voicemails Voicemail @@ -97,6 +99,12 @@ "Voicemail" "%s sec" "%s min %s sec" + "voicemail" + "voicemails" + "Yes" + "No" + + @string/call_log_header_today "%1$s at %2$s" "%1$02d:%2$02d" 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 36d25346d..6525bb672 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 @@ -42,6 +42,8 @@ "Call back" "Message" "%1$s: %2$s" + "Dial %s" + "Voicemail number unknown" %1$d Voicemails Voicemail @@ -97,6 +99,12 @@ "Voicemail" "%s sec" "%s min %s sec" + "voicemail" + "voicemails" + "Yes" + "No" + + @string/call_log_header_today "%1$s at %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-es-rUS/strings.xml b/java/com/android/dialer/app/res/values-es-rUS/strings.xml index 798742fb1..d86c50b46 100644 --- a/java/com/android/dialer/app/res/values-es-rUS/strings.xml +++ b/java/com/android/dialer/app/res/values-es-rUS/strings.xml @@ -42,6 +42,8 @@ "Llamar" "Mensaje" "%1$s: %2$s" + "Marcar %s" + "Número de correo de voz desconocido" %1$d mensajes de voz mensaje de voz @@ -97,6 +99,12 @@ "Correo de voz" "%s s" "%s min %s s" + "el mensaje de voz" + "los mensajes de voz" + "Sí" + "No" + + @string/call_log_header_today "El %1$s a la hora %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-es/strings.xml b/java/com/android/dialer/app/res/values-es/strings.xml index 26ea210c7..3c68a3b99 100644 --- a/java/com/android/dialer/app/res/values-es/strings.xml +++ b/java/com/android/dialer/app/res/values-es/strings.xml @@ -42,6 +42,8 @@ "Llamar" "Mensaje" "%1$s: %2$s" + "Marcar %s" + "Número de buzón de voz desconocido" %1$d mensajes de voz mensaje de voz @@ -97,6 +99,11 @@ "Buzón de voz" "%s s" "%s min y %s s" + "mensaje de voz" + "mensajes de voz" + "Sí" + "No" + "¿Eliminar la selección de %1$s?" @string/call_log_header_today "%1$s a las %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-et/strings.xml b/java/com/android/dialer/app/res/values-et/strings.xml index de64ecbb2..071f4eab4 100644 --- a/java/com/android/dialer/app/res/values-et/strings.xml +++ b/java/com/android/dialer/app/res/values-et/strings.xml @@ -42,6 +42,8 @@ "Helista tagasi" "Saada sõnum" "%1$s: %2$s" + "Valige %s" + "Kõneposti number on teadmata" %1$d kõneposti teadet Kõneposti teade @@ -97,6 +99,12 @@ "Kõnepost" "%s s" "%s min %s s" + "kõnepostisõnum" + "kõnepostisõnumid" + "Jah" + "Ei" + + @string/call_log_header_today "%1$s kell %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-eu/strings.xml b/java/com/android/dialer/app/res/values-eu/strings.xml index 688de91dc..236850ab3 100644 --- a/java/com/android/dialer/app/res/values-eu/strings.xml +++ b/java/com/android/dialer/app/res/values-eu/strings.xml @@ -42,6 +42,8 @@ "Erantzun deiari" "Mezua" "%1$s: %2$s" + "Markatu %s" + "Erantzungailuaren zenbakia ezezaguna da" Erantzungailuko %1$d mezu Erantzungailuko mezua @@ -97,6 +99,12 @@ "Erantzungailua" "%s s" "%s min %s s" + "ahots-mezua" + "ahots-mezuak" + "Bai" + "Ez" + + @string/call_log_header_today "%1$s (%2$s)" "%1$02d:%2$02d" 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 63461664f..d76253f79 100644 --- a/java/com/android/dialer/app/res/values-fa/strings.xml +++ b/java/com/android/dialer/app/res/values-fa/strings.xml @@ -42,6 +42,10 @@ "پاسخ تماس" "پیام" "%1$s: %2$s" + + + + %1$d پست صوتی %1$d پست صوتی @@ -97,6 +101,12 @@ "پست صوتی" "%s ثانیه" "%s دقیقه %s ثانیه" + "پست صوتی" + "پست‌های صوتی" + "بله" + "نه" + + @string/call_log_header_today "%1$s ساعت %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-fi/strings.xml b/java/com/android/dialer/app/res/values-fi/strings.xml index da70c087c..e247e4845 100644 --- a/java/com/android/dialer/app/res/values-fi/strings.xml +++ b/java/com/android/dialer/app/res/values-fi/strings.xml @@ -42,6 +42,8 @@ "Soita" "Viesti" "%1$s: %2$s" + "Soita numeroon %s" + "Puhelinvastaajan numero tuntematon" %1$d vastaajaviestiä Vastaajaviesti @@ -97,6 +99,11 @@ "Vastaaja" "%s s" "%s min %s s" + "vastaajaviesti" + "vastaajaviestit" + "Kyllä" + "Ei" + "Poistetaanko %1$s?" @string/call_log_header_today "%1$s klo %2$s" "%1$02d.%2$02d" diff --git a/java/com/android/dialer/app/res/values-fr-rCA/strings.xml b/java/com/android/dialer/app/res/values-fr-rCA/strings.xml index 84dcbc89d..33eae2b43 100644 --- a/java/com/android/dialer/app/res/values-fr-rCA/strings.xml +++ b/java/com/android/dialer/app/res/values-fr-rCA/strings.xml @@ -42,6 +42,8 @@ "Rappeler" "Message" "%1$s : %2$s" + "Composer le %s" + "Numéro de messagerie vocale inconnu" %1$d message vocal %1$d messages vocaux @@ -97,6 +99,11 @@ "Messagerie vocale" "%s s" "%s min et %s sec" + "message vocal" + "messages vocaux" + "Oui" + "Non" + "Supprimer la sélection (%1$s)?" @string/call_log_header_today "%1$s à %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-fr/strings.xml b/java/com/android/dialer/app/res/values-fr/strings.xml index 6f03106c4..e9bb8dd78 100644 --- a/java/com/android/dialer/app/res/values-fr/strings.xml +++ b/java/com/android/dialer/app/res/values-fr/strings.xml @@ -42,6 +42,8 @@ "Rappeler" "Envoyer un SMS" "%1$s : %2$s" + "Composer le %s" + "Numéro de messagerie vocale inconnu" %1$d message vocal %1$d messages vocaux @@ -97,6 +99,11 @@ "Messagerie vocale" "%s secondes" "%s min et %s s" + "message vocal" + "messages vocaux" + "Oui" + "Non" + "Supprimer les messages vocaux sélectionnés (%1$s) ?" @string/call_log_header_today "%1$s à %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-gl/strings.xml b/java/com/android/dialer/app/res/values-gl/strings.xml index 4d4e69377..41eacac16 100644 --- a/java/com/android/dialer/app/res/values-gl/strings.xml +++ b/java/com/android/dialer/app/res/values-gl/strings.xml @@ -42,6 +42,8 @@ "Devolver chamada" "Mensaxe" "%1$s: %2$s" + "Marca o %s" + "Número de correo de voz descoñecido" %1$d correos de voz Correo de voz @@ -97,6 +99,12 @@ "Correo de voz" "%s s" "%s min %s s" + "correo de voz" + "correos de voz" + "Si" + "Non" + + @string/call_log_header_today "%1$s ás %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-gu/strings.xml b/java/com/android/dialer/app/res/values-gu/strings.xml index 726d473a1..1b7b28a11 100644 --- a/java/com/android/dialer/app/res/values-gu/strings.xml +++ b/java/com/android/dialer/app/res/values-gu/strings.xml @@ -42,6 +42,8 @@ "કૉલ બેક" "સંદેશ" "%1$s: %2$s" + "%s ડાયલ કરો" + "વૉઇસમેઇલ નંબર અજાણ" %1$d વૉઇસમેઇલ્સ %1$d વૉઇસમેઇલ્સ @@ -97,6 +99,12 @@ "વૉઇસમેઇલ" "%s સેકંડ" "%s મિ %s સે" + "વૉઇસમેઇલ" + "વૉઇસમેઇલ" + "હા" + "નહીં" + + @string/call_log_header_today "%1$s નાં રોજ %2$s વાગ્યે" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-hi/strings.xml b/java/com/android/dialer/app/res/values-hi/strings.xml index f44d45bcb..cc8b287dc 100644 --- a/java/com/android/dialer/app/res/values-hi/strings.xml +++ b/java/com/android/dialer/app/res/values-hi/strings.xml @@ -42,6 +42,8 @@ "वापस कॉल करें" "संदेश" "%1$s: %2$s" + "%s डायल करें" + "वॉइसमेल नंबर अज्ञात" %1$d वॉइसमेल %1$d वॉइसमेल @@ -97,6 +99,12 @@ "वॉयस मेल" "%s सेकंड" "%s मि. %s से." + "वॉयसमेल" + "वॉयसमेल" + "हां" + "नहीं" + + @string/call_log_header_today "%1$s को %2$s बजे" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-hr/strings.xml b/java/com/android/dialer/app/res/values-hr/strings.xml index 0e5d0d0ec..4b12e83d7 100644 --- a/java/com/android/dialer/app/res/values-hr/strings.xml +++ b/java/com/android/dialer/app/res/values-hr/strings.xml @@ -42,6 +42,10 @@ "Povratni poziv" "Poruka" "%1$s: %2$s" + + + + %1$d poruka govorne pošte %1$d poruke govorne pošte @@ -98,6 +102,12 @@ "Govorna pošta" "%s s" "%s min %s s" + "poruka govorne pošte" + "poruke govorne pošte" + "Da" + "Ne" + + @string/call_log_header_today "%1$s u %2$s" "%1$02d.%2$02d" diff --git a/java/com/android/dialer/app/res/values-hu/strings.xml b/java/com/android/dialer/app/res/values-hu/strings.xml index fcc4454e2..7b529c205 100644 --- a/java/com/android/dialer/app/res/values-hu/strings.xml +++ b/java/com/android/dialer/app/res/values-hu/strings.xml @@ -42,6 +42,10 @@ "Visszahívás" "Üzenet" "%1$s: %2$s" + + + + %1$d hangpostaüzenet Hangpostaüzenet @@ -97,6 +101,12 @@ "Hangposta" "%s másodperc" "%s perc %s másodperc" + "hangpostaüzenetet" + "hangpostaüzeneteket" + "Igen" + "Nem" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-hy/strings.xml b/java/com/android/dialer/app/res/values-hy/strings.xml index 008d34f17..b7b9cd34f 100644 --- a/java/com/android/dialer/app/res/values-hy/strings.xml +++ b/java/com/android/dialer/app/res/values-hy/strings.xml @@ -42,6 +42,8 @@ "Հետ զանգել" "Հաղորդագրություն" "%1$s՝ %2$s" + "Զանգել %s համարին" + "Ձայնային փոստի համարն անհայտ է" %1$d ձայնային փոստ %1$d ձայնային փոստ @@ -97,6 +99,11 @@ "Ձայնային փոստ" "%s վրկ" "%s րոպե %s վայրկյան" + "ձայնային հաղորդագրություն" + "ձայնային հաղորդագրություններ" + "Այո" + "Ոչ" + "Ջնջե՞լ նշված %1$sը" @string/call_log_header_today "%1$s-ին, ժամը %2$s-ին" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-in/strings.xml b/java/com/android/dialer/app/res/values-in/strings.xml index a133a6542..75b1edbe2 100644 --- a/java/com/android/dialer/app/res/values-in/strings.xml +++ b/java/com/android/dialer/app/res/values-in/strings.xml @@ -42,6 +42,10 @@ "Telepon" "Pesan" "%1$s: %2$s" + + + + %1$d Pesan suara Pesan suara @@ -97,6 +101,12 @@ "Kotak Pesan" "%s dtk" "%s mnt %s dtk" + "pesan suara" + "pesan suara" + "Ya" + "Tidak" + + @string/call_log_header_today "%1$s pukul %2$s" "%1$02d.%2$02d" @@ -131,7 +141,7 @@ "Batalkan" "Telepon %s" "Buat kontak baru" - "Tambah ke kontak" + "Tambahkan ke kontak" "Kirim SMS" "Lakukan video call" "Blokir nomor" diff --git a/java/com/android/dialer/app/res/values-is/strings.xml b/java/com/android/dialer/app/res/values-is/strings.xml index c9dc4f371..b905ba886 100644 --- a/java/com/android/dialer/app/res/values-is/strings.xml +++ b/java/com/android/dialer/app/res/values-is/strings.xml @@ -42,6 +42,8 @@ "Hringja til baka" "Skilaboð" "%1$s: %2$s" + "Hringja í %s" + "Talhólfsnúmer ekki þekkt" %1$d talhólfsskilaboð %1$d talhólfsskilaboð @@ -97,6 +99,12 @@ "Talhólf" "%s sek." "%s mín. og %s sek." + "talhólfsskilaboð" + "talhólfsskilaboð" + "Já" + "Nei" + + @string/call_log_header_today "%1$s kl. %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-it/strings.xml b/java/com/android/dialer/app/res/values-it/strings.xml index 1465c91e1..322386fb9 100644 --- a/java/com/android/dialer/app/res/values-it/strings.xml +++ b/java/com/android/dialer/app/res/values-it/strings.xml @@ -42,6 +42,8 @@ "Richiama" "Messaggio" "%1$s: %2$s" + "Componi %s" + "Numero segreteria sconosciuto" %1$d messaggi in segreteria Messaggio in segreteria @@ -97,6 +99,12 @@ "Segreteria" "%s secondi" "%s min %s s" + "messaggio vocale" + "messaggi vocali" + "Sì" + "No" + + @string/call_log_header_today "%1$s alle ore %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-iw/strings.xml b/java/com/android/dialer/app/res/values-iw/strings.xml index efb655322..d3966b446 100644 --- a/java/com/android/dialer/app/res/values-iw/strings.xml +++ b/java/com/android/dialer/app/res/values-iw/strings.xml @@ -42,6 +42,8 @@ "התקשר חזרה" "הודעה" "%1$s: %2$s" + "‏חיוג אל ‎%s‎" + "המספר של תא הדואר הקולי אינו ידוע" %1$d הודעות דואר קולי %1$d הודעות דואר קולי @@ -99,6 +101,11 @@ "דואר קולי" "%s שניות" "%s דק\' %s שנ\'" + "ההודעה הקולית" + "ההודעות הקוליות" + "כן" + "לא" + "האם למחוק את %1$s שבחרת?" @string/call_log_header_today "%1$s ב-%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ja/strings.xml b/java/com/android/dialer/app/res/values-ja/strings.xml index ccdf01759..147f572f7 100644 --- a/java/com/android/dialer/app/res/values-ja/strings.xml +++ b/java/com/android/dialer/app/res/values-ja/strings.xml @@ -42,6 +42,8 @@ "コールバック" "メッセージ" "%1$s さん: %2$s" + "%s 宛に発信" + "ボイスメールの番号が不明です" %1$d件のボイスメール 1件のボイスメール @@ -97,6 +99,11 @@ "ボイスメール" "%s秒" "%s%s秒" + "ボイスメール" + "ボイスメール" + "はい" + "いいえ" + "選択した%1$sを削除しますか?" @string/call_log_header_today "%1$s%2$s" "%1$02d%2$02d 秒" diff --git a/java/com/android/dialer/app/res/values-ka/strings.xml b/java/com/android/dialer/app/res/values-ka/strings.xml index bebf1c542..4d573831e 100644 --- a/java/com/android/dialer/app/res/values-ka/strings.xml +++ b/java/com/android/dialer/app/res/values-ka/strings.xml @@ -42,6 +42,10 @@ "გადარეკვა" "შეტყობინება" "%1$s: %2$s" + + + + %1$d ხმოვანი ფოსტა ხმოვანი ფოსტა @@ -97,6 +101,12 @@ "ხმოვანი ფოსტა" "%s წმ" "%s მინ %s წამ" + "ხმოვანი ფოსტა" + "ხმოვანი ფოსტა" + "დიახ" + "არა" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-kk/strings.xml b/java/com/android/dialer/app/res/values-kk/strings.xml index 7fa5d33ec..62397bbb9 100644 --- a/java/com/android/dialer/app/res/values-kk/strings.xml +++ b/java/com/android/dialer/app/res/values-kk/strings.xml @@ -42,6 +42,8 @@ "Қоңырау шалу" "Хабар" "%1$s: %2$s" + "%s нөмірін теру" + "Дауыстық пошта нөмірі белгісіз" %1$d дауыстық хабар Дауыстық хабар @@ -97,6 +99,12 @@ "Дауыстық пошта" "%s сек." "%s мин %s сек" + "дауыстық хабар" + "дауыстық хабарлар" + "Иә" + "Жоқ" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-km/strings.xml b/java/com/android/dialer/app/res/values-km/strings.xml index 3b6fe9e71..27dbf97c9 100644 --- a/java/com/android/dialer/app/res/values-km/strings.xml +++ b/java/com/android/dialer/app/res/values-km/strings.xml @@ -42,6 +42,8 @@ "ហៅ​ទៅ​វិញ" "សារ" "%1$s: %2$s" + "ហៅ​ទូរសព្ទ​ទៅកាន់ %s" + "មិន​ស្គាល់​លេខ​សារ​ជា​សំឡេង​ទេ" សារជាសម្លេង %1$d សារជាសម្លេង @@ -97,6 +99,11 @@ "សារ​ជា​សំឡេង" "%s វិនាទី" "%s នាទី %s វិនាទី" + "សារ​ជា​សំឡេង" + "សារ​ជា​សំឡេង" + "បាទ/ចាស" + "ទេ" + "លុប %1$s ដែល​បាន​ជ្រើសរើស?" @string/call_log_header_today "%1$s នៅម៉ោង %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-kn/strings.xml b/java/com/android/dialer/app/res/values-kn/strings.xml index 68280f1f3..19e11e90f 100644 --- a/java/com/android/dialer/app/res/values-kn/strings.xml +++ b/java/com/android/dialer/app/res/values-kn/strings.xml @@ -42,6 +42,8 @@ "ಮರಳಿ ಕರೆ ಮಾಡಿ" "ಸಂದೇಶ" "%1$s: %2$s" + "%s ಗೆ ಡಯಲ್‌‌ ಮಾಡಿ" + "ಅಪರಿಚಿತ ಧ್ವನಿಮೇಲ್‌ ಸಂಖ್ಯೆ" %1$d ಧ್ವನಿಮೇಲ್‌ಗಳು %1$d ಧ್ವನಿಮೇಲ್‌ಗಳು @@ -97,6 +99,12 @@ "ಧ್ವನಿಮೇಲ್" "%s ಸೆಕೆಂ" "%s ನಿಮಿ %s ಸೆಕೆಂ" + "ಧ್ವನಿಮೇಲ್" + "ಧ್ವನಿಮೇಲ್‌ಗಳು" + "ಹೌದು" + "ಇಲ್ಲ" + + @string/call_log_header_today "%1$s ರಂದು %2$s ಗಂಟೆಗೆ" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ko/strings.xml b/java/com/android/dialer/app/res/values-ko/strings.xml index f72a69139..d28760c6f 100644 --- a/java/com/android/dialer/app/res/values-ko/strings.xml +++ b/java/com/android/dialer/app/res/values-ko/strings.xml @@ -42,6 +42,8 @@ "통화하기" "메시지" "%1$s: %2$s" + "%s(으)로 전화걸기" + "알 수 없는 음성사서함 번호" 음성메일 %1$d 음성메일 @@ -97,6 +99,12 @@ "음성사서함" "%s초" "%s%s초" + "음성사서함" + "음성사서함" + "예" + "아니요" + + @string/call_log_header_today "%1$s %2$s" "%1$02d%2$02d초" diff --git a/java/com/android/dialer/app/res/values-ky/strings.xml b/java/com/android/dialer/app/res/values-ky/strings.xml index 34d87da09..85789978d 100644 --- a/java/com/android/dialer/app/res/values-ky/strings.xml +++ b/java/com/android/dialer/app/res/values-ky/strings.xml @@ -42,6 +42,10 @@ "Кайра чалуу" "Билдирүү" "%1$s: %2$s" + + + + %1$d Үн каты Үн каты @@ -97,6 +101,12 @@ "Үн почтасы" "%s сек." "%s мүн. %s сек." + "үн почтасы" + "үн почталары" + "Ооба" + "Жок" + + @string/call_log_header_today "%1$s саат %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-lo/strings.xml b/java/com/android/dialer/app/res/values-lo/strings.xml index 4bdb11338..a433847f9 100644 --- a/java/com/android/dialer/app/res/values-lo/strings.xml +++ b/java/com/android/dialer/app/res/values-lo/strings.xml @@ -42,6 +42,8 @@ "ໂທກັບ" "ຂໍ້ຄວາມ" "%1$s: %2$s" + "ໂທຫາ %s" + "ບໍ່ຮູ້ຈັກເບີຂໍ້ຄວາມສຽງ" %1$d ຂໍ້ຄວາມສຽງ ຂໍ້ຄວາມສຽງ @@ -97,6 +99,12 @@ "ຂໍ້ຄວາມສຽງ" "%s ວິນາທີ" "%s ນ​ທ %s ວິ" + "ຂໍ້ຄວາມສຽງ" + "ຂໍ້ຄວາມສຽງ" + "ແມ່ນແລ້ວ" + "ບໍ່" + + @string/call_log_header_today "%1$s ເວລາ %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-lt/strings.xml b/java/com/android/dialer/app/res/values-lt/strings.xml index 5266dd1b8..c4feacf32 100644 --- a/java/com/android/dialer/app/res/values-lt/strings.xml +++ b/java/com/android/dialer/app/res/values-lt/strings.xml @@ -42,6 +42,8 @@ "Perskambinti" "Siųsti pranešimą" "%1$s: „%2$s“" + "Rinkti %s" + "Nežinomas balso pašto numeris" %1$d balso pašto pranešimas %1$d balso pašto pranešimai @@ -99,6 +101,12 @@ "Balso paštas" "%s sek." "%s min. %s sek." + "balso pašto praneš." + "balso pašto praneš." + "Taip" + "Ne" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-lv/strings.xml b/java/com/android/dialer/app/res/values-lv/strings.xml index e36a47eae..440e2d4d1 100644 --- a/java/com/android/dialer/app/res/values-lv/strings.xml +++ b/java/com/android/dialer/app/res/values-lv/strings.xml @@ -42,6 +42,8 @@ "Atzvanīt" "Sūtīt ziņojumu" "%1$s: %2$s" + "Sastādiet šādu numuru: %s" + "Balss pasta numurs nav zināms." %1$d balss pasta ziņojumi %1$d balss pasta ziņojums @@ -98,6 +100,12 @@ "Balss pasts" "%s s" "%s min %s s" + "balss pasta ziņojums" + "balss pasta ziņojumi" + "Jā" + "Nē" + + @string/call_log_header_today "%1$s plkst. %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-mk/strings.xml b/java/com/android/dialer/app/res/values-mk/strings.xml index 742250d03..c179bb631 100644 --- a/java/com/android/dialer/app/res/values-mk/strings.xml +++ b/java/com/android/dialer/app/res/values-mk/strings.xml @@ -42,6 +42,8 @@ "Повикува назад" "Порака" "%1$s: %2$s" + "Бирајте %s" + "Бројот на говорната пошта е непознат" %1$d говорна порака %1$d говорни пораки @@ -97,6 +99,12 @@ "Говорна пошта" "%s сек." "%s мин. %s сек." + "говорна пошта" + "говорни пораки" + "Да" + "Не" + + @string/call_log_header_today "%1$s во %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ml/strings.xml b/java/com/android/dialer/app/res/values-ml/strings.xml index 857973aaa..a642334b5 100644 --- a/java/com/android/dialer/app/res/values-ml/strings.xml +++ b/java/com/android/dialer/app/res/values-ml/strings.xml @@ -42,6 +42,8 @@ "കോൾബാക്ക്" "സന്ദേശം" "%1$s: %2$s" + "%s ഡയൽ ചെയ്യുക" + "വോയ്‌സ്‌മെയിൽ നമ്പർ അജ്ഞാതമാണ്" %1$d വോയ്‌സ്‌മെയിലുകൾ വോയ്‌സ്‌മെയിൽ @@ -97,6 +99,12 @@ "വോയ്‌സ്‌മെയിൽ" "%s സെക്കൻഡ്" "%s മി. %s സെ." + "വോയ്‌സ്‌മെയിൽ" + "വോയ്‌സ്മെയിലുകൾ" + "അതെ" + "ഇല്ല" + + @string/call_log_header_today "%1$s, %2$s-ന്" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-mn/strings.xml b/java/com/android/dialer/app/res/values-mn/strings.xml index decd08116..12f0d41cc 100644 --- a/java/com/android/dialer/app/res/values-mn/strings.xml +++ b/java/com/android/dialer/app/res/values-mn/strings.xml @@ -42,6 +42,8 @@ "Буцааж залгах" "Зурвас" "%1$s: %2$s" + "%s руу залгах" + "Дуут шуудангийн дугаар тодорхойгүй" %1$d Дуут шуудан Дуут шуудан @@ -97,6 +99,11 @@ "Дуут шуудан" "%s сек" "%s минут %s секунд" + "дуут шуудан" + "дуут шуудан" + "Тийм" + "Үгүй" + "Сонгосон %1$s-г устгах уу?" @string/call_log_header_today "%1$s %2$s-д" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-mr/strings.xml b/java/com/android/dialer/app/res/values-mr/strings.xml index 71233ac0e..feda81603 100644 --- a/java/com/android/dialer/app/res/values-mr/strings.xml +++ b/java/com/android/dialer/app/res/values-mr/strings.xml @@ -42,6 +42,8 @@ "पुन्हा कॉल करा" "संदेश" "%1$s: %2$s" + "%s डायल करा" + "व्हॉइसमेल नंबर अज्ञात" %1$d व्हॉइसमेल %1$d व्हॉइसमेल @@ -97,6 +99,12 @@ "व्हॉइसमेल" "%s सेकंद" "%s मिनिट %s सेकंद" + "व्हॉइसमेल" + "व्हॉइसमेल" + "होय" + "नाही" + + @string/call_log_header_today "%1$s रोजी %2$s वाजता" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ms/strings.xml b/java/com/android/dialer/app/res/values-ms/strings.xml index 4373c7ca6..f4c9ac29f 100644 --- a/java/com/android/dialer/app/res/values-ms/strings.xml +++ b/java/com/android/dialer/app/res/values-ms/strings.xml @@ -42,6 +42,10 @@ "Panggil balik" "Mesej" "%1$s: %2$s" + + + + %1$d Mel suara Mel suara @@ -97,6 +101,12 @@ "Mel suara" "%s saat" "%s min %s saat" + "mel suara" + "mel suara" + "Ya" + "Tidak" + + @string/call_log_header_today "%1$s pada %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-my/strings.xml b/java/com/android/dialer/app/res/values-my/strings.xml index fa317bce4..16b286fd4 100644 --- a/java/com/android/dialer/app/res/values-my/strings.xml +++ b/java/com/android/dialer/app/res/values-my/strings.xml @@ -42,6 +42,8 @@ "ပြန်ခေါ်ပါ" "မက်ဆေ့ဂျ်" "%1$s - %2$s" + "%s ကို ခေါ်ပါ" + "အသံမေးလ်နံပါတ် မသိပါ" %1$d အသံမေးလ်များ အသံမေးလ် @@ -97,6 +99,12 @@ "အသံစာပို့စနစ်" "%s စက္ကန့်" "%s မိနစ် %s စက္ကန့်" + "အသံမေးလ်" + "အသံမေးလ်များ" + "Yes" + "No" + + @string/call_log_header_today "%1$s %2$s ၌" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-nb/strings.xml b/java/com/android/dialer/app/res/values-nb/strings.xml index 488864f3e..4d97dc23a 100644 --- a/java/com/android/dialer/app/res/values-nb/strings.xml +++ b/java/com/android/dialer/app/res/values-nb/strings.xml @@ -42,6 +42,8 @@ "Ring tilbake" "Melding" "%1$s: %2$s" + "Ring %s" + "Mangler nummer til talepostkasse" %1$d talemeldinger talemelding @@ -97,6 +99,11 @@ "Telefonsvarer" "%s sek" "%s min %s sek" + "talepost" + "talepost" + "Ja" + "Nei" + "Slett markert %1$s?" @string/call_log_header_today "%1$s kl. %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ne/strings.xml b/java/com/android/dialer/app/res/values-ne/strings.xml index 33989648e..169c0111a 100644 --- a/java/com/android/dialer/app/res/values-ne/strings.xml +++ b/java/com/android/dialer/app/res/values-ne/strings.xml @@ -42,6 +42,8 @@ "फेरि कल गर्नुहोस्" "सन्देश" "%1$s: %2$s" + "%sमा डायल गर्नुहोस्" + "भ्वाइस मेल नम्बर अज्ञात" %1$d भ्वाइसमेलहरू भ्वाइसमेल @@ -97,6 +99,11 @@ "भ्वाइसमेल" "%s सेकेन्ड" "%s मिनेट %s सकेन्ड" + "भ्वाइस मेल" + "भ्वाइस मेलहरू" + "हो" + "होइन" + "चयन गरिएका %1$s लाई मेटाउने हो?" @string/call_log_header_today "%1$s मा %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-nl/strings.xml b/java/com/android/dialer/app/res/values-nl/strings.xml index 986236e4f..3eddbb7e2 100644 --- a/java/com/android/dialer/app/res/values-nl/strings.xml +++ b/java/com/android/dialer/app/res/values-nl/strings.xml @@ -42,6 +42,8 @@ "Terugbellen" "Bericht" "%1$s: %2$s" + "%s bellen" + "Voicemailnummer onbekend" %1$d voicemails Voicemail @@ -97,6 +99,12 @@ "Voicemail" "%s sec." "%s min. %s sec." + "voicemail" + "voicemails" + "Ja" + "Nee" + + @string/call_log_header_today "%1$s om %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-no/strings.xml b/java/com/android/dialer/app/res/values-no/strings.xml index 488864f3e..4d97dc23a 100644 --- a/java/com/android/dialer/app/res/values-no/strings.xml +++ b/java/com/android/dialer/app/res/values-no/strings.xml @@ -42,6 +42,8 @@ "Ring tilbake" "Melding" "%1$s: %2$s" + "Ring %s" + "Mangler nummer til talepostkasse" %1$d talemeldinger talemelding @@ -97,6 +99,11 @@ "Telefonsvarer" "%s sek" "%s min %s sek" + "talepost" + "talepost" + "Ja" + "Nei" + "Slett markert %1$s?" @string/call_log_header_today "%1$s kl. %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-pa/strings.xml b/java/com/android/dialer/app/res/values-pa/strings.xml index 6e9cc03a9..c8a39f6ae 100644 --- a/java/com/android/dialer/app/res/values-pa/strings.xml +++ b/java/com/android/dialer/app/res/values-pa/strings.xml @@ -42,6 +42,8 @@ "ਕਾਲ ਬੈਕ ਕਰੋ" "ਸੁਨੇਹਾ" "%1$s: %2$s" + "%s ਡਾਇਲ ਕਰੋ" + "ਵੌਇਸਮੇਲ ਨੰਬਰ ਅਗਿਆਤ" %1$d ਵੌਇਸਮੇਲਾਂ %1$d ਵੌਇਸਮੇਲਾਂ @@ -97,6 +99,12 @@ "ਵੌਇਸਮੇਲ" "%s ਸਕਿੰਟ" "%s ਮਿੰਟ %s ਸਕਿੰਟ" + "ਵੌਇਸਮੇਲ" + "ਵੌਇਸਮੇਲਾਂ" + "ਹਾਂ" + "ਨਹੀਂ" + + @string/call_log_header_today "%1$s ਨੂੰ %2$s ਵਜੇ" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-pl/strings.xml b/java/com/android/dialer/app/res/values-pl/strings.xml index 0c8f43ff6..452854064 100644 --- a/java/com/android/dialer/app/res/values-pl/strings.xml +++ b/java/com/android/dialer/app/res/values-pl/strings.xml @@ -42,6 +42,8 @@ "Oddzwoń" "Wyślij SMS-a" "%1$s: %2$s" + "Zadzwoń pod numer %s" + "Numer poczty głosowej jest nieznany" %1$d wiadomości głosowe %1$d wiadomości głosowych @@ -99,6 +101,12 @@ "Poczta głosowa" "%s s" "%s min %s s" + "wiadomości głosowe" + "wiadomości głosowe" + "Tak" + "Nie" + + @string/call_log_header_today "%1$s o %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-pt-rBR/strings.xml b/java/com/android/dialer/app/res/values-pt-rBR/strings.xml index 4f090df6e..845442a71 100644 --- a/java/com/android/dialer/app/res/values-pt-rBR/strings.xml +++ b/java/com/android/dialer/app/res/values-pt-rBR/strings.xml @@ -42,6 +42,8 @@ "Retornar chamada" "Mensagem" "%1$s: %2$s" + "Discar %s" + "Número do correio de voz desconhecido" %1$d Correios de voz %1$d Correios de voz @@ -97,6 +99,12 @@ "Correio de voz" "%s seg" "%s m %s s" + "correio de voz" + "correios de voz" + "Sim" + "Não" + + @string/call_log_header_today "%1$s às %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-pt-rPT/strings.xml b/java/com/android/dialer/app/res/values-pt-rPT/strings.xml index 9cabdc4a5..95451bc9d 100644 --- a/java/com/android/dialer/app/res/values-pt-rPT/strings.xml +++ b/java/com/android/dialer/app/res/values-pt-rPT/strings.xml @@ -42,6 +42,8 @@ "Ligar de volta" "Mensagem" "%1$s: %2$s" + "Marcar %s" + "Número do correio de voz desconhecido" %1$d mensagens de correio de voz Mensagem de correio de voz @@ -97,6 +99,12 @@ "Correio de voz" "%s seg" "%s min. %s seg." + "mensagem de correio de voz" + "mensagens de correio de voz" + "Sim" + "Não" + + @string/call_log_header_today "%1$s às %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-pt/strings.xml b/java/com/android/dialer/app/res/values-pt/strings.xml index 4f090df6e..845442a71 100644 --- a/java/com/android/dialer/app/res/values-pt/strings.xml +++ b/java/com/android/dialer/app/res/values-pt/strings.xml @@ -42,6 +42,8 @@ "Retornar chamada" "Mensagem" "%1$s: %2$s" + "Discar %s" + "Número do correio de voz desconhecido" %1$d Correios de voz %1$d Correios de voz @@ -97,6 +99,12 @@ "Correio de voz" "%s seg" "%s m %s s" + "correio de voz" + "correios de voz" + "Sim" + "Não" + + @string/call_log_header_today "%1$s às %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ro/strings.xml b/java/com/android/dialer/app/res/values-ro/strings.xml index 3a083ae74..36987fe3e 100644 --- a/java/com/android/dialer/app/res/values-ro/strings.xml +++ b/java/com/android/dialer/app/res/values-ro/strings.xml @@ -42,6 +42,8 @@ "Sunați" "Trimiteți mesaj" "%1$s: %2$s" + "Apelați %s" + "Numărul mesageriei vocale necunoscut" %1$d mesaje vocale %1$d de mesaje vocale @@ -98,6 +100,12 @@ "Mesagerie vocală" "%s secunde" "%s min. %s sec." + "mesagerie vocală" + "mesaje vocale" + "Da" + "Nu" + + @string/call_log_header_today "%1$s la %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ru/strings.xml b/java/com/android/dialer/app/res/values-ru/strings.xml index 925d684a5..69031b14f 100644 --- a/java/com/android/dialer/app/res/values-ru/strings.xml +++ b/java/com/android/dialer/app/res/values-ru/strings.xml @@ -42,6 +42,8 @@ "Позвонить" "Написать SMS" "%1$s: %2$s" + "Позвонить: %s" + "Номер голосовой почты неизвестен" %1$d голосовое сообщение %1$d голосовых сообщения @@ -99,6 +101,12 @@ "Голосовая почта" "%s сек." "%s мин. %s сек." + "голосовое сообщение" + "голосовые сообщения" + "Да" + "Нет" + + @string/call_log_header_today "%1$s в %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-si/strings.xml b/java/com/android/dialer/app/res/values-si/strings.xml index 55ce37b81..45ee7d961 100644 --- a/java/com/android/dialer/app/res/values-si/strings.xml +++ b/java/com/android/dialer/app/res/values-si/strings.xml @@ -42,6 +42,8 @@ "නැවත අමතන්න" "පණිවිඩය" "%1$s: %2$s" + "%s ඩයල් කරන්න" + "හඬ තැපැල් අංකය නොදනී" හඬ තැපැල් %1$d හඬ තැපැල් %1$d @@ -97,6 +99,12 @@ "හඬ තැපෑල" "තත් %s" "මිනි %s තත් %s" + "හඬ තැපෑල" + "හඬ තැපැල්" + "ඔව්" + "නැත" + + @string/call_log_header_today "%1$s දින %2$sට" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sk/strings.xml b/java/com/android/dialer/app/res/values-sk/strings.xml index 59f3d10f1..9774a4180 100644 --- a/java/com/android/dialer/app/res/values-sk/strings.xml +++ b/java/com/android/dialer/app/res/values-sk/strings.xml @@ -42,6 +42,8 @@ "Zavolať" "Správa" "%1$s: %2$s" + "Vytočiť číslo %s" + "Číslo hlasovej schránky je neznáme" %1$d odkazy v hlasovej schránke %1$d odkazu v hlasovej schránke @@ -99,6 +101,12 @@ "Hlasová schránka" "%s s" "%s min. %s s" + "hlasová správa" + "hlasové správy" + "Áno" + "Nie" + + @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sl/strings.xml b/java/com/android/dialer/app/res/values-sl/strings.xml index 28f4ce021..80898e58d 100644 --- a/java/com/android/dialer/app/res/values-sl/strings.xml +++ b/java/com/android/dialer/app/res/values-sl/strings.xml @@ -42,6 +42,8 @@ "Povratni klic" "SMS" "%1$s: %2$s" + "Kliči %s" + "Neznana številka odzivnika" %1$d sporočilo v odzivniku %1$d sporočili v odzivniku @@ -99,6 +101,12 @@ "Glasovna pošta" "%s s" "%s min %s s" + "sporočilo v odzivniku" + "sporočila v odzivniku" + "Da" + "Ne" + + @string/call_log_header_today "%1$s ob %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sq/strings.xml b/java/com/android/dialer/app/res/values-sq/strings.xml index 48ec8fee8..ea757a873 100644 --- a/java/com/android/dialer/app/res/values-sq/strings.xml +++ b/java/com/android/dialer/app/res/values-sq/strings.xml @@ -42,6 +42,10 @@ "Telefono" "Mesazh" "%1$s: %2$s" + + + + %1$d posta zanore postë zanore @@ -97,6 +101,12 @@ "Posta zanore" "%s sekonda" "%s min. e %s sek." + "posta zanore" + "postat zanore" + "Po" + "Jo" + + @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sr/strings.xml b/java/com/android/dialer/app/res/values-sr/strings.xml index fd4e2b9ba..610f230f7 100644 --- a/java/com/android/dialer/app/res/values-sr/strings.xml +++ b/java/com/android/dialer/app/res/values-sr/strings.xml @@ -42,6 +42,8 @@ "Узврати позив" "Пошаљи SMS" "%1$s: %2$s" + "Позови %s" + "Непознат број говорне поште" %1$d говорна порука %1$d говорне поруке @@ -98,6 +100,12 @@ "Говорна пошта" "%s сек" "%s мин %s сек" + "говорну поруку" + "говорне поруке" + "Да" + "Не" + + @string/call_log_header_today "%1$s у %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sv/strings.xml b/java/com/android/dialer/app/res/values-sv/strings.xml index fc8920a38..c29568ba3 100644 --- a/java/com/android/dialer/app/res/values-sv/strings.xml +++ b/java/com/android/dialer/app/res/values-sv/strings.xml @@ -42,6 +42,8 @@ "Ring upp" "Meddelande" "%1$s: %2$s" + "Ring %s" + "Numret till röstbrevlådan är okänt" %1$d röstmeddelanden röstmeddelande @@ -97,6 +99,12 @@ "Röstbrevlåda" "%s sekund" "%s min %s sek" + "röstbrevlåda" + "röstmeddelanden" + "Ja" + "Nej" + + @string/call_log_header_today "%1$s kl. %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-sw/strings.xml b/java/com/android/dialer/app/res/values-sw/strings.xml index 4c469979a..11f5664d0 100644 --- a/java/com/android/dialer/app/res/values-sw/strings.xml +++ b/java/com/android/dialer/app/res/values-sw/strings.xml @@ -42,6 +42,10 @@ "Mpigie" "Ujumbe" "%1$s: %2$s" + + + + Ujumbe %1$d wa sauti Ujumbe wa sauti @@ -97,6 +101,12 @@ "Ujumbe wa sauti" "Sekunde %s" "Dak %s sek %s" + "ujumbe wa sauti" + "ujumbe wa sauti" + "Ndiyo" + "Hapana" + + @string/call_log_header_today "%1$s saa %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ta/strings.xml b/java/com/android/dialer/app/res/values-ta/strings.xml index 0b5a51d9f..795a4e7cb 100644 --- a/java/com/android/dialer/app/res/values-ta/strings.xml +++ b/java/com/android/dialer/app/res/values-ta/strings.xml @@ -42,6 +42,8 @@ "அழை" "செய்தி அனுப்பு" "%1$s: %2$s" + "%s என்ற எண்ணை அழைக்கவும்" + "குரலஞ்சல் எண் அறியப்படவில்லை" %1$d குரலஞ்சல்கள் குரலஞ்சல் @@ -97,6 +99,12 @@ "குரலஞ்சல்" "%s வி" "%s நிமிடம் %s வினாடி" + "குரலஞ்சல்" + "குரலஞ்சல்கள்" + "ஆம்" + "வேண்டாம்" + + @string/call_log_header_today "%1$s அன்று %2$s மணிக்கு" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-te/strings.xml b/java/com/android/dialer/app/res/values-te/strings.xml index 512f7e276..531e20618 100644 --- a/java/com/android/dialer/app/res/values-te/strings.xml +++ b/java/com/android/dialer/app/res/values-te/strings.xml @@ -42,6 +42,8 @@ "కాల్ చేయి" "సందేశం పంపు" "%1$s: %2$s" + "%sకు డయల్ చేయండి" + "వాయిస్ మెయిల్ నంబర్ తెలియదు" %1$d వాయిస్ మెయిల్‌లు వాయిస్ మెయిల్ @@ -97,6 +99,12 @@ "వాయిస్ మెయిల్" "%s సెక" "%s నిమి %s సెక" + "వాయిస్ మెయిల్" + "వాయిస్ మెయిల్‌లు" + "అవును" + "వద్దు" + + @string/call_log_header_today "%1$s %2$sకి" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-th/strings.xml b/java/com/android/dialer/app/res/values-th/strings.xml index 6817d51b8..0433a6eb4 100644 --- a/java/com/android/dialer/app/res/values-th/strings.xml +++ b/java/com/android/dialer/app/res/values-th/strings.xml @@ -42,6 +42,8 @@ "โทรกลับ" "ข้อความ" "%1$s: %2$s" + "หมุนหมายเลข %s" + "ไม่ทราบหมายเลขข้อความเสียง" %1$d ข้อความเสียง ข้อความเสียง @@ -97,6 +99,12 @@ "ข้อความเสียง" "%s วินาที" "%s นาที %s วินาที" + "ข้อความเสียง" + "ข้อความเสียง" + "ใช่" + "ไม่" + + @string/call_log_header_today "วันที่ %1$s เวลา %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-tl/strings.xml b/java/com/android/dialer/app/res/values-tl/strings.xml index c98a04633..6eb1723ff 100644 --- a/java/com/android/dialer/app/res/values-tl/strings.xml +++ b/java/com/android/dialer/app/res/values-tl/strings.xml @@ -42,6 +42,8 @@ "Tawagan" "Mensahe" "%1$s: %2$s" + "I-dial ang %s" + "Hindi kilala ang numero ng voicemail" %1$d Voicemail %1$d na Voicemail @@ -97,6 +99,12 @@ "Voicemail" "%s sec" "%s min %s sec" + "voicemail" + "mga voicemail" + "Oo" + "Hindi" + + @string/call_log_header_today "%1$s ng %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-tr/strings.xml b/java/com/android/dialer/app/res/values-tr/strings.xml index 73b3cd729..751286b30 100644 --- a/java/com/android/dialer/app/res/values-tr/strings.xml +++ b/java/com/android/dialer/app/res/values-tr/strings.xml @@ -42,6 +42,10 @@ "Geri ara" "İleti" "%1$s: %2$s" + + + + %1$d Sesli Mesaj Sesli Mesaj @@ -97,6 +101,12 @@ "Sesli Mesaj" "%s sn." "%s dk. %s sn." + "sesli mesaj" + "sesli mesajlar" + "Evet" + "Hayır" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-uk/strings.xml b/java/com/android/dialer/app/res/values-uk/strings.xml index dd7689093..0da2ea9f2 100644 --- a/java/com/android/dialer/app/res/values-uk/strings.xml +++ b/java/com/android/dialer/app/res/values-uk/strings.xml @@ -42,6 +42,8 @@ "Передзвонити" "Повідомлення" "%1$s: %2$s" + "Набрати %s" + "Невідомий номер голосової пошти" %1$d голосове повідомлення %1$d голосові повідомлення @@ -99,6 +101,12 @@ "Голосова пошта" "%s с" "%s хв %s с" + "голосова пошта" + "голосова пошта" + "Так" + "Ні" + + @string/call_log_header_today "%1$s о %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-ur/strings.xml b/java/com/android/dialer/app/res/values-ur/strings.xml index 534b915cc..748e2f210 100644 --- a/java/com/android/dialer/app/res/values-ur/strings.xml +++ b/java/com/android/dialer/app/res/values-ur/strings.xml @@ -42,6 +42,10 @@ "واپس کال کریں" "پیغام" "%1$s: %2$s" + + + + %1$d صوتی میلز صوتی میل @@ -97,6 +101,12 @@ "صوتی میل" "%s سیکنڈ" "%s منٹ %s سیکنڈ" + "صوتی میل" + "صوتی میلز" + "ہاں" + "نہیں" + + @string/call_log_header_today "%1$s بوقت %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-uz/strings.xml b/java/com/android/dialer/app/res/values-uz/strings.xml index 11befbc51..a13da4389 100644 --- a/java/com/android/dialer/app/res/values-uz/strings.xml +++ b/java/com/android/dialer/app/res/values-uz/strings.xml @@ -42,6 +42,10 @@ "Telefon" "SMS yozish" "%1$s: %2$s" + + + + %1$d ta ovozli xabar Ovozli xabar @@ -97,6 +101,12 @@ "Ovozli pochta" "%s soniya" "%s daq %s son" + "ovozli xabar" + "ovozli xabarlar" + "Ha" + "Yo‘q" + + @string/call_log_header_today "%1$s, %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-vi/strings.xml b/java/com/android/dialer/app/res/values-vi/strings.xml index 942f06768..a95e0683c 100644 --- a/java/com/android/dialer/app/res/values-vi/strings.xml +++ b/java/com/android/dialer/app/res/values-vi/strings.xml @@ -42,6 +42,8 @@ "Gọi lại" "Tin nhắn" "%1$s: %2$s" + "Quay số %s" + "Số thư thoại không xác định" %1$d Thư thoại Thư thoại @@ -97,6 +99,12 @@ "Thư thoại" "%s giây" "%s phút %s giây" + "thư thoại" + "thư thoại" + "Có" + "Không" + + @string/call_log_header_today "%1$s lúc %2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-zh-rCN/strings.xml b/java/com/android/dialer/app/res/values-zh-rCN/strings.xml index 4b6f55a69..6a12a0711 100644 --- a/java/com/android/dialer/app/res/values-zh-rCN/strings.xml +++ b/java/com/android/dialer/app/res/values-zh-rCN/strings.xml @@ -42,6 +42,8 @@ "回拨" "发短信" "%1$s%2$s" + "拨打 %s" + "语音信箱号码未知" %1$d 封语音邮件 1 封语音邮件 @@ -97,6 +99,12 @@ "语音信箱" "%s 秒" "%s 分钟 %s 秒" + "语音邮件" + "语音邮件" + "是" + "否" + + @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-zh-rHK/strings.xml b/java/com/android/dialer/app/res/values-zh-rHK/strings.xml index 95dd23871..12e50fb09 100644 --- a/java/com/android/dialer/app/res/values-zh-rHK/strings.xml +++ b/java/com/android/dialer/app/res/values-zh-rHK/strings.xml @@ -42,6 +42,8 @@ "回撥" "短訊" "%1$s%2$s" + "撥號 %s" + "沒有可用的留言信箱號碼" %1$d 個留言 留言 @@ -97,6 +99,11 @@ "留言" "%s 秒" "%s%s 秒" + "留言" + "留言" + "是" + "否" + "要刪除所選的%1$s嗎?" @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-zh-rTW/strings.xml b/java/com/android/dialer/app/res/values-zh-rTW/strings.xml index 66d986d8c..83d093e55 100644 --- a/java/com/android/dialer/app/res/values-zh-rTW/strings.xml +++ b/java/com/android/dialer/app/res/values-zh-rTW/strings.xml @@ -42,6 +42,10 @@ "回撥" "傳送簡訊" "%1$s%2$s" + + + + %1$d 則語音留言 語音留言 @@ -97,6 +101,12 @@ "語音留言" "%s 秒" "%s%s 秒" + "語音留言" + "語音留言" + "是" + "否" + + @string/call_log_header_today "%1$s%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values-zu/strings.xml b/java/com/android/dialer/app/res/values-zu/strings.xml index 4cee09247..840d16877 100644 --- a/java/com/android/dialer/app/res/values-zu/strings.xml +++ b/java/com/android/dialer/app/res/values-zu/strings.xml @@ -42,6 +42,8 @@ "Phinda ushaye" "Umlayezo" "%1$s: %2$s" + "Dayela %s" + "Inombolo yevoyisimeyili ayaziwa" %1$d Amavoyisimeyili %1$d Amavoyisimeyili @@ -97,6 +99,12 @@ "Ivoyisimeyili" "%s isekhondi" "%s amaminithi %s amasekhondi" + "ivoyisimeyili" + "ama-meyli ezwi" + "Yebo" + "Cha" + + @string/call_log_header_today "%1$s ngo-%2$s" "%1$02d:%2$02d" diff --git a/java/com/android/dialer/app/res/values/strings.xml b/java/com/android/dialer/app/res/values/strings.xml index 9944f9ff2..a4e443dca 100644 --- a/java/com/android/dialer/app/res/values/strings.xml +++ b/java/com/android/dialer/app/res/values/strings.xml @@ -105,6 +105,12 @@ %1$s: %2$s + + Dial %s + + Voicemail number unknown Voicemail @@ -356,6 +362,12 @@ %s min %s sec + voicemail + voicemails + Yes + No + Delete selected %1$s? + diff --git a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java new file mode 100644 index 000000000..078a40a82 --- /dev/null +++ b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java @@ -0,0 +1,90 @@ +/* + * 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.voicemail; + +import android.annotation.TargetApi; +import android.app.PendingIntent; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.os.Build.VERSION_CODES; +import android.support.v4.os.BuildCompat; +import android.telecom.PhoneAccount; +import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; +import android.telephony.TelephonyManager; +import com.android.dialer.app.calllog.DefaultVoicemailNotifier; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; +import com.android.voicemail.VoicemailComponent; + +/** + * Receives {@link TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION}, and forwards to {@link + * DefaultVoicemailNotifier}. Will ignore the notification if the account has visual voicemail. + * Legacy voicemail is the traditional, non-visual, dial-in voicemail. + */ +@TargetApi(VERSION_CODES.O) +public class LegacyVoicemailNotificationReceiver extends BroadcastReceiver { + + @Override + public void onReceive(Context context, Intent intent) { + LogUtil.i( + "LegacyVoicemailNotificationReceiver.onReceive", "received legacy voicemail notification"); + Assert.checkArgument(BuildCompat.isAtLeastO()); + + PhoneAccountHandle phoneAccountHandle = + intent.getParcelableExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE); + if (phoneAccountHandle == null) { + // TODO: assert instead after API has landed. + phoneAccountHandle = + context + .getSystemService(TelecomManager.class) + .getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_VOICEMAIL); + } + if (VoicemailComponent.get(context) + .getVoicemailClient() + .isActivated(context, phoneAccountHandle)) { + LogUtil.i( + "LegacyVoicemailNotificationReceiver.onReceive", + "visual voicemail is activated, ignoring notification"); + return; + } + + // Missing extra means there are unknown numbers of voicemails. + int count = intent.getIntExtra(TelephonyManager.EXTRA_NOTIFICATION_COUNT, 1); + if (count == 0) { + LogUtil.i("LegacyVoicemailNotificationReceiver.onReceive", "clearing notification"); + DefaultVoicemailNotifier.getInstance(context).cancelLegacyNotification(); + return; + } + + String voicemailNumber = intent.getStringExtra(TelephonyManager.EXTRA_VOICEMAIL_NUMBER); + PendingIntent callVoicemailIntent = + intent.getParcelableExtra(TelephonyManager.EXTRA_CALL_VOICEMAIL_INTENT); + PendingIntent voicemailSettingIntent = + intent.getParcelableExtra(TelephonyManager.EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT); + + LogUtil.i("LegacyVoicemailNotificationReceiver.onReceive", "sending notification"); + DefaultVoicemailNotifier.getInstance(context) + .notifyLegacyVoicemail( + phoneAccountHandle, + count, + voicemailNumber, + callVoicemailIntent, + voicemailSettingIntent); + } +} diff --git a/java/com/android/dialer/app/voicemail/VoicemailErrorManager.java b/java/com/android/dialer/app/voicemail/VoicemailErrorManager.java index 939007adf..a0bae36cc 100644 --- a/java/com/android/dialer/app/voicemail/VoicemailErrorManager.java +++ b/java/com/android/dialer/app/voicemail/VoicemailErrorManager.java @@ -20,15 +20,25 @@ import android.content.Context; import android.database.ContentObserver; import android.database.Cursor; import android.os.Handler; +import android.support.annotation.MainThread; +import android.telecom.PhoneAccountHandle; +import android.telephony.PhoneStateListener; +import android.telephony.ServiceState; +import android.telephony.TelephonyManager; +import android.util.ArrayMap; import com.android.dialer.app.calllog.CallLogAlertManager; import com.android.dialer.app.calllog.CallLogModalAlertManager; import com.android.dialer.app.voicemail.error.VoicemailErrorAlert; import com.android.dialer.app.voicemail.error.VoicemailErrorMessageCreator; import com.android.dialer.app.voicemail.error.VoicemailStatus; import com.android.dialer.app.voicemail.error.VoicemailStatusReader; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; import com.android.dialer.database.CallLogQueryHandler; +import com.android.voicemail.VoicemailComponent; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * Fetches voicemail status and generate {@link VoicemailStatus} for {@link VoicemailErrorAlert} to @@ -40,12 +50,14 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic private final CallLogQueryHandler callLogQueryHandler; private final VoicemailErrorAlert alertItem; + private final Map listeners = new ArrayMap<>(); + private final ContentObserver statusObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { super.onChange(selfChange); - maybeFetchStatus(); + fetchStatus(); } }; @@ -61,13 +73,14 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic new VoicemailErrorAlert( context, alertManager, modalAlertManager, new VoicemailErrorMessageCreator()); callLogQueryHandler = new CallLogQueryHandler(context, context.getContentResolver(), this); - maybeFetchStatus(); + fetchStatus(); } public ContentObserver getContentObserver() { return statusObserver; } + @MainThread @Override public void onVoicemailStatusFetched(Cursor statusCursor) { List statuses = new ArrayList<>(); @@ -75,6 +88,7 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic VoicemailStatus status = new VoicemailStatus(context, statusCursor); if (status.isActive()) { statuses.add(status); + addServiceStateListener(status); } } alertItem.updateStatus(statuses, this); @@ -82,6 +96,37 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic return; } + @MainThread + private void addServiceStateListener(VoicemailStatus status) { + Assert.isMainThread(); + if (!VoicemailComponent.get(context).getVoicemailClient().isVoicemailModuleEnabled()) { + LogUtil.i("VoicemailErrorManager.addServiceStateListener", "VVM module not enabled"); + return; + } + if (!status.sourcePackage.equals(context.getPackageName())) { + LogUtil.i("VoicemailErrorManager.addServiceStateListener", "non-dialer source"); + return; + } + TelephonyManager telephonyManager = + context + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(status.getPhoneAccountHandle()); + if (telephonyManager == null) { + LogUtil.e("VoicemailErrorManager.addServiceStateListener", "invalid PhoneAccountHandle"); + return; + } + PhoneAccountHandle phoneAccountHandle = status.getPhoneAccountHandle(); + if (listeners.containsKey(phoneAccountHandle)) { + return; + } + LogUtil.i( + "VoicemailErrorManager.addServiceStateListener", + "adding listener for " + phoneAccountHandle); + ServiceStateListener serviceStateListener = new ServiceStateListener(); + telephonyManager.listen(serviceStateListener, PhoneStateListener.LISTEN_SERVICE_STATE); + listeners.put(phoneAccountHandle, serviceStateListener); + } + @Override public void onVoicemailUnreadCountFetched(Cursor cursor) { // Do nothing @@ -101,7 +146,7 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic public void onResume() { isForeground = true; if (statusInvalidated) { - maybeFetchStatus(); + fetchStatus(); } } @@ -110,15 +155,22 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic statusInvalidated = false; } + public void onDestroy() { + TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); + for (ServiceStateListener listener : listeners.values()) { + telephonyManager.listen(listener, PhoneStateListener.LISTEN_NONE); + } + } + @Override public void refresh() { - maybeFetchStatus(); + fetchStatus(); } /** * Fetch the status when the dialer is in foreground, or queue a fetch when the dialer resumes. */ - private void maybeFetchStatus() { + private void fetchStatus() { if (!isForeground) { // Dialer is in the background, UI should not be updated. Reload the status when it resumes. statusInvalidated = true; @@ -126,4 +178,12 @@ public class VoicemailErrorManager implements CallLogQueryHandler.Listener, Voic } callLogQueryHandler.fetchVoicemailStatus(); } + + private class ServiceStateListener extends PhoneStateListener { + + @Override + public void onServiceStateChanged(ServiceState serviceState) { + fetchStatus(); + } + } } diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java index 04fe7f66a..f160e024e 100644 --- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java +++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java @@ -33,8 +33,8 @@ import android.widget.TextView; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogAsyncTaskUtil; import com.android.dialer.app.calllog.CallLogListItemViewHolder; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import java.util.Objects; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java index 5bfa03e90..5ac487b2d 100644 --- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java +++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java @@ -54,8 +54,8 @@ import com.android.dialer.common.concurrent.AsyncTaskExecutors; import com.android.dialer.common.concurrent.DialerExecutor; import com.android.dialer.common.concurrent.DialerExecutors; import com.android.dialer.constants.Constants; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.phonenumbercache.CallLogQuery; import com.google.common.io.ByteStreams; import java.io.File; diff --git a/java/com/android/dialer/app/voicemail/error/OmtpVoicemailMessageCreator.java b/java/com/android/dialer/app/voicemail/error/OmtpVoicemailMessageCreator.java index 2b19bd7bb..48602ea33 100644 --- a/java/com/android/dialer/app/voicemail/error/OmtpVoicemailMessageCreator.java +++ b/java/com/android/dialer/app/voicemail/error/OmtpVoicemailMessageCreator.java @@ -24,8 +24,8 @@ import android.telecom.PhoneAccountHandle; import com.android.dialer.app.voicemail.error.VoicemailErrorMessage.Action; import com.android.dialer.common.LogUtil; import com.android.dialer.common.PerAccountSharedPreferences; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; import java.util.ArrayList; @@ -184,8 +184,8 @@ public class OmtpVoicemailMessageCreator { String title; CharSequence message; - int enabledImpression; - int dismissedImpression; + DialerImpression.Type enabledImpression; + DialerImpression.Type dismissedImpression; String dismissedKey; if (isFull) { @@ -237,20 +237,25 @@ public class OmtpVoicemailMessageCreator { PerAccountSharedPreferences sharedPreferenceForAccount, String title, CharSequence message, - int impressionToLogOnEnable, - int impressionToLogOnDismiss, + DialerImpression.Type impressionToLogOnEnable, + DialerImpression.Type impressionToLogOnDismiss, String preferenceKeyToUpdate) { return new VoicemailErrorMessage( title, message, + VoicemailErrorMessage.createTurnArchiveOnAction( + context, + impressionToLogOnEnable, + status, + statusReader, + voicemailClient, + phoneAccountHandle), VoicemailErrorMessage.createDismissTurnArchiveOnAction( context, impressionToLogOnDismiss, statusReader, sharedPreferenceForAccount, - preferenceKeyToUpdate), - VoicemailErrorMessage.createTurnArchiveOnAction( - context, impressionToLogOnEnable, status, voicemailClient, phoneAccountHandle)); + preferenceKeyToUpdate)); } @Nullable diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java b/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java index 628ef87eb..d045b1bd3 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java @@ -18,6 +18,7 @@ package com.android.dialer.app.voicemail.error; import android.content.Context; import android.support.annotation.VisibleForTesting; +import android.text.util.Linkify; import android.view.View; import android.widget.TextView; import com.android.dialer.app.alert.AlertManager; @@ -119,6 +120,7 @@ public class VoicemailErrorAlert { TextView tosTitle = (TextView) view.findViewById(R.id.tos_message_title); tosTitle.setText(message.getTitle()); TextView tosDetails = (TextView) view.findViewById(R.id.tos_message_details); + tosDetails.setAutoLinkMask(Linkify.WEB_URLS); tosDetails.setText(message.getDescription()); Assert.checkArgument(message.getActions().size() == 2); diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java b/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java index 1ef80288b..a0dd30f0b 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java @@ -27,8 +27,8 @@ import android.view.View; import android.view.View.OnClickListener; import com.android.dialer.common.Assert; import com.android.dialer.common.PerAccountSharedPreferences; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.util.CallUtil; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; @@ -191,8 +191,9 @@ public class VoicemailErrorMessage { @NonNull public static Action createTurnArchiveOnAction( final Context context, - int impressionToLog, + DialerImpression.Type impressionToLog, final VoicemailStatus status, + VoicemailStatusReader statusReader, VoicemailClient voicemailClient, PhoneAccountHandle phoneAccountHandle) { return new Action( @@ -209,6 +210,7 @@ public class VoicemailErrorMessage { Intent intent = new Intent(VoicemailContract.ACTION_SYNC_VOICEMAIL); intent.setPackage(status.sourcePackage); context.sendBroadcast(intent); + statusReader.refresh(); } }); } @@ -216,7 +218,7 @@ public class VoicemailErrorMessage { @NonNull public static Action createDismissTurnArchiveOnAction( final Context context, - int impressionToLog, + DialerImpression.Type impressionToLog, VoicemailStatusReader statusReader, PerAccountSharedPreferences sharedPreferenceForAccount, String preferenceKeyToUpdate) { diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailStatus.java b/java/com/android/dialer/app/voicemail/error/VoicemailStatus.java index c429d6dcc..1cfbe86d0 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailStatus.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailStatus.java @@ -26,8 +26,11 @@ import android.provider.Settings; import android.provider.Settings.Global; import android.provider.VoicemailContract.Status; import android.support.annotation.Nullable; +import android.support.v4.os.BuildCompat; import android.telecom.PhoneAccountHandle; +import android.telephony.ServiceState; import android.telephony.TelephonyManager; +import com.android.dialer.common.LogUtil; import com.android.dialer.database.VoicemailStatusQuery; /** Structured data from {@link android.provider.VoicemailContract.Status} */ @@ -60,6 +63,19 @@ public class VoicemailStatus { settingsUri = getUri(statusCursor, VoicemailStatusQuery.SETTINGS_URI_INDEX); voicemailAccessUri = getUri(statusCursor, VoicemailStatusQuery.VOICEMAIL_ACCESS_URI_INDEX); + if (VERSION.SDK_INT >= VERSION_CODES.N_MR1) { + type = + getString( + statusCursor, VoicemailStatusQuery.SOURCE_TYPE_INDEX, TelephonyManager.VVM_TYPE_OMTP); + phoneAccountComponentName = + getString(statusCursor, VoicemailStatusQuery.PHONE_ACCOUNT_COMPONENT_NAME, ""); + phoneAccountId = getString(statusCursor, VoicemailStatusQuery.PHONE_ACCOUNT_ID, ""); + } else { + type = TelephonyManager.VVM_TYPE_OMTP; + phoneAccountComponentName = ""; + phoneAccountId = ""; + } + configurationState = getInt( statusCursor, @@ -70,12 +86,23 @@ public class VoicemailStatus { statusCursor, VoicemailStatusQuery.DATA_CHANNEL_STATE_INDEX, Status.DATA_CHANNEL_STATE_NO_CONNECTION); - notificationChannelState = - getInt( - statusCursor, - VoicemailStatusQuery.NOTIFICATION_CHANNEL_STATE_INDEX, - Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION); + /* Before O, the NOTIFICATION_CHANNEL_STATE in the voicemail status table for the system + * visual voicemail client always correspond to the service state (cellular signal availability) + * Tracking the state in the background is redundant because it will not be visible to the + * user. It is much simpler to poll the status on the UI side. The result is injected back to + * the status query result so the handling will be consistent with other voicemail clients. + */ + if (BuildCompat.isAtLeastO() && sourcePackage.equals(context.getPackageName())) { + notificationChannelState = + getNotificationChannelStateFormTelephony(context, getPhoneAccountHandle()); + } else { + notificationChannelState = + getInt( + statusCursor, + VoicemailStatusQuery.NOTIFICATION_CHANNEL_STATE_INDEX, + Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION); + } isAirplaneMode = Settings.System.getInt(context.getContentResolver(), Global.AIRPLANE_MODE_ON, 0) != 0; @@ -88,18 +115,24 @@ public class VoicemailStatus { quotaOccupied = Status.QUOTA_UNAVAILABLE; quotaTotal = Status.QUOTA_UNAVAILABLE; } + } - if (VERSION.SDK_INT >= VERSION_CODES.N_MR1) { - type = - getString( - statusCursor, VoicemailStatusQuery.SOURCE_TYPE_INDEX, TelephonyManager.VVM_TYPE_OMTP); - phoneAccountComponentName = - getString(statusCursor, VoicemailStatusQuery.PHONE_ACCOUNT_COMPONENT_NAME, ""); - phoneAccountId = getString(statusCursor, VoicemailStatusQuery.PHONE_ACCOUNT_ID, ""); + private static int getNotificationChannelStateFormTelephony( + Context context, PhoneAccountHandle phoneAccountHandle) { + TelephonyManager telephonyManager = + context + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(phoneAccountHandle); + if (telephonyManager == null) { + LogUtil.e("VoicemailStatus.constructor", "invalid PhoneAccountHandle"); + return Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION; } else { - type = TelephonyManager.VVM_TYPE_OMTP; - phoneAccountComponentName = ""; - phoneAccountId = ""; + int state = telephonyManager.getServiceState().getState(); + if (state == ServiceState.STATE_IN_SERVICE) { + return Status.NOTIFICATION_CHANNEL_STATE_OK; + } else { + return Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION; + } } } diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailStatusCorruptionHandler.java b/java/com/android/dialer/app/voicemail/error/VoicemailStatusCorruptionHandler.java index 6f411217c..2ff182b63 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailStatusCorruptionHandler.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailStatusCorruptionHandler.java @@ -28,8 +28,8 @@ import com.android.contacts.common.compat.TelephonyManagerCompat; import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; /** * This class will detect the corruption in the voicemail status and log it so we can track how many diff --git a/java/com/android/dialer/app/voicemail/error/Vvm3VoicemailMessageCreator.java b/java/com/android/dialer/app/voicemail/error/Vvm3VoicemailMessageCreator.java index d98ac2cd5..132e8a328 100644 --- a/java/com/android/dialer/app/voicemail/error/Vvm3VoicemailMessageCreator.java +++ b/java/com/android/dialer/app/voicemail/error/Vvm3VoicemailMessageCreator.java @@ -37,8 +37,10 @@ import com.android.contacts.common.compat.TelephonyManagerCompat; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.app.voicemail.error.VoicemailErrorMessage.Action; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.voicemail.VoicemailClient; +import com.android.voicemail.VoicemailComponent; import java.util.Locale; /** @@ -379,7 +381,12 @@ public class Vvm3VoicemailMessageCreator { @Override public void onClick(DialogInterface dialog, int which) { Logger.get(context).logImpression(DialerImpression.Type.VOICEMAIL_VVM3_TOS_DECLINED); - TelephonyManagerCompat.setVisualVoicemailEnabled(telephonyManager, handle, false); + VoicemailClient voicemailClient = VoicemailComponent.get(context).getVoicemailClient(); + if (voicemailClient.isVoicemailModuleEnabled()) { + voicemailClient.setVoicemailEnabled(context, status.getPhoneAccountHandle(), false); + } else { + TelephonyManagerCompat.setVisualVoicemailEnabled(telephonyManager, handle, false); + } } }); diff --git a/java/com/android/dialer/app/voicemail/error/res/drawable-hdpi/ic_voicemail_error_24px.png b/java/com/android/dialer/app/voicemail/error/res/drawable-hdpi/ic_voicemail_error_24px.png new file mode 100644 index 000000000..1a5744bce Binary files /dev/null and b/java/com/android/dialer/app/voicemail/error/res/drawable-hdpi/ic_voicemail_error_24px.png differ diff --git a/java/com/android/dialer/app/voicemail/error/res/drawable-mdpi/ic_voicemail_error_24px.png b/java/com/android/dialer/app/voicemail/error/res/drawable-mdpi/ic_voicemail_error_24px.png new file mode 100644 index 000000000..9936f0be6 Binary files /dev/null and b/java/com/android/dialer/app/voicemail/error/res/drawable-mdpi/ic_voicemail_error_24px.png differ diff --git a/java/com/android/dialer/app/voicemail/error/res/drawable-xhdpi/ic_voicemail_error_24px.png b/java/com/android/dialer/app/voicemail/error/res/drawable-xhdpi/ic_voicemail_error_24px.png new file mode 100644 index 000000000..9eff40989 Binary files /dev/null and b/java/com/android/dialer/app/voicemail/error/res/drawable-xhdpi/ic_voicemail_error_24px.png differ diff --git a/java/com/android/dialer/app/voicemail/error/res/drawable-xxhdpi/ic_voicemail_error_24px.png b/java/com/android/dialer/app/voicemail/error/res/drawable-xxhdpi/ic_voicemail_error_24px.png new file mode 100644 index 000000000..5b25f7300 Binary files /dev/null and b/java/com/android/dialer/app/voicemail/error/res/drawable-xxhdpi/ic_voicemail_error_24px.png differ diff --git a/java/com/android/dialer/app/voicemail/error/res/drawable-xxxhdpi/ic_voicemail_error_24px.png b/java/com/android/dialer/app/voicemail/error/res/drawable-xxxhdpi/ic_voicemail_error_24px.png new file mode 100644 index 000000000..d47ee4cdc Binary files /dev/null and b/java/com/android/dialer/app/voicemail/error/res/drawable-xxxhdpi/ic_voicemail_error_24px.png differ diff --git a/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml b/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml index 4a40857a0..4bea8b152 100644 --- a/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml +++ b/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml @@ -1,5 +1,5 @@ - - - - - + android:paddingTop="@dimen/alert_main_padding" + android:paddingBottom="@dimen/alert_main_padding" + android:paddingStart="@dimen/alert_main_padding" + android:paddingEnd="@dimen/alert_main_padding" + android:gravity="top" + android:orientation="horizontal"> - + + + + + + + + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="@dimen/voicemail_promo_card_action_vertical_padding" + android:paddingBottom="@dimen/voicemail_promo_card_action_vertical_padding" + android:paddingEnd="@dimen/voicemail_promo_card_action_end_padding" + android:gravity="end" + android:orientation="horizontal"> + android:id="@+id/secondary_action_raised" + style="@style/RaisedErrorActionStyle" + android:paddingEnd="@dimen/alert_action_between_padding" + android:layout_marginEnd="8dp" + android:nextFocusForward="@+id/secondary_action" + android:clickable="true"/> + android:id="@+id/secondary_action" + style="@style/ErrorActionStyle" + android:paddingEnd="@dimen/voicemail_promo_card_action_between_padding" + android:background="?android:attr/selectableItemBackground" + android:nextFocusForward="@+id/primary_action"/> - - + android:id="@+id/primary_action" + style="@style/ErrorActionStyle" + android:background="?android:attr/selectableItemBackground" + android:nextFocusForward="@+id/primary_action_raised"/> + android:id="@+id/primary_action_raised" + style="@style/RaisedErrorActionStyle" + android:nextFocusForward="@+id/promo_card" + android:clickable="true" + /> diff --git a/java/com/android/dialer/app/voicemail/error/res/values-af/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-af/strings.xml index 77f132136..9c64735af 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-af/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-af/strings.xml @@ -44,10 +44,10 @@ "Jy sal nie nuwe stemboodskappe kan ontvang as jou inkassie vol is nie." "Kan nie nuwe stemboodskappe ontvang nie" "Jou inkassie is vol. Probeer \'n paar boodskappe uitvee om nuwe stemboodskappe te ontvang." - "[Eksperimenteel] Skakel ekstra berging en rugsteun aan" - "Jou posbus is vol. Maak spasie beskikbaar deur ekstra berging aan te skakel sodat Google jou stemboodskappe kan bestuur en rugsteun. ""Hierdie kenmerk word tans getoets ""en kan potensieel stemboodskappe van jou stemboodskapbediener af uitvee. Ons belowe ook nie om hierdie kenmerk in die toekoms te steun nie. Ons sal egter graag jou terugvoer wil kry." - "[Eksperimenteel] Skakel ekstra berging en rugsteun aan" - "Jou posbus is amper vol. Maak spasie beskikbaar deur ekstra berging aan te skakel sodat Google jou stemboodskappe kan bestuur en rugsteun. ""Hierdie kenmerk word tans getoets ""en kan potensieel stemboodskappe van jou stemboodskapbediener af uitvee. Ons belowe ook nie om hierdie kenmerk in die toekoms te steun nie. Ons sal egter graag jou terugvoer wil kry." + "Skakel ekstra berging en rugsteun aan" + "Jou posbus is vol. Om spasie beskikbaar te maak, skakel ekstra berging aan sodat Google jou stemboodskappe kan bestuur en rugsteun." + "Skakel ekstra berging en rugsteun aan" + "Jou posbus is amper vol. Om spasie beskikbaar te maak, skakel ekstra berging aan sodat Google jou stemboodskappe kan bestuur en rugsteun." "Stel jou stemboodskap-PIN" "Jy sal \'n stemboodskap-PIN nodig hê wanneer jy ook al na jou stemboodskapdiens toe bel." "Onbekende fout" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-am/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-am/strings.xml index 60851a655..502b87304 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-am/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-am/strings.xml @@ -44,10 +44,10 @@ "የገቢ መልዕክት ሳጥንዎ ሙሉ ከሆነ አዲስ የድምጽ መልዕክት መቀበል አይችሉም።" "አዲስ የድምጽ መልዕክት መቀበል አይቻልም" "የመልዕክት ሳጥንዎ ሙሉ ነው። አዲስ የድምጽ መልዕክት ለመቀበል የተወሰኑ መልዕክቶችን ለመሰረዝ ይሞክሩ።" - "[የሙከራ] ተጨማሪ ማከማቻ እና ምትኬን ያብሩ" - "የመልዕክት ሳጥንዎ ሙሉ ነው። ቦታ ነጻ ለማድረግ፣ ተጨማሪ ማከማቻ ያብሩ እና Google የእርስዎን የድምፅ መልዕክት ማስተዳደር እና ምትኬ ማድረግ ይችላል። ""ይህ ባህሪይ በአሁኑ ጊዜ እየተሞከሩ ነው ""እናም ምናልባት ከድምፅ መልዕክት አገልጋይዎ የድምፅ መልዕክቶችን ሊሰርዝ ይችላል፣ እንዲሁም ለወደፊቱ ይህን ባህሪ ለመደገፍ ቃል አንገባም። ነገር ግን ግብረመልስዎን ብናገኝ እንወዳለን።" - "[የሙከራ] ተጨማሪ ማከማቻ እና ምትኬን ያብሩ" - "የመልዕክት ሳጥንዎ ከሞላ ጎደል ሙሉ ነው። ቦታ ነጻ ለማድረግ፣ ተጨማሪ ማከማቻ ያብሩ እና Google የእርስዎን የድምፅ መልዕክት ማስተዳደር እና ምትኬ ማድረግ ይችላል። ""ይህ ባህሪይ በአሁኑ ጊዜ እየተሞከሩ ነው ""እናም ምናልባት ከድምፅ መልዕክት አገልጋይዎ የድምፅ መልዕክቶችን ሊሰርዝ ይችላል፣ እንዲሁም ለወደፊቱ ይህን ባህሪ ለመደገፍ ቃል አንገባም። ነገር ግን ግብረመልስዎን ብናገኝ እንወዳለን።" + "ትርፍ ማከማቻ እና ምትኬን ያብሩ" + "የእርስዎ የመልእክት ሳጥን ሙሉ ነው። ባዶ ቦታ ነጻ ለማድረግ፣ Google የእርስዎን የድምፅ መልእክቶች ማስተዳደር እና በምትኬ ማስቀመጥ እንዲችል ትርፍ ማከማቻን ያብሩ።" + "ትርፍ ማከማቻ እና ምትኬን ያብሩ" + "የእርስዎ የመልእክት ሳጥን ሙሉ ነው። ባዶ ቦታ ነጻ ለማድረግ፣ Google የእርስዎን የድምፅ መልእክቶች ማስተዳደር እና በምትኬ ማስቀመጥ እንዲችል ትርፍ ማከማቻን ያብሩ።" "የድምፅ መልዕክት ፒንዎን ያስገቡ" "በማንኛውም ጊዜ የድምፅ መልዕክትዎ ላይ ለመድረስ ሲደውሉ የድምፅ መልዕክት ፒን ያስፈልግዎታል።" "ያልታወቀ ስህተት" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ar/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ar/strings.xml index d2c0fe697..6d462ef41 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ar/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ar/strings.xml @@ -44,10 +44,10 @@ "لن تتمكن من تلقي بريد صوتي جديد إذا امتلأ بريدك الوارد." "يتعذر تلقي رسائل بريد صوتي جديدة" "بريدك الوارد ممتلئ. حاول حذف بعض الرسائل لتلقي رسائل بريد صوتي جديدة." - "[ميزة تجريبية] تشغيل سعة التخزين الإضافية والنسخ الاحتياطي" - "‏صندوق بريدك ممتلئ. للحصول على بعض المساحة، يمكنك تشغيل سعة التخزين الإضافية حتى يمكن لحساب Google إدارة رسائل البريد الصوتي ونسخها احتياطيًا. ""هذه الميزة قيد الاختبار حاليًا "" وقد تؤدي إلى حذف رسائل البريد الصوتي من خادم البريد الصوتي، ونحن لا نعد بدعم هذه الميزة في المستقبل. إلا أننا نود الحصول على تعليقات منك." - "[ميزة تجريبية] تشغيل سعة التخزين الإضافية والنسخ الاحتياطي" - "‏صندوق بريدك ممتلئ تقريبًا. للحصول على بعض المساحة، يمكنك تشغيل سعة التخزين الإضافية حتى يمكن لحساب Google إدارة رسائل البريد الصوتي ونسخها احتياطيًا. ""هذه الميزة قيد الاختبار حاليًا ""وقد تؤدي إلى حذف رسائل البريد الصوتي من خادم البريد الصوتي، ونحن لا نعد بدعم هذه الميزة في المستقبل. إلا أننا نود الحصول على تعليقات منك." + "تشغيل سعة التخزين الإضافية والنسخ الاحتياطي" + "‏صندوق بريدك ممتلئ. للحصول على بعض المساحة، ينبغي تشغيل سعة التخزين الإضافية حتى يتمكن Google من إدارة رسائل البريد الصوتي ونسخها احتياطيًا." + "تشغيل سعة التخزين الإضافية والنسخ الاحتياطي" + "‏صندوق بريدك ممتلئ. للحصول على بعض المساحة، ينبغي تشغيل سعة التخزين الإضافية حتى يتمكن Google من إدارة رسائل البريد الصوتي ونسخها احتياطيًا." "إعداد رقم التعريف الشخصي للبريد الصوتي" "ستحتاج رقم تعريف شخصي للبريد الصوتي في كل مرة تتصل فيها للوصول إلى بريدك الصوتي." "حدث خطأ غير معروف" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-az/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-az/strings.xml index aea92bf97..33ddafa0a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-az/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-az/strings.xml @@ -44,10 +44,10 @@ "Gələnlər qutusu dolu olduqda, yeni səsli mesaj almaq olmayacaq." "Yeni səsli mesaj almaq olmur" "Gələnlər qutusu doludur. Yeni səsli mesaj əldə etmək üçün bəzi mesajları silin." - "[Eksperimental] Əlavə yaddaş və yedəkləməni aktiv edin" - "E-poçt qutusu doludur. Boş yer yaratmaq üçün əlavə yaddaşı aktiv edin, beləliklə Google səsli e-məktub mesajlarını idarə edə və yedəkləyə bilər. ""Bu funksiya hazırda yoxlanılır ""və səsli e-poçt serverindən səsli e-məktubları potensial olaraq siləcək, gələcəkdə bu funksiyanı dəstəkləməyə söz vermirik. Lakin əks əlaqənizi istərdik." - "[Eksperimental] Əlavə yaddaş və yedəkləməni aktiv edin" - "E-poçt qutusu demək olar ki, doludur. Boş yer yaratmaq üçün əlavə yaddaşı aktiv edin, beləliklə Google səsli e-məktub mesajlarını idarə edə və yedəkləyə bilər. ""Bu funksiya hazırda yoxlanılır ""və səsli e-poçt serverindən səsli e-məktubları potensial olaraq siləcək, gələcəkdə bu funksiyanı dəstəkləməyə söz vermirik. Lakin əks əlaqənizi istərdik." + "Əlavə yaddaş və yedəkləməni aktiv edin" + "E-poçt qutusu doludur. Boş yer yaratmaq üçün əlavə yaddaşı aktiv edin, beləliklə Google səsli e-məktub mesajlarını idarə edə və yedəkləyə bilər." + "Əlavə yaddaş və yedəkləməni aktiv edin" + "E-poçt qutusu artıq doludur. Boş yer yaratmaq üçün əlavə yaddaşı aktiv edin, beləliklə Google səsli e-məktub mesajlarını idarə edə və yedəkləyə bilər." "Səsli mesaj PIN kodunu ayarlayın" "Zəng etdiyiniz zaman səsli mesaja daxil olmaq üçün PIN koda ehtiyacınız olacaq." "Naməlum xəta" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..98dc0619d --- /dev/null +++ b/java/com/android/dialer/app/voicemail/error/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,110 @@ + + + + + "Isključite režim rada u avionu" + "Aktivira se vizuelna govorna pošta" + "Možda nećete dobijati obaveštenja o govornoj pošti dok potpuno ne aktivirate vizuelnu govornu poštu. Pozovite govornu poštu da biste preuzeli nove poruke dok govorna pošta ne bude potpuno aktivirana." + "Aktiviranje vizuelne govorne pošte nije uspelo" + "Proverite da li telefon ima mobilnu vezu i pokušajte ponovo." + "Isključite režim rada u avionu i pokušajte ponovo." + "Veza nije uspostavljena" + "Nećete dobijati obaveštenja o novim govornim porukama. Ako ste na Wi-Fi mreži, sinhronizujte da biste proverili govornu poštu." + "Nećete dobijati obaveštenja o novim govornim porukama. Isključite režim rada u avionu da biste sinhronizovali govornu poštu." + "Telefonu treba mobilna veza za prenos podataka da biste proverili govornu poštu." + "Aktiviranje vizuelne govorne pošte nije uspelo" + "I dalje možete da pozovete govornu poštu da biste je proverili." + "Ažuriranje vizuelne govorne pošte nije uspelo" + "Probajte ponovo kad budete imali bolju Wi-Fi ili mobilnu vezu. I dalje možete da pozovete govornu poštu da biste je proverili." + "Probajte ponovo kad budete imali bolju mobilnu vezu za prenos podataka. I dalje možete da pozovete govornu poštu da biste je proverili." + "Ažuriranje vizuelne govorne pošte nije uspelo" + "I dalje možete da pozovete govornu poštu da biste je proverili." + "Ažuriranje vizuelne govorne pošte nije uspelo" + "I dalje možete da pozovete govornu poštu da biste je proverili." + "Ažuriranje vizuelne govorne pošte nije uspelo" + "I dalje možete da pozovete govornu poštu da biste je proverili." + "Ažuriranje vizuelne govorne pošte nije uspelo" + "I dalje možete da pozovete govornu poštu da biste je proverili." + "Prijemno sanduče je skoro puno" + "Nećete moći da primate novu govornu poštu ako je prijemno sanduče puno." + "Ne možete da primate nove govorne poruke" + "Prijemno sanduče je puno. Izbrišite neke poruke da biste primili novu govornu poštu." + "Uključite dodatni memorijski prostor i rezervne kopije" + "Poštansko sanduče je puno. Da biste oslobodili prostor, uključite dodatni memorijski prostor, pa će Google moći da upravlja vašim govornim porukama i pravi njihove rezervne kopije." + "Uključite dodatni memorijski prostor i rezervne kopije" + "Poštansko sanduče je skoro puno. Da biste oslobodili prostor, uključite dodatni memorijski prostor, pa će Google moći da upravlja vašim govornim porukama i pravi njihove rezervne kopije." + "Podesite PIN govorne pošte" + "PIN govorne pošte vam treba svaki put kad upućujete poziv da biste pristupili govornoj pošti." + "Nepoznata greška" + "Podešavanja režima rada u avionu" + "Podesi PIN" + "Probaj ponovo" + "Uključi" + "Ne, hvala" + "Sinhronizuj" + "Pozovi govornu poštu" + "Pozovi korisničku podršku" + "Nešto nije u redu" + "Žao nam je, naišli smo na problem. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9001." + "Nešto nije u redu" + "Žao nam je, naišli smo na problem. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9002." + "Nešto nije u redu" + "Žao nam je, naišli smo na problem. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9003." + "Povezivanje sa sandučetom govorne pošte nije uspelo" + "Žao nam je, imamo probleme pri povezivanju sa sandučetom govorne pošte. Ako ste u oblasti sa slabim signalom, sačekajte dok ne budete imali jak signal i pokušajte ponovo. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9004." + "Povezivanje sa sandučetom govorne pošte nije uspelo" + "Žao nam je, imamo probleme pri povezivanju sa sandučetom govorne pošte. Ako ste u oblasti sa slabim signalom, sačekajte dok ne budete imali jak signal i pokušajte ponovo. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9005." + "Povezivanje sa sandučetom govorne pošte nije uspelo" + "Žao nam je, imamo probleme pri povezivanju sa sandučetom govorne pošte. Ako ste u oblasti sa slabim signalom, sačekajte dok ne budete imali jak signal i pokušajte ponovo. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9006." + "Nešto nije u redu" + "Žao nam je, naišli smo na problem. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9007." + "Nešto nije u redu" + "Žao nam je, naišli smo na problem. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9008." + "Nešto nije u redu" + "Žao nam je, imamo probleme pri podešavanju usluge. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9009." + "Povezivanje sa sandučetom govorne pošte nije uspelo" + "Žao nam je, trenutno ne možemo da se povežemo sa sandučetom govorne pošte. Probajte ponovo kasnije. Ako i dalje bude problema, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9990." + "Podesite govornu poštu" + "Govorna pošta nije podešena na nalogu. Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9991." + "Govorna pošta" + "Ne možete da koristite Vizuelnu govornu poštu na ovom uređaju. Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9992." + "Nešto nije u redu" + "Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9993." + "Vizuelna govorna pošta" + "Da biste završili podešavanje Vizuelne govorne pošte, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9994." + "Vizuelna govorna pošta" + "Da biste završili podešavanje Vizuelne govorne pošte, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9995." + "Vizuelna govorna pošta" + "Da biste aktivirali Vizuelnu govornu poštu, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9996." + "Nešto nije u redu" + "Da biste završili podešavanje Vizuelne govorne pošte, kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9998." + "Vizuelna govorna pošta je onemogućena" + "Kontaktirajte korisničku podršku na %1$s da biste aktivirali vizuelnu govornu poštu." + "Nešto nije u redu" + "Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9997." + "Nešto nije u redu" + "Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9989." + "Nešto nije u redu" + "Kontaktirajte korisničku podršku na %1$s i recite im da je kôd greške 9999." + "Uslovi i odredbe za vizuelnu govornu poštu" + "Morate da prihvatite Verizon Wireless uslove i odredbe da biste koristili vizuelnu govornu poštu:\n\n%s" + "Ako odbijete uslove i odredbe, onemogućićete vizuelnu govornu poštu." + "Onemogućite vizuelnu govornu poštu" + "Govornoj pošti ćete moći da pristupite samo ako pozovete *86. Podesite novi PIN kôd govorne pošte da biste nastavili." + "Podesite PIN" + diff --git a/java/com/android/dialer/app/voicemail/error/res/values-be/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-be/strings.xml index 2ab2a5c9a..50f32af4f 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-be/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-be/strings.xml @@ -44,10 +44,10 @@ "Вы не зможаце атрымліваць новыя галасавыя паведамленні, калі ваша папка ўваходных поўная." "Немагчыма атрымліваць новыя галасавыя паведамленні" "Ваша папка ўваходных запоўнена. Паспрабуйце выдаліць некалькі паведамленняў, каб атрымаць новую галасавую пошту." - "[Эксперыментальна] Уключыць дадатковае сховішча і рэзервовае капіраванне" - "Ваша паштовая скрыня запоўнена. Каб вызваліць месца, уключыце дадатковае сховішча, каб Google мог кіраваць вашымі паведамленнямі галасавой пошты і рабіць іх рэзервовую копію. ""Гэта характарыстыка тэсціруецца ""і патэнцыяльна будзе выдаляць паведамленні галасавой пошты з вашага сервера галасавой пошты, але мы не абяцаем, што будзем падтрымліваць яе ў будучым. Але мы будзем вельмі ўдзячны за водгукі на гэту характарыстыку." - "[Эксперыментальна] Уключыць дадатковае сховішча і рэзервовае капіраванне" - "Ваша паштовая скрыня запоўнена. Каб вызваліць месца, уключыце дадатковае сховішча, каб Google мог кіраваць вашымі паведамленнямі галасавой пошты і рабіць іх рэзервовую копію. ""Гэта характарыстыка тэсціруецца ""і патэнцыяльна будзе выдаляць паведамленні галасавой пошты з вашага сервера галасавой пошты, але мы не абяцаем, што будзем падтрымліваць яе ў будучым. Але мы будзем вельмі ўдзячны за водгукі на гэту характарыстыку." + "Уключыць дадатковае сховішча і рэзервовае капіраванне" + "Ваша паштовая скрыня запоўнена. Каб вызваліць месца, уключыце дадатковае сховішча, каб Google мог кіраваць вашымі паведамленнямі галасавой пошты і рабіць іх рэзервовую копію." + "Уключыць дадатковае сховішча і рэзервовае капіраванне" + "Ваша паштовая скрыня амаль запоўнена. Каб вызваліць месца, уключыце дадатковае сховішча, каб Google мог кіраваць вашымі паведамленнямі галасавой пошты і рабіць іх рэзервовую копію." "Наладзьце PIN-код галасавой пошты" "Вам спатрэбіцца PIN-код галасавой пошты заўжды, калі вы тэлефануеце на сваю галасавую пошту." "Невядомая памылка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-bg/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-bg/strings.xml index e9200d17c..dbca19ea2 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-bg/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-bg/strings.xml @@ -44,10 +44,10 @@ "Няма да можете да получавате нова гласова поща, ако входящата ви поща е пълна." "Не могат да се получават нови гласови съобщения" "Входящата ви поща е пълна. Опитайте да изтриете съобщения, за да получавате нова гласова поща." - "[Експериментално] Включване на допълнително хранилище и резервни копия" - "Пощенската ви кутия е пълна. За да освободите място, включете допълнителното хранилище, за да може Google да управлява и създава резервни копия на съобщенията в гласовата ви поща. ""Тази функция понастоящем се тества"". Тя потенциално може да изтрие гласови съобщения от сървъра ви за гласова поща и не обещаваме, че ще я поддържаме в бъдеще. Но ще се радваме на отзиви за нея." - "[Експериментално] Включване на допълнително хранилище и резервни копия" - "Пощенската ви кутия е почти пълна. За да освободите място, включете допълнителното хранилище, за да може Google да управлява и създава резервни копия на съобщенията в гласовата ви поща. ""Тази функция понастоящем се тества"". Тя потенциално може да изтрие гласови съобщения от сървъра ви за гласова поща и не обещаваме, че ще я поддържаме в бъдеще. Но ще се радваме на отзиви за нея." + "Включване на допълнително хранилище и създаване на резервно копие" + "Пощенската ви кутия е пълна. За да освободите място, включете допълнително хранилище, така че Google да може да управлява и създаде резервно копие на съобщенията в гласовата ви поща." + "Включване на допълнително хранилище и създаване на резервно копие" + "Пощенската ви кутия е почти пълна. За да освободите място, включете допълнително хранилище, така че Google да може да управлява и създаде резервно копие на съобщенията в гласовата ви поща." "Задайте ПИН за гласовата си поща" "Ще ви е необходим ПИН за гласовата поща при всяко обаждане за достъп до съобщенията ви в нея." "Неизвестна грешка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-bn/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-bn/strings.xml index b088f512a..5954448ee 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-bn/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-bn/strings.xml @@ -44,10 +44,10 @@ "যদি আপনার ইনবক্সে পূর্ণ থাকে তাহলে আপনি নতুন ভয়েসমেল পেতে সক্ষম হবেন না।" "নতুন ভয়েসমেলগুলি গ্রহণ করতে পারবেন না" "আপনার ইনবক্স পূর্ণ। নতুন ভয়েসমেল পেতে কিছু বার্তা মুছে ফেলার চেষ্টা করুন।" - "[পরীক্ষামূলক] অতিরিক্ত সঞ্চয়স্থান এবং ব্যাক আপ চালু করুন" - "আপনার মেলবক্স পূর্ণ। স্থান খালি করতে, অতিরিক্ত সঞ্চয়স্থান চালু করুন যাতে Google আপনার ভয়েসমেল বার্তাগুলি পরিচালনা করতে এবং ব্যাক আপ নিতে পারে। ""এই বৈশিষ্ট্যটি বর্তমানে পরীক্ষা করা হচ্ছে ""এবং সম্ভবত আপনার ভয়েসমেল সার্ভার থেকে ভয়েসমেলগুলি মুছবে এবং আমরা ভবিষ্যতে এই বৈশিষ্ট্যের উপর সমর্থন দেওয়ার কোন কথা দিচ্ছি না। যদিও আমরা এই বৈশিষ্ট্যটির উপর মতামত পেলে খুব খুশি হব।" - "[পরীক্ষামূলক] অতিরিক্ত সঞ্চয়স্থান এবং ব্যাক আপ চালু করুন" - "আপনার মেলবক্স প্রায় পূর্ণ। স্থান খালি করতে, অতিরিক্ত সঞ্চয়স্থান চালু করুন যাতে Google আপনার ভয়েসমেল বার্তাগুলি পরিচালনা করতে এবং ব্যাক আপ নিতে পারে। ""এই বৈশিষ্ট্যটি বর্তমানে পরীক্ষা করা হচ্ছে ""এবং সম্ভবত আপনার ভয়েসমেল সার্ভার থেকে ভয়েসমেলগুলি মুছবে এবং আমরা ভবিষ্যতে এই বৈশিষ্ট্যেটি সমর্থন করব কিনা সেই নিয়ে কোন কথা দিচ্ছি না। যদিও আমরা এই বৈশিষ্ট্যটির উপর মতামত পেলে খুব খুশি হব।" + "অতিরিক্ত সঞ্চয়স্থান এবং ব্যাক আপ চালু করুন" + "আপনার মেলবক্স পূর্ণ। স্থান খালি করতে, অতিরিক্ত সঞ্চয়স্থান চালু করুন যাতে Google আপনার ভয়েসমেল বার্তাগুলি পরিচালনা করতে এবং ব্যাক আপ নিতে পারে।" + "অতিরিক্ত সঞ্চয়স্থান এবং ব্যাক আপ চালু করুন" + "আপনার মেলবক্স প্রায় পূর্ণ। স্থান খালি করতে, অতিরিক্ত সঞ্চয়স্থান চালু করুন যাতে Google আপনার ভয়েসমেল বার্তাগুলি পরিচালনা করতে এবং ব্যাক আপ নিতে পারে।" "আপনার ভয়েসমেল পিন সেট করুন" "যে কোনো সময়ে আপনার ভয়েসমেল অ্যাক্সেস করার জন্য আপনার একটি ভয়েসমেল পিন প্রয়োজন৷" "অজানা ত্রুটি" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-bs/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-bs/strings.xml index 32b4ea345..0352436c4 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-bs/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-bs/strings.xml @@ -44,10 +44,10 @@ "Nećete moći primati novu govornu poštu ako je vam je pristigla pošta puna." "Ne možete primati novu govornu poštu" "Vaša pristigla pošta je puna. Pokušajte izbrisati neke poruke da primite novu govornu poštu." - "[Eksperimentalno] Uključite dodatnu pohranu i sigurnosnu kopiju" - "Vaše poštansko sanduče je puno. Za oslobađanje prostora uključite dodatnu pohranu da Google može upravljati i kreirati sigurnosnu kopiju poruka vaše govorne pošte. ""Ova funkcija se trenutno testira "" i može izbrisati poruke govorne pošte sa servera govorne pošte. Iako ne obećavamo da ćemo podržavati ovu funkciju u budućnosti, ipak bismo željeli primiti vaše povratne informacije." - "[Eksperimentalno] Uključite dodatnu pohranu i sigurnosnu kopiju" - "Vaše poštansko sanduče je puno. Za oslobađanje prostora uključite dodatnu pohranu da Google može upravljati i kreirati sigurnosnu kopiju poruka vaše govorne pošte. ""Ova funkcija se trenutno testira ""i može izbrisati poruke govorne pošte sa servera govorne pošte. Iako ne obećavamo da ćemo podržavati ovu funkciju u budućnosti, ipak bismo željeli primiti vaše povratne informacije." + "Uključite dodatnu pohranu i sigurnosnu kopiju" + "Poštanski pretinac je pun. Da oslobodite prostor, uključite dodatnu pohranu tako da Google može upravljati vašim porukama govorne pošte i praviti njihovu sigurnosnu kopiju." + "Uključite dodatnu pohranu i sigurnosnu kopiju" + "Poštanski pretinac je gotovo sasvim pun. Da oslobodite prostor, uključite dodatnu pohranu tako da Google može upravljati vašim porukama govorne pošte i praviti njihovu sigurnosnu kopiju." "Postavite PIN za govornu poštu" "PIN za govornu poštu trebat će vam svaki put kada zatražite pristup govornoj pošti." "Nepoznata greška" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ca/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ca/strings.xml index cea2ed3cb..b6d844df8 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ca/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ca/strings.xml @@ -44,10 +44,10 @@ "No podràs rebre missatges de veu nous si la safata d\'entrada està plena." "No es poden rebre missatges de veu nous" "La safata d\'entrada està plena. Per rebre missatges de veu nous, prova de suprimir alguns missatges." - "[Experimental] Activa l\'emmagatzematge addicional i la còpia de seguretat" - "La bústia de veu està plena. Per alliberar espai, activa l\'emmagatzematge addicional perquè Google pugui gestionar els teus missatges de veu i crear-ne una còpia de seguretat. ""Aquesta funció està en mode de prova ""i és possible que suprimeixi els missatges de veu del servidor de la bústia. No podem garantir-ne la continuïtat en el futur. De tota manera, ens agradaria saber què en penses." - "[Experimental] Activa l\'emmagatzematge addicional i la còpia de seguretat" - "La bústia de veu gairebé està plena. Per alliberar espai, activa l\'emmagatzematge addicional perquè Google pugui gestionar els teus missatges de veu i crear-ne una còpia de seguretat. ""Aquesta funció està en mode de prova ""i és possible que suprimeixi els missatges de veu del servidor de la bústia. No podem garantir-ne la continuïtat en el futur. De tota manera, ens agradaria saber què en penses." + "Activa l\'emmagatzematge addicional i la còpia de seguretat" + "Tens la bústia plena. Per alliberar espai, activa l\'emmagatzematge addicional perquè Google pugui gestionar els missatges de veu i crear-ne una còpia de seguretat." + "Activa l\'emmagatzematge addicional i la còpia de seguretat" + "Tens la bústia gairebé plena. Per alliberar espai, activa l\'emmagatzematge addicional perquè Google pugui gestionar els missatges de veu i crear-ne una còpia de seguretat." "Defineix el PIN per als missatges de veu" "Necessitaràs el PIN per als missatges de veu cada vegada que truquis per accedir-hi." "Error desconegut" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-cs/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-cs/strings.xml index 9db772737..c52f7b007 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-cs/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-cs/strings.xml @@ -44,10 +44,10 @@ "Pokud máte plnou schránku, nemůžete přijímat nové hlasové zprávy." "Nemůžete přijímat nové hlasové zprávy" "Vaše schránka je plná. Abyste mohli přijímat nové hlasové zprávy, zkuste nějaké zprávy smazat." - "[Experimentální funkce] Zapněte si další úložiště a zálohování" - "Vaše e-mailová schránka je plná. Pokud chcete uvolnit místo, zapněte si další úložiště, aby Google mohl spravovat a zálohovat vaše hlasové zprávy. ""Tuto funkci právě testujeme."" Funkce vám může smazat hlasové zprávy ze serveru hlasové schránky. Nemůžeme zaručit, že bude podporována i v budoucnu, budeme vám ale vděční za zpětnou vazbu." - "[Experimentální funkce] Zapněte si další úložiště a zálohování" - "Vaše e-mailová schránka je téměř plná. Pokud chcete uvolnit místo, zapněte si další úložiště, aby Google mohl spravovat a zálohovat vaše hlasové zprávy. ""Tuto funkci právě testujeme."" Funkce vám může smazat hlasové zprávy ze serveru hlasové schránky. Nemůžeme zaručit, že bude podporována i v budoucnu, budeme vám ale vděční za zpětnou vazbu." + "Zapněte si další úložiště a zálohování" + "Vaše e-mailová schránka je plná. Pokud chcete uvolnit místo, zapněte si další úložiště, aby Google mohl spravovat a zálohovat vaše hlasové zprávy." + "Zapněte si další úložiště a zálohování" + "Vaše e-mailová schránka je téměř plná. Pokud chcete uvolnit místo, zapněte si další úložiště, aby Google mohl spravovat a zálohovat vaše hlasové zprávy." "Nastavit kód PIN hlasové schránky" "PIN hlasové schránky budete potřebovat, kdykoli do své hlasové schránky zavoláte." "Neznámá chyba" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-da/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-da/strings.xml index f04049a0f..26e5ede7c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-da/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-da/strings.xml @@ -44,10 +44,10 @@ "Du vil ikke kunne modtage nye telefonsvarerbeskeder, hvis din indbakke er fuld." "Du kan ikke modtage nye telefonsvarerbeskeder" "Din indbakke er fuld. Prøv at slette nogle beskeder for at modtage nye telefonsvarerbeskeder." - "[Eksperimental] Slå ekstra lagerplads og sikkerhedskopiering til" - "Din telefonsvarer er fuld. Frigør plads ved at slå ekstra lagerplads til, så Google kan administrere og sikkerhedskopiere dine talebeskeder. ""Denne funktion bliver testet i øjeblikket ""og vil muligvis slette talebeskeder fra din telefonsvarerserver. Vi lover desuden ikke, at denne funktion understøttes fremover. Vi vil dog stadig gerne have feedback fra dig." - "[Eksperimental] Slå ekstra lagerplads og sikkerhedskopiering til" - "Din telefonsvarer er næsten fuld. Frigør plads ved at slå ekstra lagerplads til, så Google kan administrere og sikkerhedskopiere dine talebeskeder. ""Denne funktion bliver testet i øjeblikket ""og vil muligvis slette talebeskeder fra din telefonsvarerserver. Vi lover desuden ikke, at denne funktion understøttes fremover. Vi vil dog stadig gerne have feedback fra dig." + "Slå ekstra lagerplads og sikkerhedskopiering til" + "Din telefonsvarer er fuld. Du kan frigøre plads ved at slå ekstra lagerplads til, så Google kan administrere og sikkerhedskopiere dine talebeskeder." + "Slå ekstra lagerplads og sikkerhedskopiering til" + "Din telefonsvarer er næsten fuld. Du kan frigøre plads ved at slå ekstra lagerplads til, så Google kan administrere og sikkerhedskopiere dine talebeskeder." "Bestem pinkoden til din telefonsvarer" "Du skal bruge en pinkode til din telefonsvarer, når du ringer for at få adgang til den." "Ukendt fejl" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-de/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-de/strings.xml index 8939e687e..865ddd95a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-de/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-de/strings.xml @@ -44,10 +44,10 @@ "Wenn deine Mailbox voll ist, kannst du keine neuen Sprachnachrichten empfangen." "Es können keine neuen Mailboxnachrichten empfangen werden" "Deine Mailbox ist voll. Lösche einige Nachrichten, um neue empfangen zu können." - "[Testfunktion] Zusätzlichen Speicher und Sicherung aktivieren" - "Dein Postfach ist voll. Aktivere zusätzlichen Speicher, um Speicherplatz freizugeben. So kann Google deine Mailboxnachrichten verwalten und sichern. ""Diese Funktion wird gerade getestet."" Hiermit werden möglicherweise Mailboxnachrichten von deinem Mailbox-Server gelöscht und es wird nicht garantiert, dass diese Funktion auch in Zukunft unterstützt wird. Wir würden uns aber sehr über Feedback dazu freuen." - "[Testfunktion] Zusätzlichen Speicher und Sicherung aktivieren" - "Dein Postfach ist voll. Aktivere zusätzlichen Speicher, um Speicherplatz freizugeben. So kann Google deine Mailboxnachrichten verwalten und sichern. ""Diese Funktion wird gerade getestet."" Hiermit werden möglicherweise Mailboxnachrichten von deinem Mailbox-Server gelöscht und es wird nicht garantiert, dass diese Funktion auch in Zukunft unterstützt wird. Wir würden uns aber sehr über Feedback dazu freuen." + "Zusätzlichen Speicher und Sicherung aktivieren" + "Dein Postfach ist voll. Aktivere zusätzlichen Speicher, um Speicherplatz freizugeben. So kann Google deine Mailboxnachrichten verwalten und sichern." + "Zusätzlichen Speicher und Sicherung aktivieren" + "Dein Postfach fast ist voll. Aktivere zusätzlichen Speicher, um Speicherplatz freizugeben. So kann Google deine Mailboxnachrichten verwalten und sichern." "Mailbox-PIN festlegen" "Bei jedem Anruf auf deiner Mailbox benötigst du eine Mailbox-PIN." "Unbekannter Fehler" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-el/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-el/strings.xml index 9c7c7da66..acd1ca0e7 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-el/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-el/strings.xml @@ -44,10 +44,10 @@ "Δεν θα είστε σε θέση να λάβετε νέα φωνητικά μηνύματα από τον αυτόματο τηλεφωνητή εάν τα εισερχόμενά σας είναι πλήρη." "Δεν μπορείτε να λάβετε νέα μηνύματα από τον αυτόματο τηλεφωνητή" "Τα εισερχόμενά σας είναι πλήρη. Δοκιμάστε να διαγράψετε μερικά μηνύματα, για να λάβετε νέα μηνύματα από τον αυτόματο τηλεφωνητή." - "[Πειραματική λειτουργία] Ενεργοποίηση επιπλέον αποθηκευτικού χώρου και αντιγράφων ασφαλείας" - "Το γραμματοκιβώτιό σας είναι πλήρες. Για να ελευθερώσετε χώρο, ενεργοποιήστε επιπλέον αποθηκευτικό χώρο, ώστε η Google μπορεί να διαχειριστεί και να δημιουργήσει αντίγραφα ασφαλείας των μηνυμάτων του αυτόματου τηλεφωνητή σας. ""Αυτή η λειτουργία βρίσκεται σε δοκιμαστική φάση "", ενδέχεται να έχει ως αποτέλεσμα τη διαγραφή φωνητικών μηνυμάτων από τον διακομιστή αυτόματου τηλεφωνητή σας και δεν παρέχουμε εγγυήσεις για την υποστήριξη αυτής της λειτουργίας μελλοντικά. Ωστόσο, θα εκτιμούσαμε τα σχόλιά σας." - "[Πειραματική λειτουργία] Ενεργοποίηση επιπλέον αποθηκευτικού χώρου και αντιγράφων ασφαλείας" - "Το γραμματοκιβώτιό σας είναι σχεδόν πλήρες. Για να ελευθερώσετε χώρο, ενεργοποιήστε επιπλέον αποθηκευτικό χώρο, ώστε η Google μπορεί να διαχειριστεί και να δημιουργήσει αντίγραφα ασφαλείας των μηνυμάτων του αυτόματου τηλεφωνητή σας. ""Αυτή η λειτουργία βρίσκεται σε δοκιμαστική φάση "", ενδέχεται να έχει ως αποτέλεσμα τη διαγραφή φωνητικών μηνυμάτων από τον διακομιστή αυτόματου τηλεφωνητή σας και δεν παρέχουμε εγγυήσεις για την υποστήριξη αυτής της λειτουργίας μελλοντικά. Ωστόσο, θα εκτιμούσαμε τα σχόλιά σας." + "Ενεργοποίηση επιπλέον αποθηκευτικού χώρου και αντιγράφων ασφαλείας" + "Το γραμματοκιβώτιό σας είναι πλήρες. Για να ελευθερώσετε χώρο, ενεργοποιήστε επιπλέον αποθηκευτικό χώρο, ώστε η Google μπορεί να διαχειριστεί και να δημιουργήσει αντίγραφα ασφαλείας των μηνυμάτων του αυτόματου τηλεφωνητή σας." + "Ενεργοποίηση επιπλέον αποθηκευτικού χώρου και αντιγράφων ασφαλείας" + "Το γραμματοκιβώτιό σας είναι σχεδόν πλήρες. Για να ελευθερώσετε χώρο, ενεργοποιήστε επιπλέον αποθηκευτικό χώρο, ώστε η Google μπορεί να διαχειριστεί και να δημιουργήσει αντίγραφα ασφαλείας των μηνυμάτων του αυτόματου τηλεφωνητή σας." "Ορίστε PIN για τον αυτόματο τηλεφωνητή σας" "Θα χρειάζεστε ένα PIN φωνητικού τηλεφωνητή κάθε φορά που καλείτε, για να έχετε πρόσβαση στον τηλεφωνητή σας." "Άγνωστο σφάλμα" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-en-rAU/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-en-rAU/strings.xml index c1455cafc..a036950a6 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-en-rAU/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-en-rAU/strings.xml @@ -44,10 +44,10 @@ "You won\'t be able to receive new voicemail if your inbox is full." "Can\'t receive new voicemail" "Your inbox is full. Try deleting some messages to receive new voicemail." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." + "Turn on extra storage and backup" + "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." + "Turn on extra storage and backup" + "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." "Set your voicemail PIN" "You\'ll need a voicemail PIN whenever you call to access your voicemail." "Unknown error" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-en-rGB/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-en-rGB/strings.xml index c1455cafc..a036950a6 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-en-rGB/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-en-rGB/strings.xml @@ -44,10 +44,10 @@ "You won\'t be able to receive new voicemail if your inbox is full." "Can\'t receive new voicemail" "Your inbox is full. Try deleting some messages to receive new voicemail." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." + "Turn on extra storage and backup" + "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." + "Turn on extra storage and backup" + "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." "Set your voicemail PIN" "You\'ll need a voicemail PIN whenever you call to access your voicemail." "Unknown error" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-en-rIN/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-en-rIN/strings.xml index c1455cafc..a036950a6 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-en-rIN/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-en-rIN/strings.xml @@ -44,10 +44,10 @@ "You won\'t be able to receive new voicemail if your inbox is full." "Can\'t receive new voicemail" "Your inbox is full. Try deleting some messages to receive new voicemail." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." - "[Experimental] Turn on extra storage and backup" - "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemail from your voicemail server. We do not promise to support this feature in the future. We would love your feedback though." + "Turn on extra storage and backup" + "Your mailbox is full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." + "Turn on extra storage and backup" + "Your mailbox is almost full. To free up space, turn on extra storage so that Google can manage and back up your voicemail messages." "Set your voicemail PIN" "You\'ll need a voicemail PIN whenever you call to access your voicemail." "Unknown error" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-es-rUS/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-es-rUS/strings.xml index be7eef136..485a78b10 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-es-rUS/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-es-rUS/strings.xml @@ -44,10 +44,10 @@ "Si la carpeta Recibidos está llena, no podrás recibir mensajes de voz nuevos." "No se pueden recibir mensajes de voz nuevos" "La carpeta Recibidos está llena. Intenta borrar algunos mensajes para recibir mensajes de voz nuevos." - "[Experimental] Activar la copia de seguridad y el almacenamiento adicional" - "Tu buzón está lleno. Para liberar espacio, obtén almacenamiento adicional para que Google pueda administrar tus mensajes de voz y hacer copias de seguridad de ellos. ""Esta función se está probando"", y es posible que borre los mensajes de voz del servidor correspondiente. No podemos garantizar la compatibilidad de la función en el futuro. Sin embargo, nos encantaría que nos hicieras comentarios acerca de ella." - "[Experimental] Activar la copia de seguridad y el almacenamiento adicional" - "Tu buzón está casi lleno. Para liberar espacio, obtén almacenamiento adicional para que Google pueda administrar tus mensajes de voz y hacer copias de seguridad de ellos. ""Esta función se está probando"", y es posible que borre los mensajes de voz del servidor correspondiente. No podemos garantizar la compatibilidad de la función en el futuro. Sin embargo, nos encantaría que nos hicieras comentarios acerca de ella." + "Activar la copia de seguridad y obtener almacenamiento adicional" + "Tu buzón está lleno. Para liberar espacio, obtén almacenamiento adicional para que Google pueda administrar tus mensajes de voz y hacer copias de seguridad de ellos." + "Activar la copia de seguridad y obtener almacenamiento adicional" + "Tu buzón está casi lleno. Para liberar espacio, obtén almacenamiento adicional para que Google pueda administrar tus mensajes de voz y hacer copias de seguridad de ellos." "Configura el PIN del buzón de voz" "Necesitas un PIN cada vez que llames para acceder al buzón de voz." "Error desconocido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-es/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-es/strings.xml index 01cccf3d0..d351f375c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-es/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-es/strings.xml @@ -44,10 +44,10 @@ "Si la bandeja de entrada está llena, no podrás recibir los mensajes de voz nuevos." "No puedes recibir los mensajes de voz nuevos" "Tienes la bandeja de entrada llena. Para recibir nuevos mensajes de voz, prueba a eliminar algunos antiguos." - "(Experimental) Habilita más espacio de almacenamiento y copias de seguridad" - "Tu buzón de voz está lleno. Para liberar espacio, habilita más espacio de almacenamiento de forma que Google pueda gestionar tus mensajes de voz y hacer copias de seguridad de estos. ""Esta función, que se encuentra actualmente en fase de prueba, ""podría servir para eliminar los mensajes de tu servidor de buzón de voz. Aunque no garantizamos que se siga admitiendo en el futuro, nos encantaría conocer tu opinión." - "(Experimental) Habilita más espacio de almacenamiento y copias de seguridad" - "Tu buzón de voz está casi lleno. Para liberar espacio, habilita más espacio de almacenamiento de forma que Google pueda gestionar tus mensajes de voz y hacer copias de seguridad de estos. ""Esta función, que se encuentra actualmente en fase de prueba, ""podría servir para eliminar los mensajes de tu servidor de buzón de voz. Aunque no garantizamos que se siga admitiendo en el futuro, nos encantaría conocer tu opinión." + "Habilitar más espacio de almacenamiento y de copia de seguridad" + "Tu buzón de voz está lleno. Para desocupar espacio, habilita más almacenamiento para que Google pueda hacer una copia de seguridad de tus mensajes del buzón de buzón y gestionarlos." + "Habilitar más espacio de almacenamiento y de copia de seguridad" + "Tu buzón de voz está prácticamente lleno. Para desocupar espacio, habilita más almacenamiento para que Google pueda hacer una copia de seguridad de tus mensajes del buzón de buzón y gestionarlos." "Configura el PIN del buzón de voz" "Deberás introducir un PIN del buzón de voz siempre que llames para escuchar los mensajes de voz." "Error desconocido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-et/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-et/strings.xml index bfbd977c2..e392f9067 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-et/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-et/strings.xml @@ -44,10 +44,10 @@ "Kui teie postkast on täis, ei saa te uusi kõnepostisõnumeid vastu võtta." "Uusi kõnepostisõnumeid ei saa vastu võtta" "Teie postkast on täis. Uute kõnepostisõnumite vastuvõtmiseks kustutage mõned sõnumid." - "[Katseline.] Lisasalvestusruumi ja -varunduse sisselülitamine" - "Teie postkast on täis. Ruumi vabastamiseks lülitage sisse lisasalvestusruum, et Google saaks teie kõnepostisõnumeid hallata ja varundada. ""Seda funktsiooni testitakse ""ja see võib teie kõnepostisõnumid kõnepostiserverist kustutada. Me ei garanteeri, et seda funktsiooni tulevikus toetatakse. Soovime selle kohta siiski tagasisidet saada." - "[Katseline.] Lisasalvestusruumi ja -varunduse sisselülitamine" - "Teie postkast on peaaegu täis. Ruumi vabastamiseks lülitage sisse lisasalvestusruum, et Google saaks teie kõnepostisõnumeid hallata ja varundada. ""Seda funktsiooni testitakse ""ja see võib teie kõnepostisõnumid kõnepostiserverist kustutada. Me ei garanteeri, et seda funktsiooni tulevikus toetatakse. Soovime selle kohta siiski tagasisidet saada." + "Lisasalvestusruumi ja varundamise sisselülitamine" + "Teie postkast on täis. Ruumi vabastamiseks lülitage sisse lisasalvestusruum, et Google saaks teie kõnepostisõnumeid hallata ja varundada." + "Lisasalvestusruumi ja varundamise sisselülitamine" + "Teie postkast on peaaegu täis. Ruumi vabastamiseks lülitage sisse lisasalvestusruum, et Google saaks teie kõnepostisõnumeid hallata ja varundada." "Määrake kõneposti PIN-kood" "Vajate PIN-koodi juhul, kui helistate kõnepostile juurdepääsemiseks." "Tundmatu viga" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-eu/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-eu/strings.xml index a23d03e14..af40192d2 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-eu/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-eu/strings.xml @@ -44,10 +44,10 @@ "Ezin izango duzu jaso ahots-mezu berririk sarrera-ontzia beteta badago." "Ezin da jaso ahots-mezu berririk" "Beteta dago sarrera-ontzia. Ezabatu mezu batzuk ahots-mezu berriak jasotzeko." - "[Esperimentala] Lortu biltegiratze-toki gehiago eta egin babeskopiak" - "Beteta dago postontzia. Tokia egiteko, lortu biltegiratze-toki gehiago, Google-k erantzungailuko mezuak kudeatu eta haien babeskopiak egin ahal izan ditzan. ""Eginbide hau probatzen ari gara oraindik, ""eta agian erantzungailuaren zerbitzarian gordetako mezuak ezabatuko ditu. Ez dugu bermatzen eginbide hau etorkizunean erabiltzeko aukera emango dugunik. Halere, bihotzez eskertuko genizuke iritzia emango bazenigu." - "[Esperimentala] Lortu biltegiratze-toki gehiago eta egin babeskopiak" - "Ia beteta dago postontzia. Tokia egiteko, lortu biltegiratze-toki gehiago, Google-k erantzungailuko mezuak kudeatu eta haien babeskopiak egin ahal izan ditzan. ""Eginbide hau probatzen ari gara oraindik, ""eta agian erantzungailuaren zerbitzarian gordetako mezuak ezabatuko ditu. Ez dugu bermatzen eginbide hau etorkizunean erabiltzeko aukera emango dugunik. Halere, bihotzez eskertuko genizuke iritzia emango bazenigu." + "Lortu biltegiratze-toki gehiago eta egin babeskopiak" + "Beteta dago postontzia. Tokia egiteko, lortu biltegiratze-toki gehiago, Google-k erantzungailuko mezuak kudeatu eta haien babeskopiak egin ahal izan ditzan." + "Lortu biltegiratze-toki gehiago eta egin babeskopiak" + "Ia beteta dago postontzia. Tokia egiteko, lortu biltegiratze-toki gehiago, Google-k erantzungailuko mezuak kudeatu eta haien babeskopiak egin ahal izan ditzan." "Ezarri erantzungailuko PIN kodea" "Erantzungailua atzitzeko deitzen duzunerako behar duzu PIN kodea." "Errore ezezagun bat gertatu da" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-fa/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-fa/strings.xml index 331ee9c0c..af79322bb 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-fa/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-fa/strings.xml @@ -44,10 +44,10 @@ "اگر صندوق ورودی‌تان پر باشد نمی‌توانید پست صوتی جدیدی دریافت کنید." "پست‌های صوتی جدید دریافت نمی‌شود" "صندوق ورودی‌تان پر است. بعضی از پیام‌ها را حذف کنید تا پست صوتی جدید دریافت کنید." - "[آزمایشی] روشن کردن فضای ذخیره‌سازی اضافی و پشتیبان‌گیری" - "‏صندوق پستی‌تان پر است. برای آزاد کردن فضا، فضای ذخیره‌سازی اضافی را روشن کنید تا Google بتواند پیام‌های پست صوتی شما را مدیریت و پشتیبان‌گیری کند""این یک قابلیت درحال آزمایش شدن است""و به‌طور بالقوه پست‌های صوتی را از سرور پست صوتی شما حذف خواهد کرد و قول نمی‌دهیم در آینده از این قابلیت پشتیبانی کنیم. با این حال مشتاقیم درباره آن بازخورد دریافت کنیم." - "[آزمایشی] روشن کردن فضای ذخیره‌سازی اضافی و پشتیبان‌گیری" - "‏صندوق پستی‌تان تقریباً پر است. برای آزاد کردن فضا، فضای ذخیره‌سازی اضافی را روشن کنید تا Google بتواند پیام‌های پست صوتی شما را مدیریت و پشتیبان‌گیری کند""این یک قابلیت درحال آزمایش شدن است""و به‌طور بالقوه پست‌های صوتی را از سرور پست صوتی شما حذف خواهد کرد و قول نمی‌دهیم در آینده از این قابلیت پشتیبانی کنیم. با این حال مشتاقیم درباره آن بازخورد دریافت کنیم." + "فعال‌سازی فضای ذخیره‌سازی اضافی و پشتیبان‌گیری" + "‏صندوق ورودی‌تان پر است. برای آزاد کردن فضا، فضای ذخیره‌سازی اضافی را فعال‌سازی کنید تا Google بتواند پیام‌های صندوق پستی‌تان را مدیریت و پشتیبان‌گیری کند." + "فعال‌سازی فضای ذخیره‌سازی اضافی و پشتیبان‌گیری" + "‏صندوق ورودی‌تان تقریباً پر است. برای آزاد کردن فضا، فضای ذخیره‌سازی اضافی را فعال‌سازی کنید تا Google بتواند پیام‌های صندوق پستی‌تان را مدیریت و پشتیبان‌گیری کند." "تنظیم پین پست صوتی" "هر بار که تماس می‌گیرید برای دسترسی به پست صوتی‌تان به پین پست صوتی نیاز دارید." "خطای ناشناس" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-fi/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-fi/strings.xml index 2807a22dc..54167659b 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-fi/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-fi/strings.xml @@ -44,10 +44,10 @@ "Uusia vastaajaviestejä ei voi vastaanottaa, jos postilaatikko on täynnä." "Uusien vastaajaviestien vastaanottaminen ei onnistu." "Postilaatikkosi on täynnä. Poista viestejä, jotta voit vastaanottaa uusia vastaajaviestejä." - "[Kokeellinen] Ota käyttöön lisätallennustila ja ‑varmuuskopiointi" - "Postilaatikkosi on täynnä. Vapauta tilaa ottamalla käyttöön lisätallennustila, jotta Google voi hallinnoida ja varmuuskopioida vastaajaviestejäsi. ""Ominaisuus on testivaiheessa"", ja se saattaa poistaa vastaajaviestejä vastaajapalvelimelta. Emme takaa ominaisuuden tukea tulevaisuudessa. Otamme kuitenkin mielellämme vastaan palautetta." - "[Kokeellinen] Ota käyttöön lisätallennustila ja ‑varmuuskopiointi" - "Postilaatikkosi on lähes täynnä. Vapauta tilaa ottamalla käyttöön lisätallennustila, jotta Google voi hallinnoida ja varmuuskopioida vastaajaviestejäsi. ""Ominaisuus on testivaiheessa"", ja se saattaa poistaa vastaajaviestejä vastaajapalvelimelta. Emme takaa ominaisuuden tukea tulevaisuudessa. Otamme kuitenkin mielellämme vastaan palautetta." + "Ota käyttöön lisätallennustila ja ‑varmuuskopiointi" + "Postilaatikkosi on täynnä. Jos haluat vapauttaa tilaa, ota käyttöön lisätallennustila, niin Google voi hallinnoida ja varmuuskopioida vastaajaviestisi." + "Ota käyttöön lisätallennustila ja ‑varmuuskopiointi" + "Postilaatikkosi on lähes täynnä. Jos haluat vapauttaa tilaa, ota käyttöön lisätallennustila, niin Google voi hallinnoida ja varmuuskopioida vastaajaviestisi." "Aseta vastaajan PIN-koodi" "Vastaajan PIN-koodi on annettava aina, kun käytät vastaajaa." "Tuntematon virhe" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-fr-rCA/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-fr-rCA/strings.xml index b26f65b21..ef88ecfa2 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-fr-rCA/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-fr-rCA/strings.xml @@ -44,10 +44,10 @@ "Vous ne pourrez pas recevoir de nouveaux messages vocaux si votre boîte de réception est pleine." "Impossible de recevoir de nouveaux messages vocaux" "Votre boîte de réception est pleine. Essayez de supprimer des messages pour pouvoir recevoir de nouveaux messages vocaux." - "[Fonction expérimentale] Activer l\'espace supplémentaire de stockage et de sauvegarde" - "Votre boîte aux lettres est pleine. Pour libérer de l\'espace, activez l\'espace supplémentaire de stockage pour que Google puisse gérer et sauvegarder vos messages vocaux. ""Cette fonction est en cours de test ""et pourrait supprimer des messages de votre serveur de messagerie vocale. Nous ne pouvons pas garantir le maintien de cette fonction à l\'avenir. Nous voudrions toutefois savoir ce que vous en pensez." - "[Fonction expérimentale] Activer l\'espace supplémentaire de stockage et de sauvegarde" - "Votre boîte aux lettres est presque pleine. Pour libérer de l\'espace, activez l\'espace supplémentaire de stockage pour que Google puisse gérer et sauvegarder vos messages vocaux. ""Cette fonction est en cours de test ""et pourrait supprimer des messages de votre serveur de messagerie vocale. Nous ne pouvons pas garantir le maintien de cette fonction à l\'avenir. Nous voudrions toutefois savoir ce que vous en pensez." + "Activer l\'espace supplémentaire de stockage et de sauvegarde" + "Votre boîte aux lettres est pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire pour que Google puisse gérer et sauvegarder vos messages vocaux." + "Activer l\'espace supplémentaire de stockage et de sauvegarde" + "Votre boîte aux lettres est presque pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire pour que Google puisse gérer et sauvegarder vos messages vocaux." "Définir votre NIP de messagerie vocale" "Vous devez saisir un NIP de messagerie vocale chaque fois que vous appelez pour accéder à vos messages vocaux." "Erreur inconnue" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-fr/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-fr/strings.xml index f10c0383b..eefd5ad24 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-fr/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-fr/strings.xml @@ -44,10 +44,10 @@ "Vous ne pouvez pas recevoir de nouveaux messages vocaux si votre boîte de réception est pleine." "Impossible de recevoir de nouveaux messages vocaux" "Votre boîte de réception est pleine. Supprimez des messages vocaux pour pouvoir en recevoir de nouveaux." - "[Fonctionnalité expérimentale] Activer l\'espace de stockage et de sauvegarde supplémentaire" - "Votre messagerie est pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire pour permettre à Google de gérer et de sauvegarder vos messages vocaux. ""Cette fonctionnalité est en cours de test. ""Des messages risquent d\'être supprimés de votre serveur de messagerie vocale. Nous ne pouvons pas garantir le maintien de cette fonction. Toutefois, n\'hésitez pas à nous faire part de vos commentaires." - "[Fonctionnalité expérimentale] Activer l\'espace de stockage et de sauvegarde supplémentaire" - "Votre messagerie est presque pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire pour permettre à Google de gérer et de sauvegarder vos messages vocaux. ""Cette fonctionnalité est en cours de test. ""Des messages risquent d\'être supprimés de votre serveur de messagerie vocale. Nous ne pouvons pas garantir le maintien de cette fonction. Toutefois, n\'hésitez pas à nous faire part de vos commentaires." + "Activer l\'espace de stockage et de sauvegarde supplémentaire" + "Votre boîte aux lettres est pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire. Google pourra ainsi gérer vos messages vocaux et les sauvegarder." + "Activer l\'espace de stockage et de sauvegarde supplémentaire" + "Votre boîte aux lettres est presque pleine. Pour libérer de l\'espace, activez l\'espace de stockage supplémentaire. Google pourra ainsi gérer vos messages vocaux et les sauvegarder." "Définir le code de votre messagerie vocale" "Vous devrez saisir ce code chaque fois que vous consulterez votre messagerie vocale." "Erreur inconnue" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-gl/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-gl/strings.xml index a4f8f565c..efd174ffb 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-gl/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-gl/strings.xml @@ -44,10 +44,10 @@ "Non poderás recibir correo de voz novo se a caixa de entrada está chea." "Non se poden recibir correos de voz novos" "A caixa de entrada está chea. Proba a eliminar algunhas mensaxes para recibir correo de voz novo." - "[Experimental] Activa a copia de seguranza e o almacenamento adicional" - "A túa caixa de correo está chea. Para liberar espazo, activa o almacenamento adicional de modo que Google poida xestionar e facer unha copia de seguranza das túas mensaxes do correo de voz. ""Actualmente esta función está en modo de proba, ""e é posible que elimine correos de voz do teu servidor de correo de voz. Non prometemos a súa continuidade no futuro. De todos modos, encantaríanos que nos deses a túa opinión." - "[Experimental] Activa a copia de seguranza e o almacenamento adicional" - "O túa caixa de correo está case chea. Para liberar espazo, activa o almacenamento adicional de modo que Google poida xestionar e facer unha copia de seguranza das túas mensaxes do correo de voz. ""Actualmente esta función está en modo de proba, ""e é posible que elimine os correos de voz do teu servidor de correo de voz. Non prometemos a súa continuidade no futuro. De todos modos, encantaríanos que nos deses a túa opinión." + "Activa o almacenamento adicional e a copia de seguranza" + "A túa caixa de correo está chea. Para liberar espazo, activa o almacenamento adicional, de modo que Google poida xestionar as túas mensaxes do correo de voz e facer unha copia de seguranza." + "Activa o almacenamento adicional e a copia de seguranza" + "A túa caixa de correo está case chea. Para liberar espazo, activa o almacenamento adicional, de modo que Google poida xestionar as túas mensaxes do correo de voz e facer unha copia de seguranza." "Establece o PIN para o teu correo de voz" "Necesitarás o PIN cada vez que chames para acceder ao teu correo de voz." "Produciuse un erro descoñecido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-gu/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-gu/strings.xml index 149c52764..44634437a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-gu/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-gu/strings.xml @@ -44,10 +44,10 @@ "જો તમારું ઇનબોક્સ ભરાઈ ગયું હોય તો તમે નવી વૉઇસમેઇલ પ્રાપ્ત કરી શકશો નહીં." "નવી વૉઇસમેઇલ્સ પ્રાપ્ત કરી શકતાંં નથી" "તમારું ઇનબોક્સ ભરાઈ ગયું છે. નવી વૉઇસમેઇલ પ્રાપ્ત કરવા માટે કેટલા સંદેશા કાઢી નાખવાનો પ્રયાસ કરો." - "[પ્રાયોગિક] અતિરિક્ત સ્ટોરેજ ચાલુ કરો અને બેકઅપ લો" - "તમારું મેઇલબૉક્સ ભરાઇ ગયું છે. સ્થાન ખાલી કરવા માટે, અતિરિક્ત સ્ટોરેજ ચાલુ કરો જેથી Google તમારા વૉઇસમેઇલ સંદેશા સંચાલિત કરી અને તેનું બેકઅપ લઈ શકે. ""આ સુવિધાનું હાલમાં પરીક્ષણ થઈ રહ્યું છે ""અને તમારા વૉઇસમેઇલ સર્વરમાંથી સંભવિત રૂપે વૉઇસમેઇલ કાઢી નાખશે અને આ સુવિધાનું ભવિષ્યમાં સમર્થન કરવાનું અમે વચન આપતા નથી. જોકે અમને આ સુવિધા પર પ્રતિસાદ ગમશે." - "[પ્રાયોગિક] અતિરિક્ત સ્ટોરેજ ચાલુ કરો અને બેકઅપ લો" - "તમારું મેઇલબૉક્સ મોટે ભાગે ભરાઇ ગયું છે. સ્થાન ખાલી કરવા માટે, અતિરિક્ત સ્ટોરેજ ચાલુ કરો જેથી Google તમારા વૉઇસમેઇલ સંદેશા સંચાલિત કરી અને તેનું બેકઅપ લઈ શકે. ""આ સુવિધાનું હાલમાં પરીક્ષણ થઈ રહ્યું છે ""અને તમારા વૉઇસમેઇલ સર્વરમાંથી સંભવિત રૂપે વૉઇસમેઇલ કાઢી નાખશે અને આ સુવિધાનું ભવિષ્યમાં સમર્થન કરવાનું અમે વચન આપતા નથી. જોકે અમને આ સુવિધા પર પ્રતિસાદ ગમશે." + "અતિરિક્ત સ્ટોરેજ ચાલુ કરો અને બેકઅપ લો" + "તમારું મેઇલબોક્સ ભરાઇ ગયું છે. સ્થાન ખાલી કરવા માટે, અતિરિક્ત સ્ટોરેજ ખાલી કરો જેથી Google તમારા વૉઇસમેઇલ સંદેશા સંચાલિત કરી અને તેનું બેકઅપ લઈ શકે." + "અતિરિક્ત સ્ટોરેજ ચાલુ કરો અને બેકઅપ લો" + "તમારું મેઇલબોક્સ મોટાંભાગે ભરાઇ ગયું છે. સ્થાન ખાલી કરવા માટે, અતિરિક્ત સ્ટોરેજ ખાલી કરો જેથી Google તમારા વૉઇસમેઇલ સંદેશા સંચાલિત કરી અને તેનું બેકઅપ લઈ શકે." "તમારો વૉઇસમેઇલ PIN સેટ કરો" "તમારી વૉઇસમેઇલને ઍક્સેસ કરવા માટે તમે કોઈપણ સમયે કૉલ કરો છો, ત્યારે તમને વૉઇસમેઇલ PIN ની જરૂર પડશે." "અજાણી ભૂલ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-hi/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-hi/strings.xml index 07cc9b70b..bc9c46331 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-hi/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-hi/strings.xml @@ -44,10 +44,10 @@ "यदि आपका इनबॉक्स भरा हुआ है, तो आप नया वॉइसमेल नहीं प्राप्त कर सकेंगे." "नए वॉइसमेल प्राप्त नहीं किए जा सकते" "आपका इनबॉक्स पूरा भर गया है. नया वॉइसमेल प्राप्त करने के लिए कुछ संदेश हटाने का प्रयास करें." - "[प्रयोगात्मक] अतिरिक्त जगह और बैकअप चालू करें" - "आपका मेलबॉक्स भर चुका है. जगह खाली करने के लिए, अतिरिक्त मेमोरी चालू करें ताकि Google आपके वॉइसमेल संदेशों को प्रबंधित कर सके और उनका बैक अप ले सके. ""इस सुविधा का अभी परीक्षण किया जा रहा है ""और हो सकता है कि यह आपके वॉइसमेल सर्वर से वॉइसमेल हटा दे और हम भविष्य में इस सुविधा को देने का वादा नहीं करते. फिर भी आपका फ़ीडबैक हमें अच्छा लगेगा." - "[प्रयोगात्मक] अतिरिक्त जगह और बैकअप चालू करें" - "आपका मेलबॉक्स लगभग भर चुका है. जगह खाली करने के लिए, अतिरिक्त मेमोरी चालू करें ताकि Google आपके वॉइसमेल संदेशों को प्रबंधित कर सके और उनका बैक अप ले सके. ""इस सुविधा का अभी परीक्षण किया जा रहा है ""और हो सकता है कि यह आपके वॉइसमेल सर्वर से वॉइसमेल हटा दे और हम भविष्य में इस सुविधा को देने का वादा नहीं करते. फिर भी आपका फ़ीडबैक हमें अच्छा लगेगा." + "अतिरिक्त जगह और बैकअप चालू करें" + "आपका मेलबॉक्स भर गया है. जगह खाली करने के लिए, अतिरिक्त जगह चालू करें ताकि Google आपके वॉइसमेल संदेशों को प्रबंधित कर सके और उनका बैकअप ले सके." + "अतिरिक्त जगह और बैकअप चालू करें" + "आपका मेलबॉक्स लगभग भर गया है. जगह खाली करने के लिए, अतिरिक्त जगह चालू करें ताकि Google आपके वॉइसमेल संदेशों को प्रबंधित कर सके और उनका बैकअप ले सके." "अपना वॉइसमेल पिन सेट करें" "आप जब भी अपना वॉइसमेल एक्सेस करने के लिए कॉल करते हैं, आपको वॉइसमेल पिन की आवश्यकता होगी." "अज्ञात गड़बड़ी" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-hr/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-hr/strings.xml index b41443b84..a310d597c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-hr/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-hr/strings.xml @@ -44,10 +44,10 @@ "Ako je vaša pristigla pošta puna, nećete moći primiti novu govornu poruku." "Primanje nove govorne pošte nije moguće" "Pristigla pošta je puna. Izbrišite neke poruke da biste primili novu govornu poštu." - "[Eksperimentalno] Uključivanje dodatne pohrane i sigurnosnog kopiranja" - "Vaš je poštanski pretinac pun. Da biste oslobodili prostor, uključite dodatnu pohranu tako da Google može upravljati porukama u govornoj pošti i sigurnosno ih kopirati. ""Ova se značajka trenutačno testira ""i možda će izbrisati poruke govorne pošte s vašeg poslužitelja govorne pošte. Ne možemo obećati da ćemo ovu značajku podržati u budućnosti. Međutim, voljeli bismo dobiti povratne informacije o njoj." - "[Eksperimentalno] Uključivanje dodatne pohrane i sigurnosnog kopiranja" - "Vaš je poštanski pretinac pun. Da biste oslobodili prostor, uključite dodatnu pohranu tako da Google može upravljati porukama u govornoj pošti i sigurnosno ih kopirati. ""Ova se značajka trenutačno testira ""i možda će izbrisati poruke govorne pošte s vašeg poslužitelja govorne pošte. Ne možemo obećati da ćemo ovu značajku podržati u budućnosti. Međutim, voljeli bismo dobiti povratne informacije o njoj." + "Uključivanje dodatne pohrane i sigurnosnog kopiranja" + "Vaš je poštanski pretinac pun. Da biste oslobodili prostor, uključite dodatnu pohranu tako da Google može upravljati porukama u govornoj pošti i sigurnosno ih kopirati." + "Uključivanje dodatne pohrane i sigurnosnog kopiranja" + "Vaš je poštanski pretinac gotovo pun. Da biste oslobodili prostor, uključite dodatnu pohranu tako da Google može upravljati porukama u govornoj pošti i sigurnosno ih kopirati." "Postavljanje PIN-a za govornu poštu" "PIN za govornu poštu trebat će vam svaki put kad zatražite pristup govornoj pošti." "Nepoznata pogreška" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-hu/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-hu/strings.xml index 2fc191ae1..cc3eb7ecf 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-hu/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-hu/strings.xml @@ -44,10 +44,10 @@ "Ha a postaláda megtelt, nem fogadhat új hangpostaüzeneteket." "Nem tud új hangpostaüzeneteket fogadni" "A postaláda megtelt. Ha meg szeretné kapni az új hangpostaüzeneteket, töröljön néhány üzenetet." - "[Kísérleti] Az extra tárhely és biztonsági mentés bekapcsolása" - "A postafiókja megtelt. Ha szeretne helyet felszabadítani, kapcsolja be az extra tárhely funkciót, így a Google kezelheti az Ön hangposta-üzeneteit, és biztonsági másolatot készíthet róluk. ""Ezt a funkciót jelenleg teszteljük"", és előfordulhat, hogy letörli az Ön hangüzeneteit a hangpostaszerverről. Nem garantáljuk, hogy a funkció a jövőben is megmarad, de nagy örömmel vennénk, ha megírná róla a véleményét." - "[Kísérleti] Az extra tárhely és biztonsági mentés bekapcsolása" - "A postafiókja majdnem megtelt. Ha szeretne helyet felszabadítani, kapcsolja be az extra tárhely funkciót, így a Google kezelheti az Ön hangposta-üzeneteit, és biztonsági másolatot készíthet róluk. ""Ezt a funkciót jelenleg teszteljük"", és előfordulhat, hogy letörli az Ön hangüzeneteit a hangpostaszerverről. Nem garantáljuk, hogy a funkció a jövőben is megmarad, de nagy örömmel vennénk, ha megírná róla a véleményét." + "Az extra tárhely és biztonsági mentés bekapcsolása" + "A postaláda betelt. Ha szeretne helyet felszabadítani, kapcsolja be az extra tárhely funkciót, hogy a Google kezelhesse a hangpostaüzeneteket, és biztonsági mentést készíthessen róluk." + "Az extra tárhely és biztonsági mentés bekapcsolása" + "A postaláda majdnem betelt. Ha szeretne helyet felszabadítani, kapcsolja be az extra tárhely funkciót, hogy a Google kezelhesse a hangpostaüzeneteket, és biztonsági mentést készíthessen róluk." "A hangposta PIN-kódjának beállítása" "A hangpostafiók eléréséhez PIN-kódra van szüksége." "Ismeretlen hiba" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-hy/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-hy/strings.xml index 435f1242b..4a9c2ed21 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-hy/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-hy/strings.xml @@ -44,10 +44,10 @@ "Եթե մուտքի արկղը լցվի, նոր ձայնային հաղորդագրություններ չեք կարողանա ստանալ:" "Հնարավոր չէ ստանալ նոր ձայնային հաղորդագրություններ" "Մուտքի արկղը լիքն է: Նոր հաղոդագրություններ ստանալու համար ջնջեք հները:" - "[Փորձնական գործառույթ] Ակտիվացրեք լրացուցիչ տարածքն ու պահուստավորումը" - "Ձեր փոստարկղը լիքն է: Ակտիվացրեք լրացուցիչ տարածք, որպեսզի Google-ը կարողանա կառավարել և պահուստավորել ձեր ձայնային փոստի հաղորդագրությունները: ""Այս գործառույթը ներկայումս փորձարկման փուլում է, ""և այս ընթացքում ձայնային հաղորդագրությունները ձեր ձայնային փոստի սերվերից կարող են ջնջվել: Մենք չենք կարող խոստանալ, որ այն հետագայում կաջակցվի: Այդուհանդերձ, կցանկանայինք ձեր կարծիքն իմանալ այս գործառույթի մասին:" - "[Փորձնական գործառույթ] Ակտիվացրեք լրացուցիչ տարածքն ու պահուստավորումը" - "Ձեր փոստարկղը գրեթե լիքն է: Ակտիվացրեք լրացուցիչ տարածք, որպեսզի Google-ը կարողանա կառավարել և պահուստավորել ձեր ձայնային փոստի հաղորդագրությունները: ""Այս գործառույթը ներկայումս փորձարկման փուլում է, ""և այս ընթացքում ձայնային հաղորդագրությունները ձեր ձայնային փոստի սերվերից կարող են ջնջվել: Մենք չենք կարող խոստանալ, որ այն հետագայում կաջակցվի: Այդուհանդերձ, կցանկանայինք ձեր կարծիքն իմանալ այս գործառույթի մասին:" + "Պահանջվում է լրացուցիչ տարածք" + "Ձեր փոստարկղը լիքն է: Ակտիվացրեք լրացուցիչ տարածք, որպեսզի Google-ը կարողանա կառավարել և պահուստավորել ձեր ձայնային փոստի հաղորդագրությունները:" + "Պահանջվում է լրացուցիչ տարածք" + "Ձեր փոստարկղը գրեթե լիքն է: Ակտիվացրեք լրացուցիչ տարածք, որպեսզի Google-ը կարողանա կառավարել և պահուստավորել ձեր ձայնային փոստի հաղորդագրությունները:" "Ընտրել ձեր ձայնային փոստի PIN-ը" "Ամեն անգամ ձայնային փոստին զանգելիս ձեզանից կպահանջվի ձայնային փոստի PIN-ը:" "Անհայտ սխալ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-in/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-in/strings.xml index 5687aa9e2..948afaed4 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-in/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-in/strings.xml @@ -44,10 +44,10 @@ "Pesan suara tidak dapat diterima jika kotak masuk Anda penuh." "Tidak dapat menerima pesan suara baru" "Kotak masuk Anda penuh. Coba hapus beberapa pesan untuk menerima pesan suara baru." - "[Eksperimental] Aktifkan penyimpanan dan backup ekstra" - "Kotak surat Anda penuh. Untuk mengosongkan ruang penyimpanan, aktifkan penyimpanan ekstra sehingga Google dapat mengelola dan mem-backup pesan suara Anda. ""Fitur ini sedang diuji ""dan berpotensi menghapus pesan suara dari server pesan suara Anda, dan kami tidak berjanji akan mendukung fitur ini di masa mendatang. Namun, kami akan menerima masukan Anda dengan senang hati." - "[Eksperimental] Aktifkan penyimpanan dan backup ekstra" - "Kotak surat Anda hampir penuh. Untuk mengosongkan ruang penyimpanan, aktifkan penyimpanan ekstra agar Google dapat mengelola dan mem-backup pesan suara Anda. ""Fitur ini sedang diuji ""dan berpotensi menghapus pesan suara dari server pesan suara Anda, dan kami tidak berjanji akan mendukung fitur ini di masa mendatang. Namun, kami akan menerima masukan Anda dengan senang hati." + "Aktifkan penyimpanan dan backup ekstra" + "Kotak surat Anda sudah penuh. Untuk mengosongkan ruang, aktifkan penyimpanan ekstra sehingga Google dapat mengelola dan melakukan backup pada pesan suara Anda." + "Aktifkan penyimpanan dan backup ekstra" + "Kotak surat Anda hampir penuh. Untuk mengosongkan ruang, aktifkan penyimpanan ekstra sehingga Google dapat mengelola dan melakukan backup pada pesan suara Anda." "Setel PIN pesan suara Anda" "Anda akan memerlukan PIN pesan suara setiap kali menelepon untuk mengakses pesan suara." "Kesalahan tidak dikenal" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-is/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-is/strings.xml index 6aeb70fec..ae0497ee3 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-is/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-is/strings.xml @@ -44,10 +44,10 @@ "Þú getur ekki tekið á móti nýjum talhólfsskilaboðum ef pósthólfið er fullt." "Ekki hægt að taka á móti nýjum talhólfsskilaboðum" "Pósthólfið er fullt. Prófaðu að eyða skilaboðum til að taka á móti nýjum talhólfsskilaboðum." - "[Tilraunaútgáfa] Kveikja á viðbótargeymslu og öryggisafritun" - "Pósthólfið er fullt. Kveiktu á viðbótargeymslu svo Google geti haft umsjón með og tekið afrit af talhólfsskilaboðunum þínum. ""Verið er að prófa þennan eiginleika ""og mögulega gæti talhólfsskilaboðum verið eytt af vefþjóni talhólfsins og við ábyrgjumst ekki að eiginleikinn verði studdur í framtíðinni. Við kunnum virkilega að meta allar ábendingar varðandi þennan eiginleika." - "[Tilraunaútgáfa] Kveikja á viðbótargeymslu og öryggisafritun" - "Pósthólfið er næstum fullt. Kveiktu á viðbótargeymslu svo Google geti haft umsjón með og tekið afrit af talhólfsskilaboðunum þínum. ""Verið er að prófa þennan eiginleika ""og mögulega gæti talhólfsskilaboðum verið eytt af vefþjóni talhólfsins og við ábyrgjumst ekki að eiginleikinn verði studdur í framtíðinni. Við kunnum virkilega að meta allar ábendingar varðandi þennan eiginleika." + "Kveikja á viðbótargeymslu og öryggisafritun" + "Pósthólfið þitt er fullt. Þú getur losað pláss með því að kveikja á viðbótargeymslu til að Google geti unnið með og tekið öryggisafrit af talhólfsskilaboðunum þínum." + "Kveikja á viðbótargeymslu og öryggisafritun" + "Pósthólfið þitt er næstum fullt. Þú getur losað pláss með því að kveikja á viðbótargeymslu til að Google geti unnið með og tekið öryggisafrit af talhólfsskilaboðunum þínum." "Stilla PIN-númer talhólfs" "Þú þarft að nota PIN-númer talhólfsins í hvert skipti sem þú hringir til að athuga það." "Óþekkt villa" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-it/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-it/strings.xml index e0a4fe946..1df608aed 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-it/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-it/strings.xml @@ -44,10 +44,10 @@ "Se la casella della segreteria è piena non potrai ricevere nuovi messaggi vocali." "Impossibile ricevere nuovi messaggi vocali" "La casella della segreteria è piena. Prova a eliminare alcuni messaggi per riceverne di nuovi." - "[Sperimentale] Attiva archiviazione supplementare e backup" - "La tua casella postale è piena. Per liberare spazio, attiva l\'archiviazione supplementare in modo che Google possa gestire i messaggi vocali ed effettuarne il backup. ""Questa funzionalità al momento è in fase di test "" possibile che i messaggi vocali vengano eliminati dal server della segreteria. Non ci sono garanzie che la funzionalità continui a essere supportata in futuro, ma ci piacerebbe ricevere il tuo feedback." - "[Sperimentale] Attiva archiviazione supplementare e backup" - "La tua casella postale è quasi piena. Per liberare spazio, attiva l\'archiviazione supplementare in modo che Google possa gestire i messaggi vocali ed effettuarne il backup. ""Questa funzionalità al momento è in fase di test ""È possibile che i messaggi vocali vengano eliminati dal server della segreteria. Non ci sono garanzie che la funzionalità continui a essere supportata in futuro, ma ci piacerebbe ricevere il tuo feedback." + "Attiva spazio di archiviazione supplementare e backup" + "La tua casella di posta e piena. Per liberare spazio, attiva lo spazio di archiviazione supplementare in modo che Google possa gestire i messaggi vocali ed eseguirne il backup." + "Attiva spazio di archiviazione supplementare e backup" + "La tua casella di posta e quasi piena. Per liberare spazio, attiva lo spazio di archiviazione supplementare in modo che Google possa gestire i messaggi vocali ed eseguirne il backup." "Imposta il PIN della segreteria" "Dovrai inserire il PIN della segreteria ogni volta che chiami per accedervi." "Errore sconosciuto" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-iw/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-iw/strings.xml index 17c8e075a..c05a02feb 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-iw/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-iw/strings.xml @@ -44,10 +44,10 @@ "אם תיבת הדואר הנכנס מלאה, לא תוכל לקבל דואר קולי חדש." "לא ניתן לקבל הודעות חדשות בדואר הקולי" "תיבת הדואר הנכנס מלאה. נסה למחוק חלק מההודעות כדי שתוכל לקבל דואר קולי חדש." - "[תכונה ניסיונית] הפעל את הגיבוי ופינוי המקום" - "‏תיבת הדואר שלך מלאה. הפעל את התכונה \'גיבוי ופינוי מקום\' כדי ש-Google תוכל לנהל ולגבות את ההודעות הקוליות שלך. ""זוהי תכונה ניסיונית"" שאנחנו בודקים כרגע. היא עלולה למחוק הודעות קוליות מתא הדואר הקולי שלך בשרת. אנחנו לא מתחייבים שהתכונה תהיה זמינה בעתיד, אך נשמח לקבל עליה משוב." - "[תכונה ניסיונית] הפעל את הגיבוי ופינוי המקום" - "‏תיבת הדואר שלך כמעט מלאה. הפעל את התכונה \'גיבוי ופינוי מקום\' כדי ש-Google תוכל לנהל ולגבות את ההודעות הקוליות שלך. ""זוהי תכונה ניסיונית"" שאנחנו בודקים כרגע. היא עלולה למחוק הודעות קוליות מתא הדואר הקולי שלך בשרת. אנחנו לא מתחייבים שהתכונה תהיה זמינה בעתיד, אך נשמח לקבל עליה משוב." + "הפעל את הגיבוי ופינוי המקום" + "‏תיבת הדואר שלך מלאה. הפעל את הגיבוי ופינוי המקום כדי ש-Google תוכל לנהל ולגבות את ההודעות הקוליות שלך." + "הפעל את הגיבוי ופינוי המקום" + "‏תיבת הדואר שלך כמעט מלאה. הפעל את הגיבוי ופינוי המקום כדי ש-Google תוכל לנהל ולגבות את ההודעות הקוליות שלך." "הגדר קוד גישה לדואר הקולי" "בכל פעם שתשתמש בדואר הקולי תצטרך את קוד הגישה." "שגיאה לא ידועה" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ja/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ja/strings.xml index 41d32b0cc..5d47a9cea 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ja/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ja/strings.xml @@ -44,10 +44,10 @@ "新しいボイスメールを受信できません。受信トレイがいっぱいです。" "新しいボイスメールを受信できません" "受信トレイがいっぱいです。新しいボイスメールを受信するには、古いメッセージをいくつか削除してみてください。" - "[試験運用機能] 追加の保存容量とバックアップを ON にしてください" - "メールボックスの容量が上限に達しました。空き容量を増やすには、追加の保存容量を ON にして、Google がボイスメールのメッセージの管理とバックアップを行えるようにしてください。""これは現在テスト中の機能""で、ボイスメール サーバーからボイスメールを削除することができます。今後この機能が正式にサポートされる保証はありませんが、フィードバックをお寄せいただければ幸いです。" - "[試験運用機能] 追加の保存容量とバックアップを ON にしてください" - "メールボックスの保存容量がもう少しで上限に達します。空き容量を増やすには、追加の保存容量を ON にして、Google がボイスメールのメッセージの管理とバックアップを行えるようにしてください。""これは現在テスト中の機能""で、ボイスメール サーバーからボイスメールを削除することができます。今後この機能が正式にサポートされる保証はありませんが、フィードバックをお寄せいただければ幸いです。" + "追加の保存容量とバックアップを ON にしてください" + "メールボックスの保存容量が上限に達しました。空き容量を増やすには、追加の保存容量を ON にして、Google がボイスメールのメッセージの管理とバックアップを行えるようにしてください。" + "追加の保存容量とバックアップを ON にしてください" + "メールボックスの保存容量がもう少しで上限に達します。空き容量を増やすには、追加の保存容量を ON にして、Google がボイスメールのメッセージの管理とバックアップを行えるようにしてください。" "ボイスメール PIN を設定" "ボイスメールを呼び出すには、ボイスメール PIN が必要です。" "不明なエラー" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ka/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ka/strings.xml index 4990066ea..c5f6a12ca 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ka/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ka/strings.xml @@ -44,10 +44,10 @@ "თუ თქვენი შემოსულები სავსეა, ახალ ხმოვან ფოსტას ვერ მიიღებთ." "ახალი ხმოვანი ფოსტის მიღება შეუძლებელია" "თქვენი შემოსულები სავსეა. ახალი ხმოვანი ფოსტის მისაღებად სცადეთ რამდენიმე შეტყობინების წაშლა." - "[ექსპერიმენტული] დამატებითი მეხსიერების ჩართვა და სარეზერვო ასლების შექმნა" - "თქვენი საფოსტო ყუთი სავსეა. სივრცის გასათავისუფლებლად ჩართეთ დამატებითი მეხსიერება, რომ Google-მა შეძლოს თქვენი ხმოვანი ფოსტის შეტყობინებების მართვა და სარეზერვო ასლების შექმნა. ""ეს ფუნქცია ამჟამად ტესტირების პროცესშია ""და, სავარაუდოდ, წაშლის ხმოვან შეტყობინებებს თქვენი ხმოვანი ფოსტის სერვერიდან. ჩვენ ვერ დაგპირდებით, რომ მომავალში ეს ფუნქცია მხარდაჭერილი იქნება. თუმცა ამ ფუნქციის შესახებ გამოხმაურებას ინტერესით გავეცნობოდით." - "[ექსპერიმენტული] დამატებითი მეხსიერების ჩართვა და სარეზერვო ასლების შექმნა" - "თქვენი საფოსტო ყუთი თითქმის სავსეა. სივრცის გასათავისუფლებლად ჩართეთ დამატებითი მეხსიერება, რომ Google-მა შეძლოს თქვენი ხმოვანი ფოსტის შეტყობინებების მართვა და სარეზერვო ასლების შექმნა. ""ეს ფუნქცია ამჟამად ტესტირების პროცესშია ""და, სავარაუდოდ, წაშლის ხმოვან შეტყობინებებს თქვენი ხმოვანი ფოსტის სერვერიდან. ჩვენ ვერ დაგპირდებით, რომ მომავალში ეს ფუნქცია მხარდაჭერილი იქნება. თუმცა ამ ფუნქციის შესახებ გამოხმაურებას ინტერესით გავეცნობოდით." + "დამატებითი მეხსიერების ჩართვა და სარეზერვო ასლების შექმნა" + "თქვენი საფოსტო ყუთი სავსეა. ადგილის გასათავისუფლებლად ჩართეთ დამატებითი მეხსიერება, რათა Google-მა შეძლოს თქვენი ხმოვანი ფოსტის შეტყობინებების მართვა და სარეზერვო ასლების შექმნა." + "დამატებითი მეხსიერების ჩართვა და სარეზერვო ასლების შექმნა" + "თქვენი საფოსტო ყუთი თითქმის სავსეა. ადგილის გასათავისუფლებლად ჩართეთ დამატებითი მეხსიერება, რათა Google-მა შეძლოს თქვენი ხმოვანი ფოსტის შეტყობინებების მართვა და სარეზერვო ასლების შექმნა." "დააყენეთ თქვენი ხმოვანი ფოსტის PIN-კოდი" "ნებისმიერ დროს, როდესაც დარეკავთ, რათა ხმოვან ფოსტაზე წვდომა იქონიოთ, ხმოვანი ფოსტის PIN-კოდი დაგჭირდებათ." "უცნობი შეცდომა" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-kk/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-kk/strings.xml index f2ea20536..ad164c8fa 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-kk/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-kk/strings.xml @@ -44,10 +44,10 @@ "Кіріс қалтасы толы болса, жаңа дауыстық хабар ала алмайсыз." "Жаңа дауыстық хабарды алу мүмкін емес" "Кіріс қалтасы толы. Жаңа дауыстық хабарды алу үшін кейбір хабарларды жойып көріңіз." - "[Эксперименттік] Қосымша жадты қосып, сақтық көшірме жасау" - "Пошта жәшігі толы. Орын босату үшін, қосымша жад функциясын қосып, Google-ға дауыстық хабарларыңызды басқарып, сақтық көшірмесін жасауға рұқсат беріңіз. ""Бұл мүмкіндік қазір тексеріліп жатыр ""және ол дауыстық хабарларды дауыстық хабар серверінен өшіруі мүмкін. Сондықтан осы мүмкіндікке алдағы уақытта қолдау көрсетілетініне уәде бермейміз. Сонда да осы мүмкіндікке қатысты пікір алғымыз келеді." - "[Эксперименттік] Қосымша жадты қосып, сақтық көшірме жасау" - "Пошта жәшігі толы. Орын босату үшін, қосымша жад функциясын қосып, Google-ға дауыстық хабарларыңызды басқарып, сақтық көшірмесін жасауға рұқсат беріңіз. ""Бұл мүмкіндік қазір тексеріліп жатыр ""және ол дауыстық хабарларды дауыстық хабар серверінен өшіруі мүмкін. Сондықтан осы мүмкіндікке алдағы уақытта қолдау көрсетілетініне уәде бермейміз. Сонда да осы мүмкіндікке қатысты пікір алғымыз келеді." + "Қосымша жадты қосып, сақтық көшірме жасау" + "Кіріс жәшігі толы. Орын босату үшін, қосымша жад функциясын қосып, Google-ға дауыстық хабарларыңызды басқарып, сақтық көшірмесін жасауға рұқсат беріңіз." + "Қосымша жадты қосып, сақтық көшірме жасау" + "Кіріс жәшігі толы. Орын босату үшін, қосымша жад функциясын қосып, Google-ға дауыстық хабарларыңызды басқарып, сақтық көшірмесін жасауға рұқсат беріңіз." "Дауыстық пошта PIN кодын орнатыңыз" "Дауыстық поштаны тыңдау үшін кез келген уақытта қоңырау шалғанда, дауыстық пошта PIN коды сұралады." "Белгісіз қате" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-km/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-km/strings.xml index ff2a28378..f0ebf043d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-km/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-km/strings.xml @@ -44,10 +44,10 @@ "អ្នក​នឹង​មិន​អាច​ទទួល​សារ​ជា​សំឡេង​ថ្មី​បាន​ទេ បើ​ប្រអប់​សំបុត្រ​របស់​អ្នក​ពេញ។" "មិនអាចទទួល​សារជា​សំឡេង​ថ្មី​បាន​ទេ" "ប្រអប់សំបុត្ររបស់អ្នកពេញ។ សូមព្យាយាមលុបសារមួយចំនួនដើម្បី​អាច​ទទួល​សារជាសំឡេងថ្មី​បាន។" - "[ការ​សាកល្បង] បើក​ទំហំ​ផ្ទុក​បន្ថែម រួច​បម្រុងទុក" - "ប្រអប់​​សារ​​របស់​អ្នក​ពេញហើយ។ ដើម្បី​បង្កើន​ទំហំ​ផ្ទុក​ទំនេរ សូម​បើក​ទំហំផ្ទុក​បន្ថែម ដើម្បី​ឲ្យ Google អាច​គ្រប់គ្រង និង​បម្រុងទុក​សារ​សារ​ជា​សំឡេង​របស់​អ្នក​បាន។ ""មុខងារ​នេះ​កំពុង​ត្រូវ​បាន​សាកល្បង​នៅ​ពេល​នេះ ""ហើយ​អាច​នឹង​លុប​សារ​ជា​សំឡេង​​ពី​ម៉ាស៊ីន​មេ​សារ​ជា​សំឡេង​របស់​អ្នក ហើយ​យើង​​មិន​សន្យា​​​ធ្វើ​ឲ្យ​មុខងារ​នេះ​ដំណើរការ​នៅ​ថ្ងៃ​ក្រោយ​ទេ។ យើង​ចង់​ដឹង​មតិ​ស្ថាបនា​អំពី​មុខងារនេះ​ផង​ដែរ។" - "[ការ​សាកល្បង] បើក​ទំហំ​ផ្ទុក​បន្ថែម រួច​បម្រុងទុក" - "ប្រអប់​​សារ​​របស់​អ្នក​ពេញហើយ។ ដើម្បី​បង្កើន​ទំហំ​ផ្ទុក​ទំនេរ សូម​បើក​ទំហំផ្ទុក​បន្ថែម ដើម្បី​ឲ្យ Google អាច​គ្រប់គ្រង និង​បម្រុងទុក​សារ​សារ​ជា​សំឡេង​របស់​អ្នក​បាន។ ""មុខងារ​នេះ​កំពុង​ត្រូវ​បាន​សាកល្បង​នៅ​ពេល​នេះ ""ហើយ​អាច​នឹង​លុប​សារ​ជា​សំឡេង​​ពី​ម៉ាស៊ីន​មេ​សារ​ជា​សំឡេង​របស់​អ្នក ហើយ​យើង​​មិន​សន្យា​​​ធ្វើ​ឲ្យ​មុខងារ​នេះ​ដំណើរការ​នៅ​ថ្ងៃ​ក្រោយ​ទេ។ យើង​ចង់​ដឹង​មតិ​ស្ថាបនា​អំពី​មុខងារនេះផង​ដែរ។" + "បើក​ទំហំ​ផ្ទុក​បន្ថែម រួច​បម្រុងទុក" + "ប្រអប់​​សារ​​របស់​អ្នក​ពេញហើយ។ ដើម្បី​បង្កើន​ទំហំ​ផ្ទុក​ទំនេរ សូម​បើក​ទំហំផ្ទុក​បន្ថែម ដើម្បី​ឲ្យ Google អាច​គ្រប់គ្រង និង​បម្រុងទុក​សារ​សារ​ជា​សំឡេង​របស់​អ្នក​បាន។" + "បើក​ទំហំ​ផ្ទុក​បន្ថែម រួច​បម្រុងទុក" + "ប្រអប់​សារ​របស់​អ្នក​ពេញហើយ។ ដើម្បី​បង្កើន​ទំហំ​ផ្ទុក​ទំនេរ សូម​បើក​ទំហំផ្ទុក​បន្ថែម ដើម្បី​ឲ្យ Google អាច​គ្រប់គ្រង និង​បម្រុងទុក​សារ​សារ​ជា​សំឡេង​របស់​អ្នក​បាន។" "កំណត់កូដ PIN ​សារ​ជាសំឡេង​របស់​អ្នក" "អ្នក​នឹង​ត្រូវការកូដ PIN សារ​ជាសំឡេងមួយ ​គ្រប់​ពេល​ដែល​អ្នក​ហៅ ​​ដើម្បី​ចូល​ដំណើរការ​សារ​ជា​សំឡេង​របស់​អ្នក។" "បញ្ហាមិនស្គាល់" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-kn/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-kn/strings.xml index bf6390349..7840fca9a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-kn/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-kn/strings.xml @@ -44,10 +44,10 @@ "ನಿಮ್ಮ ಇನ್‌ಬಾಕ್ಸ್ ಪೂರ್ಣವಾಗಿದ್ದಾಗ ಹೊಸ ಧ್ವನಿಮೇಲ್‌ ಅನ್ನು ಸ್ವೀಕರಿಸಲು ನಿಮಗೆ ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ." "ಹೊಸ ಧ್ವನಿಮೇಲ್‌‌ಗಳನ್ನು ಸ್ವೀಕರಿಸಲಾಗುವುದಿಲ್ಲ" "ನಿಮ್ಮ ಇನ್‌ಬಾಕ್ಸ್‌ ಪೂರ್ಣವಾಗಿದೆ. ಹೊಸ ಧ್ವನಿಮೇಲ್‌ ಸ್ವೀಕರಿಸಲು ಕೆಲವು ಸಂದೇಶಗಳನ್ನು ಅಳಿಸಲು ಪ್ರಯತ್ನಿಸಿ." - "[ಪ್ರಾಯೋಗಿಕ] ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆ ಮತ್ತು ಬ್ಯಾಕಪ್ ಅನ್ನು ಆನ್ ಮಾಡಿ" - "ನಿಮ್ಮ ಮೇಲ್‌ಬಾಕ್ಸ್ ತುಂಬಿದೆ. ಸ್ಥಳಾವಕಾಶವನ್ನು ತೆರವುಗೊಳಿಸಲು, ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆಯನ್ನು ಆನ್ ಮಾಡಿ ಇದರಿಂದ Google ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸಂದೇಶಗಳನ್ನು ನಿರ್ವಹಿಸಬಹುದು ಮತ್ತು ಬ್ಯಾಕಪ್ ಮಾಡಬಹುದು. ""ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಪ್ರಸ್ತುತ ಪರೀಕ್ಷೆ ಮಾಡಲಾಗುತ್ತಿದೆ ""ಮತ್ತು ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸರ್ವರ್‌ನಿಂದ ಧ್ವನಿಮೇಲ್‌ಗಳನ್ನು ಸಂಭಾವ್ಯವಾಗಿ ಅಳಿಸುತ್ತದೆ ಮತ್ತು ನಾವು ಭವಿಷ್ಯದಲ್ಲಿ ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬೆಂಬಲಿಸುವ ಭರವಸೆಯನ್ನು ನೀಡುವುದಿಲ್ಲ. ಆದರೂ ನಿಮ್ಮ ಪ್ರತಿಕ್ರಿಯೆಗೆ ಸ್ವಾಗತ." - "[ಪ್ರಾಯೋಗಿಕ] ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆ ಮತ್ತು ಬ್ಯಾಕಪ್ ಅನ್ನು ಆನ್ ಮಾಡಿ" - "ನಿಮ್ಮ ಮೇಲ್‌ಬಾಕ್ಸ್ ಬಹುತೇಕ ತುಂಬಿದೆ. ಸ್ಥಳಾವಕಾಶವನ್ನು ತೆರವುಗೊಳಿಸಲು, ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆಯನ್ನು ಆನ್ ಮಾಡಿ ಇದರಿಂದ Google ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸಂದೇಶಗಳನ್ನು ನಿರ್ವಹಿಸಬಹುದು ಮತ್ತು ಬ್ಯಾಕಪ್ ಮಾಡಬಹುದು. ""ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಪ್ರಸ್ತುತವಾಗಿ ಪರೀಕ್ಷೆ ಮಾಡಲಾಗುತ್ತಿದೆ ""ಮತ್ತು ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸರ್ವರ್‌ನಿಂದ ಧ್ವನಿಮೇಲ್‌ಗಳನ್ನು ಸಂಭಾವ್ಯವಾಗಿ ಅಳಿಸುತ್ತದೆ ಮತ್ತು ನಾವು ಭವಿಷ್ಯದಲ್ಲಿ ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬೆಂಬಲಿಸುವ ಭರವಸೆಯನ್ನು ನೀಡುವುದಿಲ್ಲ. ಆದರೂ ನಿಮ್ಮ ಪ್ರತಿಕ್ರಿಯೆಗೆ ಸ್ವಾಗತ." + "ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆ ಮತ್ತು ಬ್ಯಾಕಪ್ ಅನ್ನು ಆನ್ ಮಾಡಿ" + "ನಿಮ್ಮ ಮೇಲ್‌ಬಾಕ್ಸ್ ತುಂಬಿದೆ. ಸ್ಥಳಾವಕಾಶವನ್ನು ತೆರವುಗೊಳಿಸಲು, ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹವನ್ನು ಆನ್ ಮಾಡಿಕೊಳ್ಳುವ ಮೂಲಕ Google ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸಂದೇಶಗಳನ್ನು ನಿರ್ವಹಿಸಬಹುದು ಮತ್ತು ಬ್ಯಾಕಪ್ ಮಾಡಬಹುದು." + "ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹಣೆ ಮತ್ತು ಬ್ಯಾಕಪ್ ಅನ್ನು ಆನ್ ಮಾಡಿ" + "ನಿಮ್ಮ ಮೇಲ್‌ಬಾಕ್ಸ್ ಬಹುತೇಕ ತುಂಬಿದೆ. ಸ್ಥಳಾವಕಾಶವನ್ನು ತೆರವುಗೊಳಿಸಲು, ಹೆಚ್ಚುವರಿ ಸಂಗ್ರಹವನ್ನು ಆನ್ ಮಾಡಿಕೊಳ್ಳುವ ಮೂಲಕ Google ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸಂದೇಶಗಳನ್ನು ನಿರ್ವಹಿಸಬಹುದು ಮತ್ತು ಬ್ಯಾಕಪ್ ಮಾಡಬಹುದು." "ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಪಿನ್ ಹೊಂದಿಸಿ" "ನೀವು ಕರೆ ಮಾಡಿದಾಗ ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಪ್ರವೇಶಿಸಲು ನಿಮಗೆ ಯಾವಾಗಲೂ ಧ್ವನಿಮೇಲ್‌ ಪಿನ್ ಅಗತ್ಯವಿರುತ್ತದೆ." "ಅಪರಿಚಿತ ದೋಷ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ko/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ko/strings.xml index fc4385b99..092214db1 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ko/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ko/strings.xml @@ -44,10 +44,10 @@ "받은편지함이 가득 차면 새로운 음성메시지를 받을 수 없습니다." "새로운 음성메시지를 받을 수 없음" "받은편지함이 가득 찼습니다. 새로운 음성메시지를 받으려면 일부 메시지를 삭제해 보세요." - "[실험] 추가 저장용량 및 백업 사용 설정" - "편지함이 가득 찼습니다. 여유 공간을 확보하려면 Google에서 음성사서함 메시지를 관리하고 백업할 수 있도록 추가 저장용량을 사용 설정해 주세요. ""이 기능은 현재 테스트 단계이며 ""이 기능으로 인해 음성사서함 서버에서 메시지가 삭제될 수도 있습니다. 또한 Google에서는 추후 이 기능이 지원된다고 보장할 수 없습니다. 하지만 이 기능에 관해 의견을 주시면 감사하겠습니다." - "[실험] 추가 저장용량 및 백업 사용 설정" - "사서함이 거의 가득 찼습니다. 여유 공간을 확보하려면 Google에서 음성사서함 메시지를 관리하고 백업할 수 있도록 추가 저장용량을 사용 설정해 주세요. ""이 기능은 현재 테스트 단계이며 ""이 기능으로 인해 음성사서함 서버에서 메시지가 삭제될 수도 있습니다. 또한 Google에서는 추후 이 기능이 지원된다고 보장할 수 없습니다. 하지만 이 기능에 관해 의견을 주시면 감사하겠습니다." + "추가 저장용량 및 백업 사용" + "음성사서함이 가득 찼습니다. Google에서 음성사서함 메시지를 관리하고 백업할 수 있도록 추가 저장용량을 사용 설정하여 여유 공간을 확보하세요." + "추가 저장용량 및 백업 사용" + "음성사서함이 거의 가득 찼습니다. Google에서 음성사서함 메시지를 관리하고 백업할 수 있도록 추가 저장용량을 사용 설정하여 여유 공간을 확보하세요." "음성사서함 PIN 설정" "음성사서함에 액세스하도록 호출할 때마다 음성사서함 PIN이 필요합니다." "알 수 없는 오류" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ky/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ky/strings.xml index 096b29288..0fffb06d0 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ky/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ky/strings.xml @@ -44,10 +44,10 @@ "Почтаңыз толуп калса, жаңы үн каттарын ала албай каласыз." "Жаңы үн каттары алынбай жатат" "\"Келген каттар\" кутуңуз толуп калды. Үн каттарын алуу үчүн айрым билдирүүлөрдү өчүрүңүз." - "[Эксперименталдык] Кошумча мейкиндик жана камдык көчүрмөнү сактоону кошуңуз" - "Үн почтаңызда бош орун жок. Үн каттарыңызды башкаруу жана алардын камдык көчүрмөлөрүн сактоо үчүн кошумча мейкиндикти күйгүзүп коюңуз. ""Бул функция учурда сыноодон өтүп жатат ""жана үн почтаңыздын сервериндеги үн каттарды өчүрүп салышы мүмкүн. Кийин бул функцияны колдоого алаарыбызга кепилдик бере албайбыз. Ошентсе да, функция тууралуу пикириңизди билгибиз келет." - "[Эксперименталдык] Кошумча мейкиндик жана камдык көчүрмөнү сактоону кошуңуз" - "Үн почтаңыз толуп калды. Үн каттарыңызды башкаруу жана алардын камдык көчүрмөлөрүн сактоо үчүн кошумча мейкиндикти күйгүзүп коюңуз. ""Бул функция учурда сыноодон өтүп жатат ""жана үн почтаңыздын сервериндеги үн каттарды өчүрүп салышы мүмкүн. Кийин бул функцияны колдоого алаарыбызга кепилдик бере албайбыз. Ошентсе да, функция тууралуу пикириңизди билгибиз келет." + "Кошумча мейкиндик талап кылынат" + "Үн почтаңызда бош орун жок. Үн каттарыңызды башкаруу жана алардын камдык көчүрмөлөрүн сактоо үчүн кошумча мейкиндикти күйгүзүп коюңуз." + "Кошумча мейкиндик талап кылынат" + "Үн почтаңыз толуп калды. Үн каттарыңызды башкаруу жана алардын камдык көчүрмөлөрүн сактоо үчүн кошумча мейкиндикти күйгүзүп коюңуз." "Үн почтаңыздын PIN-кодун орнотуңуз" "PIN-код ар чалган сайын үн почтаңызды угуу үчүн керек." "Белгисиз ката" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-lo/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-lo/strings.xml index bea11800c..d6293d2e7 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-lo/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-lo/strings.xml @@ -44,10 +44,10 @@ "ທ່ານຈະບໍ່ສາມາດຮັບຂໍ້ຄວາມສຽງໃໝ່ໄດ້ຫາກອິນບັອກຂອງທ່ານເຕັມ." "ບໍ່ສາມາດຮັບຂໍ້ຄວາມສຽງໃໝ່" "ອິນບັອກຂອງທ່ານເຕັມແລ້ວ. ໃຫ້ລອງລຶບບາງຂໍ້ຄວາມອອກເພື່ອຮັບຂໍ້ຄວາມສຽງໃໝ່." - "[ການທົດລອງ] ການສຳຮອງ ແລະ ບ່ອນຈັດເກັບຂໍ້ມູນພິເສດ" - "Your mailbox is full. To free up space, turn on extra storage so Google can manage and backup your voicemail messages. ""This feature is currently being tested ""and will potentially delete voicemails from your voicemail server, and we do not promise to support this feature in the future. We would love your feedback though." - "[ການທົດລອງ] ການສຳຮອງ ແລະ ບ່ອນຈັດເກັບຂໍ້ມູນພິເສດ" - "ກ່ອງອີເມວຂອງທ່ານເຕັມແລ້ວ. ເພື່ອສ້າງພື້ນທີ່ຫວ່າງ, ໃຫ້ເປີດໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນພິເສດເພື່ອໃຫ້ Google ສາມາດຈັດການ ແລະ ສຳຮອງຂໍ້ຄວາມສຽງຂອງທ່ານໄດ້. ""ຄຸນສົມບັດນີ້ກຳລັງຢູ່ໃນລະຫວ່າງການທົດສອບ ""ແລະ ມັນອາດລຶບຂໍ້ຄວາມສຽງອອກຈາກເຊີບເວີຂໍ້ຄວາມສຽງຂອງທ່ານໄດ້. ຈະບໍ່ມີການຮັບປະກັນການຊ່ວຍເຫຼືອຄຸນສົມບັດນີ້ໃນອະນາຄົດ. ຢ່າງໃດກໍຕາມພວກເຮົາຢາກຟັງຄຳຄິດເຫັນທີ່ມີຕໍ່ຄຸນສົມບັດດັ່ງກ່າວຈາກທ່ານ." + "ເປີດໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນເພີ່ມເຕີມ ແລະ ການສຳຮອງຂໍ້ມູນ" + "ກ່ອງອີເມວຂອງທ່ານເຕັມແລ້ວ. ເພື່ອເພີ່ມບ່ອນຈັດເກັບຂໍ້ມູນ, ໃຫ້ເປີດໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນເພີ່າມເຕີມເພື່ອໃຫ້ Google ສາມາດຈັດການ ແລະ ສຳຮອງຂໍ້ມູນຂໍ້ຄວາມສຽງຂອງທ່ານໄດ້." + "ເປີດໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນເພີ່ມເຕີມ ແລະ ການສຳຮອງຂໍ້ມູນ" + "ກ່ອງອີເມວຂອງທ່ານໃກ້ເຕັມແລ້ວ. ເພື່ອເພີ່ມບ່ອນຈັດເກັບຂໍ້ມູນ, ໃຫ້ເປີດໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນເພີ່າມເຕີມເພື່ອໃຫ້ Google ສາມາດຈັດການ ແລະ ສຳຮອງຂໍ້ມູນຂໍ້ຄວາມສຽງຂອງທ່ານໄດ້." "ຕັ້ງລະຫັດ PIN ຂໍ້ຄວາມສຽງຂອງທ່ານ" "ທ່ານຈະຕ້ອງໃຊ້ລະຫັດ PIN ໃນຕອນໃດກໍຕາມທີ່ທ່ານໂທເພື່ອເຂົ້າຟັງຂໍ້ຄວາມສຽງຂອງທ່ານ." "ຄວາມຜິດພາດທີ່ບໍ່ຮູ້ຈັກ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-lt/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-lt/strings.xml index 8b4c63989..92f3316d4 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-lt/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-lt/strings.xml @@ -44,10 +44,10 @@ "Negalėsite gauti naujų balso pašto pranešimų, jei gautuosiuose nebeliks laisvos vietos." "Nepavyksta gauti naujų balso pašto pranešimų" "Gautuosiuose nebėra laisvos vietos. Kad galėtumėte gauti naujus balso pašto pranešimus, pabandykite ištrinti keletą pranešimų." - "[Eksperimentinė] Įjunkite papildomos saugyklos vietos ir atsarginių kopijų kūrimo funkciją" - "Pašto dėžutė pilna. Jei norite atlaisvinti vietos, įjunkite papildomos saugyklos vietos parinktį, kad „Google“ galėtų tvarkyti balso pašto pranešimus ir kurti atsargines jų kopijas. ""Ši funkcija šiuo metu išbandoma ""ir ją naudojant iš balso pašto serverio bus ištrinami balso pašto pranešimai. Nepažadame, kad ateityje ši funkcija bus palaikoma, tačiau norėtume gauti atsiliepimų apie ją." - "[Eksperimentinė] Įjunkite papildomos saugyklos vietos ir atsarginių kopijų kūrimo funkciją" - "Pašto dėžutė beveik pilna. Jei norite atlaisvinti vietos, įjunkite papildomos saugyklos vietos parinktį, kad „Google“ galėtų tvarkyti balso pašto pranešimus ir kurti atsargines jų kopijas. ""Ši funkcija šiuo metu išbandoma ""ir ją naudojant iš balso pašto serverio bus ištrinami balso pašto pranešimai. Nepažadame, kad ateityje ši funkcija bus palaikoma, tačiau norėtume gauti atsiliepimų apie ją." + "Įjunkite papildomos saugyklos vietos ir atsarginės kopijos kūrimo parinktį" + "Jūsų pašto dėžutė pilna. Jei norite atlaisvinti vietos, įjunkite papildomos saugyklos vietos parinktį, kad „Google“ galėtų tvarkyti balso pašto pranešimus ir kurti atsargines jų kopijas." + "Įjunkite papildomos saugyklos vietos ir atsarginės kopijos kūrimo parinktį" + "Jūsų pašto dėžutė beveik pilna. Jei norite atlaisvinti vietos, įjunkite papildomos saugyklos vietos parinktį, kad „Google“ galėtų tvarkyti balso pašto pranešimus ir kurti atsargines jų kopijas." "Nustatyti balso pašto PIN kodą" "Jums reikės balso pašto PIN kodo visada, kai skambinsite norėdami pasiekti balso paštą." "Nežinoma klaida" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-lv/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-lv/strings.xml index cd8ed7a6d..e27de6f21 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-lv/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-lv/strings.xml @@ -44,10 +44,10 @@ "Jūs nevarēsiet saņemt jaunus balss pasta ziņojumus, ja iesūtne ir pilna." "Nevar saņemt balss pasta ziņojumus." "Iesūtne ir pilna. Izdzēsiet dažus ziņojumus, lai saņemtu jaunus balss pasta ziņojumus." - "[Eksperimentāli] Papildu krātuves un dublēšanas aktivizēšana" - "Jūsu pastkaste ir pilna. Lai atbrīvotu vietu un Google varētu pārvaldīt un dublēt jūsu balss pasta ziņojumus, aktivizējiet papildu krātuvi. ""Šī funkcija pašlaik tiek testēta, ""un pastāv iespēja, ka no jūsu balss pasta servera tiks izdzēsti balss pasta ziņojumi. Mēs negarantējam šīs funkcijas turpmāku atbalstu, tomēr priecāsimies saņemt atsauksmes par to." - "[Eksperimentāli] Papildu krātuves un dublēšanas aktivizēšana" - "Jūsu pastkaste ir gandrīz pilna. Lai atbrīvotu vietu un Google varētu pārvaldīt un dublēt jūsu balss pasta ziņojumus, aktivizējiet papildu krātuvi. ""Šī funkcija pašlaik tiek testēta, ""un pastāv iespēja, ka no jūsu balss pasta servera tiks izdzēsti balss pasta ziņojumi. Mēs negarantējam šīs funkcijas turpmāku atbalstu, tomēr priecāsimies saņemt atsauksmes par to." + "Papildu krātuves un dublēšanas aktivizēšana" + "Jūsu pastkaste ir pilna. Lai atbrīvotu vietu un Google varētu pārvaldīt un dublēt jūsu balss pasta ziņojumus, aktivizējiet papildu krātuvi." + "Papildu krātuves un dublēšanas aktivizēšana" + "Jūsu pastkaste ir gandrīz pilna. Lai atbrīvotu vietu un Google varētu pārvaldīt un dublēt jūsu balss pasta ziņojumus, aktivizējiet papildu krātuvi." "Balss pasta PIN iestatīšana" "Lai piekļūtu balss pastam zvanot, būs vajadzīgs balss pasta PIN." "Nezināma kļūda" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-mk/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-mk/strings.xml index 19aaa42aa..3ff8b8739 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-mk/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-mk/strings.xml @@ -44,10 +44,10 @@ "Нема да може да добивате нова говорна пошта ако вашето приемно сандаче е полно." "Не може да добивате нова говорна пошта" "Вашето приемно сандаче е полно. Обидете се да избришете неколку пораки за да добиете нова говорна пошта." - "[Експериментално] Вклучете дополнителен простор и бекап" - "Вашето поштенско сандаче е полно. За да ослободите простор, вклучете дополнителен простор за да може Google да управува и да прави бекап на пораките од вашата говорна пошта. ""Функцијава е во фаза на тестирање во моментов ""и постои можност да брише говорни пораки од вашиот сервер за говорна пошта. Не ветуваме поддршка за функцијава во иднина. Сепак, многу би ни значеле вашите повратни информации." - "[Експериментално] Вклучете дополнителен простор и бекап" - "Вашето поштенско сандаче е речиси полно. За да ослободите простор, вклучете дополнителен простор за да може Google да управува и да прави бекап на пораките од вашата говорна пошта. ""Функцијава е во фаза на тестирање во моментов ""и постои можност да брише говорни пораки од вашиот сервер за говорна пошта. Не ветуваме поддршка за функцијава во иднина. Сепак, многу би ни значеле вашите повратни информации." + "Вклучете дополнителен простор и бекап" + "Вашето поштенско сандаче е полно. За да ослободите простор, вклучете дополнителен простор за да може Google да управува и да прави бекап на пораките од вашата говорна пошта." + "Вклучете дополнителен простор и бекап" + "Вашето поштенско сандаче е речиси полно. За да ослободите простор, вклучете дополнителен простор за да може Google да управува и да прави бекап на пораките од вашата говорна пошта." "Поставете PIN за говорната пошта" "Секогаш кога ќе повикате за да пристапите до говорната пошта, ќе треба да внесете PIN за говорна пошта." "Непозната грешка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ml/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ml/strings.xml index 896b77036..84d221e3d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ml/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ml/strings.xml @@ -44,10 +44,10 @@ "ഇൻബോക്‌സ്‌ നിറഞ്ഞിരിക്കുകയാണെങ്കിൽ നിങ്ങൾക്ക് പുതിയ വോയ്‌സ്‌മെയിൽ സ്വീകരിക്കാനാവില്ല." "പുതിയ വോയ്‌സ്‌മെയിലുകൾ സ്വീകരിക്കാനാകുന്നില്ല" "നിങ്ങളുടെ ഇൻബോക്‌സ്‌ നിറഞ്ഞിരിക്കുകയാണ്. പുതിയ വോയ്‌സ്‌മെയിൽ സ്വീകരിക്കാൻ ചില സന്ദേശങ്ങൾ ഇല്ലാതാക്കുന്നത് പരീക്ഷിച്ചുനോക്കൂ." - "[പരീക്ഷണാത്മകം] അധിക സ്‌റ്റോറേജും ബായ്‌ക്കപ്പും ഓണാക്കുക" - "നിങ്ങളുടെ മെയിൽബോക്‌സ് നിറഞ്ഞിരിക്കുന്നു. ഇടം സൃഷ്‌ടിക്കാൻ അധിക സ്‌റ്റോറേജ് ഓണാക്കുക, തുടർന്ന് Google-ന് നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സന്ദേശങ്ങൾ മാനേജുചെയ്യാനും ബായ്‌ക്കപ്പെടുക്കാനുമാകും. ""നിലവിൽ ഈ ഫീച്ചർ പരീക്ഷണ ഘട്ടത്തിലായതിനാൽ ""നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സെർവറിലെ വോയ്‌സ്‌മെയിലുകൾ ഇല്ലാതാക്കാൻ സാധ്യതയുണ്ട്, ഒപ്പം ഭാവിയിൽ ഈ ഫീച്ചർ ഉപയോഗിക്കാനാവുമെന്നും ഞങ്ങൾ ഉറപ്പുനൽകുന്നില്ല. എങ്കിലും ഇതിനെക്കുറിച്ചുള്ള ഫീഡ്‌ബാക്ക് അറിയാൻ ഞങ്ങൾ താൽപ്പര്യപ്പെടുന്നു." - "[പരീക്ഷണാത്മകം] അധിക സ്‌റ്റോറേജും ബായ്‌ക്കപ്പും ഓണാക്കുക" - "നിങ്ങളുടെ മെയിൽബോക്‌സ്‌ ഏകദേശം നിറഞ്ഞിരിക്കുന്നു. ഇടം സൃഷ്‌ടിക്കാൻ അധിക സ്‌റ്റോറേജ് ഓണാക്കുക, തുടർന്ന് Google-ന് നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സന്ദേശങ്ങൾ മാനേജുചെയ്യാനും ബായ്‌ക്കപ്പെടുക്കാനുമാകും. ""നിലവിൽ ഈ ഫീച്ചർ പരീക്ഷണ ഘട്ടത്തിലായതിനാൽ ""നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സെർവറിലെ വോയ്‌സ്‌മെയിലുകൾ ഇല്ലാതാക്കാൻ സാധ്യതയുണ്ട്, ഒപ്പം ഭാവിയിൽ ഈ ഫീച്ചർ ഉപയോഗിക്കാനാവുമെന്നും ഞങ്ങൾ ഉറപ്പുനൽകുന്നില്ല. എങ്കിലും ഇതിനെക്കുറിച്ചുള്ള ഫീഡ്‌ബാക്ക് അറിയാൻ ഞങ്ങൾ താൽപ്പര്യപ്പെടുന്നു." + "അധിക സ്‌റ്റോറേജും ബായ്‌ക്കപ്പും ഓണാക്കുക" + "നിങ്ങളുടെ മെയിൽബോക്‌സ് നിറഞ്ഞിരിക്കുന്നു. ഇടം സൃഷ്‌ടിക്കാൻ, അധിക സ്‌റ്റോറേജ് ഓണാക്കുക, തുടർന്ന് Google-ന് നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സന്ദേശങ്ങൾ മാനേജുചെയ്യാനും ബായ്‌ക്കപ്പെടുക്കാനുമാകും." + "അധിക സ്‌റ്റോറേജും ബായ്‌ക്കപ്പും ഓണാക്കുക" + "നിങ്ങളുടെ മെയിൽബോക്‌സ്‌ ഏകദേശം നിറഞ്ഞിരിക്കുന്നു. ഇടം സൃഷ്‌ടിക്കാൻ അധിക സ്‌റ്റോറേജ് ഓണാക്കുക, തുടർന്ന് Google-ന് നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സന്ദേശങ്ങൾ മാനേജുചെയ്യാനും ബായ്‌ക്കപ്പെടുക്കാനുമാകും." "നിങ്ങളുടെ വോയ്‌സ്മെയിൽ പിൻ സജ്ജമാക്കുക" "വോയ്‌സ്മെയിൽ ആക്‌സസ് ചെയ്യാൻ ശ്രമിക്കുമ്പോഴെല്ലാം നിങ്ങൾക്കൊരു വോയ്‌സ്‌മെയിൽ പിൻ ആവശ്യമാണ്." "തിരിച്ചറിയാനാകാത്ത പിശക്" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-mn/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-mn/strings.xml index b4b01f7dc..99fc29dc3 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-mn/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-mn/strings.xml @@ -44,10 +44,10 @@ "Ирсэн имэйл хайрцаг дүүрсэн бол та шинэ дуут шуудан хүлээж авах боломжгүй." "Шинэ дуут шуудан хүлээж авах боломжгүй" "Таны ирсэн имэйл хайрцаг дүүрэн байна. Шинэ дуут шуудан авахын тулд зарим зурвасыг устгаж үзнэ үү." - "[Туршилтын] Гадаад хадгалах сан болон нөөцлөлтийг асаана уу" - "Таны имэйл хайрцаг дүүрсэн байна. Сул зай гаргахын тулд гадаад хадгалах санг асааж өөрийн дуут шуудангийн зурвасуудыг удирдах, нөөцлөх боломжийг Google-д олгоно уу.""Энэ функцийг одоо шалгаж байгаа"" бөгөөд таны дуут шуудангийн серверээс дуут шуудангуудыг устгах магадлалтай, бид цаашид энэ функцийг дэмжинэ гэсэн баталгаа өгөхгүй. Гэхдээ энэ функцийн талаар санал хүсэлт илгээвэл талархах болно." - "[Туршилтын] Гадаад хадгалах сан болон нөөцлөлтийг асаана уу" - "Таны имэйл хайрцаг дүүрсэн байна. Сул зай гаргахын тулд гадаад хадгалах санг асааж өөрийн дуут шуудангийн зурвасуудыг удирдах, нөөцлөх боломжийг Google-д олгоно уу.""Энэ функцийг одоо шалгаж байгаа"" бөгөөд таны дуут шуудангийн серверээс дуут шуудангуудыг устгах магадлалтай, бид цаашид энэ функцийг дэмжинэ гэсэн баталгаа өгөхгүй. Гэхдээ энэ функцийн талаар санал хүсэлт илгээвэл талархах болно." + "Гадаад хадгалах сан болон нөөцлөлтийг асаана уу" + "Таны имэйл хайрцаг дүүрсэн байна. Сул зай гаргахын тулд гадаад хадгалах санг асааж өөрийн дуут шуудангийн зурвасуудыг удирдах, нөөцлөх боломжийг Google-д олгоно уу." + "Гадаад хадгалах сан болон нөөцлөлтийг асаана уу" + "Таны имэйл хайрцаг бараг дүүрсэн байна. Сул зай гаргахын тулд гадаад хадгалах санг асааж өөрийн дуут шуудангийн зурвасуудыг удирдах, нөөцлөх боломжийг Google-д олгоно уу." "Өөрийн дуут шуудангийн PIN-г тохируулна уу" "Та дуут шуудандаа хандахаар дуудлага хийх бүрт дуут шуудангийн PIN шаардлагатай болно." "Тодорхойгүй алдаа" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-mr/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-mr/strings.xml index 04f48b843..43c8bddbf 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-mr/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-mr/strings.xml @@ -44,10 +44,10 @@ "आपला इनबॉक्स भरलेला असल्यास आपण नवीन व्हॉइसमेल प्राप्त करण्यात सक्षम असणार नाही." "नवीन व्हॉइसमेल प्राप्त करू शकत नाही" "आपला इनबॉक्स भरलेला आहे. नवीन व्हॉइसमेल प्राप्त करण्यासाठी काही संदेश हटविण्याचा प्रयत्न करा." - "[प्रायोगिक] अतिरिक्त संचय आणि बॅक अप चालू करा" - "आपला मेलबॉक्स पूर्ण भरला आहे. स्थान मोकळे करण्यासाठी, अतिरिक्त संचय चालू करा त्यामुळे Google आपले व्हॉइसमेल संदेश व्यवस्थापित करू शकते आणि त्यांचा बॅक अप घेऊ शकते. ""या वैशिष्ट्याची सध्‍या चाचणी घेतली जात आहे ""आणि आपल्या व्हॉइसमेल सर्व्हर मधून संभाव्यपणे व्हॉइसमेल हटवेल आणि आम्ही भविष्‍यात या वैशिष्‍ट्यास समर्थन देण्याचे वचन देत नाही. तरीही आम्ही आपला अभिप्राय घेऊ इच्छितो." - "[प्रायोगिक] अतिरिक्त संचय आणि बॅक अप चालू करा" - "आपला मेलबॉक्स जवळजवळ पूर्ण भरला आहे. स्थान मोकळे करण्यासाठी, अतिरिक्त संचय चालू करा त्यामुळे Google आपले व्हॉइसमेल संदेश व्यवस्थापित करू शकते आणि त्यांचा बॅक अप घेऊ शकते. ""या वैशिष्ट्याची सध्‍या चाचणी घेतली जात आहे ""आणि आपल्या व्हॉइसमेल सर्व्हर मधून संभाव्यपणे व्हॉइसमेल हटवेल आणि आम्ही भविष्‍यात या वैशिष्‍ट्यास समर्थन देण्याचे वचन देत नाही. तरीही आम्ही आपला अभिप्राय घेऊ इच्छितो." + "अतिरिक्त संचय आणि बॅक अप चालू करा" + "आपला मेलबॉक्स पूर्ण भरला आहे. स्थान मोकळे करण्यासाठी, अतिरिक्त संचय चालू करा त्यामुळे Google आपले व्हॉइसमेल संदेश व्यवस्थापित करू शकते आणि त्यांचा बॅक अप घेऊ शकते." + "अतिरिक्त संचय आणि बॅक अप चालू करा" + "आपला मेलबॉक्स जवळजवळ पूर्ण भरला आहे. स्थान मोकळे करण्यासाठी, अतिरिक्त संचय चालू करा त्यामुळे Google आपले व्हॉइसमेल संदेश व्यवस्थापित करू शकते आणि त्यांचा बॅक अप घेऊ शकते." "आपला व्हॉइसमेल पिन सेट करा" "आपल्या व्हॉइसमेलमध्ये प्रवेश करण्यासाठी आपण कधीही कॉल करता तेव्हा आपल्याला व्हॉइसमेल पिन आवश्यक असेल." "अज्ञात त्रुटी" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ms/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ms/strings.xml index e011de1a7..c8b70d55c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ms/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ms/strings.xml @@ -44,10 +44,10 @@ "Anda tidak akan dapat menerima mel suara baharu jika peti masuk anda penuh." "Tidak dapat menerima mel suara baharu" "Peti masuk anda penuh. Cuba padamkan beberapa mesej untuk menerima mel suara baharu." - "[Percubaan] Hidupkan storan tambahan dan sandaran" - "Peti mel anda penuh. Untuk mengosongkan ruang, hidupkan storan tambahan supaya Google boleh mengurus dan menyandarkan mesej mel suara anda. ""Ciri ini sedang diuji"" dan berupaya memadamkan mel suara daripada pelayan mel suara anda. Kami tidak menjamin bahawa ciri ini akan disokong pada masa hadapan. Namun begitu, kami berharap untuk menerima maklum balas anda tentang ciri ini." - "[Percubaan] Hidupkan storan tambahan dan sandaran" - "Peti mel anda hampir penuh. Untuk mengosongkan ruang, hidupkan storan tambahan supaya Google boleh mengurus dan menyandarkan mesej mel suara anda. ""Ciri ini sedang diuji"" dan berupaya memadamkan mel suara daripada pelayan mel suara anda. Kami tidak menjamin bahawa ciri ini akan disokong pada masa hadapan. Namun begitu, kami berharap untuk menerima maklum balas anda tentang ciri ini." + "Hidupkan storan tambahan dan sandaran" + "Peti mel anda penuh. Untuk mengosongkan ruang, hidupkan storan tambahan supaya Google boleh mengurus dan menyandarkan mesej mel suara anda." + "Hidupkan storan tambahan dan sandaran" + "Peti mel anda hampir penuh. Untuk mengosongkan ruang, hidupkan storan tambahan supaya Google boleh mengurus dan menyandarkan mesej mel suara anda." "Tetapkan PIN mel suara anda" "Anda memerlukan PIN mel suara setiap kali anda memanggil untuk mengakses mel suara anda." "Ralat tidak diketahui" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-my/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-my/strings.xml index d755850d2..686d37d10 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-my/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-my/strings.xml @@ -44,10 +44,10 @@ "သင့်ဝင်စာပြည့်နေပါက အသံမေးလ်အသစ်များ လက်ခံရယူနိုင်မည်မဟုတ်ပါ။" "အသံမေးလ်အသစ် လက်ခံ၍မရပါ" "သင့်ဝင်စာပြည့်နေပါသည်။ အသံမေးလ်အသစ်များ လက်ခံရယူနိုင်ရန် မက်ဆေ့ဂျ်အချို့ဖျက်ကြည့်ပါ။" - "[စမ်းသပ်ဆဲ] အပိုဆောင်း သိုလှောင်မှုနှင့် မိတ္တူတို့ကို ဖွင့်ပါ" - "သင့်ဝင်စာ ပြည့်နေပါပြီ။ နေရာလွတ်ရရှိရန်အတွက် အပိုသိုလှောင်မှုကို ဖွင့်လျှင် Google က သင်၏အသံမေးလ်မက်ဆေ့ဂျ်များကို စီမံခန့်ခွဲပြီး မိတ္တူကူးနိုင်ပါမည်။ ""ဤဝန်ဆောင်မှုကို လတ်တလောတွင် စမ်းသပ်နေ ""ပါသည်၊ ဤဝန်ဆောင်မှုသည် သင်၏အသံမေးလ်ဆာဗာမှ အသံမေးလ်များကို ဖျက်ပစ်နိုင်ပြီး အနာဂတ်တွင် ၎င်းကို ဆက်လက်ရရှိနိုင်မည်ဟု အာမခံပေးမထားပါ။ သို့သော် သင့်အကြံပြုချက်များကို ရရှိလိုပါသည်။" - "[စမ်းသပ်ဆဲ] အပိုဆောင်း သိုလှောင်မှုနှင့် မိတ္တူတို့ကို ဖွင့်ပါ" - "သင့်ဝင်စာ ပြည့်နေပါပြီ။ နေရာလွတ်ရရှိရန်အတွက် အပိုသိုလှောင်မှုကို ဖွင့်လျှင် Google က သင်၏အသံမေးလ်မက်ဆေ့ဂျ်များကို စီမံခန့်ခွဲပြီး မိတ္တူကူးနိုင်ပါမည်။ ""ဤဝန်ဆောင်မှုကို လတ်တလောတွင် စမ်းသပ်နေ ""ပါသည်၊ ဤဝန်ဆောင်မှုသည် သင်၏အသံမေးလ်ဆာဗာမှ အသံမေးလ်များကို ဖျက်ပစ်နိုင်ပြီး အနာဂတ်တွင် ၎င်းကို ဆက်လက်ရရှိနိုင်မည်ဟု အာမခံပေးမထားပါ။ သို့သော် သင့်အကြံပြုချက်များကို ရရှိလိုပါသည်။" + "အပိုသိုလှောင်မှုနှင့် မိတ္တူ ဖွင့်ရန်" + "သင့်ဝင်စာ ပြည့်နေပါပြီ။ နေရာလွတ်ရရှိရန်အတွက် Google က သင်၏အသံမေးလ်မက်ဆေ့ဂျ်များကို စီမံခန့်ခွဲပြီး မိတ္တူကူးနိုင်ရန် အပိုသိုလှောင်မှုကို ဖွင့်ပါ။" + "အပိုသိုလှောင်မှုနှင့် မိတ္တူ ဖွင့်ရန်" + "သင့်ဝင်စာ ပြည့်လုပါပြီ။ နေရာလွတ်ရရှိရန်အတွက် Google က သင်၏အသံမေးလ်မက်ဆေ့ဂျ်များကို စီမံခန့်ခွဲပြီး မိတ္တူကူးနိုင်ရန် အပိုသိုလှောင်မှုကို ဖွင့်ပါ။" "သင်၏အသံမေးလ်ပင်နံပါတ် သတ်မှတ်ပါ" "သင်၏အသံမေးလ်ကို သုံးစွဲရန်အတွက် သင်ခေါ်ဆိုသည့်အခါတိုင်း အသံမေးလ်ပင်နံပါတ်တစ်ခု လိုအပ်ပါမည်။" "အမျိုးအမည်မသိမှားယွင်းမှု" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-nb/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-nb/strings.xml index 9dff46dce..6fc75614a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-nb/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-nb/strings.xml @@ -44,10 +44,10 @@ "Du kan ikke motta ny talepost hvis innboksen din er full." "Kan ikke motta ny talepost" "Innboksen din er full. Prøv å slette noen meldinger for å motta ny talepost." - "Slå på ekstra lagring og sikkerhetskopi" - "Postkassen din er full. For å frigjøre plass, kan du slå på ekstra lagring sånn at Google kan administrere og sikkerhetskopiere talepostmeldingene dine. ""Denne funksjonen er fortsatt under utforskning "", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." - "Slå på ekstra lagring og sikkerhetskopi" - "Postkassen din er nesten full. For å frigjøre plass, kan du slå på ekstra lagring sånn at Google kan administrere og sikkerhetskopiere talepostmeldingene dine. ""Denne funksjonen er fortsatt under utforskning "", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." + "Slå på ekstra lagringsplass og sikkerhetskopiering" + "Talepostkassen din er full. Frigjør plass ved å slå på ekstra lagringsplass og la Google administrere og ta sikkerhetskopi av taleposten din." + "Slå på ekstra lagringsplass og sikkerhetskopiering" + "Talepostkassen din er nesten full. Frigjør plass ved å slå på ekstra lagringsplass og la Google administrere og ta sikkerhetskopi av taleposten din." "Angi PIN-koden din for talepost" "Du trenger PIN-koden hver gang du ringer for å sjekke taleposten din." "Ukjent feil" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ne/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ne/strings.xml index 1f7f77102..ff06fa06c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ne/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ne/strings.xml @@ -44,10 +44,10 @@ "तपाईंको इनबक्स भरिएको छ भने तपाईंले नयाँ भ्वाइस मेल प्राप्त गर्न सक्नुहुने छैन।" "नयाँ भ्वाइस मेलहरू प्राप्त गर्न सकिँदैन" "तपाईँको इनबक्स भरिएको छ। नयाँ भ्वाइस मेलहरू प्राप्त गर्न कृपया केही सन्देशहरू मेटी हेर्नुहोस्।" - "[प्रयोगात्मक] अतिरिक्त भण्डारण र ब्याकअप सेवा सक्रिय पार्नुहोस्" - "तपाईंको मेल बक्स झन्डै झन्डै भरिएको छ। Google ले तपाईंका भ्वाइस मेल सम्बन्धी सन्देशहरूको व्यवस्थापन गर्न र ब्याकअप गर्नका लागि स्थान खाली गर्न अतिरिक्त भण्डारणलाई सक्रिय पार्नुहोस् । ""हाल यो विशेषताको परीक्षण गरिँदै छ "" र सम्भवत: तपाईंको भ्वाइस मेल सर्भरबाट भ्वाइस मेलहरू मेट्ने छ, र हामी यो विशेषतालाई भविष्यमा पनि समर्थन गरिने कुराको वाचा गर्दैनौं। तथापि तपाईंको प्रतिक्रियाको अपेक्षा गर्दछौं।" - "[प्रयोगात्मक] अतिरिक्त भण्डारण र ब्याकअप सेवा सक्रिय पार्नुहोस्" - "तपाईंको मेल बक्स झन्डै झन्डै भरिएको छ। Google ले तपाईंका भ्वाइस मेल सन्देशहरूखो व्यवस्थापन गर्न र ब्याकअप गर्न सकोस् भन्नका खातिर स्थान खाली गर्न अतिरिक्त भण्डारणलाई सक्रिय पार्नुहोस् । ""हाल यो विशेषताको परीक्षण गरिँदै छ "" र यसले सम्भवत: तपाईंको भ्वाइस मेल सर्भरका भ्वाइस मेलहरू मेट्ने छ, र हामी यो विशेषतालाई भविष्यमा पनि समर्थन गरिने कुराको वाचा गर्दैनौं। तथापि तपाईंको प्रतिक्रियाको अपेक्षा गर्दछौं।" + "अतिरिक्त भण्डारण र ब्याकअप सेवा सक्रिय पार्नुहोस्" + "तपाईंको मेल बक्स भरिएको छ। ठाउँ खाली गर्न, Google ले तपाईंका भ्वाइस मेल सन्देशहरूको व्यवस्थापन र ब्याकअप गर्न सकोस् भन्नाका खातिर अतिरिक्त भण्डारणलाई सक्रिय पार्नुहोस्।" + "अतिरिक्त भण्डारण र ब्याकअप सेवा सक्रिय पार्नुहोस्" + "तपाईंको मेल बक्स लगभग भरिएको छ। ठाउँ खाली गर्न Google ले तपाईंका भ्वाइस मेल सन्देशहरूको व्यवस्थापन र ब्याकअप गर्न सकोस् भन्नाका खातिर अतिरिक्त भण्डारणलाई सक्रिय पार्नुहोस्।" "आफ्नो भ्वाइस मेलको PIN सेट गर्नुहोस्" "तपाईँलाई जुनसुकै समयमा आफ्नो भ्वाइस मेलमा पहुँच गर्न कल गर्दा भ्वाइस मेल PIN को आवश्यकता पर्दछ।" "अज्ञात त्रुटि" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-nl/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-nl/strings.xml index 4a31fd3a3..f74a37d8d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-nl/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-nl/strings.xml @@ -44,10 +44,10 @@ "Je kunt geen nieuwe voicemails ontvangen als je inbox vol is." "Kan geen nieuwe voicemails ontvangen" "Je inbox is vol. Verwijder enkele berichten om nieuwe voicemails te ontvangen." - "[Experimenteel] Extra opslag en back-up inschakelen" - "Je mailbox is vol. Schakel extra opslag in om ruimte vrij te maken, zodat Google je voicemailberichten kan beheren en back-ups kan maken. ""Deze functie wordt momenteel getest ""en het is mogelijk dat hierdoor voicemails van de voicemailserver worden verwijderd. We kunnen niet beloven dat we deze functie in de toekomst blijven ondersteunen. We zijn wel heel benieuwd naar jullie feedback over de functie." - "[Experimenteel] Extra opslag en back-up inschakelen" - "Je mailbox is bijna vol. Schakel extra opslag in om ruimte vrij te maken, zodat Google je voicemailberichten kan beheren en back-ups kan maken. ""Deze functie wordt momenteel getest ""en het is mogelijk dat hierdoor voicemails van de voicemailserver worden verwijderd. We kunnen niet beloven dat we deze functie in de toekomst blijven ondersteunen. We zijn wel heel benieuwd naar jullie feedback over de functie." + "Extra opslag en back-up inschakelen" + "Je mailbox is vol. Als je ruimte wilt vrijmaken, schakel je extra opslagruimte in zodat Google je voicemailberichten kan beheren en er back-ups van kan maken." + "Extra opslag en back-up inschakelen" + "Je mailbox is bijna vol. Als je ruimte wilt vrijmaken, schakel je extra opslagruimte in zodat Google je voicemailberichten kan beheren en er back-ups van kan maken." "Een pincode voor je voicemail instellen" "Je hebt een pincode voor de voicemail nodig wanneer je belt om toegang tot je voicemail te krijgen." "Onbekende fout" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-no/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-no/strings.xml index 9dff46dce..6fc75614a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-no/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-no/strings.xml @@ -44,10 +44,10 @@ "Du kan ikke motta ny talepost hvis innboksen din er full." "Kan ikke motta ny talepost" "Innboksen din er full. Prøv å slette noen meldinger for å motta ny talepost." - "Slå på ekstra lagring og sikkerhetskopi" - "Postkassen din er full. For å frigjøre plass, kan du slå på ekstra lagring sånn at Google kan administrere og sikkerhetskopiere talepostmeldingene dine. ""Denne funksjonen er fortsatt under utforskning "", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." - "Slå på ekstra lagring og sikkerhetskopi" - "Postkassen din er nesten full. For å frigjøre plass, kan du slå på ekstra lagring sånn at Google kan administrere og sikkerhetskopiere talepostmeldingene dine. ""Denne funksjonen er fortsatt under utforskning "", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." + "Slå på ekstra lagringsplass og sikkerhetskopiering" + "Talepostkassen din er full. Frigjør plass ved å slå på ekstra lagringsplass og la Google administrere og ta sikkerhetskopi av taleposten din." + "Slå på ekstra lagringsplass og sikkerhetskopiering" + "Talepostkassen din er nesten full. Frigjør plass ved å slå på ekstra lagringsplass og la Google administrere og ta sikkerhetskopi av taleposten din." "Angi PIN-koden din for talepost" "Du trenger PIN-koden hver gang du ringer for å sjekke taleposten din." "Ukjent feil" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-pa/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-pa/strings.xml index 3437271cb..2a07b459d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-pa/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-pa/strings.xml @@ -44,10 +44,10 @@ "ਜੇਕਰ ਤੁਹਾਡਾ ਇਨਬਾਕਸ ਭਰਿਆ ਹੋਇਆ ਹੈ ਤਾਂ ਤੁਸੀਂ ਨਵੀਂ ਵੌਇਸਮੇਲ ਪ੍ਰਾਪਤ ਨਹੀਂ ਕਰ ਸਕੋਂਗੇ।" "ਨਵੀਆਂ ਵੌਇਸਮੇਲਾਂ ਨੂੰ ਪ੍ਰਾਪਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" "ਤੁਹਾਡਾ ਇਨਬਾਕਸ ਭਰਿਆ ਹੋਇਆ ਹੈ। ਨਵੀਂ ਵੌਇਸਮੇਲ ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ ਕੁਝ ਸੁਨੇਹਿਆਂ ਨੂੰ ਮਿਟਾਉਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ।" - "[ਪ੍ਰਯੋਗਿਕ] ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਅਤੇ ਬੈਕਅੱਪ ਲਓ" - "ਤੁਹਾਡਾ ਮੇਲਬਾਕਸ ਭਰਿਆ ਹੋਇਆ ਹੈ। ਜਗ੍ਹਾ ਖਾਲੀ ਕਰਨ ਲਈ, ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਤਾਂ ਕਿ Google ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸੁਨੇਹਿਆਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰ ਸਕੇ ਅਤੇ ਬੈਕਅੱਪ ਲੈ ਸਕੇ। ""ਇਸ ਵਿਸ਼ੇਸ਼ਤਾ ਦੀ ਇਸ ਵੇਲੇ ਜਾਂਚ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ ""ਅਤੇ ਇਹ ਸੰਭਾਵੀ ਤੌਰ \'ਤੇ ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸਰਵਰ ਤੋਂ ਵੌਇਸਮੇਲਾਂ ਨੂੰ ਮਿਟਾ ਦੇਵੇਗੀ, ਅਤੇ ਅਸੀਂ ਭਵਿੱਖ ਵਿੱਚ ਇਸ ਵਿਸ਼ੇਸ਼ਤਾ ਦਾ ਸਮਰਥਨ ਕਰਨ ਦਾ ਵਾਅਦਾ ਨਹੀਂ ਕਰਦੇ ਹਾਂ। ਅਸੀਂ ਹਾਲਾਂਕਿ ਤੁਹਾਡੇ ਪ੍ਰਤੀਕਰਮ ਨੂੰ ਪਸੰਦ ਕਰਾਂਗੇ।" - "[ਪ੍ਰਯੋਗਿਕ] ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਅਤੇ ਬੈਕਅੱਪ ਲਓ" - "ਤੁਹਾਡਾ ਮੇਲਬਾਕਸ ਲਗਭਗ ਭਰਿਆ ਹੋਇਆ ਹੈ। ਜਗ੍ਹਾ ਖਾਲੀ ਕਰਨ ਲਈ, ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਤਾਂ ਕਿ Google ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸੁਨੇਹਿਆਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰ ਸਕੇ ਅਤੇ ਬੈਕਅੱਪ ਲੈ ਸਕੇ। ""ਇਸ ਵਿਸ਼ੇਸ਼ਤਾ ਦੀ ਇਸ ਵੇਲੇ ਜਾਂਚ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ ""ਅਤੇ ਇਹ ਸੰਭਾਵੀ ਤੌਰ \'ਤੇ ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸਰਵਰ ਤੋਂ ਵੌਇਸਮੇਲਾਂ ਨੂੰ ਮਿਟਾ ਦੇਵੇਗੀ, ਅਤੇ ਅਸੀਂ ਭਵਿੱਖ ਵਿੱਚ ਇਸ ਵਿਸ਼ੇਸ਼ਤਾ ਦਾ ਸਮਰਥਨ ਕਰਨ ਦਾ ਵਾਅਦਾ ਨਹੀਂ ਕਰਦੇ ਹਾਂ। ਅਸੀਂ ਹਾਲਾਂਕਿ ਤੁਹਾਡੇ ਪ੍ਰਤੀਕਰਮ ਨੂੰ ਪਸੰਦ ਕਰਾਂਗੇ।" + "ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਅਤੇ ਬੈਕਅੱਪ ਲਓ" + "ਤੁਹਾਡਾ ਮੇਲਬਾਕਸ ਭਰਿਆ ਹੋਇਆ ਹੈ। ਜਗ੍ਹਾ ਖਾਲੀ ਕਰਨ ਲਈ, ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਤਾਂ ਕਿ Google ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸੁਨੇਹਿਆਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰ ਸਕੇ ਅਤੇ ਬੈਕਅੱਪ ਲੈ ਸਕੇ।" + "ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਅਤੇ ਬੈਕਅੱਪ ਲਓ" + "ਤੁਹਾਡਾ ਮੇਲਬਾਕਸ ਲਗਭਗ ਭਰਿਆ ਹੋਇਆ ਹੈ। ਜਗ੍ਹਾ ਖਾਲੀ ਕਰਨ ਲਈ, ਵਾਧੂ ਸਟੋਰੇਜ ਨੂੰ ਚਾਲੂ ਕਰੋ ਤਾਂ ਕਿ Google ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸੁਨੇਹਿਆਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰ ਸਕੇ ਅਤੇ ਬੈਕਅੱਪ ਲੈ ਸਕੇ।" "ਆਪਣਾ ਵੌਇਸਮੇਲ PIN ਸੈੱਟ ਕਰੋ" "ਜਦੋਂ ਵੀ ਤੁਸੀਂ ਆਪਣੀ ਵੌਇਸਮੇਲ ਤੱਕ ਪਹੁੰਚ ਕਰਨ ਲਈ ਕਾਲ ਕਰੋਂਗੇ ਤਾਂ ਤੁਹਾਨੂੰ ਇੱਕ ਵੌਇਸਮੇਲ PIN ਦੀ ਲੋੜ ਪਵੇਗੀ।" "ਅਗਿਆਤ ਗੜਬੜ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-pl/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-pl/strings.xml index 1b88481ba..b12290821 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-pl/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-pl/strings.xml @@ -44,10 +44,10 @@ "Nie otrzymasz nowych wiadomości głosowych, gdy Twoja skrzynka odbiorcza jest pełna." "Nie udało się odebrać nowych wiadomości głosowych" "Twoja skrzynka odbiorcza jest pełna. Spróbuj usunąć kilka wiadomości głosowych, aby odebrać nowe." - "(Funkcja eksperymentalna) Włącz dodatkowe miejsce i kopię zapasową" - "Twoja skrzynka pocztowa jest pełna. Jeśli chcesz zwolnić miejsce, włącz dodatkowe miejsce, aby umożliwić Google zarządzanie Twoimi wiadomościami głosowymi i tworzenie ich kopii zapasowej. ""Ta funkcja jest obecnie w fazie testów"" i może usunąć wiadomości głosowe z Twojego serwera poczty głosowej. Nie gwarantujemy, że ta funkcja będzie w przyszłości obsługiwana. Chętnie jednak dowiemy się, co o niej sądzisz." - "(Funkcja eksperymentalna) Włącz dodatkowe miejsce i kopię zapasową" - "Twoja skrzynka pocztowa jest prawie pełna. Jeśli chcesz zwolnić miejsce, włącz dodatkowe miejsce, aby umożliwić Google zarządzanie Twoimi wiadomościami głosowymi i tworzenie ich kopii zapasowej. ""Ta funkcja jest obecnie w fazie testów"" i może usunąć wiadomości głosowe z Twojego serwera poczty głosowej. Nie gwarantujemy, że ta funkcja będzie w przyszłości obsługiwana. Chętnie jednak dowiemy się, co o niej sądzisz." + "Włącz dodatkowe miejsce i kopię zapasową" + "Twoja skrzynka pocztowa jest pełna. Jeśli chcesz zwolnić miejsce, włącz dodatkowe miejsce, aby umożliwić Google zarządzanie Twoimi wiadomościami głosowymi i tworzenie ich kopii zapasowej." + "Włącz dodatkowe miejsce i kopię zapasową" + "Twoja skrzynka pocztowa jest prawie pełna. Jeśli chcesz zwolnić miejsce, włącz dodatkowe miejsce, aby umożliwić Google zarządzanie Twoimi wiadomościami głosowymi i tworzenie ich kopii zapasowej." "Ustaw kod PIN do poczty głosowej" "Za każdym razem, gdy zadzwonisz pod numer poczty głosowej, będzie konieczne wpisanie kodu PIN." "Nieznany błąd" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-pt-rBR/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-pt-rBR/strings.xml index e286a4d44..bbe9340a6 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-pt-rBR/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-pt-rBR/strings.xml @@ -44,10 +44,10 @@ "Não será possível receber novos correios de voz se sua Caixa de entrada estiver cheia." "Não é possível receber novos correios de voz" "Sua Caixa de entrada está cheia. Exclua algumas mensagens para receber novos correios de voz." - "[Experimental] Ativar armazenamento extra e fazer backup" - "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz. ""Este recurso está sendo testado no momento ""e talvez exclua os correios de voz do seu servidor de correio de voz. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." - "[Experimental] Ativar armazenamento extra e fazer backup" - "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz. ""Este recurso está sendo testado no momento ""e talvez exclua os correios de voz do seu servidor de correio de voz. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." + "Ativar armazenamento extra e fazer backup" + "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz." + "Ativar armazenamento extra e fazer backup" + "Sua caixa de correio está quase cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz." "Definir seu PIN do correio de voz" "Você precisará de um PIN do correio de voz sempre que ligar para acessar seu correio de voz." "Erro desconhecido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-pt-rPT/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-pt-rPT/strings.xml index ad7ee7599..364b2783d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-pt-rPT/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-pt-rPT/strings.xml @@ -44,10 +44,10 @@ "Se a sua caixa de entrada estiver cheia, não irá receber novas mensagens de correio de voz." "Não é possível receber novas mensagens de correio de voz" "A sua caixa de entrada está cheia. Tente eliminar algumas mensagens para receber novas mensagens de correio de voz." - "[Experimental] Ativar a cópia de segurança e o armazenamento adicional" - "A sua caixa de correio está cheia. Para libertar espaço, ative o armazenamento adicional para que a Google possa gerir e criar uma cópia de segurança das suas mensagens de correio de voz. ""Esta funcionalidade está a ser testada ""e poderá eliminar mensagens de correio de voz do seu servidor de correio de voz. Não podemos garantir compatibilidade com esta funcionalidade no futuro. No entanto, gostaríamos de receber os seus comentários." - "[Experimental] Ativar a cópia de segurança e o armazenamento adicional" - "A sua caixa de correio está quase cheia. Para libertar espaço, ative o armazenamento adicional para que a Google possa gerir e criar uma cópia de segurança das suas mensagens de correio de voz. ""Esta funcionalidade está a ser testada ""e poderá eliminar mensagens de correio de voz do seu servidor de correio de voz. Não podemos garantir compatibilidade com esta funcionalidade no futuro. No entanto, gostaríamos de receber os seus comentários." + "Ativar o armazenamento adicional e a cópia de segurança" + "A sua caixa de correio está cheia. Para libertar espaço, ative o armazenamento adicional para que a Google possa gerir e criar uma cópia de segurança das suas mensagens de correio de voz." + "Ativar o armazenamento adicional e a cópia de segurança" + "A sua caixa de correio está quase cheia. Para libertar espaço, ative o armazenamento adicional para que a Google possa gerir e criar uma cópia de segurança das suas mensagens de correio de voz." "Definir o seu PIN do correio de voz" "Irá precisar de um PIN do correio de voz sempre que efetuar uma chamada para aceder ao seu correio de voz." "Erro desconhecido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-pt/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-pt/strings.xml index e286a4d44..bbe9340a6 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-pt/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-pt/strings.xml @@ -44,10 +44,10 @@ "Não será possível receber novos correios de voz se sua Caixa de entrada estiver cheia." "Não é possível receber novos correios de voz" "Sua Caixa de entrada está cheia. Exclua algumas mensagens para receber novos correios de voz." - "[Experimental] Ativar armazenamento extra e fazer backup" - "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz. ""Este recurso está sendo testado no momento ""e talvez exclua os correios de voz do seu servidor de correio de voz. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." - "[Experimental] Ativar armazenamento extra e fazer backup" - "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz. ""Este recurso está sendo testado no momento ""e talvez exclua os correios de voz do seu servidor de correio de voz. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." + "Ativar armazenamento extra e fazer backup" + "Sua caixa de correio está cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz." + "Ativar armazenamento extra e fazer backup" + "Sua caixa de correio está quase cheia. Para liberar espaço, ative o armazenamento extra para que o Google possa gerenciar e fazer o backup das suas mensagens do correio de voz." "Definir seu PIN do correio de voz" "Você precisará de um PIN do correio de voz sempre que ligar para acessar seu correio de voz." "Erro desconhecido" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ro/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ro/strings.xml index f576cf6c6..263ab003d 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ro/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ro/strings.xml @@ -44,10 +44,10 @@ "Nu veți putea primi mesaje vocale noi dacă aveți căsuța de mesaje plină." "Nu puteți primi mesaje vocale noi" "Căsuța de mesaje este plină. Încercați să ștergeți câteva mesaje pentru a putea primi unele noi." - "[Experimental] Activați spațiul de stocare suplimentar și backupul." - "Căsuța dvs. de mesaje este plină. Pentru a elibera spațiu, activați spațiul de stocare suplimentar pentru ca Google să poată gestiona și face backup pentru mesajele dvs. vocale. ""Această funcție este în curs de testare ""și e posibil să șteargă mesajele vocale de pe serverul de mesagerie vocală. Nu se poate garanta acceptarea acestei funcții pe viitor, însă feedbackul dvs. e bine-venit." - "[Experimental] Activați spațiul de stocare suplimentar și backupul." - "Căsuța dvs. de mesaje este aproape plină. Pentru a elibera spațiu, activați spațiul de stocare suplimentar pentru ca Google să poată gestiona și face backup pentru mesajele dvs. vocale. ""Această funcție este în curs de testare ""și e posibil să șteargă mesajele vocale de pe serverul de mesagerie vocală. Nu se poate garanta acceptarea acestei funcții pe viitor, însă feedbackul dvs. e bine-venit." + "Activați spațiul de stocare suplimentar și backupul" + "Căsuța dvs. de e-mail este plină. Pentru a elibera spațiu, activați spațiul de stocare suplimentar și astfel Google poate să vă gestioneze mesajele vocale și să facă backup pentru acestea." + "Activați spațiul de stocare suplimentar și backupul" + "Căsuța dvs. de e-mail este aproape plină. Pentru a elibera spațiu, activați spațiul de stocare suplimentar și astfel Google poate să vă gestioneze mesajele vocale și să facă backup pentru acestea." "Setați un cod PIN pentru mesageria vocală" "Aveți nevoie de un cod PIN pentru mesageria vocală când sunați pentru a o accesa." "Eroare necunoscută" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ru/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ru/strings.xml index f0a1048e6..1989f269c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ru/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ru/strings.xml @@ -44,10 +44,10 @@ "Когда почтовый ящик будет заполнен, вы не сможете получать новые голосовые сообщения." "Нет свободного места" "Почтовый ящик заполнен. Чтобы получать новые голосовые сообщения, удалите старые." - "[Экспериментальная функция] Активируйте дополнительное пространство для хранения и резервного копирования" - "Почтовый ящик заполнен. Чтобы освободить место, активируйте дополнительное пространство. После этого Google сможет управлять вашими голосовыми сообщениями и сохранять их резервные копии. ""Эта функция сейчас проходит тестирование."" Возможно, ваши голосовые сообщения будут удалены с вашего сервера. Поддержка этой функции в дальнейшем не гарантируется. Мы бы хотели узнать ваше мнение о ней." - "[Экспериментальная функция] Активируйте дополнительное пространство для хранения и резервного копирования" - "Почтовый ящик почти заполнен. Чтобы освободить место, активируйте дополнительное пространство. После этого Google сможет управлять вашими голосовыми сообщениями и сохранять их резервные копии. ""Эта функция сейчас проходит тестирование."" Возможно, ваши голосовые сообщения будут удалены с вашего сервера. Поддержка этой функции в дальнейшем не гарантируется. Мы бы хотели узнать ваше мнение о ней." + "Требуется дополнительное пространство" + "Почтовый ящик заполнен. Чтобы освободить место, активируйте дополнительное пространство. После этого Google сможет управлять вашими голосовыми сообщениями и сохранять их резервные копии." + "Требуется дополнительное пространство" + "Почтовый ящик почти заполнен. Чтобы освободить место, активируйте дополнительное пространство. После этого Google сможет управлять вашими голосовыми сообщениями и сохранять их резервные копии." "Установите PIN-код голосовой почты" "Он будет нужен вам каждый раз, когда вы звоните, чтобы прослушать голосовую почту." "Неизвестная ошибка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-si/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-si/strings.xml index f0c58b129..2a057facd 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-si/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-si/strings.xml @@ -44,10 +44,10 @@ "ඔබේ එන ලිපි පිරී ඇති නම් ඔබට නව හඩ තැපැල් ලැබීමට නොහැකි වනු ඇත." "නව හඬ තැපැල් ලැබීමට නොහැකිය" "ඔබේ එන ලිපි පිරී ඇත. නව හඬ තැපැල් ලබා ගැනීමට පණිවිඩ සමහරක් මැකීම උත්සාහ කරන්න." - "[Experimental] අතිරේක ගබඩාව සහ උපස්ථය ක්‍රියාත්මක කරන්න" - "ඔබේ තැපැල් පෙට්ටිය පිරී ඇත. ඉඩ නිදහස් කර ගැනීමට, අතිරේක ගබඩාව ක්‍රියාත්මක කරන්න. එවිට Google හට ඔබේ හඬ තැපැල් පණිවිඩ කළමනාකරණය කිරීමට සහ උපස්ථ කිරීමට හැකිය. ""මෙම විශේෂාංගය දැන් පරීක්ෂා කරමින් සිටින අතර ""විභව්‍යව හඬ තැපැල් ඔබේ හඬ තැපැල් සේවාදායකයෙන් මකනු ඇති අතර, අපි අනාගතයේදී මෙම විශේෂාංගයට සහාය දැක්වීමට පොරොන්දු නොවෙමු. එසේ වුවත් අපි ඔබේ විශේෂාංගය ගැන ප්‍රතිපෝෂණවලට ආදරය කරන්නෙමු." - "[Experimental] අතිරේක ගබඩාව සහ උපස්ථය ක්‍රියාත්මක කරන්න" - "ඔබේ තැපැල් පෙට්ටිය මුළුමනින්ම පාහේ පිරී ඇත. ඉඩ නිදහස් කර ගැනීමට, අතිරේක ගබඩාව ක්‍රියාත්මක කරන්න. එවිට Google හට ඔබේ හඬ තැපැල් පණිවිඩ කළමනාකරණය කිරීමට සහ උපස්ථ කිරීමට හැකිය. ""මෙම විශේෂාංගය දැන් පරීක්ෂා කරමින් සිටින අතර""විභව්‍යව හඬ තැපැල් ඔබේ හඬ තැපැල් සේවාදායකයෙන් මකනු ඇති අතර, අපි අනාගතයේදී මෙම විශේෂාංගයට සහාය දැක්වීමට පොරොන්දු නොවෙමු. එසේ වුවත් අපි ඔබේ විශේෂාංගය ගැන ප්‍රතිපෝෂණවලට ආදරය කරන්නෙමු." + "අතිරේක ගබඩාව සහ උපස්ථය ක්‍රියාත්මක කරන්න" + "ඔබේ තැපැල් පෙට්ටිය පිරී ඇත. ඉඩ නිදහස් කර ගැනීමට, අතිරේක ගබඩාව ක්‍රියාත්මක කරන්න. එවිට Google හට ඔබේ හඬ තැපැල් පණිවිඩ කළමනාකරණය කිරීමට සහ උපස්ථ කිරීමට හැකිය." + "අතිරේක ගබඩාව සහ උපස්ථය ක්‍රියාත්මක කරන්න" + "ඔබේ තැපැල් පෙට්ටිය මුළුමනින්ම පාහේ පිරී ඇත. ඉඩ නිදහස් කර ගැනීමට, අතිරේක ගබඩාව ක්‍රියාත්මක කරන්න. එවිට Google හට ඔබේ හඬ තැපැල් පණිවිඩ කළමනාකරණය කිරීමට සහ උපස්ථ කිරීමට හැකිය." "ඔබේ හඬ තැපැල් PIN අංකය සකසන්න" "ඔබ ඔබේ හඬ තැපෑලට ප්‍රවේශ වීමට අමතන ඕනෑම අවස්ථාවක ඔබට හඬ තැපැල් PIN අංකයක් අවශ්‍ය වනු ඇත." "නොදන්නා දෝෂයකි" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sk/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sk/strings.xml index ecf0a21bf..165a9f58c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sk/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sk/strings.xml @@ -44,10 +44,10 @@ "S plnou doručenou poštou nebudete môcť prijímať nové hlasové správy." "Nemôžete prijímať nové hlasové správy" "Máte plnú doručenú poštu. Skúste odstrániť niekoľko správ, aby ste mohli prijať novú hlasovú správu." - "[Experimentálna funkcia] Zapnite si ďalšie úložisko a zálohovanie" - "Poštovú schránku máte plnú. Ak chcete uvoľniť miesto, zapnite ďalšie úložisko, aby mohol Google spravovať a zálohovať vaše hlasové správy. ""Túto funkciu práve testujeme ""a môže vám odstrániť hlasové správy zo servera hlasovej schránky. Nemôžeme zaručiť, že bude podporovaná aj v budúcnosti, no budeme vám vďační za poskytnutie spätnej väzby." - "[Experimentálna funkcia] Zapnite si ďalšie úložisko a zálohovanie" - "Poštovú schránku máte takmer plnú. Ak chcete uvoľniť miesto, zapnite ďalšie úložisko, aby mohol Google spravovať a zálohovať vaše hlasové správy. ""Túto funkciu práve testujeme ""a môže vám odstrániť hlasové správy zo servera hlasovej schránky. Nemôžeme zaručiť, že bude podporovaná aj v budúcnosti, no budeme vám vďační za poskytnutie spätnej väzby." + "Zapnite si ďalšie úložisko a zálohovanie" + "Poštovú schránku máte plnú. Ak chcete uvoľniť miesto, zapnite si ďalšie úložisko, aby mohol Google spravovať a zálohovať vaše hlasové správy." + "Zapnite si ďalšie úložisko a zálohovanie" + "Poštovú schránku máte takmer plnú. Ak chcete uvoľniť miesto, zapnite si ďalšie úložisko, aby mohol Google spravovať a zálohovať vaše hlasové správy." "Nastaviť kód PIN hlasovej schránky" "Kód PIN hlasovej schránky budete potrebovať vždy, keď zavoláte do svojej hlasovej schránky." "Neznáma chyba" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sl/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sl/strings.xml index c2ef327d8..d4f63c1e4 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sl/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sl/strings.xml @@ -44,10 +44,10 @@ "Če je nabiralnik poln, ne boste mogli prejemati novih sporočil v odzivniku." "Vizualnih sporočil v odzivniku ni mogoče prejemati" "Nabiralnik je poln. Poskusite izbrisati nekaj sporočil, da bo mogoče prejeti nova sporočila v odzivniku." - "[Poskusno] Vklop dodatne shrambe in varnostnega kopiranja" - "Odzivnik je poln. Če želite sprostiti prostor, vklopite dodatno shrambo, da bo lahko Google upravljal vaša sporočila v odzivniku in jih varnostno kopiral. ""Za to funkcijo se trenutno izvajajo preskusi"", zato bodo sporočila v odzivniku morda izbrisana iz strežnika za sporočila v odzivniku, pri čemer ne obljubljamo, da bomo to funkcijo podpirali tudi v prihodnje. Kljub temu bomo veseli vaših povratnih informacij o funkciji." - "[Poskusno] Vklop dodatne shrambe in varnostnega kopiranja" - "Odzivnik je skoraj poln. Če želite sprostiti prostor, vklopite dodatno shrambo, da bo lahko Google upravljal vaša sporočila v odzivniku in jih varnostno kopiral. ""Za to funkcijo se trenutno izvajajo preskusi"", zato bodo sporočila v odzivniku morda izbrisana iz strežnika za sporočila v odzivniku, pri čemer ne obljubljamo, da bomo to funkcijo podpirali tudi v prihodnje. Kljub temu bomo veseli vaših povratnih informacij o funkciji." + "Vklop dodatnega prostora za shranjevanje in varnostno kopiranje" + "Odzivnik je poln. Če želite sprostiti prostor, vklopite dodaten prostor za shranjevanje, da bo Google lahko upravljal vaša sporočila v odzivniku in jih varnostno kopiral." + "Vklop dodatnega prostora za shranjevanje in varnostno kopiranje" + "Odzivnik je skoraj poln. Če želite sprostiti prostor, vklopite dodaten prostor za shranjevanje, da bo Google lahko upravljal vaša sporočila v odzivniku in jih varnostno kopiral." "Nastavite kodo PIN za glasovno pošto" "Kodo PIN za glasovno pošto boste potrebovali ob vsakem klicu za dostop do glasovne pošte." "Neznana napaka" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sq/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sq/strings.xml index 7beb4585b..d400cd8ef 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sq/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sq/strings.xml @@ -44,10 +44,10 @@ "Nuk mund të marrësh postë zanore të re nëse kutia hyrëse është plot." "Posta zanore nuk mund të merret" "Kutia hyrëse është plot. Provo të fshish disa mesazhe për të marrë postë zanore të re." - "[Eksperimentale] Aktivizo rezervimin dhe hapësirën ruajtëse shtesë" - "Kutia jote postare është plot. Për të liruar hapësirën, aktivizo hapësirën ruajtëse shtesë që Google të mund të menaxhojë dhe të rezervojë mesazhet e tua të postës zanore. ""Ky funksion po testohet aktualisht ""dhe mund të fshijë posta zanore nga serveri i postës zanore, si dhe nuk premtojmë mbështetjen për këtë funksion në të ardhmen. Megjithatë do të na pëlqente të merrnim komentet e tua." - "[Eksperimentale] Aktivizo rezervimin dhe hapësirën ruajtëse shtesë" - "Kutia jote postare është plot. Për të liruar hapësirën, aktivizo hapësirën ruajtëse shtesë që Google të mund të menaxhojë dhe të rezervojë mesazhet e tua të postës zanore. ""Ky funksion po testohet aktualisht ""dhe mund të fshijë posta zanore nga serveri i postës zanore, si dhe nuk premtojmë mbështetjen për këtë funksion në të ardhmen. Megjithatë do të na pëlqente të merrnim komentet e tua." + "Aktivizo hapësirën ruajtëse shtesë dhe rezervimin" + "Kutia jote postare është plot. Për të liruar hapësirën, aktivizo hapësirën ruajtëse shtesë që Google të mund të menaxhojë dhe të rezervojë mesazhet e tua të postës zanore." + "Aktivizo hapësirën ruajtëse shtesë dhe rezervimin" + "Kutia jote postare është thuajse plot. Për të liruar hapësirën, aktivizo hapësirën ruajtëse shtesë që Google të mund të menaxhojë dhe të rezervojë mesazhet e tua të postës zanore." "Vendos kodin PIN të postës zanore" "Të duhet një kod PIN për postën zanore në çdo kohë që telefonon për të hyrë te posta zanore." "Gabim i panjohur" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sr/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sr/strings.xml index ebbee778c..da1853a14 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sr/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sr/strings.xml @@ -44,10 +44,10 @@ "Нећете моћи да примате нову говорну пошту ако је пријемно сандуче пуно." "Не можете да примате нове говорне поруке" "Пријемно сандуче је пуно. Избришите неке поруке да бисте примили нову говорну пошту." - "[Експериментално] Укључите додатни меморијски простор и резервне копије" - "Ваше поштанско сандуче је пуно. Да бисте ослободили простор, укључите додатни меморијски простор како би Google могао да управља вашим порукама говорне поште и прави њихове резервне копије. ""Ова функција се тренутно тестира "", може да избрише говорне поруке са сервера говорне поште и не гарантујемо да ћемо је подржавати у будућности. Ипак, желели бисмо да добијамо повратне информације од вас." - "[Експериментално] Укључите додатни меморијски простор и резервне копије" - "Ваше поштанско сандуче је скоро пуно. Да бисте ослободили простор, укључите додатни меморијски простор како би Google могао да управља вашим порукама говорне поште и прави њихове резервне копије. ""Ова функција се тренутно тестира "", може да избрише говорне поруке са сервера говорне поште и не гарантујемо да ћемо је подржавати у будућности. Ипак, желели бисмо да добијамо повратне информације од вас." + "Укључите додатни меморијски простор и резервне копије" + "Поштанско сандуче је пуно. Да бисте ослободили простор, укључите додатни меморијски простор, па ће Google моћи да управља вашим говорним порукама и прави њихове резервне копије." + "Укључите додатни меморијски простор и резервне копије" + "Поштанско сандуче је скоро пуно. Да бисте ослободили простор, укључите додатни меморијски простор, па ће Google моћи да управља вашим говорним порукама и прави њихове резервне копије." "Подесите PIN говорне поште" "PIN говорне поште вам треба сваки пут кад упућујете позив да бисте приступили говорној пошти." "Непозната грешка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sv/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sv/strings.xml index b74be6132..cfab8305a 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sv/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sv/strings.xml @@ -44,10 +44,10 @@ "Du kan inte ta emot nya röstmeddelanden om inkorgen är full." "Du kan inte ta emot nya röstmeddelanden." "Inkorgen är full. Testa att radera några meddelanden om du vill kunna ta emot nya röstmeddelanden." - "[Experimentell] Aktivera extra lagring och säkerhetskopiering" - "Din brevlåda är full. Frigör utrymme genom att aktivera extra lagring så att Google hanterar och säkerhetskopierar dina röstmeddelanden. ""Det här är en experimentfunktion"" som vi för närvarande testar. Den kan potentiellt radera röstmeddelanden på röstbrevlådans server och vi garanterar inte support för den här funktionen i framtiden. Vi är dock tacksamma för synpunkter om den." - "[Experimentell] Aktivera extra lagring och säkerhetskopiering" - "Din brevlåda är nästan full. Frigör utrymme genom att aktivera extra lagring så att Google hanterar och säkerhetskopierar dina röstmeddelanden. ""Det här är en experimentfunktion"" som vi för närvarande testar. Den kan potentiellt radera röstmeddelanden på röstbrevlådans server och vi garanterar inte support för den här funktionen i framtiden. Vi är dock tacksamma för synpunkter om den." + "Aktivera extra lagring och säkerhetskopiering" + "Din postlåda är full. Frigör utrymme genom att aktivera extra lagringsutrymme så att Google kan hantera och säkerhetskopiera dina röstmeddelanden." + "Aktivera extra lagring och säkerhetskopiering" + "Din postlåda är nästan full. Frigör utrymme genom att aktivera extra lagringsutrymme så att Google kan hantera och säkerhetskopiera dina röstmeddelanden." "Ange PIN-kod till röstbrevlåda" "Du måste ha en PIN-kod till röstbrevlådan varje gång du ringer till den." "Okänt fel" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-sw/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-sw/strings.xml index 098fbe0b7..56aad211c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-sw/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-sw/strings.xml @@ -44,10 +44,10 @@ "Hutaweza kupokea ujumbe mpya wa sauti kama kikasha chako kimejaa." "Huwezi kupokea ujumbe mpya wa sauti" "Kikasha chako kimejaa. Jaribu kufuta baadhi ili uweze kupokea ujumbe mpya wa sauti." - "[Majaribio] Washa nafasi ya ziada halafu uhifadhi nakala rudufu" - "Sanduku lako la ujumbe wa sauti limejaa. Ili upate nafasi, washa hifadhi ya ziada ili Google idhibiti na kuweka nakala rudufu ya ujumbe wako wa sauti. ""Kipengele hiki kinajaribiwa kwa sasa ""na huenda kitafuta ujumbe wa sauti kutoka kwenye seva yako ya ujumbe wa sauti, na hatuwezi kutoa ahadi kwamba kipengele hiki kitatumika katika siku zijazo. Hata hivyo, tungependa kupata maoni yako kuhusu kipengele hiki." - "[Majaribio] Washa nafasi ya ziada halafu uhifadhi nakala rudufu" - "Sanduku lako la ujumbe wa sauti limejaa. Ili upate nafasi, washa hifadhi ya ziada ili Google idhibiti na kuweka nakala rudufu ya ujumbe wako wa sauti. ""Kipengele hiki kinajaribiwa kwa sasa ""na huenda kitafuta ujumbe wa sauti kutoka kwenye seva yako ya ujumbe wa sauti, na hatuwezi kutoa ahadi kwamba kipengele hiki kitatumika katika siku zijazo. Hata hivyo, tungependa kupata maoni yako kuhusu kipengele hiki." + "Washa nafasi ya ziada halafu uhifadhi nakala rudufu" + "Sanduku lako la ujumbe wa sauti limejaa. Ili upate nafasi, washa hifadhi ya ziada ili Google idhibiti na kuweka nakala rudufu ya ujumbe wako wa sauti." + "Washa nafasi ya ziada halafu uhifadhi nakala rudufu" + "Sanduku lako la ujumbe wa sauti linakaribia kujaa. Ili upate nafasi, washa hifadhi ya ziada ili Google idhibiti na kuweka nakala rudufu ya ujumbe wako wa sauti." "Weka PIN yako ya ujumbe wa sauti" "Utahitaji PIN ya ujumbe wa sauti wakati wowote unapopiga simu ili ufikie ujumbe wako wa sauti." "Hitilafu isiyojulikana" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ta/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ta/strings.xml index f8ab381f7..f2613f082 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ta/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ta/strings.xml @@ -44,10 +44,10 @@ "இன்பாக்ஸ் நிரம்பியிருந்தால், புதிய குரலஞ்சலைப் பெற முடியாது." "புதிய குரலஞ்சல்களைப் பெற முடியவில்லை" "இன்பாக்ஸ் நிரம்பிவிட்டது. புதிய குரலஞ்சல்களைப் பெற, சில செய்திகளை நீக்கவும்." - "[சோதனை முயற்சி] கூடுதல் சேமிப்பகத்தையும் காப்புப் பிரதியையும் இயக்கு" - "உங்கள் அஞ்சல்பெட்டி நிரம்பிவிட்டது. இடத்தைக் காலியாக்க, கூடுதல் சேமிப்பகத்தை இயக்கவும். இதன் மூலம் Google உங்கள் குரலஞ்சல் செய்திகளை நிர்வகித்து, காப்புப் பிரதி எடுக்கலாம். "" இந்த அம்சம் தற்போது சோதனை செய்யப்படுகிறது "", இது உங்கள் குரலஞ்சல் சேவையகத்திலிருந்து குரலஞ்சல்களை நீக்கச் சாத்தியமுள்ளது. இந்த அம்சம் எதிர்காலத்தில் ஆதரிப்படும் என்பதற்குஉத்திரவாதம் இல்லை. இருப்பினும் உங்கள் கருத்தை வரவேற்கிறோம்." - "[சோதனை முயற்சி] கூடுதல் சேமிப்பகத்தையும் காப்புப் பிரதியையும் இயக்கு" - "உங்கள் அஞ்சல்பெட்டி கிட்டத்தட்ட நிரம்பிவிட்டது. இடத்தைக் காலியாக்க, கூடுதல் சேமிப்பகத்தை இயக்கவும். இதன் மூலம் Google உங்கள் குரலஞ்சல் செய்திகளை நிர்வகித்து, காப்புப் பிரதி எடுக்கலாம். "" இந்த அம்சம் தற்போது சோதனை செய்யப்படுகிறது "", இது உங்கள் குரலஞ்சல் சேவையகத்திலிருந்து குரலஞ்சல்களை நீக்கச் சாத்தியமுள்ளது. இந்த அம்சம் எதிர்காலத்தில் ஆதரிப்படும் என்பதற்குஉத்திரவாதம் இல்லை. இருப்பினும் உங்கள் கருத்தை வரவேற்கிறோம்." + "கூடுதல் சேமிப்பகத்தையும் காப்புப் பிரதியையும் இயக்கு" + "உங்கள் அஞ்சல்பெட்டி நிரம்பிவிட்டது. இடத்தைக் காலியாக்க, கூடுதல் சேமிப்பகத்தை இயக்கவும். இதன் மூலம் Google உங்கள் குரலஞ்சல் செய்திகளை நிர்வகித்து, காப்புப் பிரதி எடுக்கலாம்." + "கூடுதல் சேமிப்பகத்தையும் காப்புப் பிரதியையும் இயக்கு" + "உங்கள் அஞ்சல்பெட்டி கிட்டத்தட்ட நிரம்பிவிட்டது. இடத்தைக் காலியாக்க, கூடுதல் சேமிப்பகத்தை இயக்கவும். இதன் மூலம் Google உங்கள் குரலஞ்சல் செய்திகளை நிர்வகித்து, காப்புப் பிரதி எடுக்கலாம்." "உங்கள் குரலஞ்சல் பின்னை அமைக்கவும்" "உங்கள் குரலஞ்சலை அணுகுவதற்கு நீங்கள் எப்போது அழைத்தாலும் குரலஞ்சல் பின் அவசியம்." "அறியப்படாத பிழை" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-te/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-te/strings.xml index c2a818f47..a881550e8 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-te/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-te/strings.xml @@ -44,10 +44,10 @@ "మీ ఇన్‌బాక్స్ నిండిపోయి ఉంటే, కొత్త వాయిస్ మెయిల్‌ను స్వీకరించలేరు." "కొత్త వాయిస్ మెయిల్‌లను స్వీకరించలేరు" "మీ ఇన్‌బాక్స్ నిండింది. కొత్త వాయిస్ మెయిల్‌ను స్వీకరించడానికి కొన్ని సందేశాలను తొలగించడానికి ప్రయత్నించండి." - "[ప్రయోగాత్మకం] అదనపు నిల్వ మరియు బ్యాకప్‌ను ఆన్ చేయండి" - "మీ మెయిల్‌బాక్స్ నిండింది. స్థలాన్ని ఖాళీ చేసేందుకు అదనపు నిల్వను ఆన్ చేయండి, అప్పుడు Google మీ వాయిస్ మెయిల్ సందేశాలను నిర్వహించగలదు మరియు బ్యాకప్ చేయగలదు. ""ప్రస్తుతం ఈ లక్షణం పరీక్షించబడుతున్నందున ""మీ వాయిస్ మెయిల్ సర్వర్ నుండి సంభావ్యంగా వాయిస్ మెయిల్‌లు తొలగించబడతాయి, అలాగే మేము భవిష్యత్తులో ఈ లక్షణానికి మద్దతు ఇస్తామని ఎలాంటి వాగ్దానం చేయము. అయితే, మీ అభిప్రాయాన్ని అందిస్తే మేము సంతోషిస్తాము." - "[ప్రయోగాత్మకం] అదనపు నిల్వ మరియు బ్యాకప్‌ను ఆన్ చేయండి" - "మీ మెయిల్‌బాక్స్ దాదాపు నిండింది. స్థలాన్ని ఖాళీ చేసేందుకు అదనపు నిల్వను ఆన్ చేయండి, అప్పుడు Google మీ వాయిస్ మెయిల్ సందేశాలను నిర్వహించగలదు మరియు బ్యాకప్ చేయగలదు. ""ప్రస్తుతం ఈ లక్షణం పరీక్షించబడుతున్నందున ""మీ వాయిస్ మెయిల్ సర్వర్ నుండి సంభావ్యంగా వాయిస్ మెయిల్‌లు తొలగించబడతాయి మరియు మేము భవిష్యత్తులో ఈ లక్షణానికి మద్దతు ఇస్తామని ఎలాంటి వాగ్దానం చేయము. అయితే, మీ అభిప్రాయాన్ని అందిస్తే మేము సంతోషిస్తాము." + "అదనపు నిల్వ మరియు బ్యాకప్‌ను ఆన్ చేయండి" + "మీ మెయిల్‌బాక్స్ నిండింది. స్థలాన్ని ఖాళీ చేసేందుకు అదనపు నిల్వను ఆన్ చేయండి, దీని వలన Google మీ వాయిస్ మెయిల్ సందేశాలను నిర్వహించగలదు మరియు బ్యాకప్ చేయగలదు." + "అదనపు నిల్వ మరియు బ్యాకప్‌ను ఆన్ చేయండి" + "మీ మెయిల్‌బాక్స్ దాదాపు నిండిపోయింది. స్థలాన్ని ఖాళీ చేసేందుకు అదనపు నిల్వను ఆన్ చేయండి, దీని వలన Google మీ వాయిస్ మెయిల్ సందేశాలను నిర్వహించగలదు మరియు బ్యాకప్ చేయగలదు." "మీ వాయిస్ మెయిల్ PIN సెట్ చేయండి" "మీరు మీ వాయిస్ మెయిల్‌ను ప్రాప్యత చేయడానికి కాల్ చేసే ప్రతిసారి మీకు వాయిస్ మెయిల్ PIN అవసరమవుతుంది." "తెలియని లోపం" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-th/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-th/strings.xml index 97ceee724..31302cc65 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-th/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-th/strings.xml @@ -44,10 +44,10 @@ "คุณจะไม่สามารถรับข้อความเสียงใหม่ได้ ถ้ากล่องจดหมายเต็ม" "ไม่สามารถรับข้อความเสียงใหม่ได้" "กล่องจดหมายเต็ม ลองลบข้อความบางส่วนออกเพื่อรับข้อความเสียงใหม่" - "[ทดสอบ] เปิดพื้นที่เก็บข้อมูลและการสำรองข้อมูลเพิ่มเติม" - "กล่องจดหมายเต็มแล้ว หากต้องการทำให้พื้นที่ว่างมากขึ้น โปรดเปิดพื้นที่เก็บข้อมูลเพิ่มเติมเพื่อให้ Google จัดการและสำรองข้อมูลข้อความเสียงได้ ""คุณลักษณะนี้อยู่ในระหว่างการทดสอบ""และอาจลบข้อความเสียงออกจากเซิร์ฟเวอร์ข้อความเสียงได้ เราไม่สัญญาว่าจะรองรับคุณลักษณะนี้ในอนาคต แต่ยินดีรับฟังความคิดเห็น" - "[ทดสอบ] เปิดพื้นที่เก็บข้อมูลและการสำรองข้อมูลเพิ่มเติม" - "กล่องจดหมายใกล้จะเต็มแล้ว หากต้องการทำให้พื้นที่ว่างมากขึ้น โปรดเปิดพื้นที่เก็บข้อมูลเพิ่มเติมเพื่อให้ Google จัดการและสำรองข้อมูลข้อความเสียงได้ ""คุณลักษณะนี้อยู่ในระหว่างการทดสอบ""และอาจลบข้อความเสียงออกจากเซิร์ฟเวอร์ข้อความเสียงได้ เราไม่สัญญาว่าจะรองรับคุณลักษณะนี้ในอนาคต แต่ยินดีรับฟังความคิดเห็น" + "เปิดพื้นที่เก็บข้อมูลเพิ่มเติมและการสำรองข้อมูล" + "กล่องจดหมายของคุณเต็มแล้ว หากต้องการเพิ่มพื้นที่ว่าง โปรดเปิดพื้นที่เก็บข้อมูลเพิ่มเติมเพื่อให้ Google สามารถจัดการและเก็บสำรองข้อความเสียงได้" + "เปิดพื้นที่เก็บข้อมูลเพิ่มเติมและการสำรองข้อมูล" + "กล่องจดหมายของคุณใกล้เต็มแล้ว หากต้องการเพิ่มพื้นที่ว่าง โปรดเปิดพื้นที่เก็บข้อมูลเพิ่มเติมเพื่อให้ Google สามารถจัดการและเก็บสำรองข้อความเสียงได้" "ตั้งค่า PIN ข้อความเสียง" "คุณต้องใช้ PIN ข้อความเสียงทุกครั้งที่โทรหาบริการข้อความเสียง" "ข้อผิดพลาดที่ไม่ทราบสาเหตุ" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-tl/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-tl/strings.xml index f8bcc952a..b99d0c377 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-tl/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-tl/strings.xml @@ -44,10 +44,10 @@ "Hindi ka makakatanggap ng bagong voicemail kung puno na ang inbox mo." "Hindi makatanggap ng mga bagong voicemail" "Puno na ang inbox mo. Subukang i-delete ang ilang mensahe upang makatanggap ng bagong voicemail." - "[Eksperimental] I-on ang karagdagang storage at backup" - "Puno na ang iyong mailbox. Upang magbakante ng space, i-on ang karagdagang storage para mapamahalaan at ma-back up ng Google ang iyong mga mensahe sa voicemail. ""Kasalukuyang sinusubukan ang feature na ito ""at posibleng i-delete ang mga voicemail mula sa iyong server ng voicemail, at hindi namin ipinapangakong susuportahan ang feature na ito sa hinaharap. Gayunpaman, gusto naming makuha ang iyong feedback." - "[Eksperimental] I-on ang karagdagang storage at backup" - "Malapit nang mapuno ang iyong mailbox. Upang magbakante ng space, i-on ang karagdagang storage para mapamahalaan at ma-back up ng Google ang iyong mga mensahe sa voicemail. ""Kasalukuyang sinusubukan ang feature na ito ""at posibleng i-delete ang mga voicemail mula sa iyong server ng voicemail, at hindi namin ipinapangakong susuportahan ang feature na ito sa hinaharap. Gayunpaman, gusto naming makuha ang iyong feedback." + "I-on ang karagdagang storage at backup" + "Puno na ang iyong mailbox. Upang magbakante ng space, i-on ang karagdagang storage para pamahalaan at i-back up ng Google ang iyong mga mensahe sa voicemail." + "I-on ang karagdagang storage at backup" + "Malapit nang mapuno ang iyong mailbox. Upang magbakante ng space, i-on ang karagdagang storage para pamahalaan at i-back up ng Google ang iyong mga mensahe sa voicemail." "Itakda ang iyong PIN sa voicemail" "Kakailanganin mo ng isang PIN sa voicemail sa tuwing tatawag ka upang ma-access ang iyong voicemail." "Hindi alam na error" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-tr/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-tr/strings.xml index 428543d3b..be5cbb027 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-tr/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-tr/strings.xml @@ -44,10 +44,10 @@ "Gelen kutunuz dolarsa yeni sesli mesajları alamayacaksınız." "Yeni sesli mesajlar alınamıyor" "Gelen kutunuz doldu. Yeni sesli mesajları almak için bazı mesajları silmeyi deneyin." - "[Deneysel] Ekstra depolama alanını ve yedeklemeyi etkinleştirin" - "Posta kutunuz dolu. Google\'ın sesli mesajlarınızı yönetebileceği ve yedekleyebileceği şekilde yer açmak için ekstra depolama alanını etkinleştirin. ""Bu özellik henüz test edilmektedir ""ve sesli mesaj sunucunuzdaki sesli mesajların silinmesine neden olabilir. Ayrıca, bu özelliğin gelecekte destekleneceğine dair bir garanti vermiyoruz. Yine de geri bildirimlerinizi öğrenmek isteriz." - "[Deneysel] Ekstra depolama alanını ve yedeklemeyi etkinleştirin" - "Posta kutunuz dolmak üzere. Google\'ın sesli mesajlarınızı yönetebileceği ve yedekleyebileceği şekilde yer açmak için ekstra depolama alanını etkinleştirin. ""Bu özellik henüz test edilmektedir ""ve sesli mesaj sunucunuzdaki sesli mesajların silinmesine neden olabilir. Ayrıca, bu özelliğin gelecekte destekleneceğine dair bir garanti vermiyoruz. Yine de geri bildirimlerinizi öğrenmek isteriz." + "Ekstra depolama alanını ve yedeklemeyi etkinleştirin" + "Posta kutunuz dolu. Google\'ın sesli mesajlarınızı yönetebileceği ve yedekleyebileceği şekilde yer açmak için ekstra depolama alanını etkinleştirin." + "Ekstra depolama alanını ve yedeklemeyi etkinleştirin" + "Posta kutunuz dolmak üzere. Google\'ın sesli mesajlarınızı yönetebileceği ve yedekleyebileceği şekilde yer açmak için ekstra depolama alanını etkinleştirin." "Sesli mesaj PIN\'inizi ayarlayın" "Sesli mesajlarınıza erişmek için her aradığınızda bir sesli mesaj PIN\'i girmeniz gerekecek." "Bilinmeyen hata" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-uk/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-uk/strings.xml index 30e83f2d7..6adf49ab9 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-uk/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-uk/strings.xml @@ -44,10 +44,10 @@ "Якщо папка вхідної голосової пошти заповнена, ви не зможете отримувати нові повідомлення." "Неможливо отримати нові голосові повідомлення" "Папка вхідної голосової пошти заповнена. Видаліть деякі повідомлення, щоб отримати нові." - "[Експериментальна функція] Увімкніть додаткову пам’ять і резервне копіювання" - "У поштовій скриньці не залишилося місця. Щоб звільнити його, увімкніть додаткову пам’ять, і тоді Google робитиме резервні копії вашої голосової пошти та керуватиме нею. ""Ця функція зараз тестується, ""і в результаті її використання голосові повідомлення може бути видалено із сервера голосової пошти. Ми не гарантуємо, що вона підтримуватиметься в майбутньому, однак хочемо отримати ваш відгук." - "[Експериментальна функція] Увімкніть додаткову пам’ять і резервне копіювання" - "У поштовій скриньці майже не залишилося місця. Щоб звільнити його, увімкніть додаткову пам’ять, і тоді Google робитиме резервні копії вашої голосової пошти та керуватиме нею. ""Ця функція зараз тестується, ""і в результаті її використання голосові повідомлення може бути видалено із сервера голосової пошти. Ми не гарантуємо, що вона підтримуватиметься в майбутньому, однак хочемо отримати ваш відгук." + "Увімкніть додаткову пам’ять і резервне копіювання" + "У поштовій скриньці не залишилося місця. Щоб звільнити його, увімкніть додаткову пам’ять, і тоді Google почне робити резервні копії вашої голосової пошти й керувати нею." + "Увімкніть додаткову пам’ять і резервне копіювання" + "У поштовій скриньці майже не залишилося місця. Щоб звільнити його, увімкніть додаткову пам’ять, і тоді Google почне робити резервні копії вашої голосової пошти й керувати нею." "Установіть PIN-код голосової пошти" "PIN-код буде потрібен під час кожного дзвінка на голосову пошту." "Невідома помилка" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-ur/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-ur/strings.xml index ab640ffd1..e6fd9f7a0 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-ur/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-ur/strings.xml @@ -44,10 +44,10 @@ "اگر آپ کا ان باکس بھرا ہوا ہوگا تو آپ نئی صوتی میل موصول نہیں کر پائیں گے۔" "نئی صوتی میلز موصول نہیں ہو سکتی" "آپ کا ان باکس بھرا ہوا ہے۔ نئی صوتی میل موصول کرنے کیلئے کچھ پیغامات حذف کرنے کی کوشش کریں۔" - "[تجرباتی] اضافی اسٹوریج اور بیک اپ آن کریں" - "‏آپ کا میل باکس تقریبا بھرا ہوا ہے۔ جگہ خالی کرنے کیلئے، اضافی اسٹوریج آن کریں تاکہ Google آپ کے صوتی میل پیغامات کا بیک اپ اور نظم کر سکے۔ ""یہ خصوصیت ابھی ٹیسٹ کی جا رہی ہے ""اور ممکنہ طور پر آپ کے صوتی میل سرور پر سے آپ کی صوتی میلز کو حذف کر دے گی اور مستقبل میں اس خصوصیت کی معاونت کا ہم وعدہ نہیں کرتے۔ لیکن ہم آپ کے تاثرات کو پسند کریں گے۔" - "[تجرباتی] اضافی اسٹوریج اور بیک اپ آن کریں" - "‏آپ کا میل باکس تقریبا بھرا ہوا ہے۔ جگہ خالی کرنے کیلئے، اضافی اسٹوریج آن کریں تاکہ Google آپ کے صوتی میل پیغامات کا بیک اپ اور نظم کر سکے۔ ""یہ خصوصیت ابھی ٹیسٹ کی جا رہی ہے ""اور ممکنہ طور پر آپ کے صوتی میل سرور پر سے آپ کی صوتی میلز کو حذف کر دے گی اور مستقبل میں اس خصوصیت کی معاونت کا ہم وعدہ نہیں کرتے۔ لیکن ہم آپ کے تاثرات کو پسند کریں گے۔" + "اضافی اسٹوریج اور بیک اپ آن کریں" + "‏آپ کا میل باکس بھر گیا ہے۔ جگہ خالی کرنے کیلئے، اضافی اسٹوریج کو آن کریں تا کہ Google آپ کے صوتی میل پیغامات کا بیک اپ اور ان کا نظم کر سکے۔" + "اضافی اسٹوریج اور بیک اپ آن کریں" + "‏آپ کا میل باکس تقریباً بھر گیا ہے۔ جگہ خالی کرنے کیلئے، اضافی اسٹوریج کو آن کریں تا کہ Google آپ کے صوتی میل پیغامات کا بیک اپ اور ان کا نظم کر سکے۔" "‏اپنی صوتی میل PIN سیٹ کریں" "‏آپ جب بھی صوتی میل تک رسائی کیلئے کال کریں گے تو آپ کو صوتی میل PIN چاہئیے ہوگی۔" "نامعلوم خرابی" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-uz/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-uz/strings.xml index 0cfd29c24..5583e2778 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-uz/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-uz/strings.xml @@ -44,10 +44,10 @@ "Agar ovozli pochta qutisi to‘lib qolsa, yangi xabarlar qabul qilishning imkoni bo‘lmay qoladi." "Yangi ovozli pochta xabarlarini qabul qilib bo‘lmadi" "Ovozli pochta qutisi to‘lgan. Yangi xabarlar qabul qilish uchun eskilaridan bir nechtasini o‘chirib tashlang." - "[Tajribaviy xususiyat] Zaxiralash va saqlash uchun qo‘shimcha xotirani faollashtiring" - "Pochta qutisi to‘lgan. Unda joy bo‘shatish uchun qo‘shimcha xotirani faollashtiring. Bu – Google’ga ovozli xabarlaringizni boshqarish va ularning nusxasini zaxiralashga imkon beradi. ""Bu xususiyat ayni vaqtda sinovdan o‘tkazilmoqda."" Sizning ovozli xabarlaringiz, ehtimol, ovozli pochta serveridan o‘chirib tashlanadi. Bu xususiyatning keyinchalik qo‘llab-quvvatlanishi kafolatlanmaydi. Shunday bo‘lsa-da, u haqda fikr-mulohaza bildirishingizni xohlaymiz." - "[Tajribaviy xususiyat] Zaxiralash va saqlash uchun qo‘shimcha xotirani faollashtiring" - "Pochta qutisi deyarli to‘lgan. Unda joy bo‘shatish uchun qo‘shimcha xotirani faollashtiring. Bu – Google’ga ovozli xabarlaringizni boshqarish va ularning nusxasini zaxiralashga imkon beradi. ""Bu xususiyat ayni vaqtda sinovdan o‘tkazilmoqda."" Sizning ovozli xabarlaringiz, ehtimol, ovozli pochta serveridan o‘chirib tashlanadi. Bu xususiyatning keyinchalik qo‘llab-quvvatlanishi kafolatlanmaydi. Shunday bo‘lsa-da, u haqda fikr-mulohaza bildirishingizni xohlaymiz." + "Qo‘shimcha xotira va zaxiralash xususiyatini yoqish" + "Pochtangiz qutisi deyarli to‘lgan. Unda joy bo‘shatish uchun qo‘shimcha xotirani yoqing. Google esa, ovozli xabarlaringiz nusxasini zaxiralashni hamda ularni boshqarishni boshlaydi." + "Qo‘shimcha xotira va zaxiralash xususiyatini yoqish" + "Pochtangiz qutisi deyarli to‘lgan. Unda joy bo‘shatish uchun qo‘shimcha xotirani yoqing. Google esa, ovozli xabarlaringiz nusxasini zaxiralashni hamda ularni boshqarishni boshlaydi." "Ovozli pochta uchun PIN kod o‘rnatish" "Ovozli pochtaga har safar qo‘ng‘iroq qilinganda PIN kod so‘raladi." "Noma’lum xatolik" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-vi/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-vi/strings.xml index 819b35161..029396e31 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-vi/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-vi/strings.xml @@ -44,10 +44,10 @@ "Bạn sẽ không thể nhận được thư thoại mới nếu hộp thư đến của bạn đã đầy." "Không nhận được thư thoại mới" "Hộp thư đến của bạn đã đầy. Hãy thử xóa một vài thư để nhận thư thoại mới." - "[Thử nghiệm] Bật bộ nhớ và bản sao lưu bổ sung" - "Hộp thư của bạn đã đầy. Để tạo thêm dung lượng, hãy bật bộ nhớ bổ sung để Google có thể quản lý và sao lưu tin nhắn thoại của bạn. ""Tính năng này hiện đang được thử nghiệm ""và có khả năng sẽ xóa thư thoại của bạn khỏi máy chủ thư thoại. Ngoài ra, chúng tôi không cam kết hỗ trợ tính năng này trong tương lai. Mặc dù vậy, chúng tôi vẫn mong muốn nhận được phản hồi của bạn." - "[Thử nghiệm] Bật bộ nhớ và bản sao lưu bổ sung" - "Hộp thư của bạn sắp đầy. Để tạo thêm dung lượng, hãy bật bộ nhớ bổ sung để Google có thể quản lý và sao lưu tin nhắn thoại của bạn. ""Tính năng này hiện đang được thử nghiệm ""và có khả năng sẽ xóa thư thoại của bạn khỏi máy chủ thư thoại. Ngoài ra, chúng tôi không cam kết hỗ trợ tính năng này trong tương lai. Mặc dù vậy, chúng tôi vẫn mong muốn nhận được phản hồi của bạn." + "Bật sao lưu và bộ nhớ bổ sung" + "Hộp thư của bạn đã đầy. Để giải phóng dung lượng, hãy bật bộ nhớ bổ sung để Google có thể quản lý và sao lưu thư thoại của bạn." + "Bật sao lưu và bộ nhớ bổ sung" + "Hộp thư của bạn đã gần đầy. Để giải phóng dung lượng, hãy bật bộ nhớ bổ sung để Google có thể quản lý và sao lưu thư thoại của bạn." "Đặt mã PIN thư thoại của bạn" "Bạn cần có mã PIN thư thoại mỗi khi gọi để truy cập thư thoại của mình." "Lỗi không xác định" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-zh-rCN/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-zh-rCN/strings.xml index 4efebc588..faa36dead 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-zh-rCN/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-zh-rCN/strings.xml @@ -44,10 +44,10 @@ "如果收件箱已满,您将无法接收新的语音邮件。" "无法接收新的语音邮件" "您的收件箱已满。请尝试删除部分邮件,以便接收新的语音邮件。" - "[试验性功能] 启用额外存储空间和备份功能" - "您的邮箱已满。要释放空间,请启用额外存储空间,以便 Google 管理和备份您的语音邮件。""此功能目前正处于测试阶段""并且可能会将语音邮件从您的语音邮件服务器上删除。我们不保证将来会支持此功能,但希望能收到您的反馈。" - "[试验性功能] 启用额外存储空间和备份功能" - "您的邮箱已满。要释放空间,请启用额外存储空间,以便 Google 管理和备份您的语音邮件。""此功能目前正处于测试阶段""并且可能会将语音邮件从您的语音邮件服务器上删除。我们不保证将来会支持此功能,但希望能收到您的反馈。" + "启用额外存储空间和备份功能" + "您的邮箱已满。要释放空间,请启用额外存储空间,以便 Google 管理和备份您的语音邮件。" + "启用额外存储空间和备份功能" + "您的邮箱快满了。要释放空间,请启用额外存储空间,以便 Google 管理和备份您的语音邮件。" "设置语音信箱 PIN 码" "您必须使用语音信箱 PIN 码,才能访问您的语音信箱。" "未知错误" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-zh-rHK/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-zh-rHK/strings.xml index 0ef798e6a..e51a0a902 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-zh-rHK/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-zh-rHK/strings.xml @@ -44,10 +44,10 @@ "如果您的收件箱已滿,就無法接收新留言。" "無法接收新留言" "您的收件箱已滿。建議您刪除部分訊息以接收新留言。" - "[實驗性] 啟用額外儲存裝置和備份功能" - "您的信箱已滿。若要騰出空間,請啟用額外儲存空間,以便 Google 管理及備份您的留言訊息。""此功能目前處於測試階段,""有可能會將您的留言從留言伺服器刪除。我們不保證日後會支援此功能,但還是歡迎您提供相關意見。" - "[實驗性] 啟用額外儲存裝置和備份功能" - "您的信箱將滿。若要騰出空間,請啟用額外儲存空間,以便 Google 管理及備份您的留言訊息。""此功能目前處於測試階段,""有可能會將您的留言從留言伺服器刪除。我們不保證日後會支援此功能,但還是歡迎您提供相關意見。" + "啟用額外儲存裝置和備份功能" + "您的信箱已滿。若要騰出空間,請啟用額外儲存裝置,以便 Google 管理並備份您的留言訊息。" + "啟用額外儲存裝置和備份功能" + "您的信箱快要滿了。若要騰出空間,請啟用額外儲存裝置,以便 Google 管理並備份您的留言訊息。" "設定留言信箱 PIN" "您必須輸入留言信箱 PIN 才可收聽留言。" "不明錯誤" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-zh-rTW/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-zh-rTW/strings.xml index 9b22c403e..7f2e1d61c 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-zh-rTW/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-zh-rTW/strings.xml @@ -44,10 +44,10 @@ "收件匣已滿時無法接收新的語音留言。" "無法接收新的語音留言" "您的收件匣已滿。請刪除部分訊息,以便接收新的語音留言。" - "[實驗性] 啟用額外的儲存空間和備份功能" - "你的信箱容量已滿。如要釋出空間,請啟用額外的儲存空間,方便 Google 管理及備份你的語音留言。""這項功能目前正在測試階段"",可能會從你的語音信箱伺服器中刪除語音留言。我們不保證日後會支援此功能,但還是希望聽聽你的寶貴意見。" - "[實驗性] 啟用額外的儲存空間和備份功能" - "你的信箱容量幾乎已滿。如要釋出空間,請啟用額外的儲存空間,方便 Google 管理及備份你的語音留言。""這項功能目前正在測試階段"",可能會從你的語音信箱伺服器中刪除語音留言。我們不保證日後會支援此功能,但還是希望聽聽你的寶貴意見。" + "啟用額外的儲存空間和備份功能" + "你的信箱容量已滿。如要釋出空間,請啟用額外的儲存空間,方便 Google 管理及備份你的語音留言。" + "啟用額外的儲存空間和備份功能" + "你的信箱容量幾乎已滿。如要釋出空間,請啟用額外的儲存空間,方便 Google 管理及備份你的語音留言。" "設定您的語音信箱 PIN 碼" "您必須輸入語音信箱 PIN 碼才能存取您的語音信箱。" "不明錯誤" diff --git a/java/com/android/dialer/app/voicemail/error/res/values-zu/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values-zu/strings.xml index fa2613216..8d3cd79ea 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values-zu/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values-zu/strings.xml @@ -44,10 +44,10 @@ "Ngeke uze ukwazi ukuthola ivoyisimeyili entsha uma ibhokisi lakho lokungenayo ligcwele." "Ayikwazi ukwamukela amavoyisimeyili amasha" "Ibhokisi lakho lokungenayo ligcwele. Zama ukususa eminye imilayezo ukuze uthole ivoyisimeyili entsha." - "[Ukuhlolwa] Vula isitoreji esingeziwe nesipele" - "Ibhokisi lakho lemeyili ligcwele. Ukuze ukhulule isikhala, vula isitoreji esingeziwe ukuze i-Google ikwazi ukuphatha iphinde yenze isipele imilayezo yakho yevoyisimeyili. ""Lesi sici manje siyahlolwa ""futhi sinamandla okususa amavoyisimeyili kusukela kuseva yakho yevoyisimeyili, futhi asithembisi ukusekela lesi sici ngokuzayo. Singayijabulela impendulo yakho yize kunjalo." - "[Ukuhlolwa] Vula isitoreji esingeziwe nesipele" - "Ibhokisi lakho lemeyili selicishe ligcwele. Ukuze ukhulule isikhala, vula isitoreji esingeziwe ukuze i-Google ikwazi ukuphatha iphinde yenze isipele imilayezo yakho yevoyisimeyili. ""Lesi sici manje siyahlolwa ""futhi sinamandla okususa amavoyisimeyili kusukela kuseva yakho yevoyisimeyili, futhi asithembisi ukusekela lesi sici ngokuzayo. Singayijabulela impendulo yakho yize kunjalo." + "Vula isitoreji esingeziwe nesipele" + "Ibhokisi lakho lemeyili ligcwele. Ukuze ukhulule isikhala, vula isitoreji esingeziwe ukuze i-Google ikwazi ukuphatha futhi yenze isipele imilTo free up space, turn on extra storage so Google can manage and backup your voicemail messages." + "Vula isitoreji esingeziwe nesipele" + "Ibhokisi lakho lemeyili cishe ligcwele. Ukuze ukhulule isikhala, vula isitoreji esingeziwe ukuze i-Google ikwazi ukuphatha nokwenza isipele imilayezo yakho yevoyisimeyili." "Setha iphini yakho yevoyisimeyili" "Udinga iphini yevoyisimeyili noma kunini uma wenza ikholi ukufinyelela ivoyisimeyili yakho." "Iphutha elingaziwa" diff --git a/java/com/android/dialer/app/voicemail/error/res/values/dimens.xml b/java/com/android/dialer/app/voicemail/error/res/values/dimens.xml index 20dd40a8f..090311f15 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values/dimens.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values/dimens.xml @@ -9,4 +9,17 @@ 4dp 11dp 4dp + + + 24dp + 16dp + 21dp + 24dp + 12dp + 4dp + 4dp + 11dp + 4dp + 16sp + 14sp \ No newline at end of file diff --git a/java/com/android/dialer/app/voicemail/error/res/values/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values/strings.xml index d14652553..94d3dba11 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values/strings.xml @@ -54,11 +54,11 @@ Can\'t receive new voicemails Your inbox is full. Try deleting some messages to receive new voicemail. - [Experimental] Turn on extra storage and backup - Your mailbox is full. To free up space, turn on extra storage so Google can manage and backup your voicemail messages. This feature is currently being tested and will potentially delete voicemails from your voicemail server, and we do not promise to support this feature in the future. We would love your feedback though. + Turn on extra storage and backup + Your mailbox is full. To free up space, turn on extra storage so Google can manage and backup your voicemail messages. - [Experimental] Turn on extra storage and backup - Your mailbox is almost full. To free up space, turn on extra storage so Google can manage and backup your voicemail messages. This feature is currently being tested and will potentially delete voicemails from your voicemail server, and we do not promise to support this feature in the future. We would love your feedback though. + Turn on extra storage and backup + Your mailbox is almost full. To free up space, turn on extra storage so Google can manage and backup your voicemail messages. Set your voicemail PIN You\'ll need a voicemail PIN anytime you call to access your voicemail. diff --git a/java/com/android/dialer/backup/DialerBackupAgent.java b/java/com/android/dialer/backup/DialerBackupAgent.java index 0841e82e7..27dfc29f4 100644 --- a/java/com/android/dialer/backup/DialerBackupAgent.java +++ b/java/com/android/dialer/backup/DialerBackupAgent.java @@ -33,12 +33,11 @@ import android.provider.VoicemailContract; import android.provider.VoicemailContract.Voicemails; import android.telecom.PhoneAccountHandle; import android.util.Pair; -import com.android.dialer.backup.nano.VoicemailInfo; import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.telecom.TelecomUtil; import java.io.File; import java.io.IOException; @@ -59,7 +58,7 @@ public class DialerBackupAgent extends BackupAgent { // Voicemail Uri Column public static final String VOICEMAIL_URI = "voicemail_uri"; // Voicemail packages to backup - public static final String VOICEMAIL_SOURCE_PACKAGE = "com.android.phone"; + public static final String VOICEMAIL_SOURCE_PACKAGE = "com.google.android.dialer"; private long voicemailsBackedupSoFar = 0; private long sizeOfVoicemailsBackedupSoFar = 0; diff --git a/java/com/android/dialer/backup/DialerBackupUtils.java b/java/com/android/dialer/backup/DialerBackupUtils.java index 410772ff0..17e82e45d 100644 --- a/java/com/android/dialer/backup/DialerBackupUtils.java +++ b/java/com/android/dialer/backup/DialerBackupUtils.java @@ -30,16 +30,14 @@ import android.support.annotation.Nullable; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.util.Pair; -import com.android.dialer.backup.nano.VoicemailInfo; import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; import com.android.voicemail.VoicemailComponent; import com.google.common.io.ByteStreams; import com.google.common.io.Files; -import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.ByteString; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -66,15 +64,14 @@ public class DialerBackupUtils { ByteStreams.copy(decodedStream, restoreStream); } - public static @Nullable byte[] audioStreamToByteArray(@NonNull InputStream stream) + public static @Nullable ByteString audioStreamToByteString(@NonNull InputStream stream) throws IOException { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); if (stream.available() > 0) { - ByteStreams.copy(stream, buffer); + return ByteString.readFrom(stream); } else { LogUtil.i("DialerBackupUtils.audioStreamToByteArray", "no audio stream to backup"); } - return buffer.toByteArray(); + return ByteString.EMPTY; } public static void writeProtoToFile(@NonNull File file, @NonNull VoicemailInfo voicemailInfo) @@ -83,7 +80,7 @@ public class DialerBackupUtils { "DialerBackupUtils.writeProtoToFile", "backup " + voicemailInfo + " to " + file.getAbsolutePath()); - byte[] bytes = MessageNano.toByteArray(voicemailInfo); + byte[] bytes = voicemailInfo.toByteArray(); Files.write(bytes, file); } @@ -111,7 +108,7 @@ public class DialerBackupUtils { public static VoicemailInfo convertVoicemailCursorRowToProto( @NonNull Cursor cursor, @NonNull ContentResolver contentResolver) throws IOException { - VoicemailInfo voicemailInfo = new VoicemailInfo(); + VoicemailInfo.Builder voicemailInfo = VoicemailInfo.newBuilder(); for (int i = 0; i < cursor.getColumnCount(); ++i) { String name = cursor.getColumnName(i); @@ -126,56 +123,56 @@ public class DialerBackupUtils { switch (name) { case Voicemails.DATE: - voicemailInfo.date = value; + voicemailInfo.setDate(value); break; case Voicemails.DELETED: - voicemailInfo.deleted = value; + voicemailInfo.setDeleted(value); break; case Voicemails.DIRTY: - voicemailInfo.dirty = value; + voicemailInfo.setDirty(value); break; case Voicemails.DIR_TYPE: - voicemailInfo.dirType = value; + voicemailInfo.setDirType(value); break; case Voicemails.DURATION: - voicemailInfo.duration = value; + voicemailInfo.setDuration(value); break; case Voicemails.HAS_CONTENT: - voicemailInfo.hasContent = value; + voicemailInfo.setHasContent(value); break; case Voicemails.IS_READ: - voicemailInfo.isRead = value; + voicemailInfo.setIsRead(value); break; case Voicemails.ITEM_TYPE: - voicemailInfo.itemType = value; + voicemailInfo.setItemType(value); break; case Voicemails.LAST_MODIFIED: - voicemailInfo.lastModified = value; + voicemailInfo.setLastModified(value); break; case Voicemails.MIME_TYPE: - voicemailInfo.mimeType = value; + voicemailInfo.setMimeType(value); break; case Voicemails.NUMBER: - voicemailInfo.number = value; + voicemailInfo.setNumber(value); break; case Voicemails.PHONE_ACCOUNT_COMPONENT_NAME: - voicemailInfo.phoneAccountComponentName = value; + voicemailInfo.setPhoneAccountComponentName(value); break; case Voicemails.PHONE_ACCOUNT_ID: - voicemailInfo.phoneAccountId = value; + voicemailInfo.setPhoneAccountId(value); break; case Voicemails.SOURCE_DATA: - voicemailInfo.sourceData = value; + voicemailInfo.setSourceData(value); break; case Voicemails.SOURCE_PACKAGE: - voicemailInfo.sourcePackage = value; + voicemailInfo.setSourcePackage(value); break; case Voicemails.TRANSCRIPTION: - voicemailInfo.transcription = value; + voicemailInfo.setTranscription(value); break; case DialerBackupAgent.VOICEMAIL_URI: try (InputStream audioStream = contentResolver.openInputStream(Uri.parse(value))) { - voicemailInfo.encodedVoicemailKey = audioStreamToByteArray(audioStream); + voicemailInfo.setEncodedVoicemailKey(audioStreamToByteString(audioStream)); } break; default: @@ -187,7 +184,7 @@ public class DialerBackupUtils { break; } } - return voicemailInfo; + return voicemailInfo.build(); } public static Pair convertVoicemailProtoFileToContentValueAndAudioBytes( @@ -209,45 +206,45 @@ public class DialerBackupUtils { } else { ContentValues contentValues = new ContentValues(); - if (!voicemailInfo.date.isEmpty()) { - contentValues.put(Voicemails.DATE, voicemailInfo.date); + if (voicemailInfo.hasDate()) { + contentValues.put(Voicemails.DATE, voicemailInfo.getDate()); } - if (!voicemailInfo.deleted.isEmpty()) { - contentValues.put(Voicemails.DELETED, voicemailInfo.deleted); + if (voicemailInfo.hasDeleted()) { + contentValues.put(Voicemails.DELETED, voicemailInfo.getDeleted()); } - if (!voicemailInfo.dirty.isEmpty()) { - contentValues.put(Voicemails.DIRTY, voicemailInfo.dirty); + if (!voicemailInfo.hasDirty()) { + contentValues.put(Voicemails.DIRTY, voicemailInfo.getDirty()); } - if (!voicemailInfo.duration.isEmpty()) { - contentValues.put(Voicemails.DURATION, voicemailInfo.duration); + if (!voicemailInfo.hasDuration()) { + contentValues.put(Voicemails.DURATION, voicemailInfo.getDuration()); } - if (!voicemailInfo.isRead.isEmpty()) { - contentValues.put(Voicemails.IS_READ, voicemailInfo.isRead); + if (!voicemailInfo.hasIsRead()) { + contentValues.put(Voicemails.IS_READ, voicemailInfo.getIsRead()); } - if (!voicemailInfo.lastModified.isEmpty()) { - contentValues.put(Voicemails.LAST_MODIFIED, voicemailInfo.lastModified); + if (!voicemailInfo.hasLastModified()) { + contentValues.put(Voicemails.LAST_MODIFIED, voicemailInfo.getLastModified()); } - if (!voicemailInfo.mimeType.isEmpty()) { - contentValues.put(Voicemails.MIME_TYPE, voicemailInfo.mimeType); + if (!voicemailInfo.hasMimeType()) { + contentValues.put(Voicemails.MIME_TYPE, voicemailInfo.getMimeType()); } - if (!voicemailInfo.number.isEmpty()) { - contentValues.put(Voicemails.NUMBER, voicemailInfo.number); + if (!voicemailInfo.hasNumber()) { + contentValues.put(Voicemails.NUMBER, voicemailInfo.getNumber()); } - if (!voicemailInfo.phoneAccountComponentName.isEmpty()) { + if (!voicemailInfo.hasPhoneAccountComponentName()) { contentValues.put( - Voicemails.PHONE_ACCOUNT_COMPONENT_NAME, voicemailInfo.phoneAccountComponentName); + Voicemails.PHONE_ACCOUNT_COMPONENT_NAME, voicemailInfo.getPhoneAccountComponentName()); } - if (!voicemailInfo.phoneAccountId.isEmpty()) { - contentValues.put(Voicemails.PHONE_ACCOUNT_ID, voicemailInfo.phoneAccountId); + if (!voicemailInfo.hasPhoneAccountId()) { + contentValues.put(Voicemails.PHONE_ACCOUNT_ID, voicemailInfo.getPhoneAccountId()); } - if (!voicemailInfo.sourceData.isEmpty()) { - contentValues.put(Voicemails.SOURCE_DATA, voicemailInfo.sourceData); + if (!voicemailInfo.hasSourceData()) { + contentValues.put(Voicemails.SOURCE_DATA, voicemailInfo.getSourceData()); } - if (!voicemailInfo.sourcePackage.isEmpty()) { - contentValues.put(Voicemails.SOURCE_PACKAGE, voicemailInfo.sourcePackage); + if (!voicemailInfo.hasSourcePackage()) { + contentValues.put(Voicemails.SOURCE_PACKAGE, voicemailInfo.getSourcePackage()); } - if (!voicemailInfo.transcription.isEmpty()) { - contentValues.put(Voicemails.TRANSCRIPTION, voicemailInfo.transcription); + if (!voicemailInfo.hasTranscription()) { + contentValues.put(Voicemails.TRANSCRIPTION, voicemailInfo.getTranscription()); } contentValues.put(VoicemailContract.Voicemails.HAS_CONTENT, 1); contentValues.put(RESTORED_COLUMN, "1"); @@ -257,7 +254,7 @@ public class DialerBackupUtils { "DialerBackupUtils.convertVoicemailProtoFileToContentValueAndEncodedAudio", "cv: " + contentValues); - return Pair.create(contentValues, voicemailInfo.encodedVoicemailKey); + return Pair.create(contentValues, voicemailInfo.getEncodedVoicemailKey().toByteArray()); } } @@ -276,7 +273,7 @@ public class DialerBackupUtils { } if (ConfigProviderBindings.get(context) .getBoolean("voicemail_restore_check_archive_for_source_package", true)) { - if ("1".equals(voicemailInfo.archived)) { + if ("1".equals(voicemailInfo.getArchived())) { LogUtil.i( "DialerBackupUtils.getSourcePackage", "voicemail was archived, using app source package"); @@ -312,7 +309,9 @@ public class DialerBackupUtils { String.format( "(%s = ? AND %s = ? AND %s = ?)", Voicemails.NUMBER, Voicemails.DATE, Voicemails.DURATION), - new String[] {voicemailInfo.number, voicemailInfo.date, voicemailInfo.duration}, + new String[] { + voicemailInfo.getNumber(), voicemailInfo.getDate(), voicemailInfo.getDuration() + }, null, null)) { if (cursor.moveToFirst() diff --git a/java/com/android/dialer/backup/nano/VoicemailInfo.java b/java/com/android/dialer/backup/nano/VoicemailInfo.java deleted file mode 100644 index f11595ec2..000000000 --- a/java/com/android/dialer/backup/nano/VoicemailInfo.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * 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. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.android.dialer.backup.nano; - -/** This file is autogenerated, but javadoc required. */ -@SuppressWarnings("hiding") -public final class VoicemailInfo - extends com.google.protobuf.nano.ExtendableMessageNano { - - private static volatile VoicemailInfo[] _emptyArray; - - public static VoicemailInfo[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new VoicemailInfo[0]; - } - } - } - return _emptyArray; - } - - // optional string date = 1; - public java.lang.String date; - - // optional string deleted = 2; - public java.lang.String deleted; - - // optional string dirty = 3; - public java.lang.String dirty; - - // optional string dir_type = 4; - public java.lang.String dirType; - - // optional string duration = 5; - public java.lang.String duration; - - // optional string has_content = 6; - public java.lang.String hasContent; - - // optional string is_read = 7; - public java.lang.String isRead; - - // optional string item_type = 8; - public java.lang.String itemType; - - // optional string last_modified = 9; - public java.lang.String lastModified; - - // optional string mime_type = 10; - public java.lang.String mimeType; - - // optional string number = 11; - public java.lang.String number; - - // optional string phone_account_component_name = 12; - public java.lang.String phoneAccountComponentName; - - // optional string phone_account_id = 13; - public java.lang.String phoneAccountId; - - // optional string source_data = 14; - public java.lang.String sourceData; - - // optional string source_package = 15; - public java.lang.String sourcePackage; - - // optional string transcription = 16; - public java.lang.String transcription; - - // optional string voicemail_uri = 17; - public java.lang.String voicemailUri; - - // optional bytes encoded_voicemail_key = 18; - public byte[] encodedVoicemailKey; - - // optional string archived = 19; - public java.lang.String archived; - - // @@protoc_insertion_point(class_scope:com.android.dialer.backup.VoicemailInfo) - - public VoicemailInfo() { - clear(); - } - - public VoicemailInfo clear() { - date = ""; - deleted = ""; - dirty = ""; - dirType = ""; - duration = ""; - hasContent = ""; - isRead = ""; - itemType = ""; - lastModified = ""; - mimeType = ""; - number = ""; - phoneAccountComponentName = ""; - phoneAccountId = ""; - sourceData = ""; - sourcePackage = ""; - transcription = ""; - voicemailUri = ""; - encodedVoicemailKey = com.google.protobuf.nano.WireFormatNano.EMPTY_BYTES; - archived = ""; - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.date != null && !this.date.equals("")) { - output.writeString(1, this.date); - } - if (this.deleted != null && !this.deleted.equals("")) { - output.writeString(2, this.deleted); - } - if (this.dirty != null && !this.dirty.equals("")) { - output.writeString(3, this.dirty); - } - if (this.dirType != null && !this.dirType.equals("")) { - output.writeString(4, this.dirType); - } - if (this.duration != null && !this.duration.equals("")) { - output.writeString(5, this.duration); - } - if (this.hasContent != null && !this.hasContent.equals("")) { - output.writeString(6, this.hasContent); - } - if (this.isRead != null && !this.isRead.equals("")) { - output.writeString(7, this.isRead); - } - if (this.itemType != null && !this.itemType.equals("")) { - output.writeString(8, this.itemType); - } - if (this.lastModified != null && !this.lastModified.equals("")) { - output.writeString(9, this.lastModified); - } - if (this.mimeType != null && !this.mimeType.equals("")) { - output.writeString(10, this.mimeType); - } - if (this.number != null && !this.number.equals("")) { - output.writeString(11, this.number); - } - if (this.phoneAccountComponentName != null && !this.phoneAccountComponentName.equals("")) { - output.writeString(12, this.phoneAccountComponentName); - } - if (this.phoneAccountId != null && !this.phoneAccountId.equals("")) { - output.writeString(13, this.phoneAccountId); - } - if (this.sourceData != null && !this.sourceData.equals("")) { - output.writeString(14, this.sourceData); - } - if (this.sourcePackage != null && !this.sourcePackage.equals("")) { - output.writeString(15, this.sourcePackage); - } - if (this.transcription != null && !this.transcription.equals("")) { - output.writeString(16, this.transcription); - } - if (this.voicemailUri != null && !this.voicemailUri.equals("")) { - output.writeString(17, this.voicemailUri); - } - if (!java.util.Arrays.equals( - this.encodedVoicemailKey, com.google.protobuf.nano.WireFormatNano.EMPTY_BYTES)) { - output.writeBytes(18, this.encodedVoicemailKey); - } - if (this.archived != null && !this.archived.equals("")) { - output.writeString(19, this.archived); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.date != null && !this.date.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(1, this.date); - } - if (this.deleted != null && !this.deleted.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(2, this.deleted); - } - if (this.dirty != null && !this.dirty.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(3, this.dirty); - } - if (this.dirType != null && !this.dirType.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(4, this.dirType); - } - if (this.duration != null && !this.duration.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(5, this.duration); - } - if (this.hasContent != null && !this.hasContent.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(6, this.hasContent); - } - if (this.isRead != null && !this.isRead.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(7, this.isRead); - } - if (this.itemType != null && !this.itemType.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(8, this.itemType); - } - if (this.lastModified != null && !this.lastModified.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 9, this.lastModified); - } - if (this.mimeType != null && !this.mimeType.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(10, this.mimeType); - } - if (this.number != null && !this.number.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(11, this.number); - } - if (this.phoneAccountComponentName != null && !this.phoneAccountComponentName.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 12, this.phoneAccountComponentName); - } - if (this.phoneAccountId != null && !this.phoneAccountId.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 13, this.phoneAccountId); - } - if (this.sourceData != null && !this.sourceData.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(14, this.sourceData); - } - if (this.sourcePackage != null && !this.sourcePackage.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 15, this.sourcePackage); - } - if (this.transcription != null && !this.transcription.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 16, this.transcription); - } - if (this.voicemailUri != null && !this.voicemailUri.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 17, this.voicemailUri); - } - if (!java.util.Arrays.equals( - this.encodedVoicemailKey, com.google.protobuf.nano.WireFormatNano.EMPTY_BYTES)) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeBytesSize( - 18, this.encodedVoicemailKey); - } - if (this.archived != null && !this.archived.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(19, this.archived); - } - return size; - } - - @Override - public VoicemailInfo mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - case 10: - { - this.date = input.readString(); - break; - } - case 18: - { - this.deleted = input.readString(); - break; - } - case 26: - { - this.dirty = input.readString(); - break; - } - case 34: - { - this.dirType = input.readString(); - break; - } - case 42: - { - this.duration = input.readString(); - break; - } - case 50: - { - this.hasContent = input.readString(); - break; - } - case 58: - { - this.isRead = input.readString(); - break; - } - case 66: - { - this.itemType = input.readString(); - break; - } - case 74: - { - this.lastModified = input.readString(); - break; - } - case 82: - { - this.mimeType = input.readString(); - break; - } - case 90: - { - this.number = input.readString(); - break; - } - case 98: - { - this.phoneAccountComponentName = input.readString(); - break; - } - case 106: - { - this.phoneAccountId = input.readString(); - break; - } - case 114: - { - this.sourceData = input.readString(); - break; - } - case 122: - { - this.sourcePackage = input.readString(); - break; - } - case 130: - { - this.transcription = input.readString(); - break; - } - case 138: - { - this.voicemailUri = input.readString(); - break; - } - case 146: - { - this.encodedVoicemailKey = input.readBytes(); - break; - } - case 154: - { - this.archived = input.readString(); - break; - } - } - } - } - - public static VoicemailInfo parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new VoicemailInfo(), data); - } - - public static VoicemailInfo parseFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - return new VoicemailInfo().mergeFrom(input); - } -} diff --git a/java/com/android/dialer/backup/proto/voicemail_info.proto b/java/com/android/dialer/backup/proto/voicemail_info.proto new file mode 100644 index 000000000..b74cce954 --- /dev/null +++ b/java/com/android/dialer/backup/proto/voicemail_info.proto @@ -0,0 +1,30 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.backup"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + +package com.android.dialer.backup; + +// Next id: 20 +message VoicemailInfo { + optional string date = 1; + optional string deleted = 2; + optional string dirty = 3; + optional string dir_type = 4; + optional string duration = 5; + optional string has_content = 6; + optional string is_read = 7; + optional string item_type = 8; + optional string last_modified = 9; + optional string mime_type = 10; + optional string number = 11; + optional string phone_account_component_name = 12; + optional string phone_account_id = 13; + optional string source_data = 14; + optional string source_package = 15; + optional string transcription = 16; + optional string voicemail_uri = 17; + optional bytes encoded_voicemail_key = 18; + optional string archived = 19; +} diff --git a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java index 3a2f3cf9a..595401c70 100644 --- a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java +++ b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java @@ -17,6 +17,7 @@ package com.android.dialer.binary.aosp; import com.android.dialer.binary.basecomponent.BaseDialerRootComponent; +import com.android.dialer.calllog.CallLogModule; import com.android.dialer.enrichedcall.stub.StubEnrichedCallModule; import com.android.dialer.inject.ContextModule; import com.android.dialer.lightbringer.stub.StubLightbringerModule; @@ -31,6 +32,7 @@ import javax.inject.Singleton; @Singleton @Component( modules = { + CallLogModule.class, ContextModule.class, SimulatorModule.class, StubCallLocationModule.class, diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java index e8962c248..2deb7fdc4 100644 --- a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java +++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java @@ -16,6 +16,7 @@ package com.android.dialer.binary.basecomponent; +import com.android.dialer.calllog.CallLogComponent; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.lightbringer.LightbringerComponent; import com.android.dialer.simulator.SimulatorComponent; @@ -24,11 +25,12 @@ import com.android.incallui.maps.MapsComponent; import com.android.voicemail.VoicemailComponent; /** - * Base class for the core application-wide {@link Component}. All variants of the Dialer app should - * extend from this component. + * Base class for the core application-wide component. All variants of the Dialer app should extend + * from this component. */ public interface BaseDialerRootComponent extends CallLocationComponent.HasComponent, + CallLogComponent.HasComponent, EnrichedCallComponent.HasComponent, MapsComponent.HasComponent, SimulatorComponent.HasComponent, diff --git a/java/com/android/dialer/binary/common/DialerApplication.java b/java/com/android/dialer/binary/common/DialerApplication.java index 352c4eba9..b4ee75cd4 100644 --- a/java/com/android/dialer/binary/common/DialerApplication.java +++ b/java/com/android/dialer/binary/common/DialerApplication.java @@ -23,6 +23,7 @@ import android.support.annotation.NonNull; import com.android.dialer.blocking.BlockedNumbersAutoMigrator; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; import com.android.dialer.buildtype.BuildType; +import com.android.dialer.calllog.CallLogComponent; import com.android.dialer.common.concurrent.DefaultDialerExecutorFactory; import com.android.dialer.inject.HasRootComponent; import com.android.dialer.persistentlog.PersistentLogger; @@ -44,6 +45,7 @@ public abstract class DialerApplication extends Application implements HasRootCo new FilteredNumberAsyncQueryHandler(this), new DefaultDialerExecutorFactory()) .asyncAutoMigrate(); + CallLogComponent.get(this).callLogFramework().registerContentObservers(getApplicationContext()); PersistentLogger.initialize(this); Trace.endSection(); } diff --git a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java index c405b2fe7..7ef77c4b6 100644 --- a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java +++ b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java @@ -33,8 +33,8 @@ import android.widget.Toast; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnBlockNumberListener; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnUnblockNumberListener; +import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.InteractionEvent; import com.android.dialer.voicemailstatus.VisualVoicemailEnabledChecker; /** diff --git a/java/com/android/dialer/blocking/FilteredNumbersUtil.java b/java/com/android/dialer/blocking/FilteredNumbersUtil.java index 8908238ea..cbef73ca5 100644 --- a/java/com/android/dialer/blocking/FilteredNumbersUtil.java +++ b/java/com/android/dialer/blocking/FilteredNumbersUtil.java @@ -34,8 +34,8 @@ import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnHasBlockedN import com.android.dialer.common.LogUtil; import com.android.dialer.database.FilteredNumberContract.FilteredNumber; import com.android.dialer.database.FilteredNumberContract.FilteredNumberColumns; +import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.InteractionEvent; import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.notification.NotificationChannelManager.Channel; import com.android.dialer.util.PermissionsUtil; diff --git a/java/com/android/dialer/blocking/res/drawable-hdpi/ic_block_24dp.png b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_block_24dp.png new file mode 100644 index 000000000..2ccc89d24 Binary files /dev/null and b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_block_24dp.png differ diff --git a/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_24dp.png b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_24dp.png new file mode 100644 index 000000000..dc0c995c1 Binary files /dev/null and b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_24dp.png differ diff --git a/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_white_36dp.png b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_white_36dp.png new file mode 100644 index 000000000..919a872e0 Binary files /dev/null and b/java/com/android/dialer/blocking/res/drawable-hdpi/ic_report_white_36dp.png differ diff --git a/java/com/android/dialer/blocking/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/blocking/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..238dde0bf --- /dev/null +++ b/java/com/android/dialer/blocking/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,46 @@ + + + + + "Novo, jednostavnije blokiranje" + "Telefon treba da promeni način na koji blokiranje funkcioniše da bi vam pružio bolju zaštitu. Sa blokiranih brojeva više nećete primati ni pozive ni SMS-ove, ali možete da ih delite sa drugim aplikacijama." + "Dozvoli" + "Želite li da blokirate %1$s?" + "Pozivi sa ovog broja će biti blokirani i poruke govorne pošte će se automatski brisati." + "Pozivi sa ovog broja će biti blokirani, ali pozivalac i dalje može da vam ostavlja poruke govorne pošte." + "Više nećete primati pozive ni SMS-ove sa ovog broja." + "BLOKIRAJ" + "Želite li da deblokirate %1$s?" + "DEBLOKIRAJ" + "%1$s je nevažeći." + "%1$s je blokiran" + "%1$s je deblokiran" + "OPOZOVI" + "Uvoz nije uspeo" + "Blokiranje poziva je onemogućeno na 48 sati" + "Onemogućeno je zato što je upućen hitan poziv." + "Želite li da blokirate %1$s?" + "Više nećete primati pozive sa ovog broja." + "%1$s Prijavićemo ovaj poziv kao nepoželjan." + "Deblokiraćemo broj i prijaviti da nije nepoželjan. Budući pozivi neće biti označavani kao nepoželjni." + "Želite li da deblokirate %1$s?" + "Prijavi" + "Želite da prijavite grešku?" + "Budući pozivi sa %1$s više neće biti označavani kao nepoželjni." + "Prijavi poziv kao nepoželjan" + diff --git a/java/com/android/dialer/callcomposer/CallComposerActivity.java b/java/com/android/dialer/callcomposer/CallComposerActivity.java index 3c0beb101..e8ca72e97 100644 --- a/java/com/android/dialer/callcomposer/CallComposerActivity.java +++ b/java/com/android/dialer/callcomposer/CallComposerActivity.java @@ -25,7 +25,6 @@ import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.net.Uri; -import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.content.ContextCompat; @@ -50,28 +49,25 @@ import android.widget.RelativeLayout; import android.widget.TextView; import com.android.contacts.common.ContactPhotoManager; import com.android.dialer.callcomposer.CallComposerFragment.CallComposerListener; -import com.android.dialer.callcomposer.nano.CallComposerContact; -import com.android.dialer.callcomposer.util.CopyAndResizeImageTask; -import com.android.dialer.callcomposer.util.CopyAndResizeImageTask.Callback; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; -import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.UiUtil; +import com.android.dialer.common.concurrent.DialerExecutors; import com.android.dialer.constants.Constants; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.enrichedcall.EnrichedCallManager.State; import com.android.dialer.enrichedcall.Session; import com.android.dialer.enrichedcall.extensions.StateExtension; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.multimedia.MultimediaData; -import com.android.dialer.protos.ProtoParsers; import com.android.dialer.telecom.TelecomUtil; import com.android.dialer.util.ViewUtil; import com.android.dialer.widget.DialerToolbar; -import com.google.protobuf.nano.InvalidProtocolBufferNanoException; +import com.google.protobuf.InvalidProtocolBufferException; import java.io.File; /** @@ -133,7 +129,7 @@ public class CallComposerActivity extends AppCompatActivity public static Intent newIntent(Context context, CallComposerContact contact) { Intent intent = new Intent(context, CallComposerActivity.class); - ProtoParsers.put(intent, ARG_CALL_COMPOSER_CONTACT, contact); + intent.putExtra(ARG_CALL_COMPOSER_CONTACT, contact.toByteArray()); return intent; } @@ -195,7 +191,7 @@ public class CallComposerActivity extends AppCompatActivity runEntranceAnimation(); }); - setMediaIconSelected(0); + setMediaIconSelected(currentIndex); } @Override @@ -204,11 +200,11 @@ public class CallComposerActivity extends AppCompatActivity getEnrichedCallManager().registerStateChangedListener(this); if (sessionId == Session.NO_SESSION_ID) { LogUtil.i("CallComposerActivity.onResume", "creating new session"); - sessionId = getEnrichedCallManager().startCallComposerSession(contact.number); + sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); } else if (getEnrichedCallManager().getSession(sessionId) == null) { LogUtil.i( "CallComposerActivity.onResume", "session closed while activity paused, creating new"); - sessionId = getEnrichedCallManager().startCallComposerSession(contact.number); + sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); } else { LogUtil.i("CallComposerActivity.onResume", "session still open, using old"); } @@ -294,29 +290,28 @@ public class CallComposerActivity extends AppCompatActivity GalleryComposerFragment galleryComposerFragment = (GalleryComposerFragment) fragment; // If the current data is not a copy, make one. if (!galleryComposerFragment.selectedDataIsCopy()) { - new CopyAndResizeImageTask( - CallComposerActivity.this, - galleryComposerFragment.getGalleryData().getFileUri(), - new Callback() { - @Override - public void onCopySuccessful(File file, String mimeType) { - Uri shareableUri = - FileProvider.getUriForFile( - CallComposerActivity.this, - Constants.get().getFileProviderAuthority(), - file); - - builder.setImage(grantUriPermission(shareableUri), mimeType); - placeRCSCall(builder); - } - - @Override - public void onCopyFailed(Throwable throwable) { - // TODO(b/34279096) - gracefully handle message failure - LogUtil.e("CallComposerActivity.onCopyFailed", "copy Failed", throwable); - } + DialerExecutors.createUiTaskBuilder( + getFragmentManager(), + "copyAndResizeImageToSend", + new CopyAndResizeImageWorker(this.getApplicationContext())) + .onSuccess( + output -> { + Uri shareableUri = + FileProvider.getUriForFile( + CallComposerActivity.this, + Constants.get().getFileProviderAuthority(), + output.first); + + builder.setImage(grantUriPermission(shareableUri), output.second); + placeRCSCall(builder); + }) + .onFailure( + throwable -> { + // TODO(b/34279096) - gracefully handle message failure + LogUtil.e("CallComposerActivity.onCopyFailed", "copy Failed", throwable); }) - .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + .build() + .executeParallel(galleryComposerFragment.getGalleryData().getFileUri()); } else { Uri shareableUri = FileProvider.getUriForFile( @@ -355,7 +350,8 @@ public class CallComposerActivity extends AppCompatActivity Logger.get(this).logImpression(DialerImpression.Type.CALL_COMPOSER_ACTIVITY_PLACE_RCS_CALL); getEnrichedCallManager().sendCallComposerData(sessionId, builder.build()); TelecomUtil.placeCall( - this, new CallIntentBuilder(contact.number, CallInitiationType.Type.CALL_COMPOSER).build()); + this, + new CallIntentBuilder(contact.getNumber(), CallInitiationType.Type.CALL_COMPOSER).build()); setResult(RESULT_OK); finish(); } @@ -461,13 +457,15 @@ public class CallComposerActivity extends AppCompatActivity byte[] bytes = Base64.decode(arguments.getString(ARG_CALL_COMPOSER_CONTACT), Base64.DEFAULT); try { contact = CallComposerContact.parseFrom(bytes); - } catch (InvalidProtocolBufferNanoException e) { + } catch (InvalidProtocolBufferException e) { Assert.fail(e.toString()); } } else { - contact = - ProtoParsers.getFromInstanceState( - arguments, ARG_CALL_COMPOSER_CONTACT, new CallComposerContact()); + try { + contact = CallComposerContact.parseFrom(arguments.getByteArray(ARG_CALL_COMPOSER_CONTACT)); + } catch (InvalidProtocolBufferException e) { + throw Assert.createIllegalStateFailException(e.toString()); + } } updateContactInfo(); } @@ -480,22 +478,24 @@ public class CallComposerActivity extends AppCompatActivity /** Populates the contact info fields based on the current contact information. */ private void updateContactInfo() { ContactPhotoManager.getInstance(this) - .loadDialerThumbnail( + .loadDialerThumbnailOrPhoto( contactPhoto, - contact.contactUri == null ? null : Uri.parse(contact.contactUri), - contact.photoId, - contact.nameOrNumber, - contact.contactType); - - nameView.setText(contact.nameOrNumber); - toolbar.setTitle(contact.nameOrNumber); - if (!TextUtils.isEmpty(contact.numberLabel) && !TextUtils.isEmpty(contact.displayNumber)) { + contact.hasContactUri() ? Uri.parse(contact.getContactUri()) : null, + contact.getPhotoId(), + contact.hasPhotoUri() ? Uri.parse(contact.getPhotoUri()) : null, + contact.getNameOrNumber(), + contact.getContactType()); + + nameView.setText(contact.getNameOrNumber()); + toolbar.setTitle(contact.getNameOrNumber()); + if (!TextUtils.isEmpty(contact.getNumberLabel()) + && !TextUtils.isEmpty(contact.getDisplayNumber())) { numberView.setVisibility(View.VISIBLE); String secondaryInfo = getString( com.android.contacts.common.R.string.call_subject_type_and_number, - contact.numberLabel, - contact.displayNumber); + contact.getNumberLabel(), + contact.getDisplayNumber()); numberView.setText(secondaryInfo); toolbar.setSubtitle(secondaryInfo); } else { @@ -663,7 +663,8 @@ public class CallComposerActivity extends AppCompatActivity } private void setFailedResultAndFinish() { - setResult(RESULT_FIRST_USER, new Intent().putExtra(KEY_CONTACT_NAME, contact.nameOrNumber)); + setResult( + RESULT_FIRST_USER, new Intent().putExtra(KEY_CONTACT_NAME, contact.getNameOrNumber())); finish(); } diff --git a/java/com/android/dialer/callcomposer/CameraComposerFragment.java b/java/com/android/dialer/callcomposer/CameraComposerFragment.java index ceefc068e..f65207fa3 100644 --- a/java/com/android/dialer/callcomposer/CameraComposerFragment.java +++ b/java/com/android/dialer/callcomposer/CameraComposerFragment.java @@ -48,8 +48,8 @@ import com.android.dialer.callcomposer.camera.camerafocus.RenderOverlay; import com.android.dialer.callcomposer.cameraui.CameraMediaChooserView; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.util.PermissionsUtil; /** Fragment used to compose call with image from the user's camera. */ diff --git a/java/com/android/dialer/callcomposer/CopyAndResizeImageWorker.java b/java/com/android/dialer/callcomposer/CopyAndResizeImageWorker.java new file mode 100644 index 000000000..aeb8e0388 --- /dev/null +++ b/java/com/android/dialer/callcomposer/CopyAndResizeImageWorker.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2016 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.callcomposer; + +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Bitmap.CompressFormat; +import android.graphics.BitmapFactory; +import android.net.Uri; +import android.os.Build.VERSION_CODES; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v4.util.Pair; +import com.android.dialer.callcomposer.util.BitmapResizer; +import com.android.dialer.common.Assert; +import com.android.dialer.common.concurrent.DialerExecutor.Worker; +import com.android.dialer.util.DialerUtils; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; + +/** Task for copying and resizing images to be shared with RCS process. */ +@TargetApi(VERSION_CODES.M) +class CopyAndResizeImageWorker implements Worker> { + private static final String MIME_TYPE = "image/jpeg"; + + private final Context context; + + CopyAndResizeImageWorker(@NonNull Context context) { + this.context = Assert.isNotNull(context); + } + + /** + * @param input The input Uri is expected to be a image openable by {@link + * android.content.ContentResolver#openInputStream(Uri)}. + * @return a Pair where the File contains the resized image, and the String is the result File's + * MIME type. + */ + @Nullable + @Override + public Pair doInBackground(@Nullable Uri input) throws Throwable { + try (InputStream inputStream = context.getContentResolver().openInputStream(input)) { + Bitmap bitmap = BitmapFactory.decodeStream(inputStream); + bitmap = BitmapResizer.resizeForEnrichedCalling(bitmap); + + File outputFile = DialerUtils.createShareableFile(context); + try (OutputStream outputStream = new FileOutputStream(outputFile)) { + // Encode images to jpeg as it is better for camera pictures which we expect to be sending + bitmap.compress(CompressFormat.JPEG, 80, outputStream); + return new Pair<>(outputFile, MIME_TYPE); + } + } + } +} diff --git a/java/com/android/dialer/callcomposer/GalleryComposerFragment.java b/java/com/android/dialer/callcomposer/GalleryComposerFragment.java index 1d684a2d3..01e067440 100644 --- a/java/com/android/dialer/callcomposer/GalleryComposerFragment.java +++ b/java/com/android/dialer/callcomposer/GalleryComposerFragment.java @@ -28,6 +28,7 @@ import android.os.Parcelable; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.annotation.VisibleForTesting; import android.support.v4.app.LoaderManager.LoaderCallbacks; import android.support.v4.content.ContextCompat; import android.support.v4.content.CursorLoader; @@ -39,13 +40,14 @@ import android.view.ViewGroup; import android.widget.GridView; import android.widget.ImageView; import android.widget.TextView; -import com.android.dialer.callcomposer.util.CopyAndResizeImageTask; -import com.android.dialer.callcomposer.util.CopyAndResizeImageTask.Callback; +import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.common.concurrent.DefaultDialerExecutorFactory; +import com.android.dialer.common.concurrent.DialerExecutor; +import com.android.dialer.common.concurrent.DialerExecutorFactory; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.util.PermissionsUtil; -import java.io.File; import java.util.ArrayList; import java.util.List; @@ -60,6 +62,8 @@ public class GalleryComposerFragment extends CallComposerFragment private static final int RESULT_LOAD_IMAGE = 1; private static final int RESULT_OPEN_SETTINGS = 2; + private DialerExecutorFactory executorFactory = new DefaultDialerExecutorFactory(); + private GalleryGridAdapter adapter; private GridView galleryGridView; private View permissionView; @@ -71,10 +75,17 @@ public class GalleryComposerFragment extends CallComposerFragment private boolean selectedDataIsCopy; private List insertedImages = new ArrayList<>(); + private DialerExecutor copyAndResizeImage; + public static GalleryComposerFragment newInstance() { return new GalleryComposerFragment(); } + @VisibleForTesting + void setExecutorFactory(@NonNull DialerExecutorFactory executorFactory) { + this.executorFactory = Assert.isNotNull(executorFactory); + } + @Nullable @Override public View onCreateView( @@ -107,6 +118,32 @@ public class GalleryComposerFragment extends CallComposerFragment return view; } + @Override + public void onActivityCreated(@Nullable Bundle bundle) { + super.onActivityCreated(bundle); + + copyAndResizeImage = + executorFactory + .createUiTaskBuilder( + getActivity().getFragmentManager(), + "copyAndResizeImage", + new CopyAndResizeImageWorker(getActivity().getApplicationContext())) + .onSuccess( + output -> { + GalleryGridItemData data1 = + adapter.insertEntry(output.first.getAbsolutePath(), output.second); + insertedImages.add(0, data1); + setSelected(data1, true); + }) + .onFailure( + throwable -> { + // TODO(b/34279096) - gracefully handle message failure + LogUtil.e( + "GalleryComposerFragment.onFailure", "data preparation failed", throwable); + }) + .build(); + } + private void setupGallery() { adapter = new GalleryGridAdapter(getContext(), null, this); galleryGridView.setAdapter(adapter); @@ -264,25 +301,7 @@ public class GalleryComposerFragment extends CallComposerFragment // This should never happen, but just in case.. // Guard against null uri cases for when the activity returns a null/invalid intent. if (url != null) { - new CopyAndResizeImageTask( - getContext(), - Uri.parse(url), - new Callback() { - @Override - public void onCopySuccessful(File file, String mimeType) { - GalleryGridItemData data = adapter.insertEntry(file.getAbsolutePath(), mimeType); - insertedImages.add(0, data); - setSelected(data, true); - } - - @Override - public void onCopyFailed(Throwable throwable) { - // TODO(b/34279096) - gracefully handle message failure - LogUtil.e( - "GalleryComposerFragment.onFailure", "Data preparation failed", throwable); - } - }) - .execute(); + copyAndResizeImage.executeParallel(Uri.parse(url)); } else { // TODO(b/34279096) - gracefully handle message failure } diff --git a/java/com/android/dialer/callcomposer/camera/ImagePersistTask.java b/java/com/android/dialer/callcomposer/camera/ImagePersistTask.java index 80921cdd8..31751e536 100644 --- a/java/com/android/dialer/callcomposer/camera/ImagePersistTask.java +++ b/java/com/android/dialer/callcomposer/camera/ImagePersistTask.java @@ -27,7 +27,7 @@ import android.os.Build.VERSION_CODES; import android.support.v4.content.FileProvider; import com.android.dialer.callcomposer.camera.exif.ExifInterface; import com.android.dialer.callcomposer.camera.exif.ExifTag; -import com.android.dialer.callcomposer.util.CopyAndResizeImageTask; +import com.android.dialer.callcomposer.util.BitmapResizer; import com.android.dialer.common.Assert; import com.android.dialer.common.concurrent.FallibleAsyncTask; import com.android.dialer.constants.Constants; @@ -75,7 +75,7 @@ public class ImagePersistTask extends FallibleAsyncTask { writeClippedBitmap(outputStream); } else { Bitmap bitmap = BitmapFactory.decodeByteArray(mBytes, 0, mBytes.length); - bitmap = CopyAndResizeImageTask.resizeForEnrichedCalling(bitmap); + bitmap = BitmapResizer.resizeForEnrichedCalling(bitmap); bitmap.compress(Bitmap.CompressFormat.JPEG, 90, outputStream); } } @@ -131,7 +131,7 @@ public class ImagePersistTask extends FallibleAsyncTask { matrix.postTranslate(-offsetLeft, -offsetTop); clippedBitmapCanvas.drawBitmap(bitmap, matrix, null /* paint */); clippedBitmapCanvas.save(); - clippedBitmap = CopyAndResizeImageTask.resizeForEnrichedCalling(clippedBitmap); + clippedBitmap = BitmapResizer.resizeForEnrichedCalling(clippedBitmap); // EXIF data can take a big chunk of the file size and is often cleared by the // carrier, only store orientation since that's critical final ExifTag orientationTag = exifInterface.getTag(ExifInterface.TAG_ORIENTATION); diff --git a/java/com/android/dialer/callcomposer/cameraui/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/callcomposer/cameraui/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..aad8d9dd8 --- /dev/null +++ b/java/com/android/dialer/callcomposer/cameraui/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,11 @@ + + + "Pređite na prikaz kamere preko celog ekrana" + "Dugme sad aktivira prednju kameru" + "Dugme sad aktivira zadnju kameru" + "Zaustavite snimanje videa" + "Koristimo prednju kameru" + "Koristimo zadnju kameru" + "Snimite sliku" + diff --git a/java/com/android/dialer/callcomposer/nano/CallComposerContact.java b/java/com/android/dialer/callcomposer/nano/CallComposerContact.java deleted file mode 100644 index dcda571e2..000000000 --- a/java/com/android/dialer/callcomposer/nano/CallComposerContact.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.android.dialer.callcomposer.nano; - -/** This file is autogenerated, but javadoc required. */ -@SuppressWarnings("hiding") -public final class CallComposerContact - extends com.google.protobuf.nano.ExtendableMessageNano { - - private static volatile CallComposerContact[] _emptyArray; - public static CallComposerContact[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new CallComposerContact[0]; - } - } - } - return _emptyArray; - } - - // optional fixed64 photo_id = 1; - public long photoId; - - // optional string photo_uri = 2; - public java.lang.String photoUri; - - // optional string contact_uri = 3; - public java.lang.String contactUri; - - // optional string name_or_number = 4; - public java.lang.String nameOrNumber; - - // optional string number = 6; - public java.lang.String number; - - // optional string display_number = 7; - public java.lang.String displayNumber; - - // optional string number_label = 8; - public java.lang.String numberLabel; - - // optional int32 contact_type = 9; - public int contactType; - - // @@protoc_insertion_point(class_scope:com.android.dialer.callcomposer.CallComposerContact) - - public CallComposerContact() { - clear(); - } - - public CallComposerContact clear() { - photoId = 0L; - photoUri = ""; - contactUri = ""; - nameOrNumber = ""; - number = ""; - displayNumber = ""; - numberLabel = ""; - contactType = 0; - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.photoId != 0L) { - output.writeFixed64(1, this.photoId); - } - if (this.photoUri != null && !this.photoUri.equals("")) { - output.writeString(2, this.photoUri); - } - if (this.contactUri != null && !this.contactUri.equals("")) { - output.writeString(3, this.contactUri); - } - if (this.nameOrNumber != null && !this.nameOrNumber.equals("")) { - output.writeString(4, this.nameOrNumber); - } - if (this.number != null && !this.number.equals("")) { - output.writeString(6, this.number); - } - if (this.displayNumber != null && !this.displayNumber.equals("")) { - output.writeString(7, this.displayNumber); - } - if (this.numberLabel != null && !this.numberLabel.equals("")) { - output.writeString(8, this.numberLabel); - } - if (this.contactType != 0) { - output.writeInt32(9, this.contactType); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.photoId != 0L) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeFixed64Size(1, this.photoId); - } - if (this.photoUri != null && !this.photoUri.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(2, this.photoUri); - } - if (this.contactUri != null && !this.contactUri.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(3, this.contactUri); - } - if (this.nameOrNumber != null && !this.nameOrNumber.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 4, this.nameOrNumber); - } - if (this.number != null && !this.number.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(6, this.number); - } - if (this.displayNumber != null && !this.displayNumber.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize( - 7, this.displayNumber); - } - if (this.numberLabel != null && !this.numberLabel.equals("")) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeStringSize(8, this.numberLabel); - } - if (this.contactType != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size(9, this.contactType); - } - return size; - } - - @Override - public CallComposerContact mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - case 9: - { - this.photoId = input.readFixed64(); - break; - } - case 18: - { - this.photoUri = input.readString(); - break; - } - case 26: - { - this.contactUri = input.readString(); - break; - } - case 34: - { - this.nameOrNumber = input.readString(); - break; - } - case 50: - { - this.number = input.readString(); - break; - } - case 58: - { - this.displayNumber = input.readString(); - break; - } - case 66: - { - this.numberLabel = input.readString(); - break; - } - case 72: - { - this.contactType = input.readInt32(); - break; - } - } - } - } - - public static CallComposerContact parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new CallComposerContact(), data); - } - - public static CallComposerContact parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { - return new CallComposerContact().mergeFrom(input); - } -} diff --git a/java/com/android/dialer/callcomposer/proto/call_composer_contact.proto b/java/com/android/dialer/callcomposer/proto/call_composer_contact.proto new file mode 100644 index 000000000..99766aac5 --- /dev/null +++ b/java/com/android/dialer/callcomposer/proto/call_composer_contact.proto @@ -0,0 +1,18 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.callcomposer"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + +package com.android.dialer.callcomposer; + +message CallComposerContact { + optional fixed64 photo_id = 1; + optional string photo_uri = 2; + optional string contact_uri = 3; + optional string name_or_number = 4; + optional string number = 6; + optional string display_number = 7; + optional string number_label = 8; + optional int32 contact_type = 9; +} diff --git a/java/com/android/dialer/callcomposer/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/callcomposer/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..c357d506f --- /dev/null +++ b/java/com/android/dialer/callcomposer/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,33 @@ + + + + + "Hitno je! Javi se!" + "Želiš da ćaskaš?" + "Kratko pitanje…" + "Napišite prilagođenu poruku" + "Pošalji i pozovi" + "Deli i pozovi" + "slika, %1$tB %1$te %1$tY %1$tl %1$tM %1$tp" + "slika" + "Slikajte" + "Učitavanje slike sa kamere nije uspelo" + "Dozvoli" + "Odobrite pristup Kameri da biste snimili sliku" + "Odobrite pristup Medijima da biste delili sliku" + diff --git a/java/com/android/dialer/callcomposer/util/BitmapResizer.java b/java/com/android/dialer/callcomposer/util/BitmapResizer.java new file mode 100644 index 000000000..658462def --- /dev/null +++ b/java/com/android/dialer/callcomposer/util/BitmapResizer.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.callcomposer.util; + +import android.graphics.Bitmap; +import android.support.annotation.VisibleForTesting; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; + +/** Utility class for resizing images before sending them as enriched call attachments. */ +public final class BitmapResizer { + @VisibleForTesting static final int MAX_OUTPUT_RESOLUTION = 640; + + /** + * Returns a bitmap that is a resized version of the parameter image. The image will only be + * resized down and sized to be appropriate for an enriched call. + */ + public static Bitmap resizeForEnrichedCalling(Bitmap image) { + Assert.isWorkerThread(); + + int width = image.getWidth(); + int height = image.getHeight(); + + LogUtil.i( + "BitmapResizer.resizeForEnrichedCalling", "starting height: %d, width: %d", height, width); + + if (width <= MAX_OUTPUT_RESOLUTION && height <= MAX_OUTPUT_RESOLUTION) { + LogUtil.i("BitmapResizer.resizeForEnrichedCalling", "no resizing needed"); + return image; + } + + if (width > height) { + // landscape + float ratio = width / (float) MAX_OUTPUT_RESOLUTION; + width = MAX_OUTPUT_RESOLUTION; + height = (int) (height / ratio); + } else if (height > width) { + // portrait + float ratio = height / (float) MAX_OUTPUT_RESOLUTION; + height = MAX_OUTPUT_RESOLUTION; + width = (int) (width / ratio); + } else { + // square + height = MAX_OUTPUT_RESOLUTION; + width = MAX_OUTPUT_RESOLUTION; + } + + LogUtil.i( + "BitmapResizer.resizeForEnrichedCalling", "ending height: %d, width: %d", height, width); + + return Bitmap.createScaledBitmap(image, width, height, true); + } +} diff --git a/java/com/android/dialer/callcomposer/util/CopyAndResizeImageTask.java b/java/com/android/dialer/callcomposer/util/CopyAndResizeImageTask.java deleted file mode 100644 index 81511d274..000000000 --- a/java/com/android/dialer/callcomposer/util/CopyAndResizeImageTask.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2016 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.callcomposer.util; - -import android.annotation.TargetApi; -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.Bitmap.CompressFormat; -import android.graphics.BitmapFactory; -import android.net.Uri; -import android.os.Build.VERSION_CODES; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import com.android.dialer.common.Assert; -import com.android.dialer.common.LogUtil; -import com.android.dialer.common.concurrent.FallibleAsyncTask; -import com.android.dialer.util.DialerUtils; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStream; - -/** Task for copying and resizing images to be shared with RCS process. */ -@TargetApi(VERSION_CODES.M) -public class CopyAndResizeImageTask extends FallibleAsyncTask { - public static final int MAX_OUTPUT_RESOLUTION = 640; - private static final String MIME_TYPE = "image/jpeg"; - - private final Context context; - private final Uri uri; - private final Callback callback; - - public CopyAndResizeImageTask( - @NonNull Context context, @NonNull Uri uri, @NonNull Callback callback) { - this.context = Assert.isNotNull(context); - this.uri = Assert.isNotNull(uri); - this.callback = Assert.isNotNull(callback); - } - - @Nullable - @Override - protected File doInBackgroundFallible(Void... params) throws Throwable { - Bitmap bitmap = BitmapFactory.decodeStream(context.getContentResolver().openInputStream(uri)); - bitmap = resizeForEnrichedCalling(bitmap); - - File outputFile = DialerUtils.createShareableFile(context); - try (OutputStream outputStream = new FileOutputStream(outputFile)) { - // Encode images to jpeg as it is better for camera pictures which we expect to be sending - bitmap.compress(CompressFormat.JPEG, 80, outputStream); - return outputFile; - } - } - - @Override - protected void onPostExecute(FallibleTaskResult result) { - if (result.isFailure()) { - callback.onCopyFailed(result.getThrowable()); - } else { - callback.onCopySuccessful(result.getResult(), MIME_TYPE); - } - } - - public static Bitmap resizeForEnrichedCalling(Bitmap image) { - Assert.isWorkerThread(); - - int width = image.getWidth(); - int height = image.getHeight(); - - LogUtil.i( - "CopyAndResizeImageTask.resizeForEnrichedCalling", - "starting height: %d, width: %d", - height, - width); - - if (width <= MAX_OUTPUT_RESOLUTION && height <= MAX_OUTPUT_RESOLUTION) { - LogUtil.i("CopyAndResizeImageTask.resizeForEnrichedCalling", "no resizing needed"); - return image; - } - - if (width > height) { - // landscape - float ratio = width / (float) MAX_OUTPUT_RESOLUTION; - width = MAX_OUTPUT_RESOLUTION; - height = (int) (height / ratio); - } else if (height > width) { - // portrait - float ratio = height / (float) MAX_OUTPUT_RESOLUTION; - height = MAX_OUTPUT_RESOLUTION; - width = (int) (width / ratio); - } else { - // square - height = MAX_OUTPUT_RESOLUTION; - width = MAX_OUTPUT_RESOLUTION; - } - - LogUtil.i( - "CopyAndResizeImageTask.resizeForEnrichedCalling", - "ending height: %d, width: %d", - height, - width); - - return Bitmap.createScaledBitmap(image, width, height, true); - } - - /** Callback for callers to know when the task has finished */ - public interface Callback { - void onCopySuccessful(File file, String mimeType); - - void onCopyFailed(Throwable throwable); - } -} diff --git a/java/com/android/dialer/calldetails/CallDetailsActivity.java b/java/com/android/dialer/calldetails/CallDetailsActivity.java index 757c6eed2..41d176562 100644 --- a/java/com/android/dialer/calldetails/CallDetailsActivity.java +++ b/java/com/android/dialer/calldetails/CallDetailsActivity.java @@ -29,14 +29,14 @@ import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar.OnMenuItemClickListener; import android.view.MenuItem; -import com.android.dialer.callcomposer.nano.CallComposerContact; -import com.android.dialer.calldetails.nano.CallDetailsEntries; -import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry; +import com.android.dialer.callcomposer.CallComposerContact; +import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.common.Assert; import com.android.dialer.common.concurrent.AsyncTaskExecutors; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; -import com.android.dialer.protos.ProtoParsers; +import com.google.protobuf.InvalidProtocolBufferException; +import java.util.List; /** Displays the details of a specific call log entry. */ public class CallDetailsActivity extends AppCompatActivity implements OnMenuItemClickListener { @@ -45,7 +45,7 @@ public class CallDetailsActivity extends AppCompatActivity implements OnMenuItem private static final String EXTRA_CONTACT = "contact"; private static final String TASK_DELETE = "task_delete"; - private CallDetailsEntry[] entries; + private List entries; public static Intent newInstance( Context context, @NonNull CallDetailsEntries details, @NonNull CallComposerContact contact) { @@ -53,8 +53,8 @@ public class CallDetailsActivity extends AppCompatActivity implements OnMenuItem Assert.isNotNull(contact); Intent intent = new Intent(context, CallDetailsActivity.class); - ProtoParsers.put(intent, EXTRA_CONTACT, contact); - ProtoParsers.put(intent, EXTRA_CALL_DETAILS_ENTRIES, details); + intent.putExtra(EXTRA_CONTACT, contact.toByteArray()); + intent.putExtra(EXTRA_CALL_DETAILS_ENTRIES, details.toByteArray()); return intent; } @@ -77,12 +77,15 @@ public class CallDetailsActivity extends AppCompatActivity implements OnMenuItem private void onHandleIntent(Intent intent) { Bundle arguments = intent.getExtras(); - CallComposerContact contact = - ProtoParsers.getFromInstanceState(arguments, EXTRA_CONTACT, new CallComposerContact()); - entries = - ProtoParsers.getFromInstanceState( - arguments, EXTRA_CALL_DETAILS_ENTRIES, new CallDetailsEntries()) - .entries; + CallComposerContact contact = CallComposerContact.getDefaultInstance(); + try { + contact = CallComposerContact.parseFrom(arguments.getByteArray(EXTRA_CONTACT)); + entries = + CallDetailsEntries.parseFrom(arguments.getByteArray(EXTRA_CALL_DETAILS_ENTRIES)) + .getEntriesList(); + } catch (InvalidProtocolBufferException e) { + throw Assert.createIllegalStateFailException(e.toString()); + } RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setAdapter(new CallDetailsAdapter(this, contact, entries)); @@ -110,7 +113,7 @@ public class CallDetailsActivity extends AppCompatActivity implements OnMenuItem if (callIds.length() != 0) { callIds.append(","); } - callIds.append(entry.callId); + callIds.append(entry.getCallId()); } this.callIds = callIds.toString(); } diff --git a/java/com/android/dialer/calldetails/CallDetailsAdapter.java b/java/com/android/dialer/calldetails/CallDetailsAdapter.java index 7471c9c1e..725077965 100644 --- a/java/com/android/dialer/calldetails/CallDetailsAdapter.java +++ b/java/com/android/dialer/calldetails/CallDetailsAdapter.java @@ -17,14 +17,16 @@ package com.android.dialer.calldetails; import android.content.Context; +import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView.ViewHolder; import android.view.LayoutInflater; import android.view.ViewGroup; -import com.android.dialer.callcomposer.nano.CallComposerContact; -import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry; +import com.android.dialer.callcomposer.CallComposerContact; +import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.calllogutils.CallTypeHelper; import com.android.dialer.common.Assert; +import java.util.List; /** Adapter for RecyclerView in {@link CallDetailsActivity}. */ public class CallDetailsAdapter extends RecyclerView.Adapter { @@ -34,13 +36,15 @@ public class CallDetailsAdapter extends RecyclerView.Adapter callDetailsEntries; private final CallTypeHelper callTypeHelper; public CallDetailsAdapter( - Context context, CallComposerContact contact, CallDetailsEntry[] callDetailsEntries) { + Context context, + @NonNull CallComposerContact contact, + @NonNull List callDetailsEntries) { this.contact = Assert.isNotNull(contact); - this.callDetailsEntries = Assert.isNotNull(callDetailsEntries); + this.callDetailsEntries = callDetailsEntries; callTypeHelper = new CallTypeHelper(context.getResources()); } @@ -68,15 +72,15 @@ public class CallDetailsAdapter extends RecyclerView.Adapter 0 && position != getItemCount() - 2); + !entry.getHistoryResultsList().isEmpty() && position != getItemCount() - 2); } } @@ -93,6 +97,6 @@ public class CallDetailsAdapter extends RecyclerView.Adapter { @@ -128,10 +134,10 @@ public class CallDetailsEntryViewHolder extends ViewHolder { }); multimediaImageContainer.setClipToOutline(true); - if (!TextUtils.isEmpty(historyResult.imageUri)) { + if (!TextUtils.isEmpty(historyResult.getImageUri())) { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "setting image"); multimediaImageContainer.setVisibility(View.VISIBLE); - multimediaImage.setImageURI(Uri.parse(historyResult.imageUri)); + multimediaImage.setImageURI(Uri.parse(historyResult.getImageUri())); multimediaDetails.setText( isIncoming(historyResult) ? R.string.received_a_photo : R.string.sent_a_photo); } else { @@ -139,19 +145,20 @@ public class CallDetailsEntryViewHolder extends ViewHolder { } // Set text after image to overwrite the received/sent a photo text - if (!TextUtils.isEmpty(historyResult.text)) { + if (!TextUtils.isEmpty(historyResult.getText())) { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "showing text"); multimediaDetails.setText( - context.getString(R.string.message_in_quotes, historyResult.text)); + context.getString(R.string.message_in_quotes, historyResult.getText())); } else { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "no text"); } - if (entry.historyResults.length > 1 && !TextUtils.isEmpty(entry.historyResults[1].text)) { + if (entry.getHistoryResultsList().size() > 1 + && !TextUtils.isEmpty(entry.getHistoryResults(1).getText())) { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "showing post call note"); postCallNote.setVisibility(View.VISIBLE); postCallNote.setText( - context.getString(R.string.message_in_quotes, entry.historyResults[1].text)); + context.getString(R.string.message_in_quotes, entry.getHistoryResults(1).getText())); } else { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "no post call note"); } @@ -159,8 +166,8 @@ public class CallDetailsEntryViewHolder extends ViewHolder { } private static boolean isIncoming(@NonNull HistoryResult historyResult) { - return historyResult.type == Type.INCOMING_POST_CALL - || historyResult.type == Type.INCOMING_CALL_COMPOSER; + return historyResult.getType() == Type.INCOMING_POST_CALL + || historyResult.getType() == Type.INCOMING_CALL_COMPOSER; } private static @ColorInt int getColorForCallType(Context context, int callType) { diff --git a/java/com/android/dialer/calldetails/CallDetailsFooterViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsFooterViewHolder.java index 36662bab9..3f894366f 100644 --- a/java/com/android/dialer/calldetails/CallDetailsFooterViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsFooterViewHolder.java @@ -19,12 +19,13 @@ package com.android.dialer.calldetails; import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; +import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; import com.android.contacts.common.ClipboardUtils; import com.android.dialer.common.Assert; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.util.CallUtil; import com.android.dialer.util.DialerUtils; @@ -32,6 +33,7 @@ import com.android.dialer.util.DialerUtils; public class CallDetailsFooterViewHolder extends RecyclerView.ViewHolder implements OnClickListener { + private final View container; private final View copy; private final View edit; @@ -39,6 +41,7 @@ public class CallDetailsFooterViewHolder extends RecyclerView.ViewHolder public CallDetailsFooterViewHolder(View view) { super(view); + container = view.findViewById(R.id.footer_container); copy = view.findViewById(R.id.call_detail_action_copy); edit = view.findViewById(R.id.call_detail_action_edit_before_call); @@ -48,6 +51,9 @@ public class CallDetailsFooterViewHolder extends RecyclerView.ViewHolder public void setPhoneNumber(String number) { this.number = number; + if (TextUtils.isEmpty(number)) { + container.setVisibility(View.GONE); + } } @Override diff --git a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java index 416c521a2..437c2602c 100644 --- a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java @@ -25,12 +25,12 @@ import android.view.View.OnClickListener; import android.widget.QuickContactBadge; import android.widget.TextView; import com.android.contacts.common.ContactPhotoManager; -import com.android.dialer.callcomposer.nano.CallComposerContact; +import com.android.dialer.callcomposer.CallComposerContact; +import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; -import com.android.dialer.callintent.nano.CallInitiationType; import com.android.dialer.common.Assert; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.util.DialerUtils; /** ViewHolder for Header/Contact in {@link CallDetailsActivity}. */ @@ -56,29 +56,37 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder } /** Populates the contact info fields based on the current contact information. */ - public void updateContactInfo(CallComposerContact contact) { + void updateContactInfo(CallComposerContact contact) { this.contact = contact; ContactPhotoManager.getInstance(context) - .loadDialerThumbnail( + .loadDialerThumbnailOrPhoto( contactPhoto, - contact.contactUri == null ? null : Uri.parse(contact.contactUri), - contact.photoId, - contact.nameOrNumber, - contact.contactType); + contact.hasContactUri() ? Uri.parse(contact.getContactUri()) : null, + contact.getPhotoId(), + contact.hasPhotoUri() ? Uri.parse(contact.getPhotoUri()) : null, + contact.getNameOrNumber(), + contact.getContactType()); - nameView.setText(contact.nameOrNumber); - if (!TextUtils.isEmpty(contact.numberLabel) && !TextUtils.isEmpty(contact.displayNumber)) { + contactPhoto.setContentDescription( + context.getString(R.string.description_contact_photo_details, contact.getNameOrNumber())); + nameView.setText(contact.getNameOrNumber()); + if (!TextUtils.isEmpty(contact.getNumberLabel()) + && !TextUtils.isEmpty(contact.getDisplayNumber())) { numberView.setVisibility(View.VISIBLE); String secondaryInfo = context.getString( com.android.contacts.common.R.string.call_subject_type_and_number, - contact.numberLabel, - contact.displayNumber); + contact.getNumberLabel(), + contact.getDisplayNumber()); numberView.setText(secondaryInfo); } else { numberView.setVisibility(View.GONE); numberView.setText(null); } + + if (TextUtils.isEmpty(contact.getNumber())) { + callBackButton.setVisibility(View.GONE); + } } @Override @@ -87,7 +95,7 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder Logger.get(view.getContext()).logImpression(DialerImpression.Type.CALL_DETAILS_CALL_BACK); DialerUtils.startActivityWithErrorToast( view.getContext(), - new CallIntentBuilder(contact.number, CallInitiationType.Type.CALL_DETAILS).build()); + new CallIntentBuilder(contact.getNumber(), CallInitiationType.Type.CALL_DETAILS).build()); } else { Assert.fail("View OnClickListener not implemented: " + view); } diff --git a/java/com/android/dialer/calldetails/nano/CallDetailsEntries.java b/java/com/android/dialer/calldetails/nano/CallDetailsEntries.java deleted file mode 100644 index aee8f3652..000000000 --- a/java/com/android/dialer/calldetails/nano/CallDetailsEntries.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * 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. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.android.dialer.calldetails.nano; - -/** This file is autogenerated, but javadoc required. */ -@SuppressWarnings("hiding") -public final class CallDetailsEntries - extends com.google.protobuf.nano.ExtendableMessageNano { - - /** This file is autogenerated, but javadoc required. */ - public static final class CallDetailsEntry - extends com.google.protobuf.nano.ExtendableMessageNano { - - private static volatile CallDetailsEntry[] _emptyArray; - public static CallDetailsEntry[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new CallDetailsEntry[0]; - } - } - } - return _emptyArray; - } - - // optional int64 call_id = 1; - public long callId; - - // optional int32 call_type = 2; - public int callType; - - // optional int32 features = 3; - public int features; - - // optional int64 date = 4; - public long date; - - // optional int64 duration = 5; - public long duration; - - // optional int64 data_usage = 6; - public long dataUsage; - - // repeated .com.android.dialer.enrichedcall.historyquery.proto. - // HistoryResult history_results = 7; - public com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult[] historyResults; - - // @@protoc_insertion_point(class_scope:com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry) - - public CallDetailsEntry() { - clear(); - } - - public CallDetailsEntry clear() { - callId = 0L; - callType = 0; - features = 0; - date = 0L; - duration = 0L; - dataUsage = 0L; - historyResults = - com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult.emptyArray(); - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof CallDetailsEntry)) { - return false; - } - CallDetailsEntry other = (CallDetailsEntry) o; - if (this.callId != other.callId) { - return false; - } - if (this.callType != other.callType) { - return false; - } - if (this.features != other.features) { - return false; - } - if (this.date != other.date) { - return false; - } - if (this.duration != other.duration) { - return false; - } - if (this.dataUsage != other.dataUsage) { - return false; - } - if (!com.google.protobuf.nano.InternalNano.equals( - this.historyResults, other.historyResults)) { - return false; - } - if (unknownFieldData == null || unknownFieldData.isEmpty()) { - return other.unknownFieldData == null || other.unknownFieldData.isEmpty(); - } else { - return unknownFieldData.equals(other.unknownFieldData); - } - } - - @Override - public int hashCode() { - int result = 17; - result = 31 * result + getClass().getName().hashCode(); - result = 31 * result + (int) (this.callId ^ (this.callId >>> 32)); - result = 31 * result + this.callType; - result = 31 * result + this.features; - result = 31 * result + (int) (this.date ^ (this.date >>> 32)); - result = 31 * result + (int) (this.duration ^ (this.duration >>> 32)); - result = 31 * result + (int) (this.dataUsage ^ (this.dataUsage >>> 32)); - result = 31 * result + com.google.protobuf.nano.InternalNano.hashCode(this.historyResults); - result = - 31 * result - + (unknownFieldData == null || unknownFieldData.isEmpty() - ? 0 - : unknownFieldData.hashCode()); - return result; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.callId != 0L) { - output.writeInt64(1, this.callId); - } - if (this.callType != 0) { - output.writeInt32(2, this.callType); - } - if (this.features != 0) { - output.writeInt32(3, this.features); - } - if (this.date != 0L) { - output.writeInt64(4, this.date); - } - if (this.duration != 0L) { - output.writeInt64(5, this.duration); - } - if (this.dataUsage != 0L) { - output.writeInt64(6, this.dataUsage); - } - if (this.historyResults != null && this.historyResults.length > 0) { - for (int i = 0; i < this.historyResults.length; i++) { - com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult element = - this.historyResults[i]; - if (element != null) { - output.writeMessage(7, element); - } - } - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.callId != 0L) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(1, this.callId); - } - if (this.callType != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size(2, this.callType); - } - if (this.features != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size(3, this.features); - } - if (this.date != 0L) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(4, this.date); - } - if (this.duration != 0L) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(5, this.duration); - } - if (this.dataUsage != 0L) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(6, this.dataUsage); - } - if (this.historyResults != null && this.historyResults.length > 0) { - for (int i = 0; i < this.historyResults.length; i++) { - com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult element = - this.historyResults[i]; - if (element != null) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeMessageSize(7, element); - } - } - } - return size; - } - - @Override - public CallDetailsEntry mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - case 8: - { - this.callId = input.readInt64(); - break; - } - case 16: - { - this.callType = input.readInt32(); - break; - } - case 24: - { - this.features = input.readInt32(); - break; - } - case 32: - { - this.date = input.readInt64(); - break; - } - case 40: - { - this.duration = input.readInt64(); - break; - } - case 48: - { - this.dataUsage = input.readInt64(); - break; - } - case 58: - { - int arrayLength = - com.google.protobuf.nano.WireFormatNano.getRepeatedFieldArrayLength(input, 58); - int i = this.historyResults == null ? 0 : this.historyResults.length; - com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult[] newArray = - new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult - [i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.historyResults, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = - new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult(); - input.readMessage(newArray[i]); - input.readTag(); - } - // Last one without readTag. - newArray[i] = - new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult(); - input.readMessage(newArray[i]); - this.historyResults = newArray; - break; - } - } - } - } - - public static CallDetailsEntry parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new CallDetailsEntry(), data); - } - - public static CallDetailsEntry parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { - return new CallDetailsEntry().mergeFrom(input); - } - } - - private static volatile CallDetailsEntries[] _emptyArray; - public static CallDetailsEntries[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new CallDetailsEntries[0]; - } - } - } - return _emptyArray; - } - - // repeated .com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry entries = 1; - public com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry[] entries; - - // @@protoc_insertion_point(class_scope:com.android.dialer.calldetails.CallDetailsEntries) - - public CallDetailsEntries() { - clear(); - } - - public CallDetailsEntries clear() { - entries = com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry.emptyArray(); - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof CallDetailsEntries)) { - return false; - } - CallDetailsEntries other = (CallDetailsEntries) o; - if (!com.google.protobuf.nano.InternalNano.equals(this.entries, other.entries)) { - return false; - } - if (unknownFieldData == null || unknownFieldData.isEmpty()) { - return other.unknownFieldData == null || other.unknownFieldData.isEmpty(); - } else { - return unknownFieldData.equals(other.unknownFieldData); - } - } - - @Override - public int hashCode() { - int result = 17; - result = 31 * result + getClass().getName().hashCode(); - result = 31 * result + com.google.protobuf.nano.InternalNano.hashCode(this.entries); - result = - 31 * result - + (unknownFieldData == null || unknownFieldData.isEmpty() - ? 0 - : unknownFieldData.hashCode()); - return result; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.entries != null && this.entries.length > 0) { - for (int i = 0; i < this.entries.length; i++) { - com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry element = - this.entries[i]; - if (element != null) { - output.writeMessage(1, element); - } - } - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.entries != null && this.entries.length > 0) { - for (int i = 0; i < this.entries.length; i++) { - com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry element = - this.entries[i]; - if (element != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeMessageSize(1, element); - } - } - } - return size; - } - - @Override - public CallDetailsEntries mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - case 10: - { - int arrayLength = - com.google.protobuf.nano.WireFormatNano.getRepeatedFieldArrayLength(input, 10); - int i = this.entries == null ? 0 : this.entries.length; - com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry[] newArray = - new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry - [i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.entries, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = - new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry(); - input.readMessage(newArray[i]); - input.readTag(); - } - // Last one without readTag. - newArray[i] = - new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry(); - input.readMessage(newArray[i]); - this.entries = newArray; - break; - } - } - } - } - - public static CallDetailsEntries parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new CallDetailsEntries(), data); - } - - public static CallDetailsEntries parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { - return new CallDetailsEntries().mergeFrom(input); - } -} diff --git a/java/com/android/dialer/calldetails/proto/call_details_entries.proto b/java/com/android/dialer/calldetails/proto/call_details_entries.proto new file mode 100644 index 000000000..e254b7713 --- /dev/null +++ b/java/com/android/dialer/calldetails/proto/call_details_entries.proto @@ -0,0 +1,23 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.calldetails"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + +import "java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto"; + +package com.android.dialer.calldetails; + +message CallDetailsEntries { + message CallDetailsEntry { + optional int64 call_id = 1; + optional int32 call_type = 2; + optional int32 features = 3; + optional int64 date = 4; + optional int64 duration = 5; + optional int64 data_usage = 6; + repeated enrichedcall.historyquery.proto.HistoryResult history_results = 7; + } + + repeated CallDetailsEntry entries = 1; +} diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml index 885cb0989..ccfa4e7ac 100644 --- a/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml +++ b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml @@ -14,6 +14,7 @@ limitations under the License. --> diff --git a/java/com/android/dialer/calldetails/res/layout/contact_container.xml b/java/com/android/dialer/calldetails/res/layout/contact_container.xml index bcda55e11..daf465b2c 100644 --- a/java/com/android/dialer/calldetails/res/layout/contact_container.xml +++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml @@ -20,14 +20,19 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/call_details_top_margin" android:gravity="center_vertical" - android:padding="@dimen/contact_container_padding"> + android:paddingTop="@dimen/contact_container_padding_top_start" + android:paddingStart="@dimen/contact_container_padding_top_start" + android:paddingBottom="@dimen/contact_container_padding_bottom_end" + android:paddingEnd="@dimen/contact_container_padding_bottom_end"> + android:padding="@dimen/call_details_contact_photo_padding" + android:focusable="true" + android:contentDescription="@string/description_quick_contact_for"/> \ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/values-af/strings.xml b/java/com/android/dialer/calldetails/res/values-af/strings.xml index 674ea2d9f..86bef4b9a 100644 --- a/java/com/android/dialer/calldetails/res/values-af/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-af/strings.xml @@ -25,4 +25,5 @@ "Het \'n foto gestuur" "Het \'n foto ontvang" "\"%1$s\"" + "Kontakbesonderhede vir %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-am/strings.xml b/java/com/android/dialer/calldetails/res/values-am/strings.xml index e9c597b9a..2a23945fe 100644 --- a/java/com/android/dialer/calldetails/res/values-am/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-am/strings.xml @@ -25,4 +25,5 @@ "አንድ ፎቶ ተልኳል" "አንድ ፎቶ ደርሷል" %1$s»" + "የ%1$s የእውቂያ ዝርዝሮች" diff --git a/java/com/android/dialer/calldetails/res/values-ar/strings.xml b/java/com/android/dialer/calldetails/res/values-ar/strings.xml index 12dfed80d..6b0d8a773 100644 --- a/java/com/android/dialer/calldetails/res/values-ar/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ar/strings.xml @@ -25,4 +25,5 @@ "تم إرسال صورة" "تم تلقي صورة" "\"%1$s\"" + "تفاصيل الاتصال بالمستخدم %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-az/strings.xml b/java/com/android/dialer/calldetails/res/values-az/strings.xml index 282e7c907..479837c34 100644 --- a/java/com/android/dialer/calldetails/res/values-az/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-az/strings.xml @@ -25,4 +25,5 @@ "Foto göndərildi" "Foto alındı" "\"%1$s\"" + "%1$s üçün kontakt detalları" diff --git a/java/com/android/dialer/calldetails/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/calldetails/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..01141ffa4 --- /dev/null +++ b/java/com/android/dialer/calldetails/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,29 @@ + + + + + "Detalji poziva" + "Izbriši" + "Kopiraj broj" + "Izmenite broj pre poziva" + "Pozovi" + "Slika je poslata" + "Slika je primljena" + "„%1$s“" + "Kontakt informacije za %1$s" + diff --git a/java/com/android/dialer/calldetails/res/values-be/strings.xml b/java/com/android/dialer/calldetails/res/values-be/strings.xml index 27f07a043..683f29bb2 100644 --- a/java/com/android/dialer/calldetails/res/values-be/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-be/strings.xml @@ -25,4 +25,5 @@ "Адпраўлена фота" "Атрымана фота" "\"%1$s\"" + "Кантактныя даныя абанента %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-bg/strings.xml b/java/com/android/dialer/calldetails/res/values-bg/strings.xml index b4378eb24..9cd70e2f6 100644 --- a/java/com/android/dialer/calldetails/res/values-bg/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-bg/strings.xml @@ -25,4 +25,5 @@ "Изпратена бе снимка" "Получена бе снимка" "„%1$s“" + "Подробности за контакта за %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-bn/strings.xml b/java/com/android/dialer/calldetails/res/values-bn/strings.xml index c96159f57..148f61aba 100644 --- a/java/com/android/dialer/calldetails/res/values-bn/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-bn/strings.xml @@ -25,4 +25,5 @@ "একটি ফটো পাঠিয়েছেন" "একটি ফটো পেয়েছেন" "\"%1$s\"" + "%1$s পরিচিতির বিশদ বিবরণ" diff --git a/java/com/android/dialer/calldetails/res/values-bs/strings.xml b/java/com/android/dialer/calldetails/res/values-bs/strings.xml index 01b5f9b82..6f164b228 100644 --- a/java/com/android/dialer/calldetails/res/values-bs/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-bs/strings.xml @@ -25,4 +25,5 @@ "Fotografija poslana" "Fotografija primljena" "\"%1$s\"" + "Detalji o kontaktu %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ca/strings.xml b/java/com/android/dialer/calldetails/res/values-ca/strings.xml index 0974303a0..0e33e60e7 100644 --- a/java/com/android/dialer/calldetails/res/values-ca/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ca/strings.xml @@ -25,4 +25,5 @@ "S\'ha enviat una foto" "S\'ha rebut una foto" "%1$s" + "Dades de contacte de: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-cs/strings.xml b/java/com/android/dialer/calldetails/res/values-cs/strings.xml index 6eebd1456..9747ee139 100644 --- a/java/com/android/dialer/calldetails/res/values-cs/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-cs/strings.xml @@ -25,4 +25,5 @@ "Byla poslána fotka" "Byla přijata fotka" "„%1$s“" + "Podrobnosti kontaktu %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-da/strings.xml b/java/com/android/dialer/calldetails/res/values-da/strings.xml index b7ebdb045..41bc25254 100644 --- a/java/com/android/dialer/calldetails/res/values-da/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-da/strings.xml @@ -25,4 +25,5 @@ "Der blev sendt et billede" "Der blev modtaget et billede" "\"%1$s\"" + "Kontaktoplysninger for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-de/strings.xml b/java/com/android/dialer/calldetails/res/values-de/strings.xml index 14d16ae2e..014666b3f 100644 --- a/java/com/android/dialer/calldetails/res/values-de/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-de/strings.xml @@ -25,4 +25,5 @@ "Hat ein Foto gesendet" "Hat ein Foto empfangen" "\"%1$s\"" + "Kontaktdetails für %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-el/strings.xml b/java/com/android/dialer/calldetails/res/values-el/strings.xml index e12b09f3b..6b51fc71d 100644 --- a/java/com/android/dialer/calldetails/res/values-el/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-el/strings.xml @@ -25,4 +25,5 @@ "Έγινε αποστολή φωτογραφίας" "Έγινε λήψη φωτογραφίας" "\"%1$s\"" + "Στοιχεία επικοινωνίας επαφής %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-en-rAU/strings.xml b/java/com/android/dialer/calldetails/res/values-en-rAU/strings.xml index 0f69f1ed1..2d5210e8c 100644 --- a/java/com/android/dialer/calldetails/res/values-en-rAU/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-en-rAU/strings.xml @@ -25,4 +25,5 @@ "Sent a photo" "Received a photo" "\"%1$s\"" + "Contact details for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-en-rGB/strings.xml b/java/com/android/dialer/calldetails/res/values-en-rGB/strings.xml index 0f69f1ed1..2d5210e8c 100644 --- a/java/com/android/dialer/calldetails/res/values-en-rGB/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-en-rGB/strings.xml @@ -25,4 +25,5 @@ "Sent a photo" "Received a photo" "\"%1$s\"" + "Contact details for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-en-rIN/strings.xml b/java/com/android/dialer/calldetails/res/values-en-rIN/strings.xml index 0f69f1ed1..2d5210e8c 100644 --- a/java/com/android/dialer/calldetails/res/values-en-rIN/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-en-rIN/strings.xml @@ -25,4 +25,5 @@ "Sent a photo" "Received a photo" "\"%1$s\"" + "Contact details for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-es-rUS/strings.xml b/java/com/android/dialer/calldetails/res/values-es-rUS/strings.xml index 9c4649c36..d9db2825c 100644 --- a/java/com/android/dialer/calldetails/res/values-es-rUS/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-es-rUS/strings.xml @@ -25,4 +25,5 @@ "Enviaste una foto" "Recibiste una foto" "\"%1$s\"" + "Datos de contacto de %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-es/strings.xml b/java/com/android/dialer/calldetails/res/values-es/strings.xml index 33889f2fe..e72e898b4 100644 --- a/java/com/android/dialer/calldetails/res/values-es/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-es/strings.xml @@ -25,4 +25,5 @@ "Se ha enviado una foto" "Se ha recibido una foto" "\"%1$s\"" + "Información de contacto de %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-et/strings.xml b/java/com/android/dialer/calldetails/res/values-et/strings.xml index c1c2f6e81..496459d6b 100644 --- a/java/com/android/dialer/calldetails/res/values-et/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-et/strings.xml @@ -25,4 +25,5 @@ "Saatis foto" "Sai foto" "„%1$s”" + "Kontakti %1$s üksikasjad" diff --git a/java/com/android/dialer/calldetails/res/values-eu/strings.xml b/java/com/android/dialer/calldetails/res/values-eu/strings.xml index 3cd78e0a9..913082fb8 100644 --- a/java/com/android/dialer/calldetails/res/values-eu/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-eu/strings.xml @@ -25,4 +25,5 @@ "Argazki bat bidali duzu" "Argazki bat jaso duzu" "\"%1$s\"" + "%1$s kontaktuaren xehetasunak" diff --git a/java/com/android/dialer/calldetails/res/values-fa/strings.xml b/java/com/android/dialer/calldetails/res/values-fa/strings.xml index 700c4ffcb..cad85a265 100644 --- a/java/com/android/dialer/calldetails/res/values-fa/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-fa/strings.xml @@ -25,4 +25,5 @@ "عکسی ارسال کرد" "عکسی دریافت کرد" %1$s»" + "جزئیات تماس %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-fi/strings.xml b/java/com/android/dialer/calldetails/res/values-fi/strings.xml index 5443236b9..c16110d58 100644 --- a/java/com/android/dialer/calldetails/res/values-fi/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-fi/strings.xml @@ -25,4 +25,5 @@ "Lähetetty kuva" "Vastaanotettu kuva" "\"%1$s\"" + "Yhteystiedot: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-fr-rCA/strings.xml b/java/com/android/dialer/calldetails/res/values-fr-rCA/strings.xml index 6433de7a8..676861f3f 100644 --- a/java/com/android/dialer/calldetails/res/values-fr-rCA/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-fr-rCA/strings.xml @@ -25,4 +25,5 @@ "Photo envoyée" "Photo reçue" "« %1$s »" + "Coordonnées de %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-fr/strings.xml b/java/com/android/dialer/calldetails/res/values-fr/strings.xml index 180b52b45..606cb1095 100644 --- a/java/com/android/dialer/calldetails/res/values-fr/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-fr/strings.xml @@ -25,4 +25,5 @@ "Envoi d\'une photo" "Réception d\'une photo" "\"%1$s\"" + "Coordonnées associées à %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-gl/strings.xml b/java/com/android/dialer/calldetails/res/values-gl/strings.xml index a3eb9abd8..aa5ff14dd 100644 --- a/java/com/android/dialer/calldetails/res/values-gl/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-gl/strings.xml @@ -25,4 +25,5 @@ "Enviouse unha foto" "Recibiuse unha foto" "\"%1$s\"" + "Detalles de contacto de: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-gu/strings.xml b/java/com/android/dialer/calldetails/res/values-gu/strings.xml index 71ced2427..ccb8755b3 100644 --- a/java/com/android/dialer/calldetails/res/values-gu/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-gu/strings.xml @@ -25,4 +25,5 @@ "એક ફોટો મોકલ્યો" "એક ફોટો પ્રાપ્ત કર્યો" "\"%1$s\"" + "%1$s માટે સંપર્ક વિગતો" diff --git a/java/com/android/dialer/calldetails/res/values-hi/strings.xml b/java/com/android/dialer/calldetails/res/values-hi/strings.xml index e4596c02b..517fbe52d 100644 --- a/java/com/android/dialer/calldetails/res/values-hi/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-hi/strings.xml @@ -25,4 +25,5 @@ "फ़ोटो भेजी गई" "फ़ोटो मिली" "\"%1$s\"" + "%1$s का संपर्क विवरण" diff --git a/java/com/android/dialer/calldetails/res/values-hr/strings.xml b/java/com/android/dialer/calldetails/res/values-hr/strings.xml index 84149fc16..687a65e2b 100644 --- a/java/com/android/dialer/calldetails/res/values-hr/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-hr/strings.xml @@ -25,4 +25,5 @@ "Šalje fotografiju" "Prima fotografiju" "\"%1$s\"" + "Pojedinosti o kontaktu %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-hu/strings.xml b/java/com/android/dialer/calldetails/res/values-hu/strings.xml index b6c38e3e2..66863e87d 100644 --- a/java/com/android/dialer/calldetails/res/values-hu/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-hu/strings.xml @@ -25,4 +25,5 @@ "Küldött egy fotót" "Kapott egy fotót" "„%1$s”" + "%1$s részletes adatai." diff --git a/java/com/android/dialer/calldetails/res/values-hy/strings.xml b/java/com/android/dialer/calldetails/res/values-hy/strings.xml index 8d90cf842..a1e84e955 100644 --- a/java/com/android/dialer/calldetails/res/values-hy/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-hy/strings.xml @@ -25,4 +25,5 @@ "Ուղարկվել է լուսանկար" "Ստացվել է լուսանկար" %1$s»" + "%1$s-ի կոնտակտային տվյալները" diff --git a/java/com/android/dialer/calldetails/res/values-in/strings.xml b/java/com/android/dialer/calldetails/res/values-in/strings.xml index 811cf0517..ba58ba01c 100644 --- a/java/com/android/dialer/calldetails/res/values-in/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-in/strings.xml @@ -25,4 +25,5 @@ "Mengirim foto" "Menerima foto" "\"%1$s\"" + "Detail kontak %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-is/strings.xml b/java/com/android/dialer/calldetails/res/values-is/strings.xml index 1d92d4c5f..0770814df 100644 --- a/java/com/android/dialer/calldetails/res/values-is/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-is/strings.xml @@ -25,4 +25,5 @@ "Sendi mynd" "Tók á móti mynd" "„%1$s“" + "Tengiliðaupplýsingar um %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-it/strings.xml b/java/com/android/dialer/calldetails/res/values-it/strings.xml index aef76a451..97af25168 100644 --- a/java/com/android/dialer/calldetails/res/values-it/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-it/strings.xml @@ -25,4 +25,5 @@ "Foto inviata" "Foto ricevuta" "\"%1$s\"" + "Dettagli contatto %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-iw/strings.xml b/java/com/android/dialer/calldetails/res/values-iw/strings.xml index 934edd103..329eded62 100644 --- a/java/com/android/dialer/calldetails/res/values-iw/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-iw/strings.xml @@ -25,4 +25,5 @@ "נשלחה תמונה" "התקבלה תמונה" "\"%1$s\"" + "פרטי ההתקשרות של %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ja/strings.xml b/java/com/android/dialer/calldetails/res/values-ja/strings.xml index 4c308e081..7aef345fd 100644 --- a/java/com/android/dialer/calldetails/res/values-ja/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ja/strings.xml @@ -25,4 +25,5 @@ "写真を送信しました" "写真を受信しました" "「%1$s」" + "%1$sの連絡先の詳細" diff --git a/java/com/android/dialer/calldetails/res/values-ka/strings.xml b/java/com/android/dialer/calldetails/res/values-ka/strings.xml index b181aa485..1cd7bc219 100644 --- a/java/com/android/dialer/calldetails/res/values-ka/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ka/strings.xml @@ -25,4 +25,5 @@ "ფოტო გაიგზავნა" "მიღებულია ფოტო" "„%1$s“" + "%1$s-ის საკონტაქტო დეტალები" diff --git a/java/com/android/dialer/calldetails/res/values-kk/strings.xml b/java/com/android/dialer/calldetails/res/values-kk/strings.xml index 2608945c6..1923cf79b 100644 --- a/java/com/android/dialer/calldetails/res/values-kk/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-kk/strings.xml @@ -25,4 +25,5 @@ "Сурет жіберілді" "Сурет қабылданды" "\"%1$s\"" + "%1$s контакт деректері" diff --git a/java/com/android/dialer/calldetails/res/values-km/strings.xml b/java/com/android/dialer/calldetails/res/values-km/strings.xml index 045503408..e0472796f 100644 --- a/java/com/android/dialer/calldetails/res/values-km/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-km/strings.xml @@ -25,4 +25,5 @@ "បានផ្ញើរូបថត" "បាន​ទទួល​រូបថត" "\"%1$s\"" + "ព័ត៌មាន​ទំនាក់​ទំនង​លម្អិត​សម្រាប់ %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-kn/strings.xml b/java/com/android/dialer/calldetails/res/values-kn/strings.xml index 0f9e0f860..66c0d6349 100644 --- a/java/com/android/dialer/calldetails/res/values-kn/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-kn/strings.xml @@ -25,4 +25,5 @@ "ಫೋಟೋ ಕಳುಹಿಸಲಾಗಿದೆ" "ಫೋಟೋ ಸ್ವೀಕರಿಸಲಾಗಿದೆ" "\"%1$s\"" + "%1$s ಗೆ ಸಂಪರ್ಕ ವಿವರಗಳು" diff --git a/java/com/android/dialer/calldetails/res/values-ko/strings.xml b/java/com/android/dialer/calldetails/res/values-ko/strings.xml index aec06cbb6..35c503858 100644 --- a/java/com/android/dialer/calldetails/res/values-ko/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ko/strings.xml @@ -25,4 +25,5 @@ "사진 전송됨" "사진 수신됨" "\'%1$s\'" + "%1$s의 연락처 세부정보" diff --git a/java/com/android/dialer/calldetails/res/values-ky/strings.xml b/java/com/android/dialer/calldetails/res/values-ky/strings.xml index 2f87e2409..fe37b33bd 100644 --- a/java/com/android/dialer/calldetails/res/values-ky/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ky/strings.xml @@ -25,4 +25,5 @@ "Сүрөт жөнөтүлдү" "Сүрөт алынды" "\"%1$s\"" + "%1$s байланыш маалыматтары" diff --git a/java/com/android/dialer/calldetails/res/values-lo/strings.xml b/java/com/android/dialer/calldetails/res/values-lo/strings.xml index 864bbf6b9..85b636acd 100644 --- a/java/com/android/dialer/calldetails/res/values-lo/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-lo/strings.xml @@ -25,4 +25,5 @@ "ສົ່ງຮູບພາບ" "ໄດ້ຮັບຮູບພາບແລ້ວ" "\"%1$s\"" + "ລາຍລະອຽດ​ການຕິດຕໍ່​ສຳລັບ %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-lt/strings.xml b/java/com/android/dialer/calldetails/res/values-lt/strings.xml index 084eb5100..9c8ad7b7f 100644 --- a/java/com/android/dialer/calldetails/res/values-lt/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-lt/strings.xml @@ -25,4 +25,5 @@ "Išsiuntė nuotrauką" "Gavo nuotrauką" "„%1$s“" + "Išsami kontaktinė informacija: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-lv/strings.xml b/java/com/android/dialer/calldetails/res/values-lv/strings.xml index 53880a638..d8783935b 100644 --- a/java/com/android/dialer/calldetails/res/values-lv/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-lv/strings.xml @@ -25,4 +25,5 @@ "Nosūtīja fotoattēlu" "Saņēma fotoattēlu" "“%1$s”" + "Kontaktpersonas informācija: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-mk/strings.xml b/java/com/android/dialer/calldetails/res/values-mk/strings.xml index 394ab2772..9388ae070 100644 --- a/java/com/android/dialer/calldetails/res/values-mk/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-mk/strings.xml @@ -25,4 +25,5 @@ "Испрати фотографија" "Прими фотографија" "„%1$s“" + "Детали за контакт за %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ml/strings.xml b/java/com/android/dialer/calldetails/res/values-ml/strings.xml index 7767ef48c..d29691159 100644 --- a/java/com/android/dialer/calldetails/res/values-ml/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ml/strings.xml @@ -25,4 +25,5 @@ "ഒരു ഫോട്ടോ അയച്ചു" "ഒരു ഫോട്ടോ ലഭിച്ചു" "\"%1$s\"" + "%1$s എന്നതിന്റെ കോൺ‌ടാക്റ്റ് വിശദാംശങ്ങൾ" diff --git a/java/com/android/dialer/calldetails/res/values-mn/strings.xml b/java/com/android/dialer/calldetails/res/values-mn/strings.xml index 1a02f1c28..cb264e016 100644 --- a/java/com/android/dialer/calldetails/res/values-mn/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-mn/strings.xml @@ -25,4 +25,5 @@ "Зураг илгээсэн" "Зураг хүлээн авсан" "\"%1$s\"" + "%1$s-н харилцагчийн мэдээлэл" diff --git a/java/com/android/dialer/calldetails/res/values-mr/strings.xml b/java/com/android/dialer/calldetails/res/values-mr/strings.xml index d76dec429..5c31e361e 100644 --- a/java/com/android/dialer/calldetails/res/values-mr/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-mr/strings.xml @@ -25,4 +25,5 @@ "एक फोटो पाठविला" "एक फोटो प्राप्त झाला" "\"%1$s\"" + "%1$s साठी संपर्क तपशील" diff --git a/java/com/android/dialer/calldetails/res/values-ms/strings.xml b/java/com/android/dialer/calldetails/res/values-ms/strings.xml index d9dbfc679..da17d6edb 100644 --- a/java/com/android/dialer/calldetails/res/values-ms/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ms/strings.xml @@ -25,4 +25,5 @@ "Menghantar foto" "Foto diterima" "\"%1$s\"" + "Butiran hubungan untuk %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-my/strings.xml b/java/com/android/dialer/calldetails/res/values-my/strings.xml index dc3cc5ada..75508d8d4 100644 --- a/java/com/android/dialer/calldetails/res/values-my/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-my/strings.xml @@ -25,4 +25,5 @@ "ဓာတ်ပုံ ပို့လိုက်သည်" "ဓာတ်ပုံ လက်ခံရရှိသည်" "\"%1$s\"" + "%1$s ၏ အဆက်အသွယ် အသေးစိတ်" diff --git a/java/com/android/dialer/calldetails/res/values-nb/strings.xml b/java/com/android/dialer/calldetails/res/values-nb/strings.xml index a391f15c3..022025fa3 100644 --- a/java/com/android/dialer/calldetails/res/values-nb/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-nb/strings.xml @@ -25,4 +25,5 @@ "Et bilde ble sendt" "Et bilde ble mottatt" %1$s»" + "Kontaktinformasjon for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ne/strings.xml b/java/com/android/dialer/calldetails/res/values-ne/strings.xml index 7ceb86660..8fe355ba6 100644 --- a/java/com/android/dialer/calldetails/res/values-ne/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ne/strings.xml @@ -25,4 +25,5 @@ "एउटा तस्बिर पठाइयो" "एउटा तस्बिर प्राप्त भयो" "\"%1$s\"" + "%1$s का सम्पर्क विवरणहरू" diff --git a/java/com/android/dialer/calldetails/res/values-nl/strings.xml b/java/com/android/dialer/calldetails/res/values-nl/strings.xml index 449875310..71657b813 100644 --- a/java/com/android/dialer/calldetails/res/values-nl/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-nl/strings.xml @@ -25,4 +25,5 @@ "Foto verzonden" "Foto ontvangen" "\'%1$s\'" + "Contactgegevens voor %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-no/strings.xml b/java/com/android/dialer/calldetails/res/values-no/strings.xml index a391f15c3..022025fa3 100644 --- a/java/com/android/dialer/calldetails/res/values-no/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-no/strings.xml @@ -25,4 +25,5 @@ "Et bilde ble sendt" "Et bilde ble mottatt" %1$s»" + "Kontaktinformasjon for %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-pa/strings.xml b/java/com/android/dialer/calldetails/res/values-pa/strings.xml index 9bf3ed016..d4f175943 100644 --- a/java/com/android/dialer/calldetails/res/values-pa/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-pa/strings.xml @@ -25,4 +25,5 @@ "ਇੱਕ ਫ਼ੋਟੋ ਭੇਜੀ ਗਈ" "ਇੱਕ ਫ਼ੋਟੋ ਪ੍ਰਾਪਤ ਹੋਈ" "\"%1$s\"" + "%1$s ਲਈ ਸੰਪਰਕ ਵੇਰਵੇ" diff --git a/java/com/android/dialer/calldetails/res/values-pl/strings.xml b/java/com/android/dialer/calldetails/res/values-pl/strings.xml index 55cc159a6..96446005d 100644 --- a/java/com/android/dialer/calldetails/res/values-pl/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-pl/strings.xml @@ -25,4 +25,5 @@ "Wysłano zdjęcie" "Odebrano zdjęcie" "„%1$s”" + "Informacje kontaktowe: %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-pt-rBR/strings.xml b/java/com/android/dialer/calldetails/res/values-pt-rBR/strings.xml index 6dd975057..467973d55 100644 --- a/java/com/android/dialer/calldetails/res/values-pt-rBR/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-pt-rBR/strings.xml @@ -25,4 +25,5 @@ "Enviou uma foto" "Recebeu uma foto" "\"%1$s\"" + "Detalhes de contato para %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-pt-rPT/strings.xml b/java/com/android/dialer/calldetails/res/values-pt-rPT/strings.xml index 01726342b..cfbbc0240 100644 --- a/java/com/android/dialer/calldetails/res/values-pt-rPT/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-pt-rPT/strings.xml @@ -25,4 +25,5 @@ "Enviou uma foto" "Recebeu uma foto" "\"%1$s\"" + "Detalhes de contacto de %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-pt/strings.xml b/java/com/android/dialer/calldetails/res/values-pt/strings.xml index 6dd975057..467973d55 100644 --- a/java/com/android/dialer/calldetails/res/values-pt/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-pt/strings.xml @@ -25,4 +25,5 @@ "Enviou uma foto" "Recebeu uma foto" "\"%1$s\"" + "Detalhes de contato para %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ro/strings.xml b/java/com/android/dialer/calldetails/res/values-ro/strings.xml index 7d0eec922..e9281ae66 100644 --- a/java/com/android/dialer/calldetails/res/values-ro/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ro/strings.xml @@ -25,4 +25,5 @@ "A fost trimisă o fotografie." "A fost primită o fotografie." "„%1$s”" + "Detalii de contact pentru %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ru/strings.xml b/java/com/android/dialer/calldetails/res/values-ru/strings.xml index 7ce2a9b06..bf981e293 100644 --- a/java/com/android/dialer/calldetails/res/values-ru/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ru/strings.xml @@ -25,4 +25,5 @@ "Отправлена фотография" "Получена фотография" "\"%1$s\"" + "Сведения о контакте %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-si/strings.xml b/java/com/android/dialer/calldetails/res/values-si/strings.xml index a2dfc36ed..5fdca0d52 100644 --- a/java/com/android/dialer/calldetails/res/values-si/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-si/strings.xml @@ -25,4 +25,5 @@ "ඡායාරූපයක් යැවිණි" "ඡායාරූපයක් ලැබිණි" "\"%1$s\"" + "%1$s සඳහා සම්බන්ධතා විස්තර" diff --git a/java/com/android/dialer/calldetails/res/values-sk/strings.xml b/java/com/android/dialer/calldetails/res/values-sk/strings.xml index 4c6e68d49..db0478713 100644 --- a/java/com/android/dialer/calldetails/res/values-sk/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sk/strings.xml @@ -25,4 +25,5 @@ "Bola odoslaná fotka" "Bola prijatá fotka" "„%1$s“" + "%1$s – podrobnosti kontaktu" diff --git a/java/com/android/dialer/calldetails/res/values-sl/strings.xml b/java/com/android/dialer/calldetails/res/values-sl/strings.xml index 7ff432254..98975f406 100644 --- a/java/com/android/dialer/calldetails/res/values-sl/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sl/strings.xml @@ -25,4 +25,5 @@ "Poslana fotografija" "Prejeta fotografija" %1$s«" + "Podrobnosti stika za %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-sq/strings.xml b/java/com/android/dialer/calldetails/res/values-sq/strings.xml index cd90c5cb4..dd9915da5 100644 --- a/java/com/android/dialer/calldetails/res/values-sq/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sq/strings.xml @@ -25,4 +25,5 @@ "U dërgua një fotografi" "U mor një fotografi" "\"%1$s\"" + "Detajet e kontaktit për %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-sr/strings.xml b/java/com/android/dialer/calldetails/res/values-sr/strings.xml index cdb68350f..7f4005d78 100644 --- a/java/com/android/dialer/calldetails/res/values-sr/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sr/strings.xml @@ -25,4 +25,5 @@ "Слика је послата" "Слика је примљена" "„%1$s“" + "Контакт информације за %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-sv/strings.xml b/java/com/android/dialer/calldetails/res/values-sv/strings.xml index b33a46800..3967b4ff3 100644 --- a/java/com/android/dialer/calldetails/res/values-sv/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sv/strings.xml @@ -25,4 +25,5 @@ "Skickade ett foto" "Tog emot ett foto" "%1$s" + "Kontaktuppgifter för %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-sw/strings.xml b/java/com/android/dialer/calldetails/res/values-sw/strings.xml index 976d1f890..e5df8230a 100644 --- a/java/com/android/dialer/calldetails/res/values-sw/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-sw/strings.xml @@ -25,4 +25,5 @@ "Picha imetumwa" "Picha imepokelewa" "\"%1$s\"" + "Maelezo ya %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ta/strings.xml b/java/com/android/dialer/calldetails/res/values-ta/strings.xml index abff58fd8..840ad8790 100644 --- a/java/com/android/dialer/calldetails/res/values-ta/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ta/strings.xml @@ -25,4 +25,5 @@ "படம் அனுப்பப்பட்டது" "படம் பெறப்பட்டது" "\"%1$s\"" + "%1$sக்கான தொடர்பு விவரங்கள்" diff --git a/java/com/android/dialer/calldetails/res/values-te/strings.xml b/java/com/android/dialer/calldetails/res/values-te/strings.xml index 9a098005e..3054444ac 100644 --- a/java/com/android/dialer/calldetails/res/values-te/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-te/strings.xml @@ -25,4 +25,5 @@ "ఫోటో పంపబడింది" "ఫోటో స్వీకరించబడింది" "\"%1$s\"" + "%1$s యొక్క సంప్రదింపు వివరాలు" diff --git a/java/com/android/dialer/calldetails/res/values-th/strings.xml b/java/com/android/dialer/calldetails/res/values-th/strings.xml index aacebbb44..e22aec76d 100644 --- a/java/com/android/dialer/calldetails/res/values-th/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-th/strings.xml @@ -25,4 +25,5 @@ "ส่งรูปภาพแล้ว" "ได้รับรูปภาพแล้ว" "\"%1$s\"" + "รายละเอียดรายชื่อติดต่อ %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-tl/strings.xml b/java/com/android/dialer/calldetails/res/values-tl/strings.xml index 74ec6bf9a..81c148e6b 100644 --- a/java/com/android/dialer/calldetails/res/values-tl/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-tl/strings.xml @@ -25,4 +25,5 @@ "Nagpadala ng larawan" "Nakatanggap ng larawan" "\"%1$s\"" + "Mga detalye sa pakikipag-ugnayan para kay/sa %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-tr/strings.xml b/java/com/android/dialer/calldetails/res/values-tr/strings.xml index 35a5ecffd..ade401843 100644 --- a/java/com/android/dialer/calldetails/res/values-tr/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-tr/strings.xml @@ -25,4 +25,5 @@ "Bir fotoğraf gönderildi" "Bir fotoğraf alındı" "\"%1$s\"" + "%1$s için kişi ayrıntıları" diff --git a/java/com/android/dialer/calldetails/res/values-uk/strings.xml b/java/com/android/dialer/calldetails/res/values-uk/strings.xml index 6ef6fc2a1..6538d664d 100644 --- a/java/com/android/dialer/calldetails/res/values-uk/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-uk/strings.xml @@ -25,4 +25,5 @@ "Надіслано фотографію" "Отримано фотографію" "\"%1$s\"" + "Відомості про контакт %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-ur/strings.xml b/java/com/android/dialer/calldetails/res/values-ur/strings.xml index 8188abeba..90c3a590a 100644 --- a/java/com/android/dialer/calldetails/res/values-ur/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-ur/strings.xml @@ -25,4 +25,5 @@ "ایک تصویر بھیجی" "ایک تصویر موصول ہوئی" "\"%1$s\"" + "%1$s کیلئے رابطہ کی تفصیلات" diff --git a/java/com/android/dialer/calldetails/res/values-uz/strings.xml b/java/com/android/dialer/calldetails/res/values-uz/strings.xml index 91f2a70ac..7b443ca2e 100644 --- a/java/com/android/dialer/calldetails/res/values-uz/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-uz/strings.xml @@ -25,4 +25,5 @@ "Rasm yuborildi" "Rasm qabul qilindi" "“%1$s”" + "%1$s kontakt ma’lumotlari" diff --git a/java/com/android/dialer/calldetails/res/values-vi/strings.xml b/java/com/android/dialer/calldetails/res/values-vi/strings.xml index 7446e23aa..7a950216d 100644 --- a/java/com/android/dialer/calldetails/res/values-vi/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-vi/strings.xml @@ -25,4 +25,5 @@ "Đã gửi một ảnh" "Đã nhận một ảnh" "\"%1$s\"" + "Chi tiết liên hệ cho %1$s" diff --git a/java/com/android/dialer/calldetails/res/values-zh-rCN/strings.xml b/java/com/android/dialer/calldetails/res/values-zh-rCN/strings.xml index c083136d3..aad695a73 100644 --- a/java/com/android/dialer/calldetails/res/values-zh-rCN/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-zh-rCN/strings.xml @@ -25,4 +25,5 @@ "发送了一张照片" "收到了一张照片" "“%1$s”" + "%1$s的详细联系信息" diff --git a/java/com/android/dialer/calldetails/res/values-zh-rHK/strings.xml b/java/com/android/dialer/calldetails/res/values-zh-rHK/strings.xml index a7cbe9038..eb5b606b7 100644 --- a/java/com/android/dialer/calldetails/res/values-zh-rHK/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-zh-rHK/strings.xml @@ -25,4 +25,5 @@ "已傳送相片" "已收到相片" "「%1$s」" + "「%1$s」的聯絡人詳細資料" diff --git a/java/com/android/dialer/calldetails/res/values-zh-rTW/strings.xml b/java/com/android/dialer/calldetails/res/values-zh-rTW/strings.xml index 3f2b3822b..fd426c0fa 100644 --- a/java/com/android/dialer/calldetails/res/values-zh-rTW/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-zh-rTW/strings.xml @@ -25,4 +25,5 @@ "傳送了 1 張相片" "收到了 1 張相片" "「%1$s」" + "「%1$s」的聯絡詳細資料" diff --git a/java/com/android/dialer/calldetails/res/values-zu/strings.xml b/java/com/android/dialer/calldetails/res/values-zu/strings.xml index a4fe447a7..d41d1f5cb 100644 --- a/java/com/android/dialer/calldetails/res/values-zu/strings.xml +++ b/java/com/android/dialer/calldetails/res/values-zu/strings.xml @@ -25,4 +25,5 @@ "Uthumele isithombe" "Uthole isithombe" "\"%1$s\"" + "Imininingwane yokuxhumana ka-%1$s" diff --git a/java/com/android/dialer/calldetails/res/values/dimens.xml b/java/com/android/dialer/calldetails/res/values/dimens.xml index 2ca7ea83a..054cd6975 100644 --- a/java/com/android/dialer/calldetails/res/values/dimens.xml +++ b/java/com/android/dialer/calldetails/res/values/dimens.xml @@ -20,10 +20,12 @@ 6dp - 16dp - 40dp - 16dp - 24dp + 16dp + 12dp + 48dp + 4dp + 12dp + 48dp 24dp diff --git a/java/com/android/dialer/calldetails/res/values/strings.xml b/java/com/android/dialer/calldetails/res/values/strings.xml index 8a7cc4cfc..4471605f6 100644 --- a/java/com/android/dialer/calldetails/res/values/strings.xml +++ b/java/com/android/dialer/calldetails/res/values/strings.xml @@ -39,4 +39,11 @@ \"%1$s\" + + + Contact details for %1$s diff --git a/java/com/android/dialer/callintent/CallIntentBuilder.java b/java/com/android/dialer/callintent/CallIntentBuilder.java index a2fb564ab..6066f6654 100644 --- a/java/com/android/dialer/callintent/CallIntentBuilder.java +++ b/java/com/android/dialer/callintent/CallIntentBuilder.java @@ -26,8 +26,6 @@ import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.text.TextUtils; -import com.android.dialer.callintent.nano.CallInitiationType; -import com.android.dialer.callintent.nano.CallSpecificAppData; import com.android.dialer.common.Assert; import com.android.dialer.util.CallUtil; @@ -43,10 +41,10 @@ public class CallIntentBuilder { this.uri = Assert.isNotNull(uri); this.callSpecificAppData = Assert.isNotNull(callSpecificAppData); Assert.checkArgument( - callSpecificAppData.callInitiationType != CallInitiationType.Type.UNKNOWN_INITIATION); + callSpecificAppData.getCallInitiationType() != CallInitiationType.Type.UNKNOWN_INITIATION); } - public CallIntentBuilder(@NonNull Uri uri, int callInitiationType) { + public CallIntentBuilder(@NonNull Uri uri, CallInitiationType.Type callInitiationType) { this(uri, createCallSpecificAppData(callInitiationType)); } @@ -55,7 +53,7 @@ public class CallIntentBuilder { this(CallUtil.getCallUri(Assert.isNotNull(number)), callSpecificAppData); } - public CallIntentBuilder(@NonNull String number, int callInitiationType) { + public CallIntentBuilder(@NonNull String number, CallInitiationType.Type callInitiationType) { this(CallUtil.getCallUri(Assert.isNotNull(number)), callInitiationType); } @@ -100,9 +98,10 @@ public class CallIntentBuilder { return intent; } - private static @NonNull CallSpecificAppData createCallSpecificAppData(int callInitiationType) { - CallSpecificAppData callSpecificAppData = new CallSpecificAppData(); - callSpecificAppData.callInitiationType = callInitiationType; + private static @NonNull CallSpecificAppData createCallSpecificAppData( + CallInitiationType.Type callInitiationType) { + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder().setCallInitiationType(callInitiationType).build(); return callSpecificAppData; } } diff --git a/java/com/android/dialer/callintent/CallIntentParser.java b/java/com/android/dialer/callintent/CallIntentParser.java index 40c8ee348..b54f7c78b 100644 --- a/java/com/android/dialer/callintent/CallIntentParser.java +++ b/java/com/android/dialer/callintent/CallIntentParser.java @@ -19,10 +19,8 @@ package com.android.dialer.callintent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import com.android.dialer.callintent.nano.CallSpecificAppData; import com.android.dialer.common.Assert; -import com.google.protobuf.nano.InvalidProtocolBufferNanoException; -import com.google.protobuf.nano.MessageNano; +import com.google.protobuf.InvalidProtocolBufferException; /** Parses data for a call extra to get any dialer specific app data. */ public class CallIntentParser { @@ -38,7 +36,7 @@ public class CallIntentParser { } try { return CallSpecificAppData.parseFrom(flatArray); - } catch (InvalidProtocolBufferNanoException e) { + } catch (InvalidProtocolBufferException e) { Assert.fail("unexpected exception: " + e); return null; } @@ -46,8 +44,7 @@ public class CallIntentParser { public static void putCallSpecificAppData( @NonNull Bundle extras, @NonNull CallSpecificAppData callSpecificAppData) { - extras.putByteArray( - Constants.EXTRA_CALL_SPECIFIC_APP_DATA, MessageNano.toByteArray(callSpecificAppData)); + extras.putByteArray(Constants.EXTRA_CALL_SPECIFIC_APP_DATA, callSpecificAppData.toByteArray()); } private CallIntentParser() {} diff --git a/java/com/android/dialer/callintent/call_initiation_type.proto b/java/com/android/dialer/callintent/call_initiation_type.proto new file mode 100644 index 000000000..994399fd9 --- /dev/null +++ b/java/com/android/dialer/callintent/call_initiation_type.proto @@ -0,0 +1,60 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.callintent"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + +package com.android.dialer.callintent; + + +// Different ways a call can be initiated. +message CallInitiationType { + enum Type { + // Initiation type unknown + UNKNOWN_INITIATION = 0; + + // Incoming call initiated by Telecom. + INCOMING_INITIATION = 1; + + DIALPAD = 2; + + SPEED_DIAL = 3; + + REMOTE_DIRECTORY = 4; + + // Call placed via a search result returned by typing into the dialpad. + SMART_DIAL = 5; + + // Call placed via a search result returned by typing into the search box. + REGULAR_SEARCH = 6; + + // Call placed via the call log fragment displayed in the main Dialer + // activity. + CALL_LOG = 7; + + // Call placed via a call log fragment displaying a filtered list of + // voicemails. + CALL_LOG_FILTER = 8; + + // Call placed via the call log fragment containing voicemails only. + VOICEMAIL_LOG = 9; + + // Call placed via the call details screen + CALL_DETAILS = 10; + + // Call placed via the quick contacts card + QUICK_CONTACTS = 11; + + // Call was placed from outside the Dialer (e.g. CALL intent sent + // via third party app) + EXTERNAL_INITIATION = 12; + + LAUNCHER_SHORTCUT = 13; + + CALL_COMPOSER = 14; + + MISSED_CALL_NOTIFICATION = 15; + + CALL_SUBJECT_DIALOG = 16; + } +} diff --git a/java/com/android/dialer/callintent/call_specific_app_data.proto b/java/com/android/dialer/callintent/call_specific_app_data.proto new file mode 100644 index 000000000..20ffc1ff4 --- /dev/null +++ b/java/com/android/dialer/callintent/call_specific_app_data.proto @@ -0,0 +1,20 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.callintent"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + +package com.android.dialer.callintent; + +import "java/com/android/dialer/callintent/call_initiation_type.proto"; + +// Miscellaneous data that's included in a new outgoing call initiated by +// Dialer. The system will pass this data to the InCallUi which can use it +// for logging or for something else. +message CallSpecificAppData { + optional CallInitiationType.Type call_initiation_type = 1; + + optional int32 position_of_selected_search_result = 2; + + optional int32 characters_in_search_string = 3; +} diff --git a/java/com/android/dialer/callintent/nano/CallInitiationType.java b/java/com/android/dialer/callintent/nano/CallInitiationType.java deleted file mode 100644 index 1dddb6ce8..000000000 --- a/java/com/android/dialer/callintent/nano/CallInitiationType.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.android.dialer.callintent.nano; - -/** This file is autogenerated, but javadoc required. */ -@SuppressWarnings("hiding") -public final class CallInitiationType - extends com.google.protobuf.nano.ExtendableMessageNano { - - /** This file is autogenerated, but javadoc required. */ - // enum Type - public interface Type { - public static final int UNKNOWN_INITIATION = 0; - public static final int INCOMING_INITIATION = 1; - public static final int DIALPAD = 2; - public static final int SPEED_DIAL = 3; - public static final int REMOTE_DIRECTORY = 4; - public static final int SMART_DIAL = 5; - public static final int REGULAR_SEARCH = 6; - public static final int CALL_LOG = 7; - public static final int CALL_LOG_FILTER = 8; - public static final int VOICEMAIL_LOG = 9; - public static final int CALL_DETAILS = 10; - public static final int QUICK_CONTACTS = 11; - public static final int EXTERNAL_INITIATION = 12; - public static final int LAUNCHER_SHORTCUT = 13; - public static final int CALL_COMPOSER = 14; - public static final int MISSED_CALL_NOTIFICATION = 15; - public static final int CALL_SUBJECT_DIALOG = 16; - } - - private static volatile CallInitiationType[] _emptyArray; - - public static CallInitiationType[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new CallInitiationType[0]; - } - } - } - return _emptyArray; - } - - // @@protoc_insertion_point(class_scope:com.android.dialer.callintent.CallInitiationType) - - public CallInitiationType() { - clear(); - } - - public CallInitiationType clear() { - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public CallInitiationType mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - } - } - } - - public static CallInitiationType parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new CallInitiationType(), data); - } - - public static CallInitiationType parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { - return new CallInitiationType().mergeFrom(input); - } -} diff --git a/java/com/android/dialer/callintent/nano/CallSpecificAppData.java b/java/com/android/dialer/callintent/nano/CallSpecificAppData.java deleted file mode 100644 index fd00b0a68..000000000 --- a/java/com/android/dialer/callintent/nano/CallSpecificAppData.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.android.dialer.callintent.nano; - -/** This file is autogenerated, but javadoc required. */ -@SuppressWarnings("hiding") -public final class CallSpecificAppData - extends com.google.protobuf.nano.ExtendableMessageNano { - - private static volatile CallSpecificAppData[] _emptyArray; - - public static CallSpecificAppData[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new CallSpecificAppData[0]; - } - } - } - return _emptyArray; - } - - // optional int32 call_initiation_type = 1; - public int callInitiationType; - - // optional int32 position_of_selected_search_result = 2; - public int positionOfSelectedSearchResult; - - // optional int32 characters_in_search_string = 3; - public int charactersInSearchString; - - // @@protoc_insertion_point(class_scope:com.android.dialer.callintent.CallSpecificAppData) - - public CallSpecificAppData() { - clear(); - } - - public CallSpecificAppData clear() { - callInitiationType = 0; - positionOfSelectedSearchResult = 0; - charactersInSearchString = 0; - unknownFieldData = null; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.callInitiationType != 0) { - output.writeInt32(1, this.callInitiationType); - } - if (this.positionOfSelectedSearchResult != 0) { - output.writeInt32(2, this.positionOfSelectedSearchResult); - } - if (this.charactersInSearchString != 0) { - output.writeInt32(3, this.charactersInSearchString); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.callInitiationType != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size( - 1, this.callInitiationType); - } - if (this.positionOfSelectedSearchResult != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size( - 2, this.positionOfSelectedSearchResult); - } - if (this.charactersInSearchString != 0) { - size += - com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size( - 3, this.charactersInSearchString); - } - return size; - } - - @Override - public CallSpecificAppData mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: - { - if (!super.storeUnknownField(input, tag)) { - return this; - } - break; - } - case 8: - { - this.callInitiationType = input.readInt32(); - break; - } - case 16: - { - this.positionOfSelectedSearchResult = input.readInt32(); - break; - } - case 24: - { - this.charactersInSearchString = input.readInt32(); - break; - } - } - } - } - - public static CallSpecificAppData parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new CallSpecificAppData(), data); - } - - public static CallSpecificAppData parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { - return new CallSpecificAppData().mergeFrom(input); - } -} diff --git a/java/com/android/dialer/calllog/CallLogComponent.java b/java/com/android/dialer/calllog/CallLogComponent.java new file mode 100644 index 000000000..5cdd2b4d0 --- /dev/null +++ b/java/com/android/dialer/calllog/CallLogComponent.java @@ -0,0 +1,37 @@ +/* + * 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.calllog; + +import android.content.Context; +import com.android.dialer.inject.HasRootComponent; +import dagger.Subcomponent; + +/** Dagger component for the call log package. */ +@Subcomponent +public abstract class CallLogComponent { + + public abstract CallLogFramework callLogFramework(); + + public static CallLogComponent get(Context context) { + return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) + .callLogComponent(); + } + + /** Used to refer to the root application component. */ + public interface HasComponent { + CallLogComponent callLogComponent(); + } +} diff --git a/java/com/android/dialer/calllog/CallLogFramework.java b/java/com/android/dialer/calllog/CallLogFramework.java new file mode 100644 index 000000000..508413b14 --- /dev/null +++ b/java/com/android/dialer/calllog/CallLogFramework.java @@ -0,0 +1,117 @@ +/* + * 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.calllog; + +import android.content.Context; +import android.content.SharedPreferences; +import android.preference.PreferenceManager; +import android.support.annotation.MainThread; +import android.support.annotation.Nullable; +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.common.Assert; +import com.android.dialer.common.ConfigProviderBindings; +import com.android.dialer.common.LogUtil; +import javax.inject.Inject; +import javax.inject.Singleton; + +/** + * Coordinates work across CallLog data sources to detect if the annotated call log is out of date + * ("dirty") and update it if necessary. + * + *

All methods should be called on the main thread. + */ +@Singleton +public final class CallLogFramework implements CallLogDataSource.ContentObserverCallbacks { + + static final String PREF_FORCE_REBUILD = "callLogFrameworkForceRebuild"; + static final String PREF_LAST_REBUILD_TIMESTAMP_MILLIS = "callLogFrameworkLastRebuild"; + + private final DataSources dataSources; + + @Nullable private CallLogUi ui; + + @Inject + CallLogFramework(DataSources dataSources) { + this.dataSources = dataSources; + } + + public boolean isNewCallLogEnabled(Context context) { + return ConfigProviderBindings.get(context).getBoolean("enable_new_call_log_tab", false); + } + + /** Registers the content observers for all data sources. */ + public void registerContentObservers(Context appContext) { + LogUtil.enterBlock("CallLogFramework.registerContentObservers"); + + if (!isNewCallLogEnabled(appContext)) { + return; + } + + for (CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog()) { + dataSource.registerContentObservers(appContext, this); + } + } + + /** + * Attach a UI component to the framework so that it may be notified of changes to the annotated + * call log. + */ + public void attachUi(CallLogUi ui) { + LogUtil.enterBlock("CallLogFramework.attachUi"); + this.ui = ui; + } + + /** + * Detaches the UI from the framework. This should be called when the UI is hidden or destroyed + * and no longer needs to be notified of changes to the annotated call log. + */ + public void detachUi() { + LogUtil.enterBlock("CallLogFramework.detachUi"); + this.ui = null; + } + + /** + * Marks the call log as dirty and notifies any attached UI components. If there are no UI + * components currently attached, this is an efficient operation since it is just writing a shared + * pref. + * + *

We don't want to actually force a rebuild when there is no UI running because we don't want + * to be constantly rebuilding the database when the device is sitting on a desk and receiving a + * lot of calls, for example. + */ + @Override + @MainThread + public void markDirtyAndNotify(Context appContext) { + Assert.isMainThread(); + LogUtil.enterBlock("CallLogFramework.markDirtyAndNotify"); + + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); + sharedPreferences.edit().putBoolean(PREF_FORCE_REBUILD, true).apply(); + + if (ui != null) { + ui.invalidateUi(); + } + } + + /** Callbacks invoked on listening UI components. */ + public interface CallLogUi { + + /** Notifies the call log UI that the annotated call log is out of date. */ + @MainThread + void invalidateUi(); + } +} diff --git a/java/com/android/dialer/calllog/CallLogModule.java b/java/com/android/dialer/calllog/CallLogModule.java new file mode 100644 index 000000000..d7473a75e --- /dev/null +++ b/java/com/android/dialer/calllog/CallLogModule.java @@ -0,0 +1,62 @@ +/* + * 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.calllog; + +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.calllog.datasources.contacts.ContactsDataSource; +import com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource; +import com.android.dialer.common.concurrent.DefaultDialerExecutorFactory; +import com.android.dialer.common.concurrent.DialerExecutorFactory; +import dagger.Binds; +import dagger.Module; +import dagger.Provides; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** Dagger module which satisfies call log dependencies. */ +@Module +public abstract class CallLogModule { + + @Binds + abstract DialerExecutorFactory bindDialerExecutorFactory( + DefaultDialerExecutorFactory defaultDialerExecutorFactory); + + @Provides + static DataSources provideCallLogDataSources( + SystemCallLogDataSource systemCallLogDataSource, ContactsDataSource contactsDataSource) { + // System call log must be first, see getDataSourcesExcludingSystemCallLog below. + List allDataSources = + Collections.unmodifiableList(Arrays.asList(systemCallLogDataSource, contactsDataSource)); + return new DataSources() { + @Override + public SystemCallLogDataSource getSystemCallLogDataSource() { + return systemCallLogDataSource; + } + + @Override + public List getDataSourcesIncludingSystemCallLog() { + return allDataSources; + } + + @Override + public List getDataSourcesExcludingSystemCallLog() { + return allDataSources.subList(1, allDataSources.size()); + } + }; + } +} diff --git a/java/com/android/dialer/calllog/DataSources.java b/java/com/android/dialer/calllog/DataSources.java new file mode 100644 index 000000000..21d190167 --- /dev/null +++ b/java/com/android/dialer/calllog/DataSources.java @@ -0,0 +1,31 @@ +/* + * 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.calllog; + +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource; +import java.util.List; + +/** Immutable lists of data sources used to populate the annotated call log. */ +interface DataSources { + + SystemCallLogDataSource getSystemCallLogDataSource(); + + List getDataSourcesIncludingSystemCallLog(); + + List getDataSourcesExcludingSystemCallLog(); +} diff --git a/java/com/android/dialer/calllog/RefreshAnnotatedCallLogWorker.java b/java/com/android/dialer/calllog/RefreshAnnotatedCallLogWorker.java new file mode 100644 index 000000000..f9f0c9935 --- /dev/null +++ b/java/com/android/dialer/calllog/RefreshAnnotatedCallLogWorker.java @@ -0,0 +1,183 @@ +/* + * 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.calllog; + +import android.annotation.TargetApi; +import android.content.Context; +import android.content.SharedPreferences; +import android.database.sqlite.SQLiteDatabase; +import android.os.Build; +import android.preference.PreferenceManager; +import android.support.annotation.WorkerThread; +import com.android.dialer.calllog.database.AnnotatedCallLog; +import com.android.dialer.calllog.database.CallLogMutations; +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; +import com.android.dialer.common.concurrent.DialerExecutor.Worker; +import javax.inject.Inject; + +/** + * Worker which brings the annotated call log up to date, if necessary. + * + *

Accepts a boolean which indicates if the dirty check should be skipped, and returns true if + * the annotated call log was updated. + */ +public class RefreshAnnotatedCallLogWorker implements Worker { + + private final Context appContext; + private final DataSources dataSources; + + @Inject + public RefreshAnnotatedCallLogWorker(Context appContext, DataSources dataSources) { + this.appContext = appContext; + this.dataSources = dataSources; + } + + @Override + public Boolean doInBackground(Boolean skipDirtyCheck) { + LogUtil.enterBlock("RefreshAnnotatedCallLogWorker.doInBackgroundFallible"); + + long startTime = System.currentTimeMillis(); + boolean annotatedCallLogUpdated = checkDirtyAndRebuildIfNecessary(appContext, skipDirtyCheck); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.doInBackgroundFallible", + "updated? %s, took %dms", + annotatedCallLogUpdated, + System.currentTimeMillis() - startTime); + return annotatedCallLogUpdated; + } + + @WorkerThread + private boolean checkDirtyAndRebuildIfNecessary(Context appContext, boolean skipDirtyCheck) { + Assert.isWorkerThread(); + + long startTime = System.currentTimeMillis(); + + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); + long lastRebuildTimeMillis = + sharedPreferences.getLong(CallLogFramework.PREF_LAST_REBUILD_TIMESTAMP_MILLIS, 0); + if (lastRebuildTimeMillis == 0) { + LogUtil.i( + "RefreshAnnotatedCallLogWorker.checkDirtyAndRebuildIfNecessary", + "annotated call log has never been built, marking it dirty"); + } + boolean forceRebuildPrefValue = + sharedPreferences.getBoolean(CallLogFramework.PREF_FORCE_REBUILD, false); + if (forceRebuildPrefValue) { + LogUtil.i( + "RefreshAnnotatedCallLogWorker.checkDirtyAndRebuildIfNecessary", + "call log has been marked dirty"); + } + + boolean isDirty = + lastRebuildTimeMillis == 0 + || skipDirtyCheck + || forceRebuildPrefValue + || isDirty(appContext); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.checkDirtyAndRebuildIfNecessary", + "isDirty took: %dms", + System.currentTimeMillis() - startTime); + if (isDirty) { + startTime = System.currentTimeMillis(); + rebuild(appContext, lastRebuildTimeMillis); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.checkDirtyAndRebuildIfNecessary", + "rebuild took: %dms", + System.currentTimeMillis() - startTime); + return true; // Annotated call log was updated. + } + return false; // Annotated call log was not updated. + } + + @WorkerThread + private boolean isDirty(Context appContext) { + Assert.isWorkerThread(); + + for (CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog()) { + String dataSourceName = getName(dataSource); + long startTime = System.currentTimeMillis(); + LogUtil.i("RefreshAnnotatedCallLogWorker.isDirty", "running isDirty for %s", dataSourceName); + boolean isDirty = dataSource.isDirty(appContext); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.isDirty", + "%s.isDirty returned %b in %dms", + dataSourceName, + isDirty, + System.currentTimeMillis() - startTime); + if (isDirty) { + return true; + } + } + return false; + } + + @TargetApi(Build.VERSION_CODES.M) // Uses try-with-resources + @WorkerThread + private void rebuild(Context appContext, long lastRebuildTimeMillis) { + Assert.isWorkerThread(); + + // TODO: Start a transaction? + try (SQLiteDatabase database = AnnotatedCallLog.getWritableDatabase(appContext)) { + + CallLogMutations mutations = new CallLogMutations(); + + // System call log data source must go first! + CallLogDataSource systemCallLogDataSource = dataSources.getSystemCallLogDataSource(); + String dataSourceName = getName(systemCallLogDataSource); + LogUtil.i("RefreshAnnotatedCallLogWorker.rebuild", "filling %s", dataSourceName); + long startTime = System.currentTimeMillis(); + systemCallLogDataSource.fill(appContext, database, lastRebuildTimeMillis, mutations); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.rebuild", + "%s.fill took: %dms", + dataSourceName, + System.currentTimeMillis() - startTime); + + for (CallLogDataSource dataSource : dataSources.getDataSourcesExcludingSystemCallLog()) { + dataSourceName = getName(dataSource); + LogUtil.i("RefreshAnnotatedCallLogWorker.rebuild", "filling %s", dataSourceName); + startTime = System.currentTimeMillis(); + dataSource.fill(appContext, database, lastRebuildTimeMillis, mutations); + LogUtil.i( + "CallLogFramework.rebuild", + "%s.fill took: %dms", + dataSourceName, + System.currentTimeMillis() - startTime); + } + LogUtil.i("RefreshAnnotatedCallLogWorker.rebuild", "applying mutations to database"); + startTime = System.currentTimeMillis(); + mutations.applyToDatabase(database); + LogUtil.i( + "RefreshAnnotatedCallLogWorker.rebuild", + "applyToDatabase took: %dms", + System.currentTimeMillis() - startTime); + } + + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); + sharedPreferences + .edit() + .putBoolean(CallLogFramework.PREF_FORCE_REBUILD, false) + .putLong(CallLogFramework.PREF_LAST_REBUILD_TIMESTAMP_MILLIS, System.currentTimeMillis()) + .commit(); + } + + private static String getName(CallLogDataSource dataSource) { + return dataSource.getClass().getSimpleName(); + } +} diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLog.java b/java/com/android/dialer/calllog/database/AnnotatedCallLog.java new file mode 100644 index 000000000..7dca44a60 --- /dev/null +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLog.java @@ -0,0 +1,53 @@ +/* + * 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.calllog.database; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.support.annotation.WorkerThread; +import com.android.dialer.common.Assert; + +/** Static methods and constants for interacting with the annotated call log table. */ +public final class AnnotatedCallLog { + + private static final String DATABASE_NAME = "annotated_call_log.db"; + + public static final String TABLE_NAME = "AnnotatedCallLog"; + + /** Column names for the annotated call log table. */ + public static final class Columns { + public static final String ID = "_id"; + public static final String TIMESTAMP = "timestamp"; + public static final String CONTACT_NAME = "contact_name"; + } + + private AnnotatedCallLog() {} + + @WorkerThread + public static SQLiteDatabase getWritableDatabase(Context appContext) { + Assert.isWorkerThread(); + + return new AnnotatedCallLogDatabaseHelper(appContext, DATABASE_NAME).getWritableDatabase(); + } + + @WorkerThread + public static SQLiteDatabase getReadableDatabase(Context appContext) { + Assert.isWorkerThread(); + + return new AnnotatedCallLogDatabaseHelper(appContext, DATABASE_NAME).getReadableDatabase(); + } +} diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java new file mode 100644 index 000000000..7b28e5505 --- /dev/null +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java @@ -0,0 +1,58 @@ +/* + * 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.calllog.database; + +import static com.android.dialer.calllog.database.AnnotatedCallLog.Columns.CONTACT_NAME; +import static com.android.dialer.calllog.database.AnnotatedCallLog.Columns.ID; +import static com.android.dialer.calllog.database.AnnotatedCallLog.Columns.TIMESTAMP; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; +import com.android.dialer.common.LogUtil; + +/** {@link SQLiteOpenHelper} for the AnnotatedCallLog database. */ +class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { + + AnnotatedCallLogDatabaseHelper(Context appContext, String databaseName) { + super(appContext, databaseName, null, 1); + } + + private static final String CREATE_SQL = + new StringBuilder() + .append("create table if not exists " + AnnotatedCallLog.TABLE_NAME + " (") + .append(ID + " integer primary key, ") + .append(TIMESTAMP + " integer, ") + .append(CONTACT_NAME + " string") + .append(");") + .toString(); + + @Override + public void onCreate(SQLiteDatabase db) { + LogUtil.enterBlock("AnnotatedCallLogDatabaseHelper.onCreate"); + long startTime = System.currentTimeMillis(); + db.execSQL(CREATE_SQL); + // TODO: Consider logging impression. + LogUtil.i( + "AnnotatedCallLogDatabaseHelper.onCreate", + "took: %dms", + System.currentTimeMillis() - startTime); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {} +} diff --git a/java/com/android/dialer/calllog/database/CallLogMutations.java b/java/com/android/dialer/calllog/database/CallLogMutations.java new file mode 100644 index 000000000..ec020c6af --- /dev/null +++ b/java/com/android/dialer/calllog/database/CallLogMutations.java @@ -0,0 +1,58 @@ +/* + * 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.calllog.database; + +import android.content.ContentValues; +import android.database.sqlite.SQLiteDatabase; +import android.support.annotation.WorkerThread; +import android.util.ArrayMap; +import android.util.ArraySet; +import com.android.dialer.common.Assert; + +/** A collection of mutations to the annotated call log. */ +public final class CallLogMutations { + + private final ArrayMap inserts = new ArrayMap<>(); + private final ArrayMap updates = new ArrayMap<>(); + private final ArraySet deletes = new ArraySet<>(); + + /** @param contentValues an entire row not including the ID */ + public void insert(int id, ContentValues contentValues) { + inserts.put(id, contentValues); + } + + /** @param contentValues the specific columns to update, not including the ID. */ + public void update(int id, ContentValues contentValues) { + // TODO: Consider merging automatically. + updates.put(id, contentValues); + } + + public void delete(int id) { + deletes.add(id); + } + + public boolean isEmpty() { + return inserts.isEmpty() && updates.isEmpty() && deletes.isEmpty(); + } + + @WorkerThread + public void applyToDatabase(SQLiteDatabase writableDatabase) { + Assert.isWorkerThread(); + + // TODO: Implementation. + } +} diff --git a/java/com/android/dialer/calllog/datasources/CallLogDataSource.java b/java/com/android/dialer/calllog/datasources/CallLogDataSource.java new file mode 100644 index 000000000..13d0b842d --- /dev/null +++ b/java/com/android/dialer/calllog/datasources/CallLogDataSource.java @@ -0,0 +1,68 @@ +/* + * 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.calllog.datasources; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.support.annotation.MainThread; +import android.support.annotation.WorkerThread; +import com.android.dialer.calllog.database.CallLogMutations; + +/** A source of data for one or more columns in the annotated call log. */ +public interface CallLogDataSource { + + /** + * A lightweight check which runs frequently to detect if the annotated call log is out of date + * with respect to this data source. + * + *

This is typically used to detect external changes to the underlying data source which have + * been made in such a way that the dialer application was not notified. + * + *

Most implementations of this method will rely on some sort of last modified timestamp. If it + * is impossible for a data source to be modified without the dialer application being notified, + * this method may immediately return false. + */ + @WorkerThread + boolean isDirty(Context appContext); + + /** + * Computes the set of mutations necessary to update the annotated call log with respect to this + * data source. + * + * @param mutations the set of mutations which this method should contribute to. Note that it may + * contain inserts from the system call log, and these inserts should be modified by each data + * source. + */ + @WorkerThread + void fill( + Context appContext, + SQLiteDatabase readableDatabase, + long lastRebuildTimeMillis, + CallLogMutations mutations); + + @MainThread + void registerContentObservers( + Context appContext, ContentObserverCallbacks contentObserverCallbacks); + + /** + * Methods which may optionally be called as a result of a data source's content observer firing. + */ + interface ContentObserverCallbacks { + @MainThread + void markDirtyAndNotify(Context appContext); + } +} diff --git a/java/com/android/dialer/calllog/datasources/contacts/ContactsDataSource.java b/java/com/android/dialer/calllog/datasources/contacts/ContactsDataSource.java new file mode 100644 index 000000000..241be5d71 --- /dev/null +++ b/java/com/android/dialer/calllog/datasources/contacts/ContactsDataSource.java @@ -0,0 +1,58 @@ +/* + * 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.calllog.datasources.contacts; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.support.annotation.MainThread; +import android.support.annotation.WorkerThread; +import com.android.dialer.calllog.database.CallLogMutations; +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.common.Assert; +import javax.inject.Inject; + +/** Responsible for maintaining the contacts related columns in the annotated call log. */ +public final class ContactsDataSource implements CallLogDataSource { + + @Inject + public ContactsDataSource() {} + + @WorkerThread + @Override + public boolean isDirty(Context appContext) { + Assert.isWorkerThread(); + + // TODO: Implementation. + return false; + } + + @WorkerThread + @Override + public void fill( + Context appContext, + SQLiteDatabase readableDatabase, + long lastRebuildTimeMillis, + CallLogMutations mutations) { + Assert.isWorkerThread(); + // TODO: Implementation. + } + + @MainThread + @Override + public void registerContentObservers( + Context appContext, ContentObserverCallbacks contentObserverCallbacks) {} +} diff --git a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java new file mode 100644 index 000000000..1cc51ee99 --- /dev/null +++ b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java @@ -0,0 +1,114 @@ +/* + * 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.calllog.datasources.systemcalllog; + +import android.content.Context; +import android.database.ContentObserver; +import android.database.sqlite.SQLiteDatabase; +import android.net.Uri; +import android.os.Handler; +import android.provider.CallLog; +import android.support.annotation.MainThread; +import android.support.annotation.WorkerThread; +import com.android.dialer.calllog.database.CallLogMutations; +import com.android.dialer.calllog.datasources.CallLogDataSource; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; +import com.android.dialer.common.concurrent.ThreadUtil; +import javax.inject.Inject; + +/** + * Responsible for defining the rows in the annotated call log and maintaining the columns in it + * which are derived from the system call log. + */ +public class SystemCallLogDataSource implements CallLogDataSource { + + @Inject + public SystemCallLogDataSource() {} + + @MainThread + @Override + public void registerContentObservers( + Context appContext, ContentObserverCallbacks contentObserverCallbacks) { + Assert.isMainThread(); + + appContext + .getContentResolver() + .registerContentObserver( + CallLog.Calls.CONTENT_URI, + true, + new CallLogObserver( + ThreadUtil.getUiThreadHandler(), appContext, contentObserverCallbacks)); + } + + @WorkerThread + @Override + public boolean isDirty(Context appContext) { + Assert.isWorkerThread(); + + /* + * The system call log has a last updated timestamp, but deletes are physical (the "deleted" + * column is unused). This means that we can't detect deletes without scanning the entire table, + * which would be too slow. So, we just rely on content observers to trigger rebuilds when any + * change is made to the system call log. + */ + return false; + } + + @WorkerThread + @Override + public void fill( + Context appContext, + SQLiteDatabase readableDatabase, + long lastRebuildTimeMillis, + CallLogMutations mutations) { + Assert.isWorkerThread(); + + // This data source should always run first so the mutations should always be empty. + Assert.checkState(mutations.isEmpty()); + + // TODO: Implementation. + } + + private static class CallLogObserver extends ContentObserver { + private final Context appContext; + private final ContentObserverCallbacks contentObserverCallbacks; + + CallLogObserver( + Handler handler, Context appContext, ContentObserverCallbacks contentObserverCallbacks) { + super(handler); + this.appContext = appContext; + this.contentObserverCallbacks = contentObserverCallbacks; + } + + @MainThread + @Override + public void onChange(boolean selfChange, Uri uri) { + Assert.isMainThread(); + LogUtil.enterBlock("SystemCallLogDataSource.CallLogObserver.onChange"); + super.onChange(selfChange, uri); + + /* + * The system call log has a last updated timestamp, but deletes are physical (the "deleted" + * column is unused). This means that we can't detect deletes without scanning the entire + * table, which would be too slow. So, we just rely on content observers to trigger rebuilds + * when any change is made to the system call log. + */ + contentObserverCallbacks.markDirtyAndNotify(appContext); + } + } +} diff --git a/java/com/android/dialer/calllog/ui/AndroidManifest.xml b/java/com/android/dialer/calllog/ui/AndroidManifest.xml new file mode 100644 index 000000000..228167749 --- /dev/null +++ b/java/com/android/dialer/calllog/ui/AndroidManifest.xml @@ -0,0 +1,16 @@ + + diff --git a/java/com/android/dialer/calllog/ui/AnnotatedCallLogCursorLoader.java b/java/com/android/dialer/calllog/ui/AnnotatedCallLogCursorLoader.java new file mode 100644 index 000000000..cd8622e80 --- /dev/null +++ b/java/com/android/dialer/calllog/ui/AnnotatedCallLogCursorLoader.java @@ -0,0 +1,48 @@ +/* + * 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.calllog.ui; + +import android.annotation.TargetApi; +import android.content.Context; +import android.content.CursorLoader; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Build; +import com.android.dialer.calllog.database.AnnotatedCallLog; +import com.android.dialer.calllog.database.AnnotatedCallLog.Columns; + +/** CursorLoader which reads the annotated call log. */ +class AnnotatedCallLogCursorLoader extends CursorLoader { + + AnnotatedCallLogCursorLoader(Context context) { + super(context); + } + + @TargetApi(Build.VERSION_CODES.M) // Uses try-with-resources + @Override + public Cursor loadInBackground() { + try (SQLiteDatabase readableDatabase = AnnotatedCallLog.getReadableDatabase(getContext())) { + return readableDatabase.rawQuery( + "SELECT * FROM " + + AnnotatedCallLog.TABLE_NAME + + " ORDER BY " + + Columns.TIMESTAMP + + " DESC", + null /* selectionArgs */); + } + } +} diff --git a/java/com/android/dialer/calllog/ui/NewCallLogFragment.java b/java/com/android/dialer/calllog/ui/NewCallLogFragment.java new file mode 100644 index 000000000..b8f2b1326 --- /dev/null +++ b/java/com/android/dialer/calllog/ui/NewCallLogFragment.java @@ -0,0 +1,138 @@ +/* + * 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.calllog.ui; + +import android.app.Fragment; +import android.app.LoaderManager.LoaderCallbacks; +import android.content.Context; +import android.content.Loader; +import android.database.Cursor; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.CursorAdapter; +import android.widget.ListView; +import android.widget.SimpleCursorAdapter; +import android.widget.TextView; +import com.android.dialer.calllog.CallLogComponent; +import com.android.dialer.calllog.CallLogFramework; +import com.android.dialer.calllog.CallLogFramework.CallLogUi; +import com.android.dialer.calllog.database.AnnotatedCallLog.Columns; +import com.android.dialer.common.LogUtil; +import java.text.SimpleDateFormat; +import java.util.Locale; + +/** The "new" call log fragment implementation, which is built on top of the annotated call log. */ +public final class NewCallLogFragment extends Fragment + implements CallLogUi, LoaderCallbacks { + + private CursorAdapter cursorAdapter; + + public NewCallLogFragment() { + LogUtil.enterBlock("NewCallLogFragment.NewCallLogFragment"); + } + + @Override + public void onCreate(Bundle state) { + super.onCreate(state); + + LogUtil.enterBlock("NewCallLogFragment.onCreate"); + + CallLogFramework callLogFramework = CallLogComponent.get(getContext()).callLogFramework(); + callLogFramework.attachUi(this); + } + + @Override + public void onResume() { + super.onResume(); + + LogUtil.enterBlock("NewCallLogFragment.onResume"); + + CallLogFramework callLogFramework = CallLogComponent.get(getContext()).callLogFramework(); + callLogFramework.attachUi(this); + } + + @Override + public void onPause() { + super.onPause(); + + LogUtil.enterBlock("NewCallLogFragment.onPause"); + + CallLogFramework callLogFramework = CallLogComponent.get(getContext()).callLogFramework(); + callLogFramework.detachUi(); + } + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + LogUtil.enterBlock("NewCallLogFragment.onCreateView"); + + View view = inflater.inflate(R.layout.new_call_log_fragment, container, false); + ListView listView = (ListView) view.findViewById(R.id.list); + + this.cursorAdapter = + new MyCursorAdapter( + getContext(), + R.layout.new_call_log_entry, + null /* cursor */, + new String[] {Columns.TIMESTAMP, Columns.CONTACT_NAME}, + new int[] {R.id.timestamp, R.id.contact_name}, + 0); + listView.setAdapter(cursorAdapter); + + getLoaderManager().initLoader(0, null, this); + + return view; + } + + @Override + public void invalidateUi() { + LogUtil.enterBlock("NewCallLogFragment.invalidateUi"); + // TODO: Implementation. + } + + @Override + public Loader onCreateLoader(int id, Bundle args) { + // TODO: This is sort of weird, do we need to implement a content provider? + return new AnnotatedCallLogCursorLoader(getContext()); + } + + @Override + public void onLoadFinished(Loader loader, Cursor newCursor) { + cursorAdapter.swapCursor(newCursor); + } + + @Override + public void onLoaderReset(Loader loader) { + cursorAdapter.swapCursor(null); + } + + private static class MyCursorAdapter extends SimpleCursorAdapter { + + MyCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to, int flags) { + super(context, layout, c, from, to, flags); + } + + @Override + public void setViewText(TextView view, String text) { + if (view.getId() == R.id.timestamp) { + text = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US).format(Long.valueOf(text)); + } + view.setText(text); + } + } +} diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml new file mode 100644 index 000000000..ee3efd002 --- /dev/null +++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml @@ -0,0 +1,33 @@ + + + + + + + + + \ No newline at end of file diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml new file mode 100644 index 000000000..433dbdd0f --- /dev/null +++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml @@ -0,0 +1,22 @@ + + + + diff --git a/java/com/android/dialer/calllogutils/CallEntryFormatter.java b/java/com/android/dialer/calllogutils/CallEntryFormatter.java index bd6d53f48..bd184bb89 100644 --- a/java/com/android/dialer/calllogutils/CallEntryFormatter.java +++ b/java/com/android/dialer/calllogutils/CallEntryFormatter.java @@ -76,7 +76,7 @@ public class CallEntryFormatter { UCharacter.TITLECASE_NO_LOWERCASE); } - private static CharSequence formatDuration(Context context, long elapsedSeconds) { + private static CharSequence formatDuration(Context context, long elapsedSeconds, boolean a11y) { long minutes = 0; long seconds = 0; @@ -84,10 +84,16 @@ public class CallEntryFormatter { minutes = elapsedSeconds / 60; elapsedSeconds -= minutes * 60; seconds = elapsedSeconds; - return context.getString(R.string.call_details_duration_format, minutes, seconds); + int stringId = + a11y ? R.string.call_details_duration_format_a11y : R.string.call_details_duration_format; + return context.getString(stringId, minutes, seconds); } else { seconds = elapsedSeconds; - return context.getString(R.string.call_details_short_duration_format, seconds); + int stringId = + a11y + ? R.string.call_details_short_duration_format_a11y + : R.string.call_details_short_duration_format; + return context.getString(stringId, seconds); } } @@ -96,13 +102,14 @@ public class CallEntryFormatter { * * @param elapsedSeconds Total elapsed seconds. * @param dataUsage Data usage in bytes, or null if not specified. + * @param a11y {@code true} if string should be talk back friendly. * @return String containing call duration and data usage. */ public static CharSequence formatDurationAndDataUsage( - Context context, long elapsedSeconds, Long dataUsage) { - CharSequence duration = formatDuration(context, elapsedSeconds); + Context context, long elapsedSeconds, long dataUsage, boolean a11y) { + CharSequence duration = formatDuration(context, elapsedSeconds, a11y); List durationItems = new ArrayList<>(); - if (dataUsage != null) { + if (dataUsage > 0) { durationItems.add(duration); durationItems.add(Formatter.formatShortFileSize(context, dataUsage)); return DialerUtils.join(durationItems); diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java index 55672ca07..58e4acfba 100644 --- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java +++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java @@ -232,44 +232,56 @@ public class CallTypeIconsView extends View { * Configures the call icon drawables. A single white call arrow which points down and left is * used as a basis for all of the call arrow icons, applying rotation and colors as needed. * + *

For each drawable we call mutate so that a new instance of the drawable is created. This + * is done so that when we apply a color filter to the drawables, they are recolored across + * dialer. + * * @param context The current context. */ public Resources(Context context, boolean largeIcons) { final android.content.res.Resources r = context.getResources(); int iconId = R.drawable.quantum_ic_call_received_white_24; - incoming = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + Drawable drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + incoming = drawable.mutate(); incoming.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY); // Create a rotated instance of the call arrow for outgoing calls. iconId = R.drawable.quantum_ic_call_made_white_24; - outgoing = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + outgoing = drawable.mutate(); outgoing.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY); // Need to make a copy of the arrow drawable, otherwise the same instance colored // above will be recolored here. iconId = R.drawable.quantum_ic_call_missed_white_24; - missed = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + missed = drawable.mutate(); missed.setColorFilter(r.getColor(R.color.missed_call), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_voicemail_white_24; - voicemail = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + voicemail = drawable.mutate(); voicemail.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_block_white_24; - blocked = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + blocked = drawable.mutate(); blocked.setColorFilter(r.getColor(R.color.blocked_call), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_videocam_white_24; - videoCall = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + videoCall = drawable.mutate(); videoCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_hd_white_24; - hdCall = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + hdCall = drawable.mutate(); hdCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_signal_wifi_4_bar_white_24; - wifiCall = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); + wifiCall = drawable.mutate(); wifiCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY); iconMargin = largeIcons ? 0 : r.getDimensionPixelSize(R.dimen.call_log_icon_margin); diff --git a/java/com/android/dialer/calllogutils/PhoneCallDetails.java b/java/com/android/dialer/calllogutils/PhoneCallDetails.java index 6fa507325..13c528ad2 100644 --- a/java/com/android/dialer/calllogutils/PhoneCallDetails.java +++ b/java/com/android/dialer/calllogutils/PhoneCallDetails.java @@ -27,7 +27,7 @@ import android.text.TextUtils; import com.android.contacts.common.ContactsUtils.UserType; import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.ContactDisplayUtils; -import com.android.dialer.phonenumbercache.CachedNumberLookupService.CachedContactInfo.ContactSourceType; +import com.android.dialer.logging.ContactSource; import com.android.dialer.phonenumbercache.ContactInfo; /** The details of a phone call to be shown in the UI. */ @@ -82,7 +82,7 @@ public class PhoneCallDetails { public Uri photoUri; // The source type of the contact associated with this call. - public @ContactSourceType int sourceType; + public ContactSource.Type sourceType; // The object id type of the contact associated with this call. public String objectId; diff --git a/java/com/android/dialer/calllogutils/res/values-af/strings.xml b/java/com/android/dialer/calllogutils/res/values-af/strings.xml index d4d615e79..1858a7210 100644 --- a/java/com/android/dialer/calllogutils/res/values-af/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-af/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "op %1$s, via %2$s" "Stemboodskap" - "%s m. %s s." - "%s s." + "%d m. %d s." + "%d s." + "%d minute %d sekondes" + "%d sekondes" diff --git a/java/com/android/dialer/calllogutils/res/values-am/strings.xml b/java/com/android/dialer/calllogutils/res/values-am/strings.xml index 80a71c93f..2d4f10ddd 100644 --- a/java/com/android/dialer/calllogutils/res/values-am/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-am/strings.xml @@ -35,6 +35,8 @@ "በ %1$s በኩል" "በ %1$s ላይ፣ በ %2$s በኩል" "የድምፅ መልእክት" - "%s%sሰ" - "%s ሰከንዶች" + "%d%dሰ" + "%d ሰከንዶች" + "%d ደቂቃዎች %d ሰከንዶች" + "%d ሰከንዶች" diff --git a/java/com/android/dialer/calllogutils/res/values-ar/strings.xml b/java/com/android/dialer/calllogutils/res/values-ar/strings.xml index 04cc6d9ac..49a96ffbf 100644 --- a/java/com/android/dialer/calllogutils/res/values-ar/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ar/strings.xml @@ -35,6 +35,8 @@ "من خلال %1$s" "على %1$s من خلال %2$s" "البريد الصوتي" - "%s د %s ث" - "%s ثانية" + "%d د %d ث" + "%d ثانية" + "%d دقيقة %d ثانية" + "%d ثانية" diff --git a/java/com/android/dialer/calllogutils/res/values-az/strings.xml b/java/com/android/dialer/calllogutils/res/values-az/strings.xml index 76726120c..8bf5c03d1 100644 --- a/java/com/android/dialer/calllogutils/res/values-az/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-az/strings.xml @@ -35,6 +35,8 @@ "%1$s vasitəsilə" "%2$s vasitəsilə %1$s hesabında" "Səsli e-məktub" - "%s dəq %s san" - "%ssan" + "%d dəq %d san" + "%dsan" + "%d dəqiqə %d saniyə" + "%d saniyə" diff --git a/java/com/android/dialer/calllogutils/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/calllogutils/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..0d658c455 --- /dev/null +++ b/java/com/android/dialer/calllogutils/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,42 @@ + + + + + "Dolazni poziv" + "Dolazni poziv je prenet na drugi uređaj" + "Odlazni poziv" + "Odlazni poziv je prenet na drugi uređaj" + "Propušten poziv" + "Dolazni video poziv" + "Dolazni video poziv je prenet na drugi uređaj" + "Odlazni video poziv" + "Odlazni video poziv je prenet na drugi uređaj" + "Propušten video poziv" + "Govorna pošta" + "Odbijen poziv" + "Blokiran poziv" + "Poziv je prihvaćen na drugom uređaju" + "na ^1" + "preko %1$s" + "na %1$s, preko %2$s" + "Govorna pošta" + "%d m %d s" + "%d s" + "%d min %d sek" + "%d sek" + diff --git a/java/com/android/dialer/calllogutils/res/values-be/strings.xml b/java/com/android/dialer/calllogutils/res/values-be/strings.xml index fbb7bf24b..e04d815d5 100644 --- a/java/com/android/dialer/calllogutils/res/values-be/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-be/strings.xml @@ -35,6 +35,8 @@ "праз %1$s" "на %1$s, праз %2$s" "Галасавая пошта" - "%s хв %s с" - "%s с" + "%d хв %d с" + "%d с" + "Хвілін: %d; секунд: %d" + "%d с" diff --git a/java/com/android/dialer/calllogutils/res/values-bg/strings.xml b/java/com/android/dialer/calllogutils/res/values-bg/strings.xml index 4f21eb3f3..716cecb3a 100644 --- a/java/com/android/dialer/calllogutils/res/values-bg/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-bg/strings.xml @@ -35,6 +35,8 @@ "през %1$s" "в/ъв %1$s, през %2$s" "Гласова поща" - "%s мин %s сек" - "%s сек" + "%d мин %d сек" + "%d сек" + "%d минути и %d секунди" + "%d секунди" diff --git a/java/com/android/dialer/calllogutils/res/values-bn/strings.xml b/java/com/android/dialer/calllogutils/res/values-bn/strings.xml index 28b40b448..ab2862e64 100644 --- a/java/com/android/dialer/calllogutils/res/values-bn/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-bn/strings.xml @@ -35,6 +35,8 @@ "%1$s এর মাধ্যমে" "%1$s এ, %2$s এর মাধ্যমে" "ভয়েসমেল" - "%sমিনিট %sসেকেন্ড" - "%sসেকেন্ড" + "%dমিনিট %dসেকেন্ড" + "%dসেকেন্ড" + "%d মিনিট %d সেকেন্ড" + "%d সেকেন্ড" diff --git a/java/com/android/dialer/calllogutils/res/values-bs/strings.xml b/java/com/android/dialer/calllogutils/res/values-bs/strings.xml index c6693d364..27bf8a46a 100644 --- a/java/com/android/dialer/calllogutils/res/values-bs/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-bs/strings.xml @@ -35,6 +35,8 @@ "preko %1$s" "na %1$s, preko %2$s" "Govorna pošta" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min. %d sek." + "%d sek." diff --git a/java/com/android/dialer/calllogutils/res/values-ca/strings.xml b/java/com/android/dialer/calllogutils/res/values-ca/strings.xml index 45b581423..eb26926a1 100644 --- a/java/com/android/dialer/calllogutils/res/values-ca/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ca/strings.xml @@ -35,6 +35,8 @@ "al número %1$s" "a %1$s, al número %2$s" "Bústia de veu" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minuts %d segons" + "%d segons" diff --git a/java/com/android/dialer/calllogutils/res/values-cs/strings.xml b/java/com/android/dialer/calllogutils/res/values-cs/strings.xml index f2de1f887..66b58810d 100644 --- a/java/com/android/dialer/calllogutils/res/values-cs/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-cs/strings.xml @@ -35,6 +35,8 @@ "z čísla %1$s" "na účet %1$s, z čísla %2$s" "Hlasová schránka" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min %d s" + "%d s" diff --git a/java/com/android/dialer/calllogutils/res/values-da/strings.xml b/java/com/android/dialer/calllogutils/res/values-da/strings.xml index 09f5b3d77..aa6ba8a2f 100644 --- a/java/com/android/dialer/calllogutils/res/values-da/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-da/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "til %1$s, via %2$s" "Telefonsvarer" - "%s min. %s sek." - "%s sek." + "%d min. %d sek." + "%d sek." + "%d minutter %d sekunder" + "%d sekunder" diff --git a/java/com/android/dialer/calllogutils/res/values-de/strings.xml b/java/com/android/dialer/calllogutils/res/values-de/strings.xml index b71487432..7fd087fb7 100644 --- a/java/com/android/dialer/calllogutils/res/values-de/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-de/strings.xml @@ -35,6 +35,8 @@ "über %1$s" "mit %1$s, über %2$s" "Mailbox" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d Minuten %d Sekunden" + "%d Sekunden" diff --git a/java/com/android/dialer/calllogutils/res/values-el/strings.xml b/java/com/android/dialer/calllogutils/res/values-el/strings.xml index ab9b5e3ee..7a3db9ab8 100644 --- a/java/com/android/dialer/calllogutils/res/values-el/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-el/strings.xml @@ -35,6 +35,8 @@ "μέσω %1$s" "στον λογαριασμό %1$s, μέσω %2$s" "Αυτόματος τηλεφωνητής" - "%sλ %sδ" - "%sδ" + "%dλ %dδ" + "%dδ" + "%d λεπτά, %d δευτερόλεπτα" + "%d δευτερόλεπτα" diff --git a/java/com/android/dialer/calllogutils/res/values-en-rAU/strings.xml b/java/com/android/dialer/calllogutils/res/values-en-rAU/strings.xml index c1105afcc..97ed6cfcc 100644 --- a/java/com/android/dialer/calllogutils/res/values-en-rAU/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-en-rAU/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "on %1$s, via %2$s" "Voicemail" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d minutes %d seconds" + "%d seconds" diff --git a/java/com/android/dialer/calllogutils/res/values-en-rGB/strings.xml b/java/com/android/dialer/calllogutils/res/values-en-rGB/strings.xml index c1105afcc..97ed6cfcc 100644 --- a/java/com/android/dialer/calllogutils/res/values-en-rGB/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-en-rGB/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "on %1$s, via %2$s" "Voicemail" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d minutes %d seconds" + "%d seconds" diff --git a/java/com/android/dialer/calllogutils/res/values-en-rIN/strings.xml b/java/com/android/dialer/calllogutils/res/values-en-rIN/strings.xml index c1105afcc..97ed6cfcc 100644 --- a/java/com/android/dialer/calllogutils/res/values-en-rIN/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-en-rIN/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "on %1$s, via %2$s" "Voicemail" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d minutes %d seconds" + "%d seconds" diff --git a/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml b/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml index 74906bd48..8d25bde11 100644 --- a/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-es-rUS/strings.xml @@ -35,6 +35,8 @@ "por medio de %1$s" "en %1$s por medio de %2$s" "Buzón de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos, %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-es/strings.xml b/java/com/android/dialer/calllogutils/res/values-es/strings.xml index 9ed0b6472..5ad0f5eab 100644 --- a/java/com/android/dialer/calllogutils/res/values-es/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-es/strings.xml @@ -35,6 +35,8 @@ "a través del %1$s" "en %1$s, a través del %2$s" "Buzón de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-et/strings.xml b/java/com/android/dialer/calllogutils/res/values-et/strings.xml index a6a8b9115..9e2cd14fa 100644 --- a/java/com/android/dialer/calllogutils/res/values-et/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-et/strings.xml @@ -35,6 +35,8 @@ "numbri %1$s kaudu" "kontol %1$s, numbri %2$s kaudu" "Kõnepost" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutit %d sekundit" + "%d sekundit" diff --git a/java/com/android/dialer/calllogutils/res/values-eu/strings.xml b/java/com/android/dialer/calllogutils/res/values-eu/strings.xml index 8c960bae6..e1a6b3f15 100644 --- a/java/com/android/dialer/calllogutils/res/values-eu/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-eu/strings.xml @@ -35,6 +35,8 @@ "%1$s bidez" "%1$s kontuan, %2$s bidez" "Erantzungailua" - "%s min eta %s s" - "%s s" + "%d min eta %d s" + "%d s" + "%d minutu eta %d segundo" + "%d segundo" diff --git a/java/com/android/dialer/calllogutils/res/values-fa/strings.xml b/java/com/android/dialer/calllogutils/res/values-fa/strings.xml index adb3d9d21..13c92b8f7 100644 --- a/java/com/android/dialer/calllogutils/res/values-fa/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-fa/strings.xml @@ -35,6 +35,8 @@ "ازطریق %1$s" "در %1$s، ازطریق %2$s" "پست صوتی" - "%s دقیقه %s ثانیه" - "%s ثانیه" + "%d دقیقه %d ثانیه" + "%d ثانیه" + "%d دقیقه و %d ثانیه" + "%d ثانیه" diff --git a/java/com/android/dialer/calllogutils/res/values-fi/strings.xml b/java/com/android/dialer/calllogutils/res/values-fi/strings.xml index 2838e0d0e..1b08ea974 100644 --- a/java/com/android/dialer/calllogutils/res/values-fi/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-fi/strings.xml @@ -35,6 +35,8 @@ "numerosta %1$s" "tililtä %1$s numerosta %2$s" "Vastaaja" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minuuttia %d sekuntia" + "%d sekuntia" diff --git a/java/com/android/dialer/calllogutils/res/values-fr-rCA/strings.xml b/java/com/android/dialer/calllogutils/res/values-fr-rCA/strings.xml index bf4ba171c..1288ae318 100644 --- a/java/com/android/dialer/calllogutils/res/values-fr-rCA/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-fr-rCA/strings.xml @@ -35,6 +35,8 @@ "au %1$s" "sur %1$s, au %2$s" "Messagerie vocale" - "%s min et %s s" - "%s s" + "%d min et %d s" + "%d s" + "%d minutes et %d secondes" + "%d secondes" diff --git a/java/com/android/dialer/calllogutils/res/values-fr/strings.xml b/java/com/android/dialer/calllogutils/res/values-fr/strings.xml index 584c53ad4..a0cee2a9f 100644 --- a/java/com/android/dialer/calllogutils/res/values-fr/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-fr/strings.xml @@ -35,6 +35,8 @@ "au %1$s" "sur %1$s, au %2$s" "Messagerie vocale" - "%s min et %s s" - "%s s" + "%d min et %d s" + "%d s" + "%d minutes %d secondes" + "%d secondes" diff --git a/java/com/android/dialer/calllogutils/res/values-gl/strings.xml b/java/com/android/dialer/calllogutils/res/values-gl/strings.xml index ace85e49b..a2a33f791 100644 --- a/java/com/android/dialer/calllogutils/res/values-gl/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-gl/strings.xml @@ -35,6 +35,8 @@ "a través do %1$s" "en %1$s, a través do %2$s" "Correo de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos e %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-gu/strings.xml b/java/com/android/dialer/calllogutils/res/values-gu/strings.xml index 0e8e0212c..598048883 100644 --- a/java/com/android/dialer/calllogutils/res/values-gu/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-gu/strings.xml @@ -35,6 +35,8 @@ "%1$s મારફતે" "%1$s પર, %2$s મારફતે" "વૉઇસમેઇલ" - "%sમિ %sસે" - "%sસે" + "%dમિ %dસે" + "%dસે" + "%d મિનિટ %d સેકંડ" + "%d સેકંડ" diff --git a/java/com/android/dialer/calllogutils/res/values-hi/strings.xml b/java/com/android/dialer/calllogutils/res/values-hi/strings.xml index 59a6aff7b..e8994bd9f 100644 --- a/java/com/android/dialer/calllogutils/res/values-hi/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-hi/strings.xml @@ -35,6 +35,8 @@ "%1$s से" "%1$s पर, %2$s से" "वॉइसमेल" - "%s मि %s से" - "%s से" + "%d मि %d से" + "%d से" + "%d मिनट %d सेकंड" + "%d सेकंड" diff --git a/java/com/android/dialer/calllogutils/res/values-hr/strings.xml b/java/com/android/dialer/calllogutils/res/values-hr/strings.xml index 38843f15b..ef60cd275 100644 --- a/java/com/android/dialer/calllogutils/res/values-hr/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-hr/strings.xml @@ -35,6 +35,8 @@ "putem broja %1$s" "na računu %1$s, putem broja %2$s" "Govorna pošta" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min %d s" + "%d s" diff --git a/java/com/android/dialer/calllogutils/res/values-hu/strings.xml b/java/com/android/dialer/calllogutils/res/values-hu/strings.xml index e2849b1de..566bf272d 100644 --- a/java/com/android/dialer/calllogutils/res/values-hu/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-hu/strings.xml @@ -35,6 +35,8 @@ "szám: %1$s" "fiók: %1$s, szám: %2$s" "Hangposta" - "%s p %s mp" - "%s mp" + "%d p %d mp" + "%d mp" + "%d perc, %d másodperc" + "%d másodperc" diff --git a/java/com/android/dialer/calllogutils/res/values-hy/strings.xml b/java/com/android/dialer/calllogutils/res/values-hy/strings.xml index 58d51a6be..1b939eca0 100644 --- a/java/com/android/dialer/calllogutils/res/values-hy/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-hy/strings.xml @@ -35,6 +35,8 @@ "%1$s համարից" "%1$s-ին %2$s համարից" "Ձայնային փոստ" - "%s ր %s վ" - "%s վ" + "%d ր %d վ" + "%d վ" + "%d րոպե %d վայրկյան" + "%d վայրկյան" diff --git a/java/com/android/dialer/calllogutils/res/values-in/strings.xml b/java/com/android/dialer/calllogutils/res/values-in/strings.xml index faf93627c..f734419d5 100644 --- a/java/com/android/dialer/calllogutils/res/values-in/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-in/strings.xml @@ -35,6 +35,8 @@ "melalui %1$s" "di %1$s, melalui %2$s" "Pesan suara" - "%sm %sd" - "%sd" + "%dm %dd" + "%dd" + "%d menit %d detik" + "%d detik" diff --git a/java/com/android/dialer/calllogutils/res/values-is/strings.xml b/java/com/android/dialer/calllogutils/res/values-is/strings.xml index e7bbbe10e..5643aee28 100644 --- a/java/com/android/dialer/calllogutils/res/values-is/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-is/strings.xml @@ -35,6 +35,8 @@ "í gegnum %1$s" %1$s, í gegnum %2$s" "Talhólf" - "%s mín. og %s sek." - "%s sek." + "%d mín. og %d sek." + "%d sek." + "%d mínútur %d sekúndur" + "%d sekúndur" diff --git a/java/com/android/dialer/calllogutils/res/values-it/strings.xml b/java/com/android/dialer/calllogutils/res/values-it/strings.xml index 04a0e1b39..808d4e444 100644 --- a/java/com/android/dialer/calllogutils/res/values-it/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-it/strings.xml @@ -35,6 +35,8 @@ "tramite %1$s" "su %1$s, tramite %2$s" "Messaggi vocali" - "%s m %s s" - "%s s" + "%d m %d s" + "%d s" + "%d minuti %d secondi" + "%d secondi" diff --git a/java/com/android/dialer/calllogutils/res/values-iw/strings.xml b/java/com/android/dialer/calllogutils/res/values-iw/strings.xml index 1df6961c5..069a8b89d 100644 --- a/java/com/android/dialer/calllogutils/res/values-iw/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-iw/strings.xml @@ -35,6 +35,8 @@ "דרך %1$s" "בחשבון %1$s, דרך %2$s" "דואר קולי" - "%s דקות ו-%s שניות" - "%s שניות" + "%d דקות ו-%d שניות" + "%d שניות" + "%d דקות ו-%d שניות" + "%d שניות" diff --git a/java/com/android/dialer/calllogutils/res/values-ja/strings.xml b/java/com/android/dialer/calllogutils/res/values-ja/strings.xml index 4baeecc5a..81e8ee510 100644 --- a/java/com/android/dialer/calllogutils/res/values-ja/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ja/strings.xml @@ -35,6 +35,8 @@ "%1$s で受信" "%1$s%2$s)で受信" "ボイスメール" - "%s%s 秒" - "%s 秒" + "%d%d 秒" + "%d 秒" + "%d%d 秒" + "%d 秒" diff --git a/java/com/android/dialer/calllogutils/res/values-ka/strings.xml b/java/com/android/dialer/calllogutils/res/values-ka/strings.xml index b1a4a4177..6bfe5d3ae 100644 --- a/java/com/android/dialer/calllogutils/res/values-ka/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ka/strings.xml @@ -35,6 +35,8 @@ "%1$s-ის მეშვეობით" "%1$s-ზე, %2$s-ის მეშვეობით" "ხმოვანი ფოსტა" - "%sწთ %sწმ" - "%sწმ" + "%dწთ %dწმ" + "%dწმ" + "%d წუთი, %d წამი" + "%d წამი" diff --git a/java/com/android/dialer/calllogutils/res/values-kk/strings.xml b/java/com/android/dialer/calllogutils/res/values-kk/strings.xml index efaef2323..8302bb397 100644 --- a/java/com/android/dialer/calllogutils/res/values-kk/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-kk/strings.xml @@ -35,6 +35,8 @@ "%1$s арқылы" "%1$s, %2$s арқылы" "Дауыстық хабар" - "%sм %sс" - "%s с" + "%dм %dс" + "%d с" + "%d минут %d секунд" + "%d секунд" diff --git a/java/com/android/dialer/calllogutils/res/values-km/strings.xml b/java/com/android/dialer/calllogutils/res/values-km/strings.xml index b5e6c5d8e..91b6d9acd 100644 --- a/java/com/android/dialer/calllogutils/res/values-km/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-km/strings.xml @@ -35,6 +35,8 @@ "តាមរយៈ %1$s" "នៅ​លើ %1$s តាមរយៈ %2$s" "សារ​ជា​សំឡេង" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d នាទី %d វិនាទី" + "%d វិនាទី" diff --git a/java/com/android/dialer/calllogutils/res/values-kn/strings.xml b/java/com/android/dialer/calllogutils/res/values-kn/strings.xml index 44feee9e3..6d6f8864a 100644 --- a/java/com/android/dialer/calllogutils/res/values-kn/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-kn/strings.xml @@ -35,6 +35,8 @@ "%1$s ಮೂಲಕ" "%1$s ರಲ್ಲಿ, %2$s ಮೂಲಕ" "ಧ್ವನಿಮೇಲ್" - "%sನಿ %sಸೆ" - "%sಸೆ" + "%dನಿ %dಸೆ" + "%dಸೆ" + "%d ನಿಮಿಷಗಳು %d ಸೆಕೆಂಡುಗಳು" + "%d ಸೆಕೆಂಡುಗಳು" diff --git a/java/com/android/dialer/calllogutils/res/values-ko/strings.xml b/java/com/android/dialer/calllogutils/res/values-ko/strings.xml index 76ba89b8a..ff49d5b83 100644 --- a/java/com/android/dialer/calllogutils/res/values-ko/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ko/strings.xml @@ -35,6 +35,8 @@ "%1$s번으로 수신" "%1$s에서 %2$s번으로 수신" "음성사서함" - "%s%s초" - "%s초" + "%d%d초" + "%d초" + "%d%d초" + "%d초" diff --git a/java/com/android/dialer/calllogutils/res/values-ky/strings.xml b/java/com/android/dialer/calllogutils/res/values-ky/strings.xml index a91f0bd45..9ec8ca253 100644 --- a/java/com/android/dialer/calllogutils/res/values-ky/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ky/strings.xml @@ -35,6 +35,8 @@ "%1$s аркылуу" "%1$s боюнча %2$s аркылуу" "Үн почтасы" - "%sмүн. %sсек." - "%sсек." + "%dмүн. %dсек." + "%dсек." + "%d мүнөт %d секунд" + "%d секунд" diff --git a/java/com/android/dialer/calllogutils/res/values-lo/strings.xml b/java/com/android/dialer/calllogutils/res/values-lo/strings.xml index 343fc60dd..72efbd872 100644 --- a/java/com/android/dialer/calllogutils/res/values-lo/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-lo/strings.xml @@ -35,6 +35,8 @@ "ຜ່ານ %1$s" "ຢູ່ %1$s, ຜ່ານ %2$s" "ຂໍ້ຄວາມສຽງ" - "%sນທ %sວິ" - "%sວິ" + "%dນທ %dວິ" + "%dວິ" + "%d ນາທີ %d ວິນາທີ" + "%d ວິນາທີ" diff --git a/java/com/android/dialer/calllogutils/res/values-lt/strings.xml b/java/com/android/dialer/calllogutils/res/values-lt/strings.xml index 779e95267..7eaa42b8f 100644 --- a/java/com/android/dialer/calllogutils/res/values-lt/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-lt/strings.xml @@ -35,6 +35,8 @@ "numeriu %1$s" "%1$s, numeriu %2$s" "Balso paštas" - "%s min. %s sek." - "%s sek." + "%d min. %d sek." + "%d sek." + "%d min. %d sek." + "%d sek." diff --git a/java/com/android/dialer/calllogutils/res/values-lv/strings.xml b/java/com/android/dialer/calllogutils/res/values-lv/strings.xml index d02d7ec3a..cf6b32efe 100644 --- a/java/com/android/dialer/calllogutils/res/values-lv/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-lv/strings.xml @@ -35,6 +35,8 @@ "izmantojot numuru %1$s" "kontā %1$s, izmantojot numuru %2$s" "Balss pasts" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minūtes %d sekundes" + "%d sekundes" diff --git a/java/com/android/dialer/calllogutils/res/values-mk/strings.xml b/java/com/android/dialer/calllogutils/res/values-mk/strings.xml index 21872a817..5747c258d 100644 --- a/java/com/android/dialer/calllogutils/res/values-mk/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-mk/strings.xml @@ -35,6 +35,8 @@ "на %1$s" "на %1$s, на %2$s" "Говорна пошта" - "%s мин. %s сек." - "%s сек." + "%d мин. %d сек." + "%d сек." + "%d минути %d секунди" + "%d секунди" diff --git a/java/com/android/dialer/calllogutils/res/values-ml/strings.xml b/java/com/android/dialer/calllogutils/res/values-ml/strings.xml index f6507ae16..fcd59958c 100644 --- a/java/com/android/dialer/calllogutils/res/values-ml/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ml/strings.xml @@ -35,6 +35,8 @@ "%1$s നമ്പർ വഴി" "%2$s നമ്പർ വഴി, %1$s അക്കൗണ്ടിൽ" "വോയ്‌സ്‌മെയിൽ" - "%sമിനിറ്റ് %sസെക്കന്‍ഡ്" - "%sസെക്കൻഡ്" + "%dമിനിറ്റ് %dസെക്കന്‍ഡ്" + "%dസെക്കൻഡ്" + "%d മിനിറ്റ് %d സെക്കൻഡ്" + "%d സെക്കൻഡ്" diff --git a/java/com/android/dialer/calllogutils/res/values-mn/strings.xml b/java/com/android/dialer/calllogutils/res/values-mn/strings.xml index 3f5bbd3ea..cc2043989 100644 --- a/java/com/android/dialer/calllogutils/res/values-mn/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-mn/strings.xml @@ -35,6 +35,8 @@ "%1$s-р" "%1$s дээр, %2$s-р" "Дуут шуудан" - "%sм %sс" - "%sс" + "%dм %dс" + "%dс" + "%d минут %d секунд" + "%d секунд" diff --git a/java/com/android/dialer/calllogutils/res/values-mr/strings.xml b/java/com/android/dialer/calllogutils/res/values-mr/strings.xml index 893851f69..eb1080289 100644 --- a/java/com/android/dialer/calllogutils/res/values-mr/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-mr/strings.xml @@ -35,6 +35,8 @@ "%1$s द्वारे" "%1$s वर, %2$s द्वारे" "व्हॉइसमेल" - "%sमि %sसे" - "%sसे" + "%dमि %dसे" + "%dसे" + "%d मिनिटे %d सेकंद" + "%d सेकंद" diff --git a/java/com/android/dialer/calllogutils/res/values-ms/strings.xml b/java/com/android/dialer/calllogutils/res/values-ms/strings.xml index 1f7a22127..03e75161d 100644 --- a/java/com/android/dialer/calllogutils/res/values-ms/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ms/strings.xml @@ -35,6 +35,8 @@ "melalui %1$s" "pada %1$s, melalui %2$s" "Mel suara" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d minit %d saat" + "%d saat" diff --git a/java/com/android/dialer/calllogutils/res/values-my/strings.xml b/java/com/android/dialer/calllogutils/res/values-my/strings.xml index 8b1337e01..07f0f8915 100644 --- a/java/com/android/dialer/calllogutils/res/values-my/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-my/strings.xml @@ -35,6 +35,8 @@ "%1$s မှတစ်ဆင့်" "%1$s တွင်၊ %2$s မှတစ်ဆင့်" "အသံမေးလ်" - "%sမိနစ် %sစက္ကန့်" - "%sစက္ကန့်" + "%dမိနစ် %dစက္ကန့်" + "%dစက္ကန့်" + "%d မိနစ် %d စက္ကန့်" + "%d စက္ကန့်" diff --git a/java/com/android/dialer/calllogutils/res/values-nb/strings.xml b/java/com/android/dialer/calllogutils/res/values-nb/strings.xml index 7d4622004..0596aa1bd 100644 --- a/java/com/android/dialer/calllogutils/res/values-nb/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-nb/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "på %1$s via %2$s" "Talepost" - "%s m og %s s" - "%s s" + "%d m og %d s" + "%d s" + "%d minutter, %d sekunder" + "%d sekunder" diff --git a/java/com/android/dialer/calllogutils/res/values-ne/strings.xml b/java/com/android/dialer/calllogutils/res/values-ne/strings.xml index d498395f0..31e1e3279 100644 --- a/java/com/android/dialer/calllogutils/res/values-ne/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ne/strings.xml @@ -35,6 +35,8 @@ "%1$s मार्फत" "%1$s मा, %2$s मार्फत" "भ्वाइस मेल" - "%sमिनेट %sसेकेन्ड" - "%sसेकेन्ड" + "%dमिनेट %dसेकेन्ड" + "%dसेकेन्ड" + "%d मिनेट %d सेकेन्ड" + "%d सेकेन्ड" diff --git a/java/com/android/dialer/calllogutils/res/values-nl/strings.xml b/java/com/android/dialer/calllogutils/res/values-nl/strings.xml index 0fcc6ca7f..6801082b3 100644 --- a/java/com/android/dialer/calllogutils/res/values-nl/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-nl/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "op %1$s, via %2$s" "Voicemail" - "%s m %s s" - "%s s" + "%d m %d s" + "%d s" + "%d minuten, %d seconden" + "%d seconden" diff --git a/java/com/android/dialer/calllogutils/res/values-no/strings.xml b/java/com/android/dialer/calllogutils/res/values-no/strings.xml index 7d4622004..0596aa1bd 100644 --- a/java/com/android/dialer/calllogutils/res/values-no/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-no/strings.xml @@ -35,6 +35,8 @@ "via %1$s" "på %1$s via %2$s" "Talepost" - "%s m og %s s" - "%s s" + "%d m og %d s" + "%d s" + "%d minutter, %d sekunder" + "%d sekunder" diff --git a/java/com/android/dialer/calllogutils/res/values-pa/strings.xml b/java/com/android/dialer/calllogutils/res/values-pa/strings.xml index f4cde52ff..e7c6119e2 100644 --- a/java/com/android/dialer/calllogutils/res/values-pa/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pa/strings.xml @@ -35,6 +35,8 @@ "%1$s ਰਾਹੀਂ" "%1$s \'ਤੇ, %2$s ਰਾਹੀਂ" "ਵੌਇਸਮੇਲ" - "%sਮਿੰ %sਸਕਿੰ" - "%sਸਕਿੰ" + "%dਮਿੰ %dਸਕਿੰ" + "%dਸਕਿੰ" + "%d ਮਿੰਟ %d ਸਕਿੰਟ" + "%d ਸਕਿੰਟ" diff --git a/java/com/android/dialer/calllogutils/res/values-pl/strings.xml b/java/com/android/dialer/calllogutils/res/values-pl/strings.xml index f1396cd88..d863c1d9d 100644 --- a/java/com/android/dialer/calllogutils/res/values-pl/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pl/strings.xml @@ -35,6 +35,8 @@ "przez %1$s" "na koncie %1$s, przez %2$s" "Poczta głosowa" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min %d s" + "%d s" diff --git a/java/com/android/dialer/calllogutils/res/values-pt-rBR/strings.xml b/java/com/android/dialer/calllogutils/res/values-pt-rBR/strings.xml index 1e8b733b9..5182576e1 100644 --- a/java/com/android/dialer/calllogutils/res/values-pt-rBR/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pt-rBR/strings.xml @@ -35,6 +35,8 @@ "pelo número %1$s" "em %1$s, pelo número %2$s" "Correio de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml b/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml index f24b83af2..b9c4d2459 100644 --- a/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pt-rPT/strings.xml @@ -35,6 +35,8 @@ "através do número %1$s" "em %1$s, através do número %2$s" "Correio de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-pt/strings.xml b/java/com/android/dialer/calllogutils/res/values-pt/strings.xml index 1e8b733b9..5182576e1 100644 --- a/java/com/android/dialer/calllogutils/res/values-pt/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-pt/strings.xml @@ -35,6 +35,8 @@ "pelo número %1$s" "em %1$s, pelo número %2$s" "Correio de voz" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d minutos %d segundos" + "%d segundos" diff --git a/java/com/android/dialer/calllogutils/res/values-ro/strings.xml b/java/com/android/dialer/calllogutils/res/values-ro/strings.xml index 84497540b..fb4ad6ba1 100644 --- a/java/com/android/dialer/calllogutils/res/values-ro/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ro/strings.xml @@ -35,6 +35,8 @@ "prin %1$s" "pe %1$s, prin %2$s" "Mesagerie vocală" - "%s min. %s sec." - "%s sec." + "%d min. %d sec." + "%d sec." + "%d minute, %d secunde" + "%d secunde" diff --git a/java/com/android/dialer/calllogutils/res/values-ru/strings.xml b/java/com/android/dialer/calllogutils/res/values-ru/strings.xml index 8e6120ab1..7fc772bbb 100644 --- a/java/com/android/dialer/calllogutils/res/values-ru/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ru/strings.xml @@ -35,6 +35,8 @@ "Номер %1$s" "%1$s, номер %2$s" "Голосовая почта" - "%s мин. %s сек." - "%s сек." + "%d мин. %d сек." + "%d сек." + "%d мин. %d сек." + "%d сек." diff --git a/java/com/android/dialer/calllogutils/res/values-si/strings.xml b/java/com/android/dialer/calllogutils/res/values-si/strings.xml index fa24c1c07..5a6e9e650 100644 --- a/java/com/android/dialer/calllogutils/res/values-si/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-si/strings.xml @@ -35,6 +35,8 @@ "%1$s හරහා" "%1$s මත, %2$s හරහා" "හඬ තැපෑල" - "මි%s%s" - "තත්%s" + "මි%d%d" + "තත්%d" + "මිනිත්තු %d තත්පර %d" + "තත්පර %d" diff --git a/java/com/android/dialer/calllogutils/res/values-sk/strings.xml b/java/com/android/dialer/calllogutils/res/values-sk/strings.xml index ee32a0875..edd431a55 100644 --- a/java/com/android/dialer/calllogutils/res/values-sk/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sk/strings.xml @@ -35,6 +35,8 @@ "prostredníctvom čísla %1$s" "v účte %1$s, prostredníctvom čísla %2$s" "Hlasová schránka" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min, %d s" + "%d s" diff --git a/java/com/android/dialer/calllogutils/res/values-sl/strings.xml b/java/com/android/dialer/calllogutils/res/values-sl/strings.xml index 0cf0ab2ca..ee2a64180 100644 --- a/java/com/android/dialer/calllogutils/res/values-sl/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sl/strings.xml @@ -35,6 +35,8 @@ "prek številke %1$s" "v računu %1$s, prek številke %2$s" "Odzivnik" - "%s min %s s" - "%s s" + "%d min %d s" + "%d s" + "%d min in %d s" + "%d s" diff --git a/java/com/android/dialer/calllogutils/res/values-sq/strings.xml b/java/com/android/dialer/calllogutils/res/values-sq/strings.xml index b2a28357c..764a35d98 100644 --- a/java/com/android/dialer/calllogutils/res/values-sq/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sq/strings.xml @@ -35,6 +35,8 @@ "nëpërmjet %1$s" "në %1$s, nëpërmjet %2$s" "Posta zanore" - "%s minuta e %s sekonda" - "%s sekonda" + "%d minuta e %d sekonda" + "%d sekonda" + "%d minuta %d sekonda" + "%d sekonda" diff --git a/java/com/android/dialer/calllogutils/res/values-sr/strings.xml b/java/com/android/dialer/calllogutils/res/values-sr/strings.xml index 49f7473d4..bef1b1683 100644 --- a/java/com/android/dialer/calllogutils/res/values-sr/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sr/strings.xml @@ -35,6 +35,8 @@ "преко %1$s" "на %1$s, преко %2$s" "Говорна пошта" - "%s м %s с" - "%s с" + "%d м %d с" + "%d с" + "%d мин %d сек" + "%d сек" diff --git a/java/com/android/dialer/calllogutils/res/values-sv/strings.xml b/java/com/android/dialer/calllogutils/res/values-sv/strings.xml index eff7210ef..630af12de 100644 --- a/java/com/android/dialer/calllogutils/res/values-sv/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sv/strings.xml @@ -35,6 +35,8 @@ "med %1$s" "på %1$s, med %2$s" "Röstbrevlåda" - "%s m %s s" - "%s s" + "%d m %d s" + "%d s" + "%d minuter, %d sekunder" + "%d sekunder" diff --git a/java/com/android/dialer/calllogutils/res/values-sw/strings.xml b/java/com/android/dialer/calllogutils/res/values-sw/strings.xml index 7810fb14b..fae34e4f1 100644 --- a/java/com/android/dialer/calllogutils/res/values-sw/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-sw/strings.xml @@ -35,6 +35,8 @@ "kupitia %1$s" "kwenye %1$s, kupitia %2$s" "Ujumbe wa sauti" - "Dakika %s sekunde %s" - "Sekunde %s" + "Dakika %d sekunde %d" + "Sekunde %d" + "Dakika %d sekunde %d" + "Sekunde %d" diff --git a/java/com/android/dialer/calllogutils/res/values-ta/strings.xml b/java/com/android/dialer/calllogutils/res/values-ta/strings.xml index b3e60bbc8..4adbe0ec2 100644 --- a/java/com/android/dialer/calllogutils/res/values-ta/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ta/strings.xml @@ -35,6 +35,8 @@ "%1$s மூலம்" "%1$s இல் %2$s மூலம்" "குரலஞ்சல்" - "%sநி %sவி" - "%sவி" + "%dநி %dவி" + "%dவி" + "%d நிமிடங்கள் %d விநாடிகள்" + "%d விநாடிகள்" diff --git a/java/com/android/dialer/calllogutils/res/values-te/strings.xml b/java/com/android/dialer/calllogutils/res/values-te/strings.xml index 4d6553765..91471538d 100644 --- a/java/com/android/dialer/calllogutils/res/values-te/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-te/strings.xml @@ -35,6 +35,8 @@ "%1$s ద్వారా" "%1$sలో, %2$s ద్వారా" "వాయిస్ మెయిల్" - "%sని %sసె" - "%sసె" + "%dని %dసె" + "%dసె" + "%d నిమిషాల %d సెకన్లు" + "%d సెకన్లు" diff --git a/java/com/android/dialer/calllogutils/res/values-th/strings.xml b/java/com/android/dialer/calllogutils/res/values-th/strings.xml index 46d9ec028..33bf725e4 100644 --- a/java/com/android/dialer/calllogutils/res/values-th/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-th/strings.xml @@ -35,6 +35,8 @@ "ผ่าน %1$s" "ใน %1$s ผ่าน %2$s" "ข้อความเสียง" - "%s นาที %s วินาที" - "%s วินาที" + "%d นาที %d วินาที" + "%d วินาที" + "%d นาที %d วินาที" + "%d วินาที" diff --git a/java/com/android/dialer/calllogutils/res/values-tl/strings.xml b/java/com/android/dialer/calllogutils/res/values-tl/strings.xml index b4f4045e3..b4d3e4972 100644 --- a/java/com/android/dialer/calllogutils/res/values-tl/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-tl/strings.xml @@ -35,6 +35,8 @@ "sa pamamagitan ng %1$s" "sa %1$s, sa pamamagitan ng %2$s" "Voicemail" - "%s (na) min. %s (na) segundo" - "%s (na) segundo" + "%d (na) min. %d (na) segundo" + "%d (na) segundo" + "%d (na) minuto %d (na) segundo" + "%d (na) segundo" diff --git a/java/com/android/dialer/calllogutils/res/values-tr/strings.xml b/java/com/android/dialer/calllogutils/res/values-tr/strings.xml index 1a2e762f1..b8dc84cee 100644 --- a/java/com/android/dialer/calllogutils/res/values-tr/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-tr/strings.xml @@ -35,6 +35,8 @@ "%1$s kullanılarak" "%2$s kullanılarak %1$s hesabında" "Sesli mesaj" - "%s dk. %s sn." - "%s sn." + "%d dk. %d sn." + "%d sn." + "%d dakika %d saniye" + "%d saniye" diff --git a/java/com/android/dialer/calllogutils/res/values-uk/strings.xml b/java/com/android/dialer/calllogutils/res/values-uk/strings.xml index 5f3e0aecf..c62f2b0ad 100644 --- a/java/com/android/dialer/calllogutils/res/values-uk/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-uk/strings.xml @@ -35,6 +35,8 @@ "на номер %1$s" "на %1$s на номер %2$s" "Голосова пошта" - "%s хв %s с" - "%s с" + "%d хв %d с" + "%d с" + "%d хв %d с" + "%d с" diff --git a/java/com/android/dialer/calllogutils/res/values-ur/strings.xml b/java/com/android/dialer/calllogutils/res/values-ur/strings.xml index 9872d4368..e9a115452 100644 --- a/java/com/android/dialer/calllogutils/res/values-ur/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-ur/strings.xml @@ -35,6 +35,8 @@ "بذریعہ %1$s" "%1$s پر، بذریعہ %2$s" "صوتی میل" - "%sمنٹ %sسیکنڈ" - "%sسیکنڈ" + "%dمنٹ %dسیکنڈ" + "%dسیکنڈ" + "%d منٹ %d سیکنڈ" + "%d سیکنڈ" diff --git a/java/com/android/dialer/calllogutils/res/values-uz/strings.xml b/java/com/android/dialer/calllogutils/res/values-uz/strings.xml index 7917f4790..b1fe269c2 100644 --- a/java/com/android/dialer/calllogutils/res/values-uz/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-uz/strings.xml @@ -35,6 +35,8 @@ "%1$s raqami orqali" "%1$s, %2$s raqami orqali" "Ovozli pochta" - "%s daq. %s son." - "%s son." + "%d daq. %d son." + "%d son." + "%d daqiqa %d soniya" + "%d soniya" diff --git a/java/com/android/dialer/calllogutils/res/values-vi/strings.xml b/java/com/android/dialer/calllogutils/res/values-vi/strings.xml index b722dc234..790997567 100644 --- a/java/com/android/dialer/calllogutils/res/values-vi/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-vi/strings.xml @@ -35,6 +35,8 @@ "qua %1$s" "trên %1$s, qua %2$s" "Thư thoại" - "%s phút %s giây" - "%s giây" + "%d phút %d giây" + "%d giây" + "%d phút %d giây" + "%d giây" diff --git a/java/com/android/dialer/calllogutils/res/values-zh-rCN/strings.xml b/java/com/android/dialer/calllogutils/res/values-zh-rCN/strings.xml index 6f20642e3..0fd41e89b 100644 --- a/java/com/android/dialer/calllogutils/res/values-zh-rCN/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-zh-rCN/strings.xml @@ -35,6 +35,8 @@ "通过 %1$s" "帐号:%1$s,通过 %2$s" "语音邮件" - "%s%s 秒" - "%s 秒" + "%d%d 秒" + "%d 秒" + "%d%d 秒" + "%d 秒" diff --git a/java/com/android/dialer/calllogutils/res/values-zh-rHK/strings.xml b/java/com/android/dialer/calllogutils/res/values-zh-rHK/strings.xml index 83b68acfb..57c669349 100644 --- a/java/com/android/dialer/calllogutils/res/values-zh-rHK/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-zh-rHK/strings.xml @@ -35,6 +35,8 @@ "透過 %1$s" "在 %1$s 上透過 %2$s" "留言" - "%s%s 秒" - "%s 秒" + "%d%d 秒" + "%d 秒" + "%d 分鐘 %d 秒" + "%d 秒" diff --git a/java/com/android/dialer/calllogutils/res/values-zh-rTW/strings.xml b/java/com/android/dialer/calllogutils/res/values-zh-rTW/strings.xml index 1566f05d4..e9816481e 100644 --- a/java/com/android/dialer/calllogutils/res/values-zh-rTW/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-zh-rTW/strings.xml @@ -35,6 +35,8 @@ "透過 %1$s" "%1$s,透過 %2$s" "語音留言" - "%s 分鐘 %s 秒" - "%s 秒" + "%d 分鐘 %d 秒" + "%d 秒" + "%d%d 秒" + "%d 秒" diff --git a/java/com/android/dialer/calllogutils/res/values-zu/strings.xml b/java/com/android/dialer/calllogutils/res/values-zu/strings.xml index 289ff34fe..226d07d6d 100644 --- a/java/com/android/dialer/calllogutils/res/values-zu/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values-zu/strings.xml @@ -35,6 +35,8 @@ "nge-%1$s" "ku-%1$s, nge-%2$s" "Ivoyisimeyili" - "%sm %ss" - "%ss" + "%dm %ds" + "%ds" + "%d amaminithi %d amasekhondi" + "%d amasekhondi" diff --git a/java/com/android/dialer/calllogutils/res/values/strings.xml b/java/com/android/dialer/calllogutils/res/values/strings.xml index 01a5a9b87..22bfb7b93 100644 --- a/java/com/android/dialer/calllogutils/res/values/strings.xml +++ b/java/com/android/dialer/calllogutils/res/values/strings.xml @@ -83,8 +83,14 @@ Voicemail - %sm %ss + %dm %ds - %ss + %ds + + + %d minutes %d seconds + + + %d seconds \ No newline at end of file diff --git a/java/com/android/dialer/common/concurrent/DefaultDialerExecutorFactory.java b/java/com/android/dialer/common/concurrent/DefaultDialerExecutorFactory.java index 80ed725bc..4b6d81afd 100644 --- a/java/com/android/dialer/common/concurrent/DefaultDialerExecutorFactory.java +++ b/java/com/android/dialer/common/concurrent/DefaultDialerExecutorFactory.java @@ -28,10 +28,14 @@ import com.android.dialer.common.concurrent.DialerExecutor.Worker; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; +import javax.inject.Inject; /** The production {@link DialerExecutorFactory}. */ public class DefaultDialerExecutorFactory implements DialerExecutorFactory { + @Inject + public DefaultDialerExecutorFactory() {} + @Override @NonNull public DialerExecutor.Builder createUiTaskBuilder( @@ -116,14 +120,15 @@ public class DefaultDialerExecutorFactory implements DialerExecutorFactory { @NonNull @Override public DialerExecutor build() { - dialerUiTaskFragment = DialerUiTaskFragment.create( - fragmentManager, - id, - super.worker, - super.successListener, - super.failureListener, - serialExecutorService, - parallelExecutorService); + dialerUiTaskFragment = + DialerUiTaskFragment.create( + fragmentManager, + id, + super.worker, + super.successListener, + super.failureListener, + serialExecutorService, + parallelExecutorService); return new UiDialerExecutor<>(dialerUiTaskFragment); } } diff --git a/java/com/android/dialer/common/concurrent/DialerExecutor.java b/java/com/android/dialer/common/concurrent/DialerExecutor.java index b0d1eac66..0237e3a05 100644 --- a/java/com/android/dialer/common/concurrent/DialerExecutor.java +++ b/java/com/android/dialer/common/concurrent/DialerExecutor.java @@ -33,7 +33,7 @@ public interface DialerExecutor { interface Worker { @WorkerThread @Nullable - OutputT doInBackground(@Nullable InputT input); + OutputT doInBackground(@Nullable InputT input) throws Throwable; } /** Functional interface for handling the result of background work. */ diff --git a/java/com/android/dialer/common/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/common/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..52b5f67e6 --- /dev/null +++ b/java/com/android/dialer/common/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,6 @@ + + + "Wi-Fi" + "Mobilni uređaji" + diff --git a/java/com/android/dialer/constants/ScheduledJobIds.java b/java/com/android/dialer/constants/ScheduledJobIds.java index 88e9a3d4f..fdb3facbc 100644 --- a/java/com/android/dialer/constants/ScheduledJobIds.java +++ b/java/com/android/dialer/constants/ScheduledJobIds.java @@ -28,4 +28,7 @@ public final class ScheduledJobIds { // This job refreshes dynamic launcher shortcuts. public static final int SHORTCUT_PERIODIC_JOB = 100; + + public static final int VVM_TASK_SCHEDULER_JOB = 200; + public static final int VVM_STATUS_CHECK_JOB = 201; } diff --git a/java/com/android/dialer/contactsfragment/AndroidManifest.xml b/java/com/android/dialer/contactsfragment/AndroidManifest.xml new file mode 100644 index 000000000..3c2750073 --- /dev/null +++ b/java/com/android/dialer/contactsfragment/AndroidManifest.xml @@ -0,0 +1,16 @@ + + diff --git a/java/com/android/dialer/contactsfragment/ContactViewHolder.java b/java/com/android/dialer/contactsfragment/ContactViewHolder.java new file mode 100644 index 000000000..5df106dbc --- /dev/null +++ b/java/com/android/dialer/contactsfragment/ContactViewHolder.java @@ -0,0 +1,82 @@ +/* + * 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.contactsfragment; + +import android.net.Uri; +import android.provider.ContactsContract.QuickContact; +import android.support.v7.widget.RecyclerView; +import android.text.TextUtils; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.QuickContactBadge; +import android.widget.TextView; +import com.android.dialer.common.Assert; + +/** View holder for a contact. */ +final class ContactViewHolder extends RecyclerView.ViewHolder implements OnClickListener { + + private final TextView header; + private final TextView name; + private final QuickContactBadge photo; + + private String headerText; + private Uri contactUri; + + public ContactViewHolder(View itemView) { + super(itemView); + itemView.findViewById(R.id.click_target).setOnClickListener(this); + header = (TextView) itemView.findViewById(R.id.header); + name = (TextView) itemView.findViewById(R.id.contact_name); + photo = (QuickContactBadge) itemView.findViewById(R.id.photo); + } + + /** + * Binds the ViewHolder with relevant data. + * + * @param headerText populates the header view. + * @param displayName populates the name view. + * @param contactUri to be shown by the contact card on photo click. + * @param showHeader if header view should be shown {@code True}, {@code False} otherwise. + */ + public void bind(String headerText, String displayName, Uri contactUri, boolean showHeader) { + Assert.checkArgument(!TextUtils.isEmpty(displayName)); + this.contactUri = contactUri; + this.headerText = headerText; + + name.setText(displayName); + header.setText(headerText); + header.setVisibility(showHeader ? View.VISIBLE : View.INVISIBLE); + } + + public QuickContactBadge getPhoto() { + return photo; + } + + public String getHeader() { + return headerText; + } + + public TextView getHeaderView() { + return header; + } + + @Override + public void onClick(View v) { + QuickContact.showQuickContact( + photo.getContext(), photo, contactUri, QuickContact.MODE_LARGE, null /* excludeMimes */); + } +} diff --git a/java/com/android/dialer/contactsfragment/ContactsAdapter.java b/java/com/android/dialer/contactsfragment/ContactsAdapter.java new file mode 100644 index 000000000..4692eff5d --- /dev/null +++ b/java/com/android/dialer/contactsfragment/ContactsAdapter.java @@ -0,0 +1,149 @@ +/* + * 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.contactsfragment; + +import android.content.Context; +import android.database.Cursor; +import android.net.Uri; +import android.provider.ContactsContract.Contacts; +import android.support.v4.util.ArrayMap; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.ViewGroup; +import android.widget.TextView; +import com.android.contacts.common.ContactPhotoManager; +import com.android.dialer.common.Assert; + +/** List adapter for the union of all contacts associated with every account on the device. */ +final class ContactsAdapter extends RecyclerView.Adapter { + + private final ArrayMap holderMap = new ArrayMap<>(); + private final Context context; + private final Cursor cursor; + + // List of contact sublist headers + private final String[] headers; + + // Number of contacts that correspond to each header in {@code headers}. + private final int[] counts; + + public ContactsAdapter(Context context, Cursor cursor) { + this.context = context; + this.cursor = cursor; + headers = cursor.getExtras().getStringArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_TITLES); + counts = cursor.getExtras().getIntArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS); + } + + @Override + public ContactViewHolder onCreateViewHolder(ViewGroup parent, int position) { + return new ContactViewHolder( + LayoutInflater.from(context).inflate(R.layout.contact_row, parent, false)); + } + + @Override + public void onBindViewHolder(ContactViewHolder contactViewHolder, int position) { + holderMap.put(contactViewHolder, position); + cursor.moveToPosition(position); + + String name = getDisplayName(cursor); + String header = getHeaderString(position); + Uri contactUri = getContactUri(cursor); + + ContactPhotoManager.getInstance(context) + .loadDialerThumbnailOrPhoto( + contactViewHolder.getPhoto(), + contactUri, + getPhotoId(cursor), + getPhotoUri(cursor), + name, + 0); + + String photoDescription = + context.getString(com.android.contacts.common.R.string.description_quick_contact_for, name); + contactViewHolder.getPhoto().setContentDescription(photoDescription); + + // Always show the view holder's header if it's the first item in the list. Otherwise, compare + // it to the previous element and only show the anchored header if the row elements fall into + // the same sublists. + if (position == 0) { + contactViewHolder.bind(header, name, contactUri, true); + } else { + boolean showHeader = !header.equals(getHeaderString(position - 1)); + contactViewHolder.bind(header, name, contactUri, showHeader); + } + } + + public void refreshHeaders() { + for (ContactViewHolder holder : holderMap.keySet()) { + onBindViewHolder(holder, holderMap.get(holder)); + } + } + + @Override + public int getItemCount() { + return cursor == null ? 0 : cursor.getCount(); + } + + public String getHeader(int position) { + return getHolderAt(position).getHeader(); + } + + public TextView getHeaderView(int position) { + return getHolderAt(position).getHeaderView(); + } + + public void setHeaderVisibility(int position, int visibility) { + getHolderAt(position).getHeaderView().setVisibility(visibility); + } + + private ContactViewHolder getHolderAt(int position) { + for (ContactViewHolder holder : holderMap.keySet()) { + if (holderMap.get(holder) == position) { + return holder; + } + } + throw Assert.createIllegalStateFailException("No holder for position: " + position); + } + + private static String getDisplayName(Cursor cursor) { + return cursor.getString(ContactsCursorLoader.CONTACT_DISPLAY_NAME); + } + + private static long getPhotoId(Cursor cursor) { + return cursor.getLong(ContactsCursorLoader.CONTACT_PHOTO_ID); + } + + private static Uri getPhotoUri(Cursor cursor) { + String photoUri = cursor.getString(ContactsCursorLoader.CONTACT_PHOTO_URI); + return photoUri == null ? null : Uri.parse(photoUri); + } + + private static Uri getContactUri(Cursor cursor) { + long contactId = cursor.getLong(ContactsCursorLoader.CONTACT_ID); + String lookupKey = cursor.getString(ContactsCursorLoader.CONTACT_LOOKUP_KEY); + return Contacts.getLookupUri(contactId, lookupKey); + } + + private String getHeaderString(int position) { + int index = -1; + int sum = 0; + while (sum <= position) { + sum += counts[++index]; + } + return headers[index]; + } +} diff --git a/java/com/android/dialer/contactsfragment/ContactsCursorLoader.java b/java/com/android/dialer/contactsfragment/ContactsCursorLoader.java new file mode 100644 index 000000000..6d4d21079 --- /dev/null +++ b/java/com/android/dialer/contactsfragment/ContactsCursorLoader.java @@ -0,0 +1,53 @@ +/* + * 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.contactsfragment; + +import android.content.Context; +import android.content.CursorLoader; +import android.provider.ContactsContract.Contacts; + +/** Cursor Loader for {@link ContactsFragment}. */ +final class ContactsCursorLoader extends CursorLoader { + + public static final int CONTACT_ID = 0; + public static final int CONTACT_DISPLAY_NAME = 1; + public static final int CONTACT_PHOTO_ID = 2; + public static final int CONTACT_PHOTO_URI = 3; + public static final int CONTACT_LOOKUP_KEY = 4; + + public static final String[] CONTACTS_PROJECTION = + new String[] { + Contacts._ID, // 0 + Contacts.DISPLAY_NAME_PRIMARY, // 1 + Contacts.PHOTO_ID, // 2 + Contacts.PHOTO_THUMBNAIL_URI, // 3 + Contacts.LOOKUP_KEY, // 4 + }; + + public ContactsCursorLoader(Context context) { + super( + context, + Contacts.CONTENT_URI + .buildUpon() + .appendQueryParameter(Contacts.EXTRA_ADDRESS_BOOK_INDEX, "true") + .build(), + CONTACTS_PROJECTION, + null, + null, + Contacts.SORT_KEY_PRIMARY + " ASC"); + } +} diff --git a/java/com/android/dialer/contactsfragment/ContactsFragment.java b/java/com/android/dialer/contactsfragment/ContactsFragment.java new file mode 100644 index 000000000..18220601f --- /dev/null +++ b/java/com/android/dialer/contactsfragment/ContactsFragment.java @@ -0,0 +1,112 @@ +/* + * 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.contactsfragment; + +import android.app.Fragment; +import android.app.LoaderManager.LoaderCallbacks; +import android.content.Loader; +import android.database.Cursor; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.View.OnScrollChangeListener; +import android.view.ViewGroup; +import android.widget.TextView; + +/** Fragment containing a list of all contacts. */ +public class ContactsFragment extends Fragment + implements LoaderCallbacks, OnScrollChangeListener { + + private TextView anchoredHeader; + private RecyclerView recyclerView; + private LinearLayoutManager manager; + private ContactsAdapter adapter; + + @Nullable + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_contacts, container, false); + anchoredHeader = (TextView) view.findViewById(R.id.header); + manager = new LinearLayoutManager(getContext()); + + // TODO: Handle contacts permission denied view + // TODO: Handle 0 contacts layout + recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view); + recyclerView.setLayoutManager(manager); + getLoaderManager().initLoader(0, null, this); + return view; + } + + @Override + public Loader onCreateLoader(int id, Bundle args) { + return new ContactsCursorLoader(getContext()); + } + + @Override + public void onLoadFinished(Loader loader, Cursor cursor) { + // TODO setup fast scroller. + adapter = new ContactsAdapter(getContext(), cursor); + recyclerView.setAdapter(adapter); + if (adapter.getItemCount() > 1) { + recyclerView.setOnScrollChangeListener(this); + } + } + + @Override + public void onLoaderReset(Loader loader) { + recyclerView.setAdapter(null); + recyclerView.setOnScrollChangeListener(null); + adapter = null; + } + + /* + * When our recycler view updates, we need to ensure that our row headers and anchored header + * are in the correct state. + * + * The general rule is, when the row headers are shown, our anchored header is hidden. When the + * recycler view is scrolling through a sublist that has more than one element, we want to show + * out anchored header, to create the illusion that our row header has been anchored. In all + * other situations, we want to hide the anchor because that means we are transitioning between + * two sublists. + */ + @Override + public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { + int firstVisibleItem = manager.findFirstVisibleItemPosition(); + int firstCompletelyVisible = manager.findFirstCompletelyVisibleItemPosition(); + + // If the user swipes to the top of the list very quickly, there is some strange behavior + // between this method updating headers and adapter#onBindViewHolder updating headers. + // To overcome this, we refresh the headers to ensure they are correct. + if (firstVisibleItem == firstCompletelyVisible && firstVisibleItem == 0) { + adapter.refreshHeaders(); + anchoredHeader.setVisibility(View.INVISIBLE); + } else { + boolean showAnchor = + adapter.getHeader(firstVisibleItem).equals(adapter.getHeader(firstCompletelyVisible)); + anchoredHeader.setText(adapter.getHeader(firstCompletelyVisible)); + anchoredHeader.setVisibility(showAnchor ? View.VISIBLE : View.INVISIBLE); + + int rowHeaderVisibility = showAnchor ? View.INVISIBLE : View.VISIBLE; + adapter.setHeaderVisibility(firstVisibleItem, rowHeaderVisibility); + adapter.setHeaderVisibility(firstCompletelyVisible, rowHeaderVisibility); + } + } +} diff --git a/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml b/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml new file mode 100644 index 000000000..af87c7f18 --- /dev/null +++ b/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml b/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml new file mode 100644 index 000000000..67b490f03 --- /dev/null +++ b/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/java/com/android/dialer/contactsfragment/res/layout/header.xml b/java/com/android/dialer/contactsfragment/res/layout/header.xml new file mode 100644 index 000000000..cb5e78a57 --- /dev/null +++ b/java/com/android/dialer/contactsfragment/res/layout/header.xml @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/java/com/android/dialer/contactsfragment/res/values/dimens.xml b/java/com/android/dialer/contactsfragment/res/values/dimens.xml new file mode 100644 index 000000000..e9d73e99b --- /dev/null +++ b/java/com/android/dialer/contactsfragment/res/values/dimens.xml @@ -0,0 +1,28 @@ + + + + 40dp + 56dp + 56dp + 16dp + 16dp + 8dp + + 16dp + 8dp + 16sp + \ No newline at end of file diff --git a/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_close_black_24dp.png b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_close_black_24dp.png new file mode 100644 index 000000000..1a9cd75a0 Binary files /dev/null and b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_close_black_24dp.png differ diff --git a/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_delete.png b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_delete.png new file mode 100644 index 000000000..e588d90e9 Binary files /dev/null and b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_delete.png differ diff --git a/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_voicemail.png b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_voicemail.png new file mode 100644 index 000000000..4706112d6 Binary files /dev/null and b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_dialpad_voicemail.png differ diff --git a/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_overflow_menu.png b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_overflow_menu.png new file mode 100644 index 000000000..262e9df91 Binary files /dev/null and b/java/com/android/dialer/dialpadview/res/drawable-hdpi/ic_overflow_menu.png differ diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_view.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_view.xml index 47112fbb1..778718632 100644 --- a/java/com/android/dialer/dialpadview/res/layout/dialpad_view.xml +++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_view.xml @@ -18,6 +18,8 @@ diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml index 9f69f983a..838f1eca5 100644 --- a/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml +++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml @@ -21,6 +21,7 @@ android:layout_gravity="bottom" android:background="?attr/dialpad_background" android:clickable="true" + android:elevation="?attr/dialpad_elevation" android:layoutDirection="ltr" android:orientation="vertical"> diff --git a/java/com/android/dialer/dialpadview/res/values-b+sr+Latn/strings.xml b/java/com/android/dialer/dialpadview/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..24ea30816 --- /dev/null +++ b/java/com/android/dialer/dialpadview/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,25 @@ + + + + + "Idite nazad" + "Još opcija" + "backspace" + "plus" + "govorna pošta" + diff --git a/java/com/android/dialer/dialpadview/res/values/attrs.xml b/java/com/android/dialer/dialpadview/res/values/attrs.xml index 273879f3e..d73946e65 100644 --- a/java/com/android/dialer/dialpadview/res/values/attrs.xml +++ b/java/com/android/dialer/dialpadview/res/values/attrs.xml @@ -35,5 +35,6 @@ + diff --git a/java/com/android/dialer/dialpadview/res/values/styles.xml b/java/com/android/dialer/dialpadview/res/values/styles.xml index 2fa2c3f2e..9d30021b9 100644 --- a/java/com/android/dialer/dialpadview/res/values/styles.xml +++ b/java/com/android/dialer/dialpadview/res/values/styles.xml @@ -96,6 +96,7 @@ @dimen/dialpad_zero_key_number_default_margin_bottom @dimen/dialpad_bottom_space_height + 0dp + diff --git a/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml b/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml new file mode 100644 index 000000000..ac2d0316a --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml @@ -0,0 +1,19 @@ + + + + 116dp + diff --git a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml index b1a86a0fa..a53fb6404 100644 --- a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml @@ -1,7 +1,23 @@ + 16dp 72dp 88dp 88dp + 104dp diff --git a/java/com/android/incallui/video/impl/res/values/dimens.xml b/java/com/android/incallui/video/impl/res/values/dimens.xml index 45860036f..aa08c9d6d 100644 --- a/java/com/android/incallui/video/impl/res/values/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values/dimens.xml @@ -1,7 +1,23 @@ + 72dp 72dp + 84dp 24dp 24dp 24dp diff --git a/java/com/android/incallui/video/impl/res/values/styles.xml b/java/com/android/incallui/video/impl/res/values/styles.xml index b94400875..f73075f09 100644 --- a/java/com/android/incallui/video/impl/res/values/styles.xml +++ b/java/com/android/incallui/video/impl/res/values/styles.xml @@ -1,6 +1,20 @@ + - + diff --git a/java/com/android/incallui/videotech/VideoTech.java b/java/com/android/incallui/videotech/VideoTech.java index 39998ad4c..7da74c057 100644 --- a/java/com/android/incallui/videotech/VideoTech.java +++ b/java/com/android/incallui/videotech/VideoTech.java @@ -78,5 +78,7 @@ public interface VideoTech { void onPeerDimensionsChanged(int width, int height); void onVideoUpgradeRequestReceived(); + + void onUpgradedToVideo(boolean switchToSpeaker); } } diff --git a/java/com/android/incallui/videotech/ims/ImsVideoCallCallback.java b/java/com/android/incallui/videotech/ims/ImsVideoCallCallback.java index 9b5222e10..17c2e6518 100644 --- a/java/com/android/incallui/videotech/ims/ImsVideoCallCallback.java +++ b/java/com/android/incallui/videotech/ims/ImsVideoCallCallback.java @@ -24,6 +24,8 @@ import android.telecom.InCallService.VideoCall; import android.telecom.VideoProfile; import android.telecom.VideoProfile.CameraCapabilities; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.logging.LoggingBindings; import com.android.incallui.videotech.VideoTech.VideoTechListener; import com.android.incallui.videotech.utils.SessionModificationState; @@ -31,12 +33,18 @@ import com.android.incallui.videotech.utils.SessionModificationState; public class ImsVideoCallCallback extends VideoCall.Callback { private static final int CLEAR_FAILED_REQUEST_TIMEOUT_MILLIS = 4000; private final Handler handler = new Handler(); + private final LoggingBindings logger; private final Call call; private final ImsVideoTech videoTech; private final VideoTechListener listener; private int requestedVideoState = VideoProfile.STATE_AUDIO_ONLY; - ImsVideoCallCallback(final Call call, ImsVideoTech videoTech, VideoTechListener listener) { + ImsVideoCallCallback( + final LoggingBindings logger, + final Call call, + ImsVideoTech videoTech, + VideoTechListener listener) { + this.logger = logger; this.call = call; this.videoTech = videoTech; this.listener = listener; @@ -61,6 +69,7 @@ public class ImsVideoCallCallback extends VideoCall.Callback { videoTech.setSessionModificationState( SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST); listener.onVideoUpgradeRequestReceived(); + logger.logImpression(DialerImpression.Type.IMS_VIDEO_REQUEST_RECEIVED); } } @@ -87,7 +96,10 @@ public class ImsVideoCallCallback extends VideoCall.Callback { handler.removeCallbacksAndMessages(null); // Clear everything final int newSessionModificationState = getSessionModificationStateFromTelecomStatus(status); - if (status != VideoProvider.SESSION_MODIFY_REQUEST_SUCCESS) { + if (status == VideoProvider.SESSION_MODIFY_REQUEST_SUCCESS) { + // Telecom manages audio route for us + listener.onUpgradedToVideo(false /* switchToSpeaker */); + } else { // This will update the video UI to display the error message. videoTech.setSessionModificationState(newSessionModificationState); } diff --git a/java/com/android/incallui/videotech/ims/ImsVideoTech.java b/java/com/android/incallui/videotech/ims/ImsVideoTech.java index 66a7af58a..40fdc6fde 100644 --- a/java/com/android/incallui/videotech/ims/ImsVideoTech.java +++ b/java/com/android/incallui/videotech/ims/ImsVideoTech.java @@ -23,6 +23,8 @@ import android.telecom.Call.Details; import android.telecom.VideoProfile; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.logging.LoggingBindings; import com.android.incallui.video.protocol.VideoCallScreen; import com.android.incallui.video.protocol.VideoCallScreenDelegate; import com.android.incallui.videotech.VideoTech; @@ -30,6 +32,7 @@ import com.android.incallui.videotech.utils.SessionModificationState; /** ViLTE implementation */ public class ImsVideoTech implements VideoTech { + private final LoggingBindings logger; private final Call call; private final VideoTechListener listener; private ImsVideoCallCallback callback; @@ -37,7 +40,8 @@ public class ImsVideoTech implements VideoTech { SessionModificationState.NO_REQUEST; private int previousVideoState = VideoProfile.STATE_AUDIO_ONLY; - public ImsVideoTech(VideoTechListener listener, Call call) { + public ImsVideoTech(LoggingBindings logger, VideoTechListener listener, Call call) { + this.logger = logger; this.listener = listener; this.call = call; } @@ -87,7 +91,7 @@ public class ImsVideoTech implements VideoTech { } if (callback == null) { - callback = new ImsVideoCallCallback(call, this, listener); + callback = new ImsVideoCallCallback(logger, call, this, listener); call.getVideoCall().registerCallback(callback); } @@ -137,6 +141,7 @@ public class ImsVideoTech implements VideoTech { .sendSessionModifyRequest( new VideoProfile(unpausedVideoState | VideoProfile.STATE_BIDIRECTIONAL)); setSessionModificationState(SessionModificationState.WAITING_FOR_UPGRADE_TO_VIDEO_RESPONSE); + logger.logImpression(DialerImpression.Type.IMS_VIDEO_UPGRADE_REQUESTED); } @Override @@ -146,6 +151,9 @@ public class ImsVideoTech implements VideoTech { LogUtil.i("ImsVideoTech.acceptUpgradeRequest", "videoState: " + requestedVideoState); call.getVideoCall().sendSessionModifyResponse(new VideoProfile(requestedVideoState)); setSessionModificationState(SessionModificationState.NO_REQUEST); + // Telecom manages audio route for us + listener.onUpgradedToVideo(false /* switchToSpeaker */); + logger.logImpression(DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED); } @Override @@ -153,6 +161,7 @@ public class ImsVideoTech implements VideoTech { LogUtil.enterBlock("ImsVideoTech.acceptVideoRequestAsAudio"); call.getVideoCall().sendSessionModifyResponse(new VideoProfile(VideoProfile.STATE_AUDIO_ONLY)); setSessionModificationState(SessionModificationState.NO_REQUEST); + logger.logImpression(DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED_AS_AUDIO); } @Override @@ -161,6 +170,7 @@ public class ImsVideoTech implements VideoTech { call.getVideoCall() .sendSessionModifyResponse(new VideoProfile(call.getDetails().getVideoState())); setSessionModificationState(SessionModificationState.NO_REQUEST); + logger.logImpression(DialerImpression.Type.IMS_VIDEO_REQUEST_DECLINED); } @Override @@ -172,20 +182,18 @@ public class ImsVideoTech implements VideoTech { public void stopTransmission() { LogUtil.enterBlock("ImsVideoTech.stopTransmission"); - int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState()); call.getVideoCall() .sendSessionModifyRequest( - new VideoProfile(unpausedVideoState & ~VideoProfile.STATE_TX_ENABLED)); + new VideoProfile(call.getDetails().getVideoState() & ~VideoProfile.STATE_TX_ENABLED)); } @Override public void resumeTransmission() { LogUtil.enterBlock("ImsVideoTech.resumeTransmission"); - int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState()); call.getVideoCall() .sendSessionModifyRequest( - new VideoProfile(unpausedVideoState | VideoProfile.STATE_TX_ENABLED)); + new VideoProfile(call.getDetails().getVideoState() | VideoProfile.STATE_TX_ENABLED)); setSessionModificationState(SessionModificationState.WAITING_FOR_RESPONSE); } diff --git a/java/com/android/incallui/wifi/res/values-b+sr+Latn/strings.xml b/java/com/android/incallui/wifi/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..51a57e403 --- /dev/null +++ b/java/com/android/incallui/wifi/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,5 @@ + + + "Omogući" + diff --git a/java/com/android/voicemail/VoicemailClient.java b/java/com/android/voicemail/VoicemailClient.java index 74823384c..97b824b27 100644 --- a/java/com/android/voicemail/VoicemailClient.java +++ b/java/com/android/voicemail/VoicemailClient.java @@ -39,11 +39,33 @@ public interface VoicemailClient { * android.content.Intent#ACTION_PROVIDER_CHANGED} will always be a self-change even if the UI is * external to the client. */ - String ACTION_UPLOAD = "com.android.voicemailomtp.VoicemailClient.ACTION_UPLOAD"; + String ACTION_UPLOAD = "com.android.voicemail.VoicemailClient.ACTION_UPLOAD"; /** Common key for passing {@link PhoneAccountHandle} in bundles. */ String PARAM_PHONE_ACCOUNT_HANDLE = "phone_account_handle"; + /** + * Broadcast from the client to inform the app to show a legacy voicemail notification. This + * broadcast is same as {@link TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION}. + */ + String ACTION_SHOW_LEGACY_VOICEMAIL = + "com.android.voicemail.VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL"; + + /** + * Whether the visual voicemail service is enabled for the {@code phoneAccountHandle}. "Enable" + * means the user "wants" to have this service on, and does not mean the service is actually + * functional(For example, the service is blocked on the carrier side. The service will be + * "enabled" but all it will do is show the error). + */ + boolean isVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle); + + /** + * Enable or disable visual voicemail service for the {@code phoneAccountHandle}. Setting to + * enabled will initiate provisioning and activation. Setting to disabled will initiate + * deactivation. + */ + void setVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled); + /** * Appends the selection to ignore voicemails from non-active OMTP voicemail package. In OC there * can be multiple packages handling OMTP voicemails which represents the same source of truth. @@ -92,4 +114,12 @@ public interface VoicemailClient { * when calling into the mailbox. */ Intent getSetPinIntent(Context context, PhoneAccountHandle phoneAccountHandle); + + /** + * Whether the client is activated and handling visual voicemail for the {@code + * phoneAccountHandle}. "Enable" is the intention to use VVM. For example VVM can be enabled but + * prevented from working because the carrier blocked it, or a connection problem is blocking the + * provisioning. Being "activated" means all setup are completed, and VVM is expected to work. + */ + boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle); } diff --git a/java/com/android/voicemail/VoicemailPermissionHelper.java b/java/com/android/voicemail/VoicemailPermissionHelper.java new file mode 100644 index 000000000..1a09d45fd --- /dev/null +++ b/java/com/android/voicemail/VoicemailPermissionHelper.java @@ -0,0 +1,60 @@ +/* + * 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.voicemail; + +import android.Manifest.permission; +import android.content.Context; +import android.content.pm.PackageManager; +import android.support.annotation.NonNull; +import java.util.ArrayList; +import java.util.List; + +/** + * Handles permission checking for the voicemail module. Currently "phone" and "sms" permissions are + * required. + */ +public class VoicemailPermissionHelper { + + /** *_VOICEMAIL permissions are auto-granted by being the default dialer. */ + private static final String[] VOICEMAIL_PERMISSIONS = { + permission.ADD_VOICEMAIL, + permission.WRITE_VOICEMAIL, + permission.READ_VOICEMAIL, + permission.READ_PHONE_STATE, + permission.SEND_SMS + }; + + /** + * Returns {@code true} if the app has all permissions required for the voicemail module to + * operate. + */ + public static boolean hasPermissions(Context context) { + return getMissingPermissions(context).isEmpty(); + } + + /** Returns a list of permission that is missing for the voicemail module to operate. */ + @NonNull + public static List getMissingPermissions(Context context) { + List result = new ArrayList<>(); + for (String permission : VOICEMAIL_PERMISSIONS) { + if (context.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { + result.add(permission); + } + } + return result; + } +} diff --git a/java/com/android/voicemail/impl/ActivationTask.java b/java/com/android/voicemail/impl/ActivationTask.java index c53d3c722..b0ad3bafc 100644 --- a/java/com/android/voicemail/impl/ActivationTask.java +++ b/java/com/android/voicemail/impl/ActivationTask.java @@ -29,8 +29,8 @@ import android.support.annotation.WorkerThread; import android.telecom.PhoneAccountHandle; import android.telephony.ServiceState; import android.telephony.TelephonyManager; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.protocol.VisualVoicemailProtocol; import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.RetryPolicy; @@ -40,6 +40,7 @@ import com.android.voicemail.impl.sms.StatusSmsFetcher; import com.android.voicemail.impl.sync.OmtpVvmSyncService; import com.android.voicemail.impl.sync.SyncTask; import com.android.voicemail.impl.sync.VvmAccountManager; +import com.android.voicemail.impl.utils.LoggerUtils; import java.io.IOException; import java.util.HashSet; import java.util.Set; @@ -55,6 +56,7 @@ import java.util.concurrent.TimeoutException; * spontaneously sent a STATUS SMS. */ @TargetApi(VERSION_CODES.O) +@UsedByReflection(value = "Tasks.java") public class ActivationTask extends BaseTask { private static final String TAG = "VvmActivationTask"; @@ -107,14 +109,15 @@ public class ActivationTask extends BaseTask { } @Override - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - mMessageData = intent.getParcelableExtra(EXTRA_MESSAGE_DATA_BUNDLE); + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + mMessageData = extras.getParcelable(EXTRA_MESSAGE_DATA_BUNDLE); } @Override public Intent createRestartIntent() { - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_AUTO_RETRY_ACTIVATION); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_AUTO_RETRY_ACTIVATION); Intent intent = super.createRestartIntent(); // mMessageData is discarded, request a fresh STATUS SMS for retries. return intent; @@ -124,7 +127,8 @@ public class ActivationTask extends BaseTask { @WorkerThread public void onExecuteInBackgroundThread() { Assert.isNotMainThread(); - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_ACTIVATION_STARTED); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_ACTIVATION_STARTED); PhoneAccountHandle phoneAccountHandle = getPhoneAccountHandle(); if (phoneAccountHandle == null) { // This should never happen @@ -234,7 +238,8 @@ public class ActivationTask extends BaseTask { helper.handleEvent(status, OmtpEvents.CONFIG_SERVICE_NOT_AVAILABLE); } } - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_ACTIVATION_COMPLETED); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_ACTIVATION_COMPLETED); } public static void updateSource( diff --git a/java/com/android/voicemail/impl/AndroidManifest.xml b/java/com/android/voicemail/impl/AndroidManifest.xml index 97e397385..47a4b2dd3 100644 --- a/java/com/android/voicemail/impl/AndroidManifest.xml +++ b/java/com/android/voicemail/impl/AndroidManifest.xml @@ -80,6 +80,16 @@ android:name="com.android.voicemail.impl.scheduling.TaskSchedulerService" android:exported="false"/> + + + + @@ -92,5 +102,21 @@ android:exported="false" android:windowSoftInputMode="stateVisible|adjustResize"> + + + + + + + + + + + + + + diff --git a/java/com/android/voicemail/impl/OmtpReceiver.java b/java/com/android/voicemail/impl/OmtpReceiver.java index 239a544c4..9baf95415 100644 --- a/java/com/android/voicemail/impl/OmtpReceiver.java +++ b/java/com/android/voicemail/impl/OmtpReceiver.java @@ -24,8 +24,8 @@ import android.os.Build.VERSION_CODES; import android.telecom.PhoneAccountHandle; import android.telephony.VisualVoicemailSms; import com.android.dialer.common.Assert; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.voicemail.VoicemailComponent; import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil; import com.android.voicemail.impl.sync.VvmAccountManager; diff --git a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java index 095f00bb7..2f1df09dd 100644 --- a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java +++ b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java @@ -336,9 +336,11 @@ public class OmtpVvmCarrierConfigHelper { public void startDeactivation() { Assert.checkArgument(isValid()); + VvmLog.i(TAG, "startDeactivation"); if (!isLegacyModeEnabled()) { // SMS should still be filtered in legacy mode VisualVoicemailService.setSmsFilterSettings(mContext, getPhoneAccountHandle(), null); + VvmLog.i(TAG, "filter disabled"); } if (mProtocol != null) { mProtocol.startDeactivation(this); diff --git a/java/com/android/voicemail/impl/StatusCheckJobService.java b/java/com/android/voicemail/impl/StatusCheckJobService.java new file mode 100644 index 000000000..870c5b471 --- /dev/null +++ b/java/com/android/voicemail/impl/StatusCheckJobService.java @@ -0,0 +1,71 @@ +/** + * 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.voicemail.impl; + +import android.annotation.TargetApi; +import android.app.job.JobInfo; +import android.app.job.JobParameters; +import android.app.job.JobScheduler; +import android.app.job.JobService; +import android.content.ComponentName; +import android.content.Context; +import android.os.Build.VERSION_CODES; +import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; +import com.android.dialer.constants.ScheduledJobIds; +import com.android.voicemail.impl.sync.VvmAccountManager; +import java.util.concurrent.TimeUnit; + +/** + * A job to perform {@link StatusCheckTask} once per day, performing book keeping to ensure the + * credentials and status for a activated voicemail account is still correct. A task will be + * scheduled for each active voicemail account. The status is expected to be always in sync, the + * check is a failsafe to mimic the previous status check on signal return behavior. + */ +@TargetApi(VERSION_CODES.O) +public class StatusCheckJobService extends JobService { + + public static void schedule(Context context) { + JobScheduler jobScheduler = context.getSystemService(JobScheduler.class); + if (jobScheduler.getPendingJob(ScheduledJobIds.VVM_STATUS_CHECK_JOB) != null) { + VvmLog.i("StatusCheckJobService.schedule", "job already scheduled"); + return; + } + + jobScheduler.schedule( + new JobInfo.Builder( + ScheduledJobIds.VVM_STATUS_CHECK_JOB, + new ComponentName(context, StatusCheckJobService.class)) + .setPeriodic(TimeUnit.DAYS.toMillis(1)) + .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY) + .setRequiresCharging(true) + .build()); + } + + @Override + public boolean onStartJob(JobParameters params) { + for (PhoneAccountHandle phoneAccountHandle : + getSystemService(TelecomManager.class).getCallCapablePhoneAccounts()) { + if (VvmAccountManager.isAccountActivated(this, phoneAccountHandle)) { + StatusCheckTask.start(this, phoneAccountHandle); + } + } + return false; // not running in background + } + + @Override + public boolean onStopJob(JobParameters params) { + return false; // don't retry + } +} diff --git a/java/com/android/voicemail/impl/StatusCheckTask.java b/java/com/android/voicemail/impl/StatusCheckTask.java new file mode 100644 index 000000000..7699e9848 --- /dev/null +++ b/java/com/android/voicemail/impl/StatusCheckTask.java @@ -0,0 +1,128 @@ +/** + * 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.voicemail.impl; + +import android.annotation.TargetApi; +import android.content.Context; +import android.content.Intent; +import android.os.Build.VERSION_CODES; +import android.os.Bundle; +import android.telecom.PhoneAccountHandle; +import android.telephony.ServiceState; +import android.telephony.TelephonyManager; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.proguard.UsedByReflection; +import com.android.voicemail.impl.scheduling.BaseTask; +import com.android.voicemail.impl.sms.StatusMessage; +import com.android.voicemail.impl.sms.StatusSmsFetcher; +import com.android.voicemail.impl.sync.VvmAccountManager; +import com.android.voicemail.impl.utils.LoggerUtils; +import java.io.IOException; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +/** + * Task to verify the account status is still correct. This task is only for book keeping so any + * error is ignored and will not retry. If the provision status sent by the carrier is "ready" the + * access credentials will be updated (although it is not expected to change without the carrier + * actively sending out an STATUS SMS which will be handled by {@link + * com.android.voicemail.impl.sms.OmtpMessageReceiver}). If the provisioning status is not ready an + * {@link ActivationTask} will be launched to attempt to correct it. + */ +@TargetApi(VERSION_CODES.O) +@UsedByReflection(value = "Tasks.java") +public class StatusCheckTask extends BaseTask { + + public StatusCheckTask() { + super(TASK_STATUS_CHECK); + } + + public static void start(Context context, PhoneAccountHandle phoneAccountHandle) { + Intent intent = BaseTask.createIntent(context, StatusCheckTask.class, phoneAccountHandle); + context.startService(intent); + } + + @Override + public void onExecuteInBackgroundThread() { + TelephonyManager telephonyManager = + getContext() + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(getPhoneAccountHandle()); + + if (telephonyManager == null) { + VvmLog.w( + "StatusCheckTask.onExecuteInBackgroundThread", + getPhoneAccountHandle() + " no longer valid"); + return; + } + if (telephonyManager.getServiceState().getState() != ServiceState.STATE_IN_SERVICE) { + VvmLog.i( + "StatusCheckTask.onExecuteInBackgroundThread", + getPhoneAccountHandle() + " not in service"); + return; + } + OmtpVvmCarrierConfigHelper config = + new OmtpVvmCarrierConfigHelper(getContext(), getPhoneAccountHandle()); + if (!config.isValid()) { + VvmLog.e( + "StatusCheckTask.onExecuteInBackgroundThread", + "config no longer valid for " + getPhoneAccountHandle()); + VvmAccountManager.removeAccount(getContext(), getPhoneAccountHandle()); + return; + } + + Bundle data; + try (StatusSmsFetcher fetcher = new StatusSmsFetcher(getContext(), getPhoneAccountHandle())) { + config.getProtocol().requestStatus(config, fetcher.getSentIntent()); + // Both the fetcher and OmtpMessageReceiver will be triggered, but + // OmtpMessageReceiver will just route the SMS back to ActivationTask, which will be + // rejected because the task is still running. + data = fetcher.get(); + } catch (TimeoutException e) { + VvmLog.e("StatusCheckTask.onExecuteInBackgroundThread", "timeout requesting status"); + return; + } catch (CancellationException e) { + VvmLog.e("StatusCheckTask.onExecuteInBackgroundThread", "Unable to send status request SMS"); + return; + } catch (InterruptedException | ExecutionException | IOException e) { + VvmLog.e("StatusCheckTask.onExecuteInBackgroundThread", "can't get future STATUS SMS", e); + return; + } + + StatusMessage message = new StatusMessage(data); + VvmLog.i( + "StatusCheckTask.onExecuteInBackgroundThread", + "STATUS SMS received: st=" + + message.getProvisioningStatus() + + ", rc=" + + message.getReturnCode()); + if (message.getProvisioningStatus().equals(OmtpConstants.SUBSCRIBER_READY)) { + VvmLog.i( + "StatusCheckTask.onExecuteInBackgroundThread", + "subscriber ready, no activation required"); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_STATUS_CHECK_READY); + VvmAccountManager.addAccount(getContext(), getPhoneAccountHandle(), message); + } else { + VvmLog.i( + "StatusCheckTask.onExecuteInBackgroundThread", + "subscriber not ready, attempting reactivation"); + VvmAccountManager.removeAccount(getContext(), getPhoneAccountHandle()); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_STATUS_CHECK_REACTIVATION); + ActivationTask.start(getContext(), getPhoneAccountHandle(), data); + } + } +} diff --git a/java/com/android/voicemail/impl/VoicemailBootReceiver.java b/java/com/android/voicemail/impl/VoicemailBootReceiver.java new file mode 100644 index 000000000..0a3e61a01 --- /dev/null +++ b/java/com/android/voicemail/impl/VoicemailBootReceiver.java @@ -0,0 +1,31 @@ +/** + * 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.voicemail.impl; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import com.android.voicemail.VoicemailComponent; + +/** Receives {@link Intent#ACTION_BOOT_COMPLETED} for the voicemail module. */ +public class VoicemailBootReceiver extends BroadcastReceiver { + + @Override + public void onReceive(Context context, Intent intent) { + if (!VoicemailComponent.get(context).getVoicemailClient().isVoicemailModuleEnabled()) { + return; + } + StatusCheckJobService.schedule(context); + } +} diff --git a/java/com/android/voicemail/impl/VoicemailClientImpl.java b/java/com/android/voicemail/impl/VoicemailClientImpl.java index 31a12791c..7747b2486 100644 --- a/java/com/android/voicemail/impl/VoicemailClientImpl.java +++ b/java/com/android/voicemail/impl/VoicemailClientImpl.java @@ -31,6 +31,7 @@ import com.android.voicemail.VoicemailClient; import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil; import com.android.voicemail.impl.settings.VoicemailChangePinActivity; import com.android.voicemail.impl.settings.VoicemailSettingsFragment; +import com.android.voicemail.impl.sync.VvmAccountManager; import java.util.List; import javax.inject.Inject; @@ -67,6 +68,17 @@ public class VoicemailClientImpl implements VoicemailClient { return true; } + @Override + public boolean isVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle) { + return VisualVoicemailSettingsUtil.isEnabled(context, phoneAccountHandle); + } + + @Override + public void setVoicemailEnabled( + Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) { + VisualVoicemailSettingsUtil.setEnabled(context, phoneAccountHandle, enabled); + } + @Nullable @Override public String getSettingsFragment() { @@ -85,7 +97,7 @@ public class VoicemailClientImpl implements VoicemailClient { return false; } - if (!ConfigProviderBindings.get(context).getBoolean(ALLOW_VOICEMAIL_ARCHIVE, true)) { + if (!ConfigProviderBindings.get(context).getBoolean(ALLOW_VOICEMAIL_ARCHIVE, false)) { LogUtil.i( "VoicemailClientImpl.isVoicemailArchiveAllowed", "feature disabled by config: %s", @@ -109,6 +121,11 @@ public class VoicemailClientImpl implements VoicemailClient { return intent; } + @Override + public boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle) { + return VvmAccountManager.isAccountActivated(context, phoneAccountHandle); + } + @TargetApi(VERSION_CODES.O) @Override public void appendOmtpVoicemailSelectionClause( diff --git a/java/com/android/voicemail/impl/VoicemailModule.java b/java/com/android/voicemail/impl/VoicemailModule.java index c3e5714d5..5a4e739f5 100644 --- a/java/com/android/voicemail/impl/VoicemailModule.java +++ b/java/com/android/voicemail/impl/VoicemailModule.java @@ -16,8 +16,10 @@ package com.android.voicemail.impl; +import android.content.Context; import android.support.v4.os.BuildCompat; import com.android.voicemail.VoicemailClient; +import com.android.voicemail.VoicemailPermissionHelper; import com.android.voicemail.stub.StubVoicemailClient; import dagger.Module; import dagger.Provides; @@ -29,12 +31,21 @@ public final class VoicemailModule { @Provides @Singleton - static VoicemailClient provideVoicemailClient() { - if (BuildCompat.isAtLeastO()) { - return new VoicemailClientImpl(); - } else { + static VoicemailClient provideVoicemailClient(Context context) { + if (!BuildCompat.isAtLeastO()) { + VvmLog.i("VoicemailModule.provideVoicemailClient", "SDK below O"); return new StubVoicemailClient(); } + + if (!VoicemailPermissionHelper.hasPermissions(context)) { + VvmLog.i( + "VoicemailModule.provideVoicemailClient", + "missing permissions " + VoicemailPermissionHelper.getMissingPermissions(context)); + return new StubVoicemailClient(); + } + + VvmLog.i("VoicemailModule.provideVoicemailClient", "providing VoicemailClientImpl"); + return new VoicemailClientImpl(); } private VoicemailModule() {} diff --git a/java/com/android/voicemail/impl/VvmPackageInstallReceiver.java b/java/com/android/voicemail/impl/VvmPackageInstallReceiver.java index d92012147..1e2de6070 100644 --- a/java/com/android/voicemail/impl/VvmPackageInstallReceiver.java +++ b/java/com/android/voicemail/impl/VvmPackageInstallReceiver.java @@ -25,7 +25,8 @@ import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil; /** * When a new package is installed, check if it matches any of the vvm carrier apps of the currently - * enabled dialer vvm sources. + * enabled dialer VVM sources. The dialer VVM client will be disabled upon carrier VVM app + * installation, unless it was explicitly enabled by the user. */ public class VvmPackageInstallReceiver extends BroadcastReceiver { @@ -46,25 +47,34 @@ public class VvmPackageInstallReceiver extends BroadcastReceiver { return; } + // This get called every time an app is installed and will be noisy. Don't log until the app + // is identified as a carrier VVM app. for (PhoneAccountHandle phoneAccount : context.getSystemService(TelecomManager.class).getCallCapablePhoneAccounts()) { - if (VisualVoicemailSettingsUtil.isEnabledUserSet(context, phoneAccount)) { - // Skip the check if this voicemail source's setting is overridden by the user. - continue; - } - OmtpVvmCarrierConfigHelper carrierConfigHelper = new OmtpVvmCarrierConfigHelper(context, phoneAccount); + if (!carrierConfigHelper.isValid()) { + continue; + } if (carrierConfigHelper.getCarrierVvmPackageNames() == null) { continue; } - if (carrierConfigHelper.getCarrierVvmPackageNames().contains(packageName)) { - // Force deactivate the client. The user can re-enable it in the settings. - // There is no need to update the settings for deactivation. At this point, if the - // default value is used it should be false because a carrier package is present. - VvmLog.i(TAG, "Carrier VVM package installed, disabling system VVM client"); - VisualVoicemailSettingsUtil.setEnabled(context, phoneAccount, false); + if (!carrierConfigHelper.getCarrierVvmPackageNames().contains(packageName)) { + continue; } + + VvmLog.i(TAG, "Carrier app installed"); + if (VisualVoicemailSettingsUtil.isEnabledUserSet(context, phoneAccount)) { + // Skip the check if this voicemail source's setting is overridden by the user. + VvmLog.i(TAG, "VVM enabled by user, not disabling"); + continue; + } + + // Force deactivate the client. The user can re-enable it in the settings. + // There is no need to update the settings for deactivation. At this point, if the + // default value is used it should be false because a carrier package is present. + VvmLog.i(TAG, "Carrier VVM package installed, disabling system VVM client"); + VisualVoicemailSettingsUtil.setEnabled(context, phoneAccount, false); } } } diff --git a/java/com/android/voicemail/impl/fetch/FetchVoicemailReceiver.java b/java/com/android/voicemail/impl/fetch/FetchVoicemailReceiver.java index b0285672e..0348a60c5 100644 --- a/java/com/android/voicemail/impl/fetch/FetchVoicemailReceiver.java +++ b/java/com/android/voicemail/impl/fetch/FetchVoicemailReceiver.java @@ -120,6 +120,16 @@ public class FetchVoicemailReceiver extends BroadcastReceiver { new PhoneAccountHandle( ComponentName.unflattenFromString(cursor.getString(PHONE_ACCOUNT_COMPONENT_NAME)), cursor.getString(PHONE_ACCOUNT_ID)); + TelephonyManager telephonyManager = + context + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(mPhoneAccount); + if (telephonyManager == null) { + // can happen when trying to fetch voicemails from a SIM that is no longer on the + // device + VvmLog.e(TAG, "account no longer valid, cannot retrieve message"); + return; + } if (!VvmAccountManager.isAccountActivated(context, mPhoneAccount)) { mPhoneAccount = getAccountFromMarshmallowAccount(context, mPhoneAccount); if (mPhoneAccount == null) { diff --git a/java/com/android/voicemail/impl/mail/Address.java b/java/com/android/voicemail/impl/mail/Address.java index 3a7a86607..ac8e8a294 100644 --- a/java/com/android/voicemail/impl/mail/Address.java +++ b/java/com/android/voicemail/impl/mail/Address.java @@ -25,8 +25,9 @@ import android.text.util.Rfc822Tokenizer; import com.android.voicemail.impl.mail.utils.LogUtils; import java.util.ArrayList; import java.util.regex.Pattern; +import org.apache.james.mime4j.codec.DecodeMonitor; +import org.apache.james.mime4j.codec.DecoderUtil; import org.apache.james.mime4j.codec.EncoderUtil; -import org.apache.james.mime4j.decoder.DecoderUtil; /** * This class represent email address. @@ -121,7 +122,8 @@ public class Address implements Parcelable { if (TextUtils.isEmpty(rawAddress)) { return null; } - String name, address; + String name; + String address; final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(rawAddress); if (tokens.length > 0) { final String tokenizedName = tokens[0].getName(); @@ -171,7 +173,7 @@ public class Address implements Parcelable { if (personal != null) { personal = REMOVE_OPTIONAL_DQUOTE.matcher(personal).replaceAll("$1"); personal = UNQUOTE.matcher(personal).replaceAll("$1"); - personal = DecoderUtil.decodeEncodedWords(personal); + personal = DecoderUtil.decodeEncodedWords(personal, DecodeMonitor.STRICT); if (personal.length() == 0) { personal = null; } diff --git a/java/com/android/voicemail/impl/mail/internet/MimeMessage.java b/java/com/android/voicemail/impl/mail/internet/MimeMessage.java index dfb7d7c25..589720660 100644 --- a/java/com/android/voicemail/impl/mail/internet/MimeMessage.java +++ b/java/com/android/voicemail/impl/mail/internet/MimeMessage.java @@ -34,12 +34,14 @@ import java.util.Date; import java.util.Locale; import java.util.Stack; import java.util.regex.Pattern; -import org.apache.james.mime4j.BodyDescriptor; -import org.apache.james.mime4j.ContentHandler; -import org.apache.james.mime4j.EOLConvertingInputStream; -import org.apache.james.mime4j.MimeStreamParser; -import org.apache.james.mime4j.field.DateTimeField; -import org.apache.james.mime4j.field.Field; +import org.apache.james.mime4j.MimeException; +import org.apache.james.mime4j.dom.field.DateTimeField; +import org.apache.james.mime4j.field.DefaultFieldParser; +import org.apache.james.mime4j.io.EOLConvertingInputStream; +import org.apache.james.mime4j.parser.ContentHandler; +import org.apache.james.mime4j.parser.MimeStreamParser; +import org.apache.james.mime4j.stream.BodyDescriptor; +import org.apache.james.mime4j.stream.Field; /** * An implementation of Message that stores all of its metadata in RFC 822 and RFC 2045 style @@ -64,7 +66,6 @@ public class MimeMessage extends Message { private Body mBody; protected int mSize; private boolean mInhibitLocalMessageId = false; - private boolean mComplete = true; // Shared random source for generating local message-id values private static final java.util.Random sRandom = new java.util.Random(); @@ -114,7 +115,7 @@ public class MimeMessage extends Message { * @throws IOException * @throws MessagingException */ - public MimeMessage(InputStream in) throws IOException, MessagingException { + public MimeMessage(InputStream in) throws IOException, MessagingException, MimeException { parse(in); } @@ -136,17 +137,9 @@ public class MimeMessage extends Message { return parser; } - protected void parse(InputStream in) throws IOException, MessagingException { + public void parse(InputStream in) throws IOException, MessagingException, MimeException { final MimeStreamParser parser = init(); parser.parse(new EOLConvertingInputStream(in)); - mComplete = !parser.getPrematureEof(); - } - - public void parse(InputStream in, EOLConvertingInputStream.Callback callback) - throws IOException, MessagingException { - final MimeStreamParser parser = init(); - parser.parse(new EOLConvertingInputStream(in, getSize(), callback)); - mComplete = !parser.getPrematureEof(); } /** @@ -171,7 +164,8 @@ public class MimeMessage extends Message { try { DateTimeField field = (DateTimeField) - Field.parse("Date: " + MimeUtility.unfoldAndDecode(getFirstHeader("Date"))); + DefaultFieldParser.parse( + "Date: " + MimeUtility.unfoldAndDecode(getFirstHeader("Date"))); mSentDate = field.getDate(); // TODO: We should make it more clear what exceptions can be thrown here, // and whether they reflect a normal or error condition. @@ -184,7 +178,7 @@ public class MimeMessage extends Message { try { DateTimeField field = (DateTimeField) - Field.parse( + DefaultFieldParser.parse( "Date: " + MimeUtility.unfoldAndDecode(getFirstHeader("Delivery-date"))); mSentDate = field.getDate(); // TODO: We should make it more clear what exceptions can be thrown here, @@ -228,10 +222,6 @@ public class MimeMessage extends Message { } } - public boolean isComplete() { - return mComplete; - } - @Override public String getMimeType() throws MessagingException { return MimeUtility.getHeaderParameter(getContentType(), null); @@ -577,10 +567,10 @@ public class MimeMessage extends Message { } @Override - public void field(String fieldData) { + public void field(Field rawField) { expect(Part.class); try { - final String[] tokens = fieldData.split(":", 2); + final String[] tokens = rawField.getRaw().toString().split(":", 2); ((Part) stack.peek()).addHeader(tokens[0], tokens[1].trim()); } catch (MessagingException me) { throw new Error(me); diff --git a/java/com/android/voicemail/impl/mail/internet/MimeUtility.java b/java/com/android/voicemail/impl/mail/internet/MimeUtility.java index 99846027b..bd85e478c 100644 --- a/java/com/android/voicemail/impl/mail/internet/MimeUtility.java +++ b/java/com/android/voicemail/impl/mail/internet/MimeUtility.java @@ -34,9 +34,10 @@ import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.io.IOUtils; +import org.apache.james.mime4j.codec.DecodeMonitor; +import org.apache.james.mime4j.codec.DecoderUtil; import org.apache.james.mime4j.codec.EncoderUtil; -import org.apache.james.mime4j.decoder.DecoderUtil; -import org.apache.james.mime4j.decoder.QuotedPrintableInputStream; +import org.apache.james.mime4j.codec.QuotedPrintableInputStream; import org.apache.james.mime4j.util.CharsetUtil; public class MimeUtility { @@ -65,7 +66,7 @@ public class MimeUtility { if (s == null) { return null; } - return DecoderUtil.decodeEncodedWords(s); + return DecoderUtil.decodeEncodedWords(s, DecodeMonitor.STRICT); } public static String unfoldAndDecode(String s) { @@ -235,7 +236,7 @@ public class MimeUtility { /* * See if there is conversion from the MIME charset to the Java one. */ - charset = CharsetUtil.toJavaCharset(charset); + charset = CharsetUtil.lookup(charset).name(); } /* * No encoding, so use us-ascii, which is the standard. diff --git a/java/com/android/voicemail/impl/mail/store/ImapFolder.java b/java/com/android/voicemail/impl/mail/store/ImapFolder.java index 1d9b01120..5760ee216 100644 --- a/java/com/android/voicemail/impl/mail/store/ImapFolder.java +++ b/java/com/android/voicemail/impl/mail/store/ImapFolder.java @@ -22,6 +22,7 @@ import android.text.TextUtils; import android.util.ArrayMap; import android.util.Base64DataException; import com.android.voicemail.impl.OmtpEvents; +import com.android.voicemail.impl.VvmLog; import com.android.voicemail.impl.mail.AuthenticationFailedException; import com.android.voicemail.impl.mail.Body; import com.android.voicemail.impl.mail.FetchProfile; @@ -41,7 +42,6 @@ import com.android.voicemail.impl.mail.store.imap.ImapElement; import com.android.voicemail.impl.mail.store.imap.ImapList; import com.android.voicemail.impl.mail.store.imap.ImapResponse; import com.android.voicemail.impl.mail.store.imap.ImapString; -import com.android.voicemail.impl.mail.utils.LogUtils; import com.android.voicemail.impl.mail.utils.Utility; import java.io.IOException; import java.io.InputStream; @@ -66,7 +66,7 @@ public class ImapFolder { private String mMode; private boolean mExists; /** A set of hashes that can be used to track dirtiness */ - Object mHash[]; + Object[] mHash; public static final String MODE_READ_ONLY = "mode_read_only"; public static final String MODE_READ_WRITE = "mode_read_write"; @@ -136,7 +136,7 @@ public class ImapFolder { try { expunge(); } catch (MessagingException e) { - LogUtils.e(TAG, e, "Messaging Exception"); + VvmLog.e(TAG, "Messaging Exception", e); } } mMessageCount = -1; @@ -174,13 +174,13 @@ public class ImapFolder { try { final String command = ImapConstants.UID_SEARCH + " " + searchCriteria; final String[] result = getSearchUids(mConnection.executeSimpleCommand(command)); - LogUtils.d(TAG, "searchForUids '" + searchCriteria + "' results: " + result.length); + VvmLog.d(TAG, "searchForUids '" + searchCriteria + "' results: " + result.length); return result; } catch (ImapException me) { - LogUtils.d(TAG, "ImapException in search: " + searchCriteria, me); + VvmLog.d(TAG, "ImapException in search: " + searchCriteria, me); return Utility.EMPTY_STRINGS; // Not found } catch (IOException ioe) { - LogUtils.d(TAG, "IOException in search: " + searchCriteria, ioe); + VvmLog.d(TAG, "IOException in search: " + searchCriteria, ioe); mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE); throw ioExceptionHandler(mConnection, ioe); } @@ -199,7 +199,7 @@ public class ImapFolder { return new ImapMessage(uid, this); } } - LogUtils.e(TAG, "UID " + uid + " not found on server"); + VvmLog.e(TAG, "UID " + uid + " not found on server"); return null; } @@ -235,7 +235,7 @@ public class ImapFolder { try { fetchInternal(messages, fp, listener); } catch (RuntimeException e) { // Probably a parser error. - LogUtils.w(TAG, "Exception detected: " + e.getMessage()); + VvmLog.w(TAG, "Exception detected: " + e.getMessage()); throw e; } } @@ -346,7 +346,11 @@ public class ImapFolder { message.setInternalDate(internalDate); message.setSize(size); - message.parse(Utility.streamFromAsciiString(header)); + try { + message.parse(Utility.streamFromAsciiString(header)); + } catch (Exception e) { + VvmLog.e(TAG, "Error parsing header %s", e); + } } if (fp.contains(FetchProfile.Item.STRUCTURE)) { ImapList bs = fetchList.getKeyedListOrEmpty(ImapConstants.BODYSTRUCTURE); @@ -354,7 +358,7 @@ public class ImapFolder { try { parseBodyStructure(bs, message, ImapConstants.TEXT); } catch (MessagingException e) { - LogUtils.v(TAG, e, "Error handling message"); + VvmLog.v(TAG, "Error handling message", e); message.setBody(null); } } @@ -365,11 +369,15 @@ public class ImapFolder { // TODO Should we accept "RFC822" as well?? ImapString body = fetchList.getKeyedStringOrEmpty("BODY[]", true); InputStream bodyStream = body.getAsStream(); - message.parse(bodyStream); + try { + message.parse(bodyStream); + } catch (Exception e) { + VvmLog.e(TAG, "Error parsing body %s", e); + } } if (fetchPart != null) { InputStream bodyStream = fetchList.getKeyedStringOrEmpty("BODY[", true).getAsStream(); - String encodings[] = fetchPart.getHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING); + String[] encodings = fetchPart.getHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING); String contentTransferEncoding = null; if (encodings != null && encodings.length > 0) { @@ -397,7 +405,7 @@ public class ImapFolder { // from here. This blanket catch-all is because we're not sure what to // do if we don't have a contentTransferEncoding, and we don't have // time to figure out what exceptions might be thrown. - LogUtils.e(TAG, "Error fetching body %s", e); + VvmLog.e(TAG, "Error fetching body %s", e); } } @@ -782,7 +790,7 @@ public class ImapFolder { } private MessagingException ioExceptionHandler(ImapConnection connection, IOException ioe) { - LogUtils.d(TAG, "IO Exception detected: ", ioe); + VvmLog.d(TAG, "IO Exception detected: ", ioe); connection.close(); if (connection == mConnection) { mConnection = null; // To prevent close() from returning the connection to the pool. diff --git a/java/com/android/voicemail/impl/mail/store/ImapStore.java b/java/com/android/voicemail/impl/mail/store/ImapStore.java index cadbe593f..838bae257 100644 --- a/java/com/android/voicemail/impl/mail/store/ImapStore.java +++ b/java/com/android/voicemail/impl/mail/store/ImapStore.java @@ -25,6 +25,7 @@ import com.android.voicemail.impl.mail.MessagingException; import com.android.voicemail.impl.mail.internet.MimeMessage; import java.io.IOException; import java.io.InputStream; +import org.apache.james.mime4j.MimeException; public class ImapStore { /** @@ -112,7 +113,7 @@ public class ImapStore { } @Override - public void parse(InputStream in) throws IOException, MessagingException { + public void parse(InputStream in) throws IOException, MessagingException, MimeException { super.parse(in); } diff --git a/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java b/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java index 5a720c609..fc7fdf3d4 100644 --- a/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java +++ b/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java @@ -25,8 +25,7 @@ import android.os.Bundle; import android.support.annotation.Nullable; import android.telecom.PhoneAccountHandle; import android.text.TextUtils; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; import com.android.voicemail.impl.ActivationTask; import com.android.voicemail.impl.OmtpConstants; import com.android.voicemail.impl.OmtpEvents; @@ -45,6 +44,7 @@ import com.android.voicemail.impl.sms.Vvm3MessageSender; import com.android.voicemail.impl.sync.VvmNetworkRequest; import com.android.voicemail.impl.sync.VvmNetworkRequest.NetworkWrapper; import com.android.voicemail.impl.sync.VvmNetworkRequest.RequestFailedException; +import com.android.voicemail.impl.utils.LoggerUtils; import java.io.IOException; import java.security.SecureRandom; import java.util.Locale; @@ -116,7 +116,8 @@ public class Vvm3Protocol extends VisualVoicemailProtocol { StatusMessage message, Bundle data) { VvmLog.i(TAG, "start vvm3 provisioning"); - Logger.get(config.getContext()).logImpression(DialerImpression.Type.VVM_PROVISIONING_STARTED); + LoggerUtils.logImpressionOnMainThread( + config.getContext(), DialerImpression.Type.VVM_PROVISIONING_STARTED); if (OmtpConstants.SUBSCRIBER_UNKNOWN.equals(message.getProvisioningStatus())) { VvmLog.i(TAG, "Provisioning status: Unknown"); if (VVM3_UNKNOWN_SUBSCRIBER_CAN_SUBSCRIBE_RESPONSE_CODE.equals(message.getReturnCode())) { @@ -229,8 +230,8 @@ public class Vvm3Protocol extends VisualVoicemailProtocol { // Only close new user tutorial if the PIN has been changed. helper.closeNewUserTutorial(); VvmLog.i(TAG, "new user: NUT closed"); - Logger.get(config.getContext()) - .logImpression(DialerImpression.Type.VVM_PROVISIONING_COMPLETED); + LoggerUtils.logImpressionOnMainThread( + config.getContext(), DialerImpression.Type.VVM_PROVISIONING_COMPLETED); config.requestStatus(null); } } catch (InitializingException | MessagingException | IOException e) { diff --git a/java/com/android/voicemail/impl/res/values-af/strings.xml b/java/com/android/voicemail/impl/res/values-af/strings.xml index b209eea0d..71263217f 100644 --- a/java/com/android/voicemail/impl/res/values-af/strings.xml +++ b/java/com/android/voicemail/impl/res/values-af/strings.xml @@ -24,7 +24,6 @@ "Gevorderde instellings" "Visuele stemboodskap" "Ekstra rugsteun en berging" - " ""Dit is \'n eksperimentele kenmerk"" wat ons tans toets. Dit kan potensieel stemboodskappe van jou stemboodskapbediener af uitvee. Daar is geen waarborg dat hierdie kenmerk in die toekoms gesteun sal word nie. Ons sal egter graag terugvoer oor die kenmerk wil hê." "Stel PIN" "Verander PIN" "Visuele stemboodskap moet geaktiveer wees om PIN te verander" diff --git a/java/com/android/voicemail/impl/res/values-am/strings.xml b/java/com/android/voicemail/impl/res/values-am/strings.xml index 4124de5f7..d350bbd94 100644 --- a/java/com/android/voicemail/impl/res/values-am/strings.xml +++ b/java/com/android/voicemail/impl/res/values-am/strings.xml @@ -24,7 +24,6 @@ "የላቁ ቅንብሮች" "ምስላዊ የድምፅ መልዕክት" "ተጨማሪ ምትኬ እና ማከማቻ" - " ""ይህ የሙከራ ባህሪ ነው"" አሁን እየሞከርን ነው። ይህ ምናልባት ከድምፅ መልዕክት አገልጋይዎ ላይ የድምፅ መልዕክቶችን ሊሰርዝ ይችላል። ለወደፊቱ ይህን ባህሪ የመደገፍ ዋስትናዎችም የሉም። ነገር ግን በባህሪው ላይ ግብረመልስ ብናገኝ እንወዳለን።" "ፒን ያዘጋጁ" "ፒን ይቀይሩ" "ፒን ለመቀየር የእይታ የድምጽ መልዕክት መንቃት አለበት" diff --git a/java/com/android/voicemail/impl/res/values-ar/strings.xml b/java/com/android/voicemail/impl/res/values-ar/strings.xml index 5d6fbba37..679dcce9c 100644 --- a/java/com/android/voicemail/impl/res/values-ar/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ar/strings.xml @@ -24,7 +24,6 @@ "الإعدادات المتقدمة" "بريد صوتي مرئي" "نسخة احتياطية وسعة تخزين إضافية" - " ""هذه الميزة تجريبية"" نحن حاليًا في مرحلة اختبار. سيؤدي هذا على الأرجح إلى حذف رسائل البريد الصوتي من خادم البريد الصوتي. لا توجد أي ضمانات بشأن دعم هذه الميزة مستقبلاً. إلا أننا نود الحصول على تعليقات بشأن هذه الميزة." "تعيين رقم التعريف الشخصي" "تغيير رقم التعريف الشخصي" "ينبغي تشغيل البريد الصوتي المرئي لتغيير رقم التعريف الشخصي" diff --git a/java/com/android/voicemail/impl/res/values-az/strings.xml b/java/com/android/voicemail/impl/res/values-az/strings.xml index ce68f9963..87b4c0692 100644 --- a/java/com/android/voicemail/impl/res/values-az/strings.xml +++ b/java/com/android/voicemail/impl/res/values-az/strings.xml @@ -24,7 +24,6 @@ "Qabaqcıl Ayarlar" "Görünən Səsli e-poçt" "Əlavə yedəkləmə və yaddaş" - " Bu, hazırda yoxladığımız ""eksperimantal funksiyadır"". Bununla səsli e-poçt serverindən səsli e-məktublar potensial olaraq silinəcək. Gələcəkdə bu funksiyanın dəstəklənəcəyinə zəmanət verilmir. Lakin funksiya haqqında əks əlaqənizi istərdik." "PIN ayarlayın" "PIN-i dəyişin" "PIN-i dəyişmək üçün görünən səsli e-poçt aktiv olmalıdır" diff --git a/java/com/android/voicemail/impl/res/values-b+sr+Latn/strings.xml b/java/com/android/voicemail/impl/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..193913081 --- /dev/null +++ b/java/com/android/voicemail/impl/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,53 @@ + + + + + "Govorna pošta (%s)" + "Govorna pošta" + "Vibracija" + "Vibracija" + "Zvuk" + "Napredna podešavanja" + "Vizuelna govorna pošta" + "Dodatne rezervne kopije i prostor" + "Podesite PIN" + "Promenite PIN" + "Morate da omogućite vizuelnu govornu poštu da biste promenili PIN" + "Vizuelna govorna pošta još uvek nije aktivirana, probajte ponovo kasnije" + "Stari PIN" + "Novi PIN" + "Sačekajte." + "Novi PIN je prekratak." + "Novi PIN je predugačak." + "Novi PIN je preslab. Jaka lozinka ne treba da sadrži uzastopni niz ni ponovljene cifre." + "Stari PIN se ne podudara." + "Novi PIN sadrži nevažeće znakove." + "Promena PIN-a nije uspela" + "Nepodržani tip poruke. Pozovite %s da biste je preslušali." + "Promenite PIN kôd govorne pošte" + "Nastavi" + "Otkaži" + "Potvrdi" + "Potvrdite stari PIN" + "Unesite PIN kôd govorne pošte da biste nastavili." + "Podesite novi PIN" + "Broj cifara koje PIN mora da sadrži: %1$d%2$d." + "Potvrdite PIN" + "PIN-ovi se ne podudaraju" + "PIN kôd govorne pošte je ažuriran" + "Podešavanje PIN-a nije uspelo" + diff --git a/java/com/android/voicemail/impl/res/values-be/strings.xml b/java/com/android/voicemail/impl/res/values-be/strings.xml index ea4a00ca0..874b4791a 100644 --- a/java/com/android/voicemail/impl/res/values-be/strings.xml +++ b/java/com/android/voicemail/impl/res/values-be/strings.xml @@ -24,7 +24,6 @@ "Пашыраныя налады" "Візуальная галасавая пошта" "Дадатковае рэзервовае капір. і сховішча" - " ""Гэта эксперыментальная характарыстыка"", якую мы тэсціруем. Патэнцыяльна яна будзе выдаляць паведамленні галасавой пошты з вашага сервера галасавой пошты. Падтрымка гэтай характарыстыкі ў будучым не гарантуецца. Але мы будзем вельмі ўдзячны за водгукі на гэту характарыстыку." "Задаць PIN-код" "Змяніць PIN-код" "Трэба ўключыць візуальную галасавую пошту, каб змяніць PIN-код" diff --git a/java/com/android/voicemail/impl/res/values-bg/strings.xml b/java/com/android/voicemail/impl/res/values-bg/strings.xml index 95cc05f36..f987015e9 100644 --- a/java/com/android/voicemail/impl/res/values-bg/strings.xml +++ b/java/com/android/voicemail/impl/res/values-bg/strings.xml @@ -24,7 +24,6 @@ "Разширени настройки" "Визуална гласова поща" "Допълнителни резервни копия и хранилище" - " ""Това е експериментална функция"", която тестваме понастоящем. Тя потенциално може да изтрие гласови съобщения от сървъра ви за гласова поща. Няма гаранции за поддръжката й в бъдеще. Но ще се радваме на отзиви за нея." "Задаване на ПИН код" "Промяна на ПИН кода" "За промяна на ПИН кода трябва да бъде активирана визуалната гласова поща" diff --git a/java/com/android/voicemail/impl/res/values-bn/strings.xml b/java/com/android/voicemail/impl/res/values-bn/strings.xml index dbbeb4d9f..699576d41 100644 --- a/java/com/android/voicemail/impl/res/values-bn/strings.xml +++ b/java/com/android/voicemail/impl/res/values-bn/strings.xml @@ -24,7 +24,6 @@ "উন্নত সেটিংস" "ভিজ্যুয়াল ভয়েসমেল" "অতিরিক্ত ব্যাক আপ এবং সঞ্চয়স্থান" - " ""এটি একটি পরীক্ষামূলক বৈশিষ্ট্য"" যা আমরা বর্তমানে পরীক্ষা করছি। এটি সম্ভবত আপনার ভয়েসমেল সার্ভার থেকে ভয়েসমেলগুলি মুছবে। যদিও ভবিষ্যতে এই বৈশিষ্ট্যতে সমর্থন পাওয়ার কোন গ্যারান্টি নেই। যদিও আমরা এই বৈশিষ্ট্যটির উপর মতামত পেলে খুব খুশি হব।" "পিন সেট করুন" "পিন পরিবর্তন করুন" "পিন পরিবর্তন করতে ভিজ্যুয়াল ভয়েসমেল অবশ্যই সক্ষম করতে হবে" diff --git a/java/com/android/voicemail/impl/res/values-bs/strings.xml b/java/com/android/voicemail/impl/res/values-bs/strings.xml index 6d2b5b30c..2c8cc7682 100644 --- a/java/com/android/voicemail/impl/res/values-bs/strings.xml +++ b/java/com/android/voicemail/impl/res/values-bs/strings.xml @@ -24,7 +24,6 @@ "Napredne postavke" "Vizuelna govorna pošta" "Dodatna sigurnosna kopija i pohrana" - " ""Ovo je eksperimentalna funkcija"" koju trenutno testiramo. Moguće je da ova radnja izbriše poruke govorne pošte sa servera govorne pošte. Nema garancije da će ova funkcija biti podržana u budućnosti. Ipak bismo željeli primiti povratne informacije o funkciji." "Postavite PIN kôd" "Promijenite PIN kôd" "Vizuelna govorna pošta mora biti omogućena za promjenu PIN kôda" diff --git a/java/com/android/voicemail/impl/res/values-ca/strings.xml b/java/com/android/voicemail/impl/res/values-ca/strings.xml index bbac25294..b6525d02b 100644 --- a/java/com/android/voicemail/impl/res/values-ca/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ca/strings.xml @@ -24,7 +24,6 @@ "Configuració avançada" "Bústia de veu visual" "Còpia de seguretat addicional i emmagatz." - " ""Aquesta funció està en mode de prova"" i és possible que suprimeixi els missatges de veu del servidor de la bústia. No podem garantir-ne la continuïtat en el futur. De tota manera, ens agradaria saber què en penses." "Defineix el PIN" "Canvia el PIN" "La bústia de veu visual ha d\'estar activada per poder canviar el PIN" diff --git a/java/com/android/voicemail/impl/res/values-cs/strings.xml b/java/com/android/voicemail/impl/res/values-cs/strings.xml index fb6be6cf4..987f9de01 100644 --- a/java/com/android/voicemail/impl/res/values-cs/strings.xml +++ b/java/com/android/voicemail/impl/res/values-cs/strings.xml @@ -24,7 +24,6 @@ "Pokročilá nastavení" "Vizuální hlasová schránka" "Další zálohování a úložiště" - " ""Toto je experimentální funkce"", kterou právě testujeme. Funkce vám může smazat hlasové zprávy ze serveru hlasové schránky. Nemůžeme zaručit, že bude podporována i v budoucnu, budeme vám ale vděční za zpětnou vazbu." "Nastavit kód PIN" "Změnit kód PIN" "Pokud chcete kód PIN změnit, musíte mít zapnutou vizuální hlasovou schránku" diff --git a/java/com/android/voicemail/impl/res/values-da/strings.xml b/java/com/android/voicemail/impl/res/values-da/strings.xml index 760c3bc39..70ecb3699 100644 --- a/java/com/android/voicemail/impl/res/values-da/strings.xml +++ b/java/com/android/voicemail/impl/res/values-da/strings.xml @@ -24,7 +24,6 @@ "Avancerede indstillinger" "Visuel telefonsvarer" "Ekstra sikkerhedskopiering og lagerplads" - " ""Dette er en eksperimental funktion,"" som vi tester i øjeblikket. Der slettes måske talebeskeder fra din telefonsvarerserver. Der er ingen garanti for, at denne funktion understøttes fremover. Vi vil dog stadig gerne have feedback om funktionen." "Angiv pinkode" "Skift pinkode" "Visuel telefonsvarer skal være aktiveret, for at du kan skifte pinkode" diff --git a/java/com/android/voicemail/impl/res/values-de/strings.xml b/java/com/android/voicemail/impl/res/values-de/strings.xml index bc5c70f5e..2746629e9 100644 --- a/java/com/android/voicemail/impl/res/values-de/strings.xml +++ b/java/com/android/voicemail/impl/res/values-de/strings.xml @@ -24,7 +24,6 @@ "Erweiterte Einstellungen" "Visuelle Mailbox" "Zusätzliche Sicherung und mehr Speicher" - " ""Dies ist eine Funktion im Versuchsstadium"", die gerade getestet wird. Hiermit werden möglicherweise Mailboxnachrichten von deinem Mailbox-Server gelöscht. Es wird nicht garantiert, dass diese Funktion auch in Zukunft unterstützt wird. Wir würden uns aber sehr über Feedback dazu freuen." "PIN festlegen" "PIN ändern" "Die visuelle Mailbox muss aktiviert sein, um die PIN zu ändern" diff --git a/java/com/android/voicemail/impl/res/values-el/strings.xml b/java/com/android/voicemail/impl/res/values-el/strings.xml index a416936b9..e9f9835c6 100644 --- a/java/com/android/voicemail/impl/res/values-el/strings.xml +++ b/java/com/android/voicemail/impl/res/values-el/strings.xml @@ -24,7 +24,6 @@ "Σύνθετες ρυθμίσεις" "Οπτικός αυτόματος τηλεφωνητής" "Επιπλέον αντίγραφα ασφ. και αποθήκευση" - " ""Αυτή είναι μια πειραματική λειτουργία"" που δοκιμάζουμε προς το παρόν. Ενδέχεται να έχει ως αποτέλεσμα τη διαγραφή φωνητικών μηνυμάτων από τον διακομιστή αυτόματου τηλεφωνητή σας. Δεν παρέχονται εγγυήσεις για την υποστήριξη αυτής της λειτουργίας μελλοντικά. Ωστόσο, θα εκτιμούσαμε τα σχόλιά σας για τη λειτουργία αυτή." "Ορισμός PIN" "Αλλαγή κωδικού PIN" "Για αλλαγή του PIN, ενεργοποιήστε τον οπτικό αυτόματο τηλεφωνητή" diff --git a/java/com/android/voicemail/impl/res/values-en-rAU/strings.xml b/java/com/android/voicemail/impl/res/values-en-rAU/strings.xml index 9b6484b45..ec08faf22 100644 --- a/java/com/android/voicemail/impl/res/values-en-rAU/strings.xml +++ b/java/com/android/voicemail/impl/res/values-en-rAU/strings.xml @@ -24,7 +24,6 @@ "Advanced settings" "Visual voicemail" "Extra backup and storage" - " ""This is an experimental feature"" that we are currently testing. This will potentially delete voicemail from your voicemail server. There are no guarantees that this feature will be supported in the future. We would love feedback on the feature though." "Set PIN" "Change PIN" "Visual voicemail must be enabled to change PIN" diff --git a/java/com/android/voicemail/impl/res/values-en-rGB/strings.xml b/java/com/android/voicemail/impl/res/values-en-rGB/strings.xml index 9b6484b45..ec08faf22 100644 --- a/java/com/android/voicemail/impl/res/values-en-rGB/strings.xml +++ b/java/com/android/voicemail/impl/res/values-en-rGB/strings.xml @@ -24,7 +24,6 @@ "Advanced settings" "Visual voicemail" "Extra backup and storage" - " ""This is an experimental feature"" that we are currently testing. This will potentially delete voicemail from your voicemail server. There are no guarantees that this feature will be supported in the future. We would love feedback on the feature though." "Set PIN" "Change PIN" "Visual voicemail must be enabled to change PIN" diff --git a/java/com/android/voicemail/impl/res/values-en-rIN/strings.xml b/java/com/android/voicemail/impl/res/values-en-rIN/strings.xml index 9b6484b45..ec08faf22 100644 --- a/java/com/android/voicemail/impl/res/values-en-rIN/strings.xml +++ b/java/com/android/voicemail/impl/res/values-en-rIN/strings.xml @@ -24,7 +24,6 @@ "Advanced settings" "Visual voicemail" "Extra backup and storage" - " ""This is an experimental feature"" that we are currently testing. This will potentially delete voicemail from your voicemail server. There are no guarantees that this feature will be supported in the future. We would love feedback on the feature though." "Set PIN" "Change PIN" "Visual voicemail must be enabled to change PIN" diff --git a/java/com/android/voicemail/impl/res/values-es-rUS/strings.xml b/java/com/android/voicemail/impl/res/values-es-rUS/strings.xml index 6ae227a81..fcd9cc7c3 100644 --- a/java/com/android/voicemail/impl/res/values-es-rUS/strings.xml +++ b/java/com/android/voicemail/impl/res/values-es-rUS/strings.xml @@ -24,7 +24,6 @@ "Configuración avanzada" "Buzón de voz visual" "Copia de seguridad y almacenamiento adicional" - " ""Esta es una función experimental"" que estamos probando. Es posible que se borren los mensajes de voz del servidor correspondiente. No podemos garantizar la compatibilidad de la función en el futuro. Sin embargo, nos encantaría que nos hicieras comentarios acerca de ella." "Establecer PIN" "Cambiar PIN" "El buzón de voz visual se debe activar para cambiar el PIN" diff --git a/java/com/android/voicemail/impl/res/values-es/strings.xml b/java/com/android/voicemail/impl/res/values-es/strings.xml index bab4e0326..f20ebc5cf 100644 --- a/java/com/android/voicemail/impl/res/values-es/strings.xml +++ b/java/com/android/voicemail/impl/res/values-es/strings.xml @@ -24,7 +24,6 @@ "Configuración avanzada" "Buzón de voz visual" "Copias de seguridad y almacenamiento extra" - " ""Se trata de una función experimental"" que se encuentra actualmente en fase de prueba y que podría servir para eliminar los mensajes de tu servidor de buzón de voz. Aunque no garantizamos que esta función se siga admitiendo en el futuro, nos encantaría conocer tu opinión." "Establecer PIN" "Cambiar PIN" "Para poder cambiar el PIN, el buzón de voz visual debe estar habilitado" diff --git a/java/com/android/voicemail/impl/res/values-et/strings.xml b/java/com/android/voicemail/impl/res/values-et/strings.xml index 02f13145d..dc7f685ba 100644 --- a/java/com/android/voicemail/impl/res/values-et/strings.xml +++ b/java/com/android/voicemail/impl/res/values-et/strings.xml @@ -24,7 +24,6 @@ "Täpsemad seaded" "Visuaalne kõnepost" "Lisavarundus ja -salvestusruum" - " ""See on katseline funktsioon"", mida praegu testime. See võib teie kõnepostisõnumid kõnepostiserverist kustutada. Me ei garanteeri, et seda funktsiooni tulevikus toetatakse. Soovime selle kohta siiski tagasisidet saada." "PIN-koodi määramine" "PIN-koodi muutmine" "PIN-koodi muutmiseks peab olema lubatud visuaalne kõnepost" diff --git a/java/com/android/voicemail/impl/res/values-eu/strings.xml b/java/com/android/voicemail/impl/res/values-eu/strings.xml index 89afb830c..8a3bd640a 100644 --- a/java/com/android/voicemail/impl/res/values-eu/strings.xml +++ b/java/com/android/voicemail/impl/res/values-eu/strings.xml @@ -24,7 +24,6 @@ "Ezarpen aurreratuak" "Erantzungailu bisuala" "Babeskopiak eta edukia gordetzeko tokia" - " Oraindik probatzen ari garen ""eginbide esperimentala da hau"". Agian erantzungailuaren zerbitzarian gordetako mezuak ezabatuko dira. Ez dugu bermatzen egibide hau etorkizunean erabiltzeko aukera emango dugunik. Halere, bihotzez eskertuko genizuke eginbideari buruzko iritzia." "Ezarri PIN kodea" "Aldatu PIN kodea" "Ikusizko erantzungailuak gaituta egon behar du PIN kodea aldatu ahal izateko" diff --git a/java/com/android/voicemail/impl/res/values-fa/strings.xml b/java/com/android/voicemail/impl/res/values-fa/strings.xml index 3db711b34..0b5d51333 100644 --- a/java/com/android/voicemail/impl/res/values-fa/strings.xml +++ b/java/com/android/voicemail/impl/res/values-fa/strings.xml @@ -24,7 +24,6 @@ "تنظیمات پیشرفته" "پست صوتی تصویری" "پشتیبان‌گیری و فضای ذخیره‌سازی اضافی" - " ""این یک قابلیت آزمایشی است"" که درحال آزمایش آن هستیم. این قابلیت به‌طور بالقوه پست‌های صوتی را از سرور پست صوتی شما حذف خواهد کرد. ضمانتی برای پشتیبانی از این قابلیت در آینده وجود ندارد. با این حال مشتاقیم درباره آن بازخورد دریافت کنیم." "تنظیم پین" "تغییر پین" "برای تغییر پین، پست صوتی تصویری باید فعال شود" diff --git a/java/com/android/voicemail/impl/res/values-fi/strings.xml b/java/com/android/voicemail/impl/res/values-fi/strings.xml index 36f5fff5d..c20d3e481 100644 --- a/java/com/android/voicemail/impl/res/values-fi/strings.xml +++ b/java/com/android/voicemail/impl/res/values-fi/strings.xml @@ -24,7 +24,6 @@ "Lisäasetukset" "Visuaalinen vastaaja" "Lisävarmuuskopiointi ja ‑tallennustila" - " ""Tämä on kokeellinen ominaisuus"", jota testaamme parhaillaan. Vastaajaviestejä saatetaan poistaa vastaajapalvelimelta. Ominaisuuden tukemista tulevaisuudessa ei taata. Kuulemme kuitenkin mielellämme mielipiteesi ominaisuudesta." "Aseta PIN-koodi" "Vaihda PIN-koodi" "Ota visuaalinen puhelinvastaaja käyttöön, jotta voit vaihtaa PIN-koodin." diff --git a/java/com/android/voicemail/impl/res/values-fr-rCA/strings.xml b/java/com/android/voicemail/impl/res/values-fr-rCA/strings.xml index 2c9a11a93..6bbd1341f 100644 --- a/java/com/android/voicemail/impl/res/values-fr-rCA/strings.xml +++ b/java/com/android/voicemail/impl/res/values-fr-rCA/strings.xml @@ -24,7 +24,6 @@ "Paramètres avancés" "Messagerie vocale visuelle" "Espace suppl. de sauvegarde et stockage" - " ""Fonction expérimentale"" en cours de test." "Définir un NIP" "Modifier le NIP" "La messagerie vocale visuelle doit être activée pour que vous puissiez modifier votre NIP" diff --git a/java/com/android/voicemail/impl/res/values-fr/strings.xml b/java/com/android/voicemail/impl/res/values-fr/strings.xml index 391671c2e..dc21c76d3 100644 --- a/java/com/android/voicemail/impl/res/values-fr/strings.xml +++ b/java/com/android/voicemail/impl/res/values-fr/strings.xml @@ -24,7 +24,6 @@ "Paramètres avancés" "Messagerie vocale visuelle" "Espace suppl. de sauvegarde et stockage" - " ""Il s\'agit d\'une fonctionnalité expérimentale"" en cours de test. Des messages risquent d\'être supprimés de votre serveur de messagerie vocale. Nous ne pouvons pas garantir le maintien de cette fonctionnalité. Toutefois, n\'hésitez pas à nous faire part de vos commentaires." "Définir le code secret" "Modifier le code secret" "Pour que vous puissiez modifier le code secret, la messagerie vocale visuelle doit être activée" diff --git a/java/com/android/voicemail/impl/res/values-gl/strings.xml b/java/com/android/voicemail/impl/res/values-gl/strings.xml index 70b949e6c..81f6e679a 100644 --- a/java/com/android/voicemail/impl/res/values-gl/strings.xml +++ b/java/com/android/voicemail/impl/res/values-gl/strings.xml @@ -24,7 +24,6 @@ "Configuración avanzada" "Correo de voz visual" "Copia de seguranza e almacenamento extra" - " ""Esta función está en modo de proba"", e é posible que elimine correos de voz do teu servidor de correo de voz. Non podemos garantir a súa continuidade no futuro. De todos modos, encantaríanos que nos deses a túa opinión." "Establecer PIN" "Cambiar PIN" "Para poder cambiar o PIN, o correo de voz visual ten que estar activado" diff --git a/java/com/android/voicemail/impl/res/values-gu/strings.xml b/java/com/android/voicemail/impl/res/values-gu/strings.xml index f9187a7d3..3e8948d19 100644 --- a/java/com/android/voicemail/impl/res/values-gu/strings.xml +++ b/java/com/android/voicemail/impl/res/values-gu/strings.xml @@ -24,7 +24,6 @@ "વિગતવાર સેટિંગ્સ" "વિઝ્યુઅલ વૉઇસમેઇલ" "અતિરિક્ત બેકઅપ અને સ્ટોરેજ" - " ""આ એક પ્રાયોગિક સુવિધા છે"" અમે હાલમાં પરીક્ષણ કરી રહ્યાં છીએ. આ તમારા વૉઇસમેઇલ સર્વરમાંથી સંભવિત રૂપે વૉઇસમેઇલ કાઢી નાખશે. ભવિષ્યમાં આ સુવિધાનું સમર્થન કરવાની કોઇ બાંંયધરી નથી. જોકે અમને આ સુવિધા પર પ્રતિસાદ ગમશે." "PIN સેટ કરો" "PIN બદલો" "PIN બદલવા માટે વિઝ્યુઅલ વૉઇસમેઇલ સક્ષમ હોય તે આવશ્યક છે" diff --git a/java/com/android/voicemail/impl/res/values-hi/strings.xml b/java/com/android/voicemail/impl/res/values-hi/strings.xml index 488fba2a9..8daa3e3d7 100644 --- a/java/com/android/voicemail/impl/res/values-hi/strings.xml +++ b/java/com/android/voicemail/impl/res/values-hi/strings.xml @@ -24,7 +24,6 @@ "उन्नत सेटिंग" "विज़ुअल वॉइसमेल" "अतिरिक्त बैकअप और जगह" - " ""यह सुविधा एक तरह का प्रयोग है"" जिसका हम अभी परीक्षण कर रहे हैं. हो सकता है कि यह आपके वॉइसमेल सर्वर से वॉइसमेल हटा दे. भविष्य में यह सुविधा दी जाएगी या नहीं इसकी कोई गारंटी नहीं है. फिर भी सुविधा पर आपका फ़ीडबैक हमें अच्छा लगेगा." "पिन सेट करें" "पिन बदलें" "पिन बदलने के लिए विज़ुअल वॉइसमेल ज़रूर सक्षम होना चाहिए" diff --git a/java/com/android/voicemail/impl/res/values-hr/strings.xml b/java/com/android/voicemail/impl/res/values-hr/strings.xml index 7d6695653..960909571 100644 --- a/java/com/android/voicemail/impl/res/values-hr/strings.xml +++ b/java/com/android/voicemail/impl/res/values-hr/strings.xml @@ -24,7 +24,6 @@ "Napredne postavke" "Vizualna govorna pošta" "Dodatno sigurnosno kopiranje i pohrana" - " ""Ovo je eksperimentalna značajka"" koju trenutačno testiramo. To će možda izbrisati poruke govorne pošte s vašeg poslužitelja govorne pošte. Nije sigurno da ćemo ovu značajku podržati u budućnosti. Međutim, voljeli bismo dobiti povratne informacije o njoj." "Postavljanje PIN-a" "Promjena PIN-a" "Za promjenu PIN-a potrebno je omogućiti vizualnu govornu poštu" diff --git a/java/com/android/voicemail/impl/res/values-hu/strings.xml b/java/com/android/voicemail/impl/res/values-hu/strings.xml index fae3ef4c7..ce18af799 100644 --- a/java/com/android/voicemail/impl/res/values-hu/strings.xml +++ b/java/com/android/voicemail/impl/res/values-hu/strings.xml @@ -24,7 +24,6 @@ "Speciális beállítások" "Vizuális hangpostaüzenet" "Extra tárhely és biztonsági mentés" - " ""Ez egy kísérleti funkció"", amelyet jelenleg tesztelünk. Előfordulhat, hogy letörli az Ön hangüzeneteit a hangpostaszerverről. Nem garantáljuk, hogy a funkció a jövőben is megmarad, de nagy örömmel vennénk, ha megírná róla a véleményét." "PIN-kód beállítása" "PIN-kód módosítása" "A PIN-kód módosításához engedélyezni kell a vizuális hangpostát." diff --git a/java/com/android/voicemail/impl/res/values-hy/strings.xml b/java/com/android/voicemail/impl/res/values-hy/strings.xml index e4126f877..eaa987aa4 100644 --- a/java/com/android/voicemail/impl/res/values-hy/strings.xml +++ b/java/com/android/voicemail/impl/res/values-hy/strings.xml @@ -24,7 +24,6 @@ "Ընդլայնված կարգավորումներ" "Տեսողական ձայնային փոստ" "Լրացուցիչ տարածք և պահուստավորում" - " ""Սա փորձնական գործառույթ է,"" որը գտնվում է փորձարկման փուլում: Այս ընթացքում ձայնային հաղորդագրությունները ձեր ձայնային փոստի սերվերից կարող են ջնջվել: Ոչ մի երաշխիք չկա, որ այն հետագայում կաջակցվի: Այդուհանդերձ, կցանկանայինք ձեր կարծիքն իմանալ այս գործառույթի մասին:" "Սահմանեք PIN կոդ" "Փոխեք PIN կոդը" "PIN կոդը փոխելու համար տեսողական ձայնային փոստը պետք է միացված լինի" diff --git a/java/com/android/voicemail/impl/res/values-in/strings.xml b/java/com/android/voicemail/impl/res/values-in/strings.xml index d47bd9b9b..6f7e6377e 100644 --- a/java/com/android/voicemail/impl/res/values-in/strings.xml +++ b/java/com/android/voicemail/impl/res/values-in/strings.xml @@ -24,7 +24,6 @@ "Setelan Lanjutan" "Pesan Suara Visual" "Penyimpanan dan backup ekstra" - " ""Ini adalah fitur eksperimental"" yang sedang kami uji. Fitur ini berpotensi menghapus pesan suara dari server pesan suara Anda. Tidak ada jaminan bahwa fitur ini akan didukung di masa mendatang. Kami akan menerima masukan terkait fitur ini dengan senang hati." "Setel PIN" "Ubah PIN" "Pesan suara visual harus diaktifkan untuk mengubah PIN" diff --git a/java/com/android/voicemail/impl/res/values-is/strings.xml b/java/com/android/voicemail/impl/res/values-is/strings.xml index c2019a3f5..5e00487af 100644 --- a/java/com/android/voicemail/impl/res/values-is/strings.xml +++ b/java/com/android/voicemail/impl/res/values-is/strings.xml @@ -24,7 +24,6 @@ "Ítarlegar stillingar" "Myndrænt talhólf" "Viðbótaröryggisafritun og samstilling" - " ""Þessi eiginleiki er í tilraunaútgáfu"" sem við erum að prófa að svo stöddu. Þetta mun mögulega eyða talhólfsskilaboðum af vefþjóni talhólfsins. Engin trygging er fyrir því að þessi eiginleiki verði studdur í framtíðinni. Við kunnum virkilega að meta allar ábendingar varðandi þennan eiginleika." "Stilla PIN-númer" "Breyta PIN-númeri" "Kveikt þarf að vera á myndrænu talhólfi til að breyta PIN-númeri" diff --git a/java/com/android/voicemail/impl/res/values-it/strings.xml b/java/com/android/voicemail/impl/res/values-it/strings.xml index 3aeaca901..2c37ba281 100644 --- a/java/com/android/voicemail/impl/res/values-it/strings.xml +++ b/java/com/android/voicemail/impl/res/values-it/strings.xml @@ -24,7 +24,6 @@ "Impostazioni avanzate" "Leggi la segreteria" "Archiviazione supplementare e backup" - " ""Questa è una funzionalità sperimentale"" che si trova al momento in fase di test. È possibile che i messaggi vocali vengano eliminati dal server della segreteria. Non ci sono garanzie che la funzionalità continui a essere supportata in futuro, ma ci piacerebbe ricevere il tuo feedback." "Imposta PIN" "Cambia PIN" "La lettura delle segreteria deve essere attivata per cambiare il PIN" diff --git a/java/com/android/voicemail/impl/res/values-iw/strings.xml b/java/com/android/voicemail/impl/res/values-iw/strings.xml index 98d31bc59..cdf58dd64 100644 --- a/java/com/android/voicemail/impl/res/values-iw/strings.xml +++ b/java/com/android/voicemail/impl/res/values-iw/strings.xml @@ -24,7 +24,6 @@ "הגדרות מתקדמות" "דואר קולי ויזואלי" "גיבוי ופינוי מקום" - " ""זוהי תכונה ניסיונית"" שאנחנו בודקים כרגע. היא עלולה למחוק הודעות קוליות מתא הדואר הקולי שלך בשרת. אנחנו לא מתחייבים שהתכונה תהיה זמינה בעתיד, אך נשמח לקבל עליה משוב." "הגדרת קוד גישה" "שינוי קוד הגישה" "צריך להפעיל את הדואר הקולי הוויזואלי כדי לשנות את קוד הגישה" diff --git a/java/com/android/voicemail/impl/res/values-ja/strings.xml b/java/com/android/voicemail/impl/res/values-ja/strings.xml index 90bce09fb..e35359f01 100644 --- a/java/com/android/voicemail/impl/res/values-ja/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ja/strings.xml @@ -24,7 +24,6 @@ "詳細設定" "ビジュアル ボイスメール" "追加のバックアップと保存容量" - " ""これは現在テスト中の試験運用機能""で、ボイスメール サーバーからボイスメールを削除することができます。今後この機能が正式にサポートされる保証はありませんが、フィードバックをお寄せいただければ幸いです。" "PIN の設定" "PIN の変更" "PIN を変更するには、ビジュアル ボイスメールを有効にする必要があります" diff --git a/java/com/android/voicemail/impl/res/values-ka/strings.xml b/java/com/android/voicemail/impl/res/values-ka/strings.xml index 4e1413287..7eb792fd0 100644 --- a/java/com/android/voicemail/impl/res/values-ka/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ka/strings.xml @@ -24,7 +24,6 @@ "გაფართოებული პარამეტრები" "ვიზუალური ხმოვანი ფოსტა" "დამატებითი სარეზ. ასლები და მეხსიერება" - " ""ეს არის ექსპერიმენტული ფუნქცია, რომელსაც"" ამჟამად ტესტირებას ვუტარებთ. სავარაუდოდ, ეს წაშლის ხმოვან შეტყობინებებს თქვენი ხმოვანი ფოსტის სერვერიდან. გარანტია, რომ ეს ფუნქცია მომავალში მხარდაჭერილი იქნება, არ არსებობს. თუმცა ამ ფუნქციის შესახებ გამოხმაურებას ინტერესით გავეცნობოდით." "PIN-კოდის დაყენება" "PIN-კოდის შეცვლა" "PIN-კოდის შესაცვლელად ჩართული უნდა იყოს ვიზუალური ხმოვანი ფოსტა" diff --git a/java/com/android/voicemail/impl/res/values-kk/strings.xml b/java/com/android/voicemail/impl/res/values-kk/strings.xml index 36ba090ea..a03171d01 100644 --- a/java/com/android/voicemail/impl/res/values-kk/strings.xml +++ b/java/com/android/voicemail/impl/res/values-kk/strings.xml @@ -24,7 +24,6 @@ "Қосымша параметрлер" "Визуалды дауыстық пошта" "Қосымша сақтық көшірме жасау және сақтау" - " ""Бұл — қазір тексеріліп жатқан, тәжірибелік мүмкіндік"". Бұл дауыстық хабарларды дауыстық хабар серверінен өшіруі мүмкін. Осы мүмкіндікке алдағы уақытта қолдау көрсетілетініне ешқандай кепілдік жоқ. Сонда да осы мүмкіндікке қатысты пікір алғымыз келеді." "PIN кодын тағайындау" "PIN кодын өзгерту" "PIN кодын өзгерту үшін визуалды дауыс хабарын қосу қажет" diff --git a/java/com/android/voicemail/impl/res/values-km/strings.xml b/java/com/android/voicemail/impl/res/values-km/strings.xml index f97ff3e5e..3d55d00bb 100644 --- a/java/com/android/voicemail/impl/res/values-km/strings.xml +++ b/java/com/android/voicemail/impl/res/values-km/strings.xml @@ -24,7 +24,6 @@ "ការ​កំណត់​កម្រិត​ខ្ពស់" "សារជាសំឡេងអាចមើលឃើញ" "ទំហំ​ផ្ទុក និង​ការ​បម្រុងទុក​បន្ថែម" - " ""នេះ​​គឺ​ជា​មុខងារ​សាកល្បង"" បច្ចុប្បន្ន យើង​កំពុង​ធ្វើ​ការ​សាកល្បង។ វា​អាច​នឹង​លុប​សារ​ជា​សំឡេង​ពី​ម៉ាស៊ីន​មេ​សារ​ជា​សំឡេង​របស់​អ្នក។ មិន​មាន​ការ​ធានា​ធ្វើ​ឲ្យ​មុខងារ​នេះ​ដំណើរការ​នៅ​ថ្ងៃ​ក្រោយ​ទេ។ យើង​ចង់​ដឹង​មតិ​ស្ថាបនា​អំពី​មុខងារនេះ​ផង​ដែរ។" "កំណត់​កូដ PIN" "ផ្លាស់ប្ដូរ​កូដ PIN" "សារ​​ជា​សំឡេង​ដែល​មើល​ឃើញ​ត្រូវតែ​បើកដំណើរការ ដើម្បី​ផ្លាស់ប្ដូរ PIN" diff --git a/java/com/android/voicemail/impl/res/values-kn/strings.xml b/java/com/android/voicemail/impl/res/values-kn/strings.xml index 6f8e21f88..379e656ce 100644 --- a/java/com/android/voicemail/impl/res/values-kn/strings.xml +++ b/java/com/android/voicemail/impl/res/values-kn/strings.xml @@ -24,7 +24,6 @@ "ಸುಧಾರಿತ ಸೆಟ್ಟಿಂಗ್‌ಗಳು" "ದೃಶ್ಯ ಧ್ವನಿಮೇಲ್" "ಹೆಚ್ಚುವರಿ ಬ್ಯಾಕಪ್ ಮತ್ತು ಸಂಗ್ರಹಣೆ" - " ""ಇದು ಪ್ರಾಯೋಗಿಕ ವೈಶಿಷ್ಟ್ಯವಾಗಿದೆ""ನಾವು ಪ್ರಸ್ತುತ ಪರೀಕ್ಷಿಸುತ್ತಿದ್ದೇವೆ. ಇದು ನಿಮ್ಮ ಧ್ವನಿಮೇಲ್ ಸರ್ವರ್‌ನಿಂದ ಧ್ವನಿಮೇಲ್‌ಗಳನ್ನು ಸಂಭಾವ್ಯವಾಗಿ ಅಳಿಸುತ್ತದೆ. ಭವಿಷ್ಯದಲ್ಲಿ ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬೆಂಬಲಿಸುವ ಯಾವುದೇ ಖಾತ್ರಿ ಇಲ್ಲ. ಆದರೂ ನಿಮ್ಮ ಪ್ರತಿಕ್ರಿಯೆಗೆ ಸ್ವಾಗತ." "ಪಿನ್ ಹೊಂದಿಸಿ" "ಪಿನ್‌ ಬದಲಾಯಿಸಿ" "ಪಿನ್ ಬದಲಾಯಿಸಲು ದೃಶ್ಯ ಧ್ವನಿಮೇಲ್ ಸಕ್ರಿಯಗೊಳಿಸಬೇಕು" diff --git a/java/com/android/voicemail/impl/res/values-ko/strings.xml b/java/com/android/voicemail/impl/res/values-ko/strings.xml index f18d1d711..513a67546 100644 --- a/java/com/android/voicemail/impl/res/values-ko/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ko/strings.xml @@ -24,7 +24,6 @@ "고급 설정" "시각적 음성사서함" "추가 백업 및 저장용량" - " 현재 테스트 중인 ""실험적 기능입니다"". 이 기능으로 인해 음성사서함 서버에서 메시지가 삭제될 수도 있습니다. 또한 Google에서는 추후 이 기능이 지원된다고 보장할 수 없습니다. 하지만 이 기능에 관해 의견을 주시면 감사하겠습니다." "PIN 설정" "PIN 변경" "PIN을 변경하려면 시각적 음성사서함이 사용 설정되어 있어야 합니다." diff --git a/java/com/android/voicemail/impl/res/values-ky/strings.xml b/java/com/android/voicemail/impl/res/values-ky/strings.xml index f5219a91c..12b7f18c5 100644 --- a/java/com/android/voicemail/impl/res/values-ky/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ky/strings.xml @@ -24,7 +24,6 @@ "Өркүндөтүлгөн жөндөөлөр" "Визуалдык үн почтасы" "Кошумча камдык көчүрмөнү сактоо жана сактагыч" - " ""Бул, сыноодон өтүп жаткан"" эксперименталдык функция. Үн каттарыңыз серверден өчүрүлүп калышы мүмкүн. Бул функциянын кийин да колдонулаарына кепилдик бере албайбыз бирок, ал жөнүндө пикириңизди билгибиз келет." "PIN код коюу" "PIN кодду өзгөртүү" "PIN кодду өзгөртүү үчүн визуладык үн почтасын иштетүү керек" diff --git a/java/com/android/voicemail/impl/res/values-lo/strings.xml b/java/com/android/voicemail/impl/res/values-lo/strings.xml index 212b12fd2..f4f45e592 100644 --- a/java/com/android/voicemail/impl/res/values-lo/strings.xml +++ b/java/com/android/voicemail/impl/res/values-lo/strings.xml @@ -24,7 +24,6 @@ "ການຕັ້ງຄ່າຂັ້ນສູງ" "ຂໍ້​ຄວາມ​ສຽງສະເໝືອນ" "ການສຳຮອງ ແລະ ບ່ອນຈັດເກັບຂໍ້ມູນພິເສດ" - " ""ນີ້ເປັນຄຸນສົມບັດທີ່ຢູ່ໃນຂັ້ນຕອນທົດລອງຢູ່"" ພວກເຮົາກຳລັງທົດສອບ. ມັນອາດລຶບຂໍ້ຄວາມສຽງອອກຈາກເຊີບເວີຂໍ້ຄວາມສຽງຂອງທ່ານໄດ້. ຈະບໍ່ມີການຮັບປະກັນການຊ່ວຍເຫຼືອຄຸນສົມບັດນີ້ໃນອະນາຄົດ. ຢ່າງໃດກໍຕາມພວກເຮົາຢາກຟັງຄຳຄິດເຫັນທີ່ມີຕໍ່ຄຸນສົມບັດດັ່ງກ່າວຈາກທ່ານ." "ຕັ້ງລະຫັດ PIN" "​ປ່ຽນ​ລະຫັດ PIN" "ຈະຕ້ອງເປີດໃຊ້ຂໍ້ຄວາມສຽງສະເໝືອນເພື່ອປ່ຽນ PIN" diff --git a/java/com/android/voicemail/impl/res/values-lt/strings.xml b/java/com/android/voicemail/impl/res/values-lt/strings.xml index d4d9c4dc3..59a15f452 100644 --- a/java/com/android/voicemail/impl/res/values-lt/strings.xml +++ b/java/com/android/voicemail/impl/res/values-lt/strings.xml @@ -24,7 +24,6 @@ "Išplėstiniai nustatymai" "Vaizdinis balso paštas" "Papild. saug. vt. ir ats. kop. kūr. f." - " ""Tai yra eksperimentinė funkcija"", kurią šiuo metu išbandome. Ją naudojant iš balso pašto serverio bus ištrinami balso pašto pranešimai. Negarantuojame, kad ateityje ši funkcija bus palaikoma, tačiau norėtume gauti atsiliepimų apie ją." "PIN kodo nustatymas" "PIN kodo keitimas" "Vaizdinis balso paštas turi būti įgalintas, kad būtų galima pakeisti PIN kodą" diff --git a/java/com/android/voicemail/impl/res/values-lv/strings.xml b/java/com/android/voicemail/impl/res/values-lv/strings.xml index 1f758c467..0b8b2f92a 100644 --- a/java/com/android/voicemail/impl/res/values-lv/strings.xml +++ b/java/com/android/voicemail/impl/res/values-lv/strings.xml @@ -24,7 +24,6 @@ "Papildu iestatījumi" "Vizuālais balss pasts" "Papildu dublēšana un krātuve" - " ""Šī ir eksperimentāla funkcija"", ko mēs pašlaik testējam. Pastāv iespēja, ka no jūsu balss pasta servera tiks izdzēsti balss pasta ziņojumi. Mēs negarantējam šīs funkcijas turpmāku atbalstu, tomēr priecāsimies saņemt atsauksmes par to." "PIN iestatīšana" "PIN mainīšana" "Lai varētu mainīt PIN, ir jābūt iespējotam vizuālajam balss pastam." diff --git a/java/com/android/voicemail/impl/res/values-mk/strings.xml b/java/com/android/voicemail/impl/res/values-mk/strings.xml index 39b8beefc..90c2f6cb2 100644 --- a/java/com/android/voicemail/impl/res/values-mk/strings.xml +++ b/java/com/android/voicemail/impl/res/values-mk/strings.xml @@ -24,7 +24,6 @@ "Напредни поставки" "Визуелна говорна пошта" "Дополнителен бекап и склад" - " ""Ова е експериментална функција"" што моментално ја тестираме. Постои можност да брише говорни пораки од вашиот сервер за говорна пошта. Нема гаранција дека функцијава ќе се поддржува во иднина. Сепак, многу би ни значеле повратните информации за функцијата." "Поставете PIN" "Променете PIN" "За променување на PIN-кодот, мора да се овозможи визуелна говорна пошта" diff --git a/java/com/android/voicemail/impl/res/values-ml/strings.xml b/java/com/android/voicemail/impl/res/values-ml/strings.xml index c30ebbcfe..d7fd31f1e 100644 --- a/java/com/android/voicemail/impl/res/values-ml/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ml/strings.xml @@ -24,7 +24,6 @@ "വിപുലമായ ക്രമീകരണം" "വിഷ്വൽ വോയ്‌സ്‌മെയിൽ" "അധിക ബായ്‌ക്കപ്പും സ്‌റ്റോറേജും" - " ഇത് നിലവിൽ ഞങ്ങൾ പരീക്ഷിക്കുന്ന ""ഒരു പരീക്ഷണാത്മക ഫീച്ചറാണ്"". ഇത് നിങ്ങളുടെ വോയ്‌സ്‌മെയിൽ സെർവറിൽ നിന്ന് വോയ്‌സ്‌മെയിലുകൾ ഇല്ലാതാക്കാൻ സാധ്യതയുണ്ട്. ഈ ഫീച്ചർ ഭാവിയിൽ ഉപയോഗിക്കാനാവുമെന്ന് ഉറപ്പൊന്നുമില്ല. എങ്കിലും ഈ ഫീച്ചറിനെക്കുറിച്ചുള്ള ഫീഡ്‌ബാക്ക് അറിയാൻ ഞങ്ങൾ താൽപ്പര്യപ്പെടുന്നു." "പിൻ സജ്ജമാക്കുക" "പിൻ മാറ്റുക" "പിൻ മാറ്റുന്നതിന് വിഷ്വൽ വോയ്‌സ്‌മെയിൽ പ്രവർത്തനക്ഷമമാക്കേണ്ടതുണ്ട്" diff --git a/java/com/android/voicemail/impl/res/values-mn/strings.xml b/java/com/android/voicemail/impl/res/values-mn/strings.xml index a559d1900..5f726342f 100644 --- a/java/com/android/voicemail/impl/res/values-mn/strings.xml +++ b/java/com/android/voicemail/impl/res/values-mn/strings.xml @@ -24,7 +24,6 @@ "Нарийвчилсан тохиргоо" "Уншиж болохуйц дуут шуудан" "Нэмэлт нөөцлөлт болон хадгалах сан" - " Энэ бол бидний одоо шалгаж буй ""туршилтын функц"". Энэ таны дуут шуудангийн серверээс дуут шуудангуудыг устгах магадлалтай. Цаашид энэ функцийг дэмжих баталгаа байхгүй. Гэхдээ энэ функцийн талаар санал хүсэлт илгээвэл талархах болно." "PIN тохируулах" "PIN өөрчлөх" "Харагдах дуут шуудан PIN-г өөрчлөх боломжтой байх ёстой" diff --git a/java/com/android/voicemail/impl/res/values-mr/strings.xml b/java/com/android/voicemail/impl/res/values-mr/strings.xml index 56e864b81..e8c546ce6 100644 --- a/java/com/android/voicemail/impl/res/values-mr/strings.xml +++ b/java/com/android/voicemail/impl/res/values-mr/strings.xml @@ -24,7 +24,6 @@ "प्रगत सेटिंग्ज" "दृश्‍यमान व्हॉइसमेल" "अतिरिक्त बॅक अप आणि संचय" - " ""हे प्रायोगिक वैशिष्ट्य आहे"" आम्ही सध्‍या चाचणी घेत आहोत. हे आपल्या व्हॉइसमेल सर्व्हर मधून संभाव्यपणे व्हॉइसमेल हटवेल. भविष्‍यात या वैशिष्‍ट्यास समर्थन देण्याची हमी नाही. तरीही आम्ही वैशिष्‍ट्यावरील अभिप्राय घेऊ इच्छितो." "पिन सेट करा" "पिन बदला" "पिन बदलण्‍यासाठी व्हिज्युअल व्हॉइसमेल सक्षम करणे आवश्‍यक आहे" diff --git a/java/com/android/voicemail/impl/res/values-ms/strings.xml b/java/com/android/voicemail/impl/res/values-ms/strings.xml index ea9b38f08..4468d49d7 100644 --- a/java/com/android/voicemail/impl/res/values-ms/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ms/strings.xml @@ -24,7 +24,6 @@ "Tetapan Terperinci" "Mel Suara Visual" "Sandaran dan storan tambahan" - " ""Ini ialah ciri percubaan"" yang sedang kami uji. Ciri ini berupaya memadamkan mel suara daripada pelayan mel suara anda. Tiada jaminan bahawa ciri ini akan disokong pada masa hadapan. Namun begitu, kami berharap untuk menerima maklum balas tentang ciri ini." "Tetapkan PIN" "Tukar PIN" "Mel suara visual mesti didayakan untuk menukar PIN" diff --git a/java/com/android/voicemail/impl/res/values-my/strings.xml b/java/com/android/voicemail/impl/res/values-my/strings.xml index 6c789275a..41e88351d 100644 --- a/java/com/android/voicemail/impl/res/values-my/strings.xml +++ b/java/com/android/voicemail/impl/res/values-my/strings.xml @@ -24,7 +24,6 @@ "အဆင့်မြင့် ဆက်တင်များ" "စာသားမှတ်တမ်းပါ အသံမေးလ်" "အပိုဆောင်း မိတ္တူနှင့် သိုလှောင်မှု" - " ဤသည်မှာ ""စမ်းသပ်ဆဲဝန်ဆောင်မှုတစ်ခု"" ဖြစ်ပါသည်။ ၎င်းက သင်၏အသံမေးလ်ဆာဗာမှ အသံမေးလ်များကို ဖျက်ပစ်နိုင်ပါသည်။ ဤဝန်ဆောင်မှုကို အနာဂတ်တွင် ဆက်လက်ရရှိနိုင်မည်ဟု အာမခံထားခြင်း မရှိသော်လည်း ၎င်းနှင့်ပတ်သက်သည့် အကြံပြုချက်များကို ရရှိလိုပါသည်။" "ပင်နံပါတ် သတ်မှတ်ပါ" "ပင်နံပါတ် ပြောင်းပါ" "ပင်နံပါတ်ပြောင်းရန် စာသားမှတ်တမ်းပါ အသံမေးလ်ကို ဖွင့်ထားရပါမည်" diff --git a/java/com/android/voicemail/impl/res/values-nb/strings.xml b/java/com/android/voicemail/impl/res/values-nb/strings.xml index 93e9e2a2c..afbdd3bb8 100644 --- a/java/com/android/voicemail/impl/res/values-nb/strings.xml +++ b/java/com/android/voicemail/impl/res/values-nb/strings.xml @@ -24,7 +24,6 @@ "Avanserte innstillinger" "Visuell talepostkasse" "Ekstra sikkerhetskopi og lagring" - " ""Denne funksjonen er fortsatt under utforskning"", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." "Angi PIN-kode" "Endre PIN-koden" "Du må slå på visuell talepost for å endre PIN-koden" diff --git a/java/com/android/voicemail/impl/res/values-ne/strings.xml b/java/com/android/voicemail/impl/res/values-ne/strings.xml index d729c2323..a186535b5 100644 --- a/java/com/android/voicemail/impl/res/values-ne/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ne/strings.xml @@ -24,7 +24,6 @@ "उन्नत सेटिङहरू" "भिजुअल भ्वाइस मेल" "अतिरिक्त ब्याकअप र भण्डारण" - " ""यो एउटा प्रयोगात्मक विशेषता हो"" हामी अहिले परीक्षण गर्दैछौं। यसले सम्भवत: तपाईंको भ्वाइस मेल सर्भरका भ्वाइस मेलहरूलाई मेट्ने छ। भविष्यमा यो विशेषतालाई समर्थन गरिने कुराको ग्यारेन्टी छैन। तथापि हामी यो विशेषताका सम्बन्धमा प्रतिक्रिया आऊन् भन्ने चाहन्छौं।" "PIN सेट गर्नुहोस्" "PIN परिवर्तन गर्नुहोस्" "PIN परिवर्तन गर्न अनिवार्य रूपले भिजुअल भ्वाइस मेललाई सक्षम पारिनुपर्छ" diff --git a/java/com/android/voicemail/impl/res/values-nl/strings.xml b/java/com/android/voicemail/impl/res/values-nl/strings.xml index 7ae9f4e0e..ed66ab303 100644 --- a/java/com/android/voicemail/impl/res/values-nl/strings.xml +++ b/java/com/android/voicemail/impl/res/values-nl/strings.xml @@ -24,7 +24,6 @@ "Geavanceerde instellingen" "Visuele voicemail" "Extra back-up en opslag" - " ""Dit is een experimentele functie"" die wordt getest. Mogelijk worden hierdoor voicemails van de voicemailserver verwijderd. Er is geen garantie dat we deze functie in de toekomst blijven ondersteunen. We zijn wel heel benieuwd naar jullie feedback over de functie." "Pincode instellen" "Pincode wijzigen" "Visuele voicemail moet zijn ingeschakeld om de pincode te wijzigen" diff --git a/java/com/android/voicemail/impl/res/values-no/strings.xml b/java/com/android/voicemail/impl/res/values-no/strings.xml index 93e9e2a2c..afbdd3bb8 100644 --- a/java/com/android/voicemail/impl/res/values-no/strings.xml +++ b/java/com/android/voicemail/impl/res/values-no/strings.xml @@ -24,7 +24,6 @@ "Avanserte innstillinger" "Visuell talepostkasse" "Ekstra sikkerhetskopi og lagring" - " ""Denne funksjonen er fortsatt under utforskning"", og det kan føre til at noen av talepostmelingene dine slettes. Vi kan dessverre ikke love at denne funksjonen støttes i fremtiden, men vi vil gjerne høre om hva du mener om den." "Angi PIN-kode" "Endre PIN-koden" "Du må slå på visuell talepost for å endre PIN-koden" diff --git a/java/com/android/voicemail/impl/res/values-pa/strings.xml b/java/com/android/voicemail/impl/res/values-pa/strings.xml index f3551cc6e..ec68867c6 100644 --- a/java/com/android/voicemail/impl/res/values-pa/strings.xml +++ b/java/com/android/voicemail/impl/res/values-pa/strings.xml @@ -24,7 +24,6 @@ "ਉੱਨਤ ਸੈਟਿੰਗਾਂ" "ਦ੍ਰਿਸ਼ਟਾਂਤਕ ਵੌਇਸਮੇਲ" "ਵਾਧੂ ਬੈਕਅੱਪ ਅਤੇ ਸਟੋਰੇਜ" - " ""ਇਹ ਇੱਕ ਪ੍ਰਯੋਗਾਤਮਕ ਵਿਸ਼ੇਸ਼ਤਾ ਹੈ"" ਜਿਸਦੀ ਅਸੀਂ ਇਸ ਵੇਲੇ ਜਾਂਚ ਕਰ ਰਹੇ ਹਾਂ। ਇਹ ਸੰਭਾਵੀ ਤੌਰ \'ਤੇ ਤੁਹਾਡੇ ਵੌਇਸਮੇਲ ਸਰਵਰ ਤੋਂ ਵੌਇਸਮੇਲਾਂ ਨੂੰ ਮਿਟਾ ਦੇਵੇਗੀ। ਭਵਿੱਖ ਵਿੱਚ ਇਸ ਵਿਸ਼ੇਸ਼ਤਾ ਦਾ ਸਮਰਥਨ ਕਰਨ ਦੀਆਂ ਕੋਈ ਗਾਰੰਟੀਆਂ ਨਹੀਂ ਹਨ। ਅਸੀਂ ਹਾਲਾਂਕਿ ਵਿਸ਼ੇਸ਼ਤਾ \'ਤੇ ਪ੍ਰਤੀਕਰਮ ਨੂੰ ਪਸੰਦ ਕਰਾਂਗੇ।" "PIN ਸੈੱਟ ਕਰੋ" "PIN ਬਦਲੋ" "ਦ੍ਰਿਸ਼ਟਾਂਤਕ ਵੌਇਸਮੇਲ ਨੂੰ PIN ਬਦਲਣ ਲਈ ਯੋਗ ਬਣਾਇਆ ਜਾਣਾ ਲਾਜ਼ਮੀ ਹੈ" diff --git a/java/com/android/voicemail/impl/res/values-pl/strings.xml b/java/com/android/voicemail/impl/res/values-pl/strings.xml index 83003df97..25b891475 100644 --- a/java/com/android/voicemail/impl/res/values-pl/strings.xml +++ b/java/com/android/voicemail/impl/res/values-pl/strings.xml @@ -24,7 +24,6 @@ "Ustawienia zaawansowane" "Wizualna poczta głosowa" "Dodatkowe miejsce i kopia zapasowa" - " ""To jest funkcja eksperymentalna"", którą obecnie testujemy. Może ona usunąć wiadomości głosowe z Twojego serwera poczty głosowej. Nie gwarantujemy, że ta funkcja będzie w przyszłości obsługiwana. Chętnie jednak dowiemy się, co o niej sądzisz." "Ustaw kod PIN" "Zmień kod PIN" "Aby można było zmienić kod PIN, wizualna poczta głosowa musi być włączona" diff --git a/java/com/android/voicemail/impl/res/values-pt-rBR/strings.xml b/java/com/android/voicemail/impl/res/values-pt-rBR/strings.xml index a0eee43ae..c93402e36 100644 --- a/java/com/android/voicemail/impl/res/values-pt-rBR/strings.xml +++ b/java/com/android/voicemail/impl/res/values-pt-rBR/strings.xml @@ -24,7 +24,6 @@ "Configurações avançadas" "Correio de voz visual" "Armazenamento extra e backup" - " ""Este é um recurso experimental"" que estamos testando. Talvez ele exclua os correios de voz do seu servidor. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." "Definir PIN" "Alterar PIN" "O correio de voz visual precisa ser ativado para alterar o PIN" diff --git a/java/com/android/voicemail/impl/res/values-pt-rPT/strings.xml b/java/com/android/voicemail/impl/res/values-pt-rPT/strings.xml index 2be877e23..00ed0331b 100644 --- a/java/com/android/voicemail/impl/res/values-pt-rPT/strings.xml +++ b/java/com/android/voicemail/impl/res/values-pt-rPT/strings.xml @@ -24,7 +24,6 @@ "Definições avançadas" "Mensagem de correio de voz visual" "Cópia de segurança e armazenamento extra" - " ""É uma funcionalidade experimental"" que estamos a testar. Poderá eliminar mensagens de correio de voz do servidor de correio de voz. Não há garantias de suporte para esta funcionalidade. Gostaríamos de receber comentários sobre a mesma." "Definir PIN" "Alterar PIN" "A mensagem de correio de voz visual tem de estar ativada para poder alterar o PIN" diff --git a/java/com/android/voicemail/impl/res/values-pt/strings.xml b/java/com/android/voicemail/impl/res/values-pt/strings.xml index a0eee43ae..c93402e36 100644 --- a/java/com/android/voicemail/impl/res/values-pt/strings.xml +++ b/java/com/android/voicemail/impl/res/values-pt/strings.xml @@ -24,7 +24,6 @@ "Configurações avançadas" "Correio de voz visual" "Armazenamento extra e backup" - " ""Este é um recurso experimental"" que estamos testando. Talvez ele exclua os correios de voz do seu servidor. Não há garantias de suporte no futuro, mas gostaríamos de receber seu feedback." "Definir PIN" "Alterar PIN" "O correio de voz visual precisa ser ativado para alterar o PIN" diff --git a/java/com/android/voicemail/impl/res/values-ro/strings.xml b/java/com/android/voicemail/impl/res/values-ro/strings.xml index 1c98d5a20..9099065c1 100644 --- a/java/com/android/voicemail/impl/res/values-ro/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ro/strings.xml @@ -24,7 +24,6 @@ "Setări avansate" "Mesagerie vocală vizuală" "Backup și spațiu de stocare suplimentare" - " ""Aceasta este o funcție experimentală"" în curs de testare. E posibil ca mesajele vocale de pe serverul de mesagerie vocală să fie șterse. Nu se poate garanta acceptarea acestei funcții pe viitor, însă feedbackul dvs. e bine-venit." "Setați codul PIN" "Schimbați codul PIN" "Mesageria vocală vizuală trebuie activată pentru a schimba codul PIN." diff --git a/java/com/android/voicemail/impl/res/values-ru/strings.xml b/java/com/android/voicemail/impl/res/values-ru/strings.xml index f899f149e..322b41bfb 100644 --- a/java/com/android/voicemail/impl/res/values-ru/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ru/strings.xml @@ -24,7 +24,6 @@ "Расширенные настройки" "Визуальная голосовая почта" "Дополнительное место для хранения и резервного копирования" - " ""Это экспериментальная функция"", которая сейчас проходит тестирование. Возможно, ваши голосовые сообщения будут удалены с вашего сервера. Поддержка этой функции в дальнейшем не гарантируется. Мы бы хотели узнать ваше мнение о ней." "Установка PIN-кода" "Изменение PIN-кода" "Чтобы изменить PIN-код, включите визуальную голосовую почту" diff --git a/java/com/android/voicemail/impl/res/values-si/strings.xml b/java/com/android/voicemail/impl/res/values-si/strings.xml index b5dc7826c..8ad6f87e6 100644 --- a/java/com/android/voicemail/impl/res/values-si/strings.xml +++ b/java/com/android/voicemail/impl/res/values-si/strings.xml @@ -24,7 +24,6 @@ "උසස් සැකසීම්" "දෘශ්‍ය හඬ තැපෑල" "අතිරේක උපස්ථය සහ ගබඩාව" - " ""මෙය අත්හදා බැලීමේ විශේෂාංගයකි"" අපි දැන් පරීක්ෂා කරමින් සිටිමු. මෙය විභව්‍යව හඬ තැපැල් ඔබේ සේවාදායකයෙන් මකනු ඇත. මෙම විශේෂාංගය අනාගතයේදී සහාය දැක්වීම ගැන ඇපවීම් නැත. එසේ වුවත් අපි විශේෂාංගය ගැන ප්‍රතිපෝෂණවලට ආදරය කරන්නෙමු." "PIN අංකය සකසන්න" "PIN අංකය වෙනස් කරන්න" "PIN අංකය වෙනස් කිරීමට දෘශ්‍ය හඬ තැපෑල සබල කළ යුතුය" diff --git a/java/com/android/voicemail/impl/res/values-sk/strings.xml b/java/com/android/voicemail/impl/res/values-sk/strings.xml index 5a81a1bd4..80252d454 100644 --- a/java/com/android/voicemail/impl/res/values-sk/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sk/strings.xml @@ -24,7 +24,6 @@ "Rozšírené nastavenia" "Vizuálna hlasová schránka" "Ďalšie zálohovanie a úložisko" - " ""Toto je experimentálna funkcia"", ktorú práve testujeme. Táto funkcia vám môže odstrániť hlasové správy zo servera hlasovej schránky. Nemôžeme zaručiť, že bude podporovaná aj v budúcnosti, no budeme vám vďační za poskytnutie spätnej väzby." "Nastavenie kódu PIN" "Zmena kódu PIN" "PIN možno zmeniť až po povolení vizuálnej hlasovej schránky" diff --git a/java/com/android/voicemail/impl/res/values-sl/strings.xml b/java/com/android/voicemail/impl/res/values-sl/strings.xml index ce0f40ec8..b634d156a 100644 --- a/java/com/android/voicemail/impl/res/values-sl/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sl/strings.xml @@ -24,7 +24,6 @@ "Dodatne nastavitve" "Vizualno sporočilo v odzivniku" "Dodatno varnostno kopiranje in shramba" - " ""To je poskusna funkcija"", za katero trenutno izvajamo preskuse. Sporočila v odzivniku bodo morda izbrisana iz strežnika za sporočila v odzivniku. Ni mogoče jamčiti, da bo ta funkcija podprta tudi v prihodnje. Kljub temu bomo veseli vaših povratnih informacij o funkciji." "Nastavitev kode PIN" "Sprememba kode PIN" "Če želite spremeniti kodo PIN, morajo biti vizualna sporočila v odzivniku omogočena" diff --git a/java/com/android/voicemail/impl/res/values-sq/strings.xml b/java/com/android/voicemail/impl/res/values-sq/strings.xml index 472e60c0d..59db0fd74 100644 --- a/java/com/android/voicemail/impl/res/values-sq/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sq/strings.xml @@ -24,7 +24,6 @@ "Cilësimet e përparuara" "Posta zanore vizuale" "Rezervimi dhe hapësira ruajtëse shtesë" - " ""Ky është një funksion eksperimental"" që po e testojmë aktualisht. Kjo mund të fshijë posta zanore nga serveri i postës zanore. Nuk ka garanci për mbështetjen e këtij funksioni në të ardhmen. Megjithatë do të na pëlqente të merrnim komente për funksionin." "Konfiguro kodin PIN" "Ndrysho kodin PIN" "Duhet të aktivizohet posta zanore vizuale për të ndryshuar kodin PIN" diff --git a/java/com/android/voicemail/impl/res/values-sr/strings.xml b/java/com/android/voicemail/impl/res/values-sr/strings.xml index 431d0dfb3..d4998ed2e 100644 --- a/java/com/android/voicemail/impl/res/values-sr/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sr/strings.xml @@ -24,7 +24,6 @@ "Напредна подешавања" "Визуелна говорна пошта" "Додатне резервне копије и простор" - " ""Ово је експериментална функција"" коју тренутно тестирамо. Тако ће се можда избрисати говорне поруке са сервера говорне поште. Нема гаранција да ће ова функција бити подржана и у будућности. Ипак, желимо да добијамо повратне информације о њој." "Подесите PIN" "Промените PIN" "Морате да омогућите визуелну говорну пошту да бисте променили PIN" diff --git a/java/com/android/voicemail/impl/res/values-sv/strings.xml b/java/com/android/voicemail/impl/res/values-sv/strings.xml index cba2b15c8..c69a2df5f 100644 --- a/java/com/android/voicemail/impl/res/values-sv/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sv/strings.xml @@ -24,7 +24,6 @@ "Avancerade inställningar" "Visuell röstbrevlåda" "Extra säkerhetskopiering och lagring" - " ""Det här är en experimentfunktion"" som vi för närvarande testar. Den kan potentiellt radera röstmeddelanden på röstbrevlådans server. Vi garanterar inte support för den här funktionen i framtiden. Vi är dock tacksamma för synpunkter om funktionen." "Ställ in pinkod" "Ändra pinkod" "Visuell röstbrevlåda måste vara aktiverat för att ändra pinkoden" diff --git a/java/com/android/voicemail/impl/res/values-sw/strings.xml b/java/com/android/voicemail/impl/res/values-sw/strings.xml index 99de90ca5..d1cccc78c 100644 --- a/java/com/android/voicemail/impl/res/values-sw/strings.xml +++ b/java/com/android/voicemail/impl/res/values-sw/strings.xml @@ -24,7 +24,6 @@ "Mipangilio ya Kina" "Ujumbe wa Sauti Unaoonekana" "Nafasi ya ziada na hifadhi rudufu" - " ""Hiki ni kipengele cha majaribio"" tunachoijaribu kwa sasa. Huenda kitafuta ujumbe wa sauti kutoka kwenye seva yako ya ujumbe wa sauti. Hakuna hakikisho yoyote kwamba kipengele hiki kitatumika katika siku zijazo. Hata hivyo, tungependa kupata maoni yako kuhusu kipengele hiki." "Weka PIN" "Badilisha PIN" "Lazima uruhusu kipengele cha ujumbe wa sauti unaoonekana ili ubadilishe PIN" diff --git a/java/com/android/voicemail/impl/res/values-ta/strings.xml b/java/com/android/voicemail/impl/res/values-ta/strings.xml index a6c97c112..0c3c454e1 100644 --- a/java/com/android/voicemail/impl/res/values-ta/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ta/strings.xml @@ -24,7 +24,6 @@ "மேம்பட்ட அமைப்புகள்" "விஷூவல் குரலஞ்சல்" "கூடுதல் காப்புப் பிரதியும் சேமிப்பகமும்" - " தற்போது நாங்கள் நடத்தி வரும் சோதனையில் ""இது ஒரு சோதனை அம்சமாகும்"". இது உங்கள் குரலஞ்சல் சேவையகத்திலிருந்து குரலஞ்சல்களை நீக்க சாத்தியமுள்ளது. இந்த அம்சம் எதிர்காலத்தில் ஆதரிக்கப்படும் என்பதற்கு உத்திரவாதம் இல்லை. இருப்பினும் இந்த அம்சத்தைப் பற்றிய கருத்தை வரவேற்கிறோம்." "பின்னை அமை" "பின்னை மாற்று" "பின்னை மாற்ற, விஷுவல் குரலஞ்சலை இயக்க வேண்டும்" diff --git a/java/com/android/voicemail/impl/res/values-te/strings.xml b/java/com/android/voicemail/impl/res/values-te/strings.xml index 2ad08cffe..7a865f43f 100644 --- a/java/com/android/voicemail/impl/res/values-te/strings.xml +++ b/java/com/android/voicemail/impl/res/values-te/strings.xml @@ -24,7 +24,6 @@ "అధునాతన సెట్టింగ్‌లు" "దృశ్యమాన వాయిస్ మెయిల్" "అదనపు బ్యాకప్ మరియు నిల్వ" - " ""ఇది ప్రయోగాత్మక లక్షణం"" ప్రస్తుతం మేము దీన్ని పరీక్షిస్తున్నాము. దీని వలన మీ వాయిస్ మెయిల్ సర్వర్ నుండి సంభావ్యంగా వాయిస్ మెయిల్‌లు తొలగించబడతాయి. భవిష్యత్తులో ఈ లక్షణానికి మద్దతు ఉంటుందని ఎలాంటి హామీ అందించబడదు. అయితే, లక్షణంపై అభిప్రాయాన్ని అందిస్తే మేము సంతోషిస్తాము." "PINని సెట్ చేయండి" "PINను మార్చండి" "PINని మార్చడానికి తప్పనిసరిగా దృశ్యమాన వాయిస్ మెయిల్‌ను ప్రారంభించాలి" diff --git a/java/com/android/voicemail/impl/res/values-th/strings.xml b/java/com/android/voicemail/impl/res/values-th/strings.xml index 49b07dfa2..68b32fb45 100644 --- a/java/com/android/voicemail/impl/res/values-th/strings.xml +++ b/java/com/android/voicemail/impl/res/values-th/strings.xml @@ -24,7 +24,6 @@ "การตั้งค่าขั้นสูง" "ภาพแสดงข้อความเสียง" "การสำรองข้อมูลและพื้นที่เก็บข้อมูลเพิ่มเติม" - " ""นี่คือคุณลักษณะทดลอง""ที่เรากำลังทดสอบการใช้งานอยู่ ซึ่งอาจลบข้อความเสียงออกจากเซิร์ฟเวอร์ข้อความเสียงได้ เราไม่รับประกันว่าจะรองรับคุณลักษณะนี้ในอนาคต แต่ยินดีรับฟังความคิดเห็น" "ตั้งค่า PIN" "เปลี่ยน PIN" "ต้องเปิดใช้ข้อความเสียงพร้อมภาพเพื่อเปลี่ยน PIN" diff --git a/java/com/android/voicemail/impl/res/values-tl/strings.xml b/java/com/android/voicemail/impl/res/values-tl/strings.xml index 62623b633..c14919c03 100644 --- a/java/com/android/voicemail/impl/res/values-tl/strings.xml +++ b/java/com/android/voicemail/impl/res/values-tl/strings.xml @@ -24,7 +24,6 @@ "Mga Advanced na Setting" "Visual na Voicemail" "Karagdagang backup at storage" - " ""Eksperimental na feature ito"" na kasalukuyan naming sinusubukan. Posible nitong i-delete ang mga voicemail mula sa iyong server ng voicemail. Walang garantiyang susuportahan ang feature na ito sa hinaharap. Gayunpaman, gusto naming makakuha ng feedback tungkol sa feature." "Magtakda ng PIN" "Palitan ang PIN" "Dapat naka-enable ang visual na voicemail upang palitan ang PIN" diff --git a/java/com/android/voicemail/impl/res/values-tr/strings.xml b/java/com/android/voicemail/impl/res/values-tr/strings.xml index aed722a11..e8f9336f3 100644 --- a/java/com/android/voicemail/impl/res/values-tr/strings.xml +++ b/java/com/android/voicemail/impl/res/values-tr/strings.xml @@ -24,7 +24,6 @@ "Gelişmiş Ayarlar" "Görsel Sesli Mesaj" "Ekstra yedekleme ve depolama alanı" - " ""Bu, test etmekte olduğumuz ""deneysel bir özelliktir"". Bu özellik, sesli mesaj sunucunuzdaki mesajların silinmesine neden olabilir ve gelecekte desteklenmeyebilir. Yine de özellikle ilgili geri bildiriminizi öğrenmek isteriz." "PIN belirleyin" "PIN\'i değiştirin" "PIN\'i değiştirebilmek için görsel sesli mesaj etkinleştirilmelidir" diff --git a/java/com/android/voicemail/impl/res/values-uk/strings.xml b/java/com/android/voicemail/impl/res/values-uk/strings.xml index c3cbee681..760177ca4 100644 --- a/java/com/android/voicemail/impl/res/values-uk/strings.xml +++ b/java/com/android/voicemail/impl/res/values-uk/strings.xml @@ -24,7 +24,6 @@ "Розширені налаштування" "Візуальна голосова пошта" "Додаткова пам’ять і резервне копіювання" - " ""Це експериментальна функція,"" яку ми зараз тестуємо. У результаті її використання голосові повідомлення може бути видалено із сервера голосової пошти. Ми не гарантуємо, що ця функція підтримуватиметься в майбутньому, однак хочемо отримати відгук про неї." "Установити PIN-код" "Змінити PIN-код" "Щоб змінити PIN-код, потрібно ввімкнути візуальну голосову пошту" diff --git a/java/com/android/voicemail/impl/res/values-ur/strings.xml b/java/com/android/voicemail/impl/res/values-ur/strings.xml index 201e6e910..2105fae08 100644 --- a/java/com/android/voicemail/impl/res/values-ur/strings.xml +++ b/java/com/android/voicemail/impl/res/values-ur/strings.xml @@ -24,7 +24,6 @@ "اعلی ترتیبات" "بصری صوتی میل" "اضافی بیک اپ اور اسٹوریج" - " ""یہ ایک تجرباتی خصوصیت ہے"" جسے ابھی ہم ٹیسٹ کر رہے ہیں۔ یہ ممکنہ طور پر آپ کے صوتی میل سرور پر سے آپ کی صوتی میلز کو حذف کر دے گی۔ مستقبل میں اس خصوصیت کی معاونت کی کوئی ضمانت نہیں ہے۔ لیکن ہم اس خصوصیت پر تاثرات پسند کریں گے۔" "‏PIN سیٹ کریں" "‏PIN تبدیل کریں" "‏PIN تبدیل کرنے کیلئے بصری صوتی میل اہل ہونی چاہئیے" diff --git a/java/com/android/voicemail/impl/res/values-uz/strings.xml b/java/com/android/voicemail/impl/res/values-uz/strings.xml index 7f26475ec..fad79164d 100644 --- a/java/com/android/voicemail/impl/res/values-uz/strings.xml +++ b/java/com/android/voicemail/impl/res/values-uz/strings.xml @@ -24,7 +24,6 @@ "Kengaytirilgan sozlamalar" "Vizual ovozli pochta" "Zaxira. va saqlash u-n qo‘shimcha xotira" - " ""Bu – tajribaviy xususiyat bo‘lib,"" u ayni vaqtda sinovdan o‘tkazilmoqda. Sizning ovozli xabarlaringiz, ehtimol, ovozli pochta serveridan o‘chirib tashlanadi. Bu xususiyatning keyinchalik qo‘llab-quvvatlanishi kafolatlanmaydi. Shunday bo‘lsa-da, u haqda fikr-mulohaza bildirishingizni xohlaymiz." "PIN kod o‘rnatish" "PIN kodni o‘zgartirish" "PIN kodni o‘zgartirish uchun vizual ovozli pochtani yoqish lozim." diff --git a/java/com/android/voicemail/impl/res/values-vi/strings.xml b/java/com/android/voicemail/impl/res/values-vi/strings.xml index a0b25f803..1d029ea12 100644 --- a/java/com/android/voicemail/impl/res/values-vi/strings.xml +++ b/java/com/android/voicemail/impl/res/values-vi/strings.xml @@ -24,7 +24,6 @@ "Cài đặt nâng cao" "Thư thoại kèm theo hình ảnh" "Bộ nhớ và bản sao lưu bổ sung" - " ""Đây là một tính năng thử nghiệm"" chúng tôi hiện đang thử nghiệm. Tính năng này có khả năng sẽ xóa thư thoại khỏi máy chủ thư thoại của bạn. Không có đảm bảo về việc hỗ trợ tính năng này trong tương lai. Mặc dù vậy, chúng tôi vẫn mong muốn nhận được phản hồi về tính năng này." "Đặt mã PIN" "Thay đổi mã PIN" "Phải bật thư thoại kèm theo hình ảnh để thay đổi mã PIN" diff --git a/java/com/android/voicemail/impl/res/values-zh-rCN/strings.xml b/java/com/android/voicemail/impl/res/values-zh-rCN/strings.xml index 9bfbe368d..d70f1fa51 100644 --- a/java/com/android/voicemail/impl/res/values-zh-rCN/strings.xml +++ b/java/com/android/voicemail/impl/res/values-zh-rCN/strings.xml @@ -24,7 +24,6 @@ "高级设置" "可视语音信箱" "额外存储空间和备份功能" - " ""这是一项试验性功能"" 我们目前正在进行测试。使用此功能可能会将语音邮件从您的语音邮件服务器上删除。我们不保证将来会支持此功能,但希望能收到针对此功能的反馈。" "设置 PIN 码" "更改 PIN 码" "必须启用可视语音信箱才可更改 PIN 码" diff --git a/java/com/android/voicemail/impl/res/values-zh-rHK/strings.xml b/java/com/android/voicemail/impl/res/values-zh-rHK/strings.xml index 6c1ed4d15..4adc3fd97 100644 --- a/java/com/android/voicemail/impl/res/values-zh-rHK/strings.xml +++ b/java/com/android/voicemail/impl/res/values-zh-rHK/strings.xml @@ -24,7 +24,6 @@ "進階設定" "視像留言" "額外備份功能和儲存空間" - " ""此為我們目前正在測試的實驗性功能"",有可能會將您的留言從留言伺服器刪除。我們不保證日後會支援此功能,但還是歡迎您提供相關意見。" "設定 PIN" "變更 PIN" "必須啟用視像留言才能變更 PIN" diff --git a/java/com/android/voicemail/impl/res/values-zh-rTW/strings.xml b/java/com/android/voicemail/impl/res/values-zh-rTW/strings.xml index 0af6ed152..6ff084f60 100644 --- a/java/com/android/voicemail/impl/res/values-zh-rTW/strings.xml +++ b/java/com/android/voicemail/impl/res/values-zh-rTW/strings.xml @@ -24,7 +24,6 @@ "進階設定" "視覺化語音信箱" "額外的備份功能和儲存空間" - " ""這是實驗性功能"",目前正在測試階段,而且可能會從你的語音信箱伺服器中刪除語音留言。我們不保證日後會支援此功能,但還是希望聽聽你的寶貴意見。" "設定 PIN" "變更 PIN" "必須啟用視覺化語音信箱才能變更 PIN" diff --git a/java/com/android/voicemail/impl/res/values-zu/strings.xml b/java/com/android/voicemail/impl/res/values-zu/strings.xml index 81d4d3548..5adf300e5 100644 --- a/java/com/android/voicemail/impl/res/values-zu/strings.xml +++ b/java/com/android/voicemail/impl/res/values-zu/strings.xml @@ -24,7 +24,6 @@ "Izilungiselelo ezithuthukisiwe" "Ivoyisimeyili ebonakalayo" "Isipele esingeziwe nesitoreji" - " ""Lesi isici sokuhlola"" manje esisihlolayo. Lokhu kunamandla okususa amavoyisimeyili kusukela kuseva yakho yevoyisimeyili. Azikho iziqinisekiso zokusekela lesi sici ngokuzayo. Singathanda impendulo kusici yize kunjalo." "Setha i-PIN" "Shintsha i-PIN" "Ivoyisimeyili ebonakalayo kumele inikwe amandla ukuze ishintshe i-PIN" diff --git a/java/com/android/voicemail/impl/res/values/strings.xml b/java/com/android/voicemail/impl/res/values/strings.xml index c8085619b..bb754d18b 100644 --- a/java/com/android/voicemail/impl/res/values/strings.xml +++ b/java/com/android/voicemail/impl/res/values/strings.xml @@ -59,11 +59,6 @@ Extra backup and storage - - - This is a experimental feature we are currently testing. This will potentially delete voicemails from your voicemail server. There are no guarantees of supporting this feature in the future. We would love feedback on the feature though." - - Set PIN diff --git a/java/com/android/voicemail/impl/scheduling/BaseTask.java b/java/com/android/voicemail/impl/scheduling/BaseTask.java index 4cc6dd59e..0144e346f 100644 --- a/java/com/android/voicemail/impl/scheduling/BaseTask.java +++ b/java/com/android/voicemail/impl/scheduling/BaseTask.java @@ -18,12 +18,14 @@ package com.android.voicemail.impl.scheduling; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.os.SystemClock; import android.support.annotation.CallSuper; import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.WorkerThread; import android.telecom.PhoneAccountHandle; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.Assert; import com.android.voicemail.impl.NeededForTesting; import java.util.ArrayList; @@ -33,10 +35,15 @@ import java.util.List; * Provides common utilities for task implementations, such as execution time and managing {@link * Policy} */ +@UsedByReflection(value = "Tasks.java") public abstract class BaseTask implements Task { private static final String EXTRA_PHONE_ACCOUNT_HANDLE = "extra_phone_account_handle"; + private static final String EXTRA_EXECUTION_TIME = "extra_execution_time"; + + private Bundle mExtras; + private Context mContext; private int mId; @@ -58,7 +65,7 @@ public abstract class BaseTask implements Task { /** * Modify the task ID to prevent arbitrary task from executing. Can only be called before {@link - * #onCreate(Context, Intent, int, int)} returns. + * #onCreate(Context, Bundle)} returns. */ @MainThread public void setId(int id) { @@ -86,8 +93,7 @@ public abstract class BaseTask implements Task { return mPhoneAccountHandle; } /** - * Should be call in the constructor or {@link Policy#onCreate(BaseTask, Intent, int, int)} will - * be missed. + * Should be call in the constructor or {@link Policy#onCreate(BaseTask, Bundle)} will be missed. */ @MainThread public BaseTask addPolicy(Policy policy) { @@ -107,6 +113,7 @@ public abstract class BaseTask implements Task { mHasFailed = true; } + /** @param timeMillis the time since epoch, in milliseconds. */ @MainThread public void setExecutionTime(long timeMillis) { Assert.isMainThread(); @@ -131,7 +138,7 @@ public abstract class BaseTask implements Task { */ public static Intent createIntent( Context context, Class task, PhoneAccountHandle phoneAccountHandle) { - Intent intent = TaskSchedulerService.createIntent(context, task); + Intent intent = Tasks.createIntent(context, task); intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle); return intent; } @@ -141,13 +148,28 @@ public abstract class BaseTask implements Task { return new TaskId(mId, mPhoneAccountHandle); } + @Override + public Bundle toBundle() { + mExtras.putLong(EXTRA_EXECUTION_TIME, mExecutionTime); + return mExtras; + } + @Override @CallSuper - public void onCreate(Context context, Intent intent, int flags, int startId) { + public void onCreate(Context context, Bundle extras) { mContext = context; - mPhoneAccountHandle = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE); + mExtras = extras; + mPhoneAccountHandle = extras.getParcelable(EXTRA_PHONE_ACCOUNT_HANDLE); for (Policy policy : mPolicies) { - policy.onCreate(this, intent, flags, startId); + policy.onCreate(this, extras); + } + } + + @Override + @CallSuper + public void onRestore(Bundle extras) { + if (mExtras.containsKey(EXTRA_EXECUTION_TIME)) { + mExecutionTime = extras.getLong(EXTRA_EXECUTION_TIME); } } diff --git a/java/com/android/voicemail/impl/scheduling/BlockerTask.java b/java/com/android/voicemail/impl/scheduling/BlockerTask.java index 353508d56..1c8badaed 100644 --- a/java/com/android/voicemail/impl/scheduling/BlockerTask.java +++ b/java/com/android/voicemail/impl/scheduling/BlockerTask.java @@ -17,10 +17,12 @@ package com.android.voicemail.impl.scheduling; import android.content.Context; -import android.content.Intent; +import android.os.Bundle; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.VvmLog; /** Task to block another task of the same ID from being queued for a certain amount of time. */ +@UsedByReflection(value = "Tasks.java") public class BlockerTask extends BaseTask { private static final String TAG = "BlockerTask"; @@ -33,10 +35,10 @@ public class BlockerTask extends BaseTask { } @Override - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - setId(intent.getIntExtra(EXTRA_TASK_ID, TASK_INVALID)); - setExecutionTime(getTimeMillis() + intent.getIntExtra(EXTRA_BLOCK_FOR_MILLIS, 0)); + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + setId(extras.getInt(EXTRA_TASK_ID, TASK_INVALID)); + setExecutionTime(getTimeMillis() + extras.getInt(EXTRA_BLOCK_FOR_MILLIS, 0)); } @Override @@ -46,6 +48,6 @@ public class BlockerTask extends BaseTask { @Override public void onDuplicatedTaskAdded(Task task) { - VvmLog.v(TAG, task.toString() + "blocked, " + getReadyInMilliSeconds() + "millis remaining"); + VvmLog.i(TAG, task + "blocked, " + getReadyInMilliSeconds() + "millis remaining"); } } diff --git a/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java b/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java index 8b2fe7098..76fba4fb0 100644 --- a/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java +++ b/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java @@ -17,6 +17,7 @@ package com.android.voicemail.impl.scheduling; import android.content.Intent; +import android.os.Bundle; import com.android.voicemail.impl.scheduling.Task.TaskId; /** @@ -35,7 +36,7 @@ public class MinimalIntervalPolicy implements Policy { } @Override - public void onCreate(BaseTask task, Intent intent, int flags, int startId) { + public void onCreate(BaseTask task, Bundle extras) { mTask = task; mId = mTask.getId(); } @@ -47,7 +48,7 @@ public class MinimalIntervalPolicy implements Policy { public void onCompleted() { if (!mTask.hasFailed()) { Intent intent = - mTask.createIntent(mTask.getContext(), BlockerTask.class, mId.phoneAccountHandle); + BaseTask.createIntent(mTask.getContext(), BlockerTask.class, mId.phoneAccountHandle); intent.putExtra(BlockerTask.EXTRA_TASK_ID, mId.id); intent.putExtra(BlockerTask.EXTRA_BLOCK_FOR_MILLIS, mBlockForMillis); mTask.getContext().startService(intent); diff --git a/java/com/android/voicemail/impl/scheduling/Policy.java b/java/com/android/voicemail/impl/scheduling/Policy.java index 607782191..9624aeb7d 100644 --- a/java/com/android/voicemail/impl/scheduling/Policy.java +++ b/java/com/android/voicemail/impl/scheduling/Policy.java @@ -16,7 +16,7 @@ package com.android.voicemail.impl.scheduling; -import android.content.Intent; +import android.os.Bundle; /** * A set of listeners managed by {@link BaseTask} for common behaviors such as retrying. Call {@link @@ -24,7 +24,7 @@ import android.content.Intent; */ public interface Policy { - void onCreate(BaseTask task, Intent intent, int flags, int startId); + void onCreate(BaseTask task, Bundle extras); void onBeforeExecute(); diff --git a/java/com/android/voicemail/impl/scheduling/PostponePolicy.java b/java/com/android/voicemail/impl/scheduling/PostponePolicy.java index e24df0c7a..46773b53a 100644 --- a/java/com/android/voicemail/impl/scheduling/PostponePolicy.java +++ b/java/com/android/voicemail/impl/scheduling/PostponePolicy.java @@ -16,7 +16,7 @@ package com.android.voicemail.impl.scheduling; -import android.content.Intent; +import android.os.Bundle; import com.android.voicemail.impl.VvmLog; /** @@ -37,7 +37,7 @@ public class PostponePolicy implements Policy { } @Override - public void onCreate(BaseTask task, Intent intent, int flags, int startId) { + public void onCreate(BaseTask task, Bundle extras) { mTask = task; mTask.setExecutionTime(mTask.getTimeMillis() + mPostponeMillis); } @@ -62,7 +62,7 @@ public class PostponePolicy implements Policy { if (mTask.hasStarted()) { return; } - VvmLog.d(TAG, "postponing " + mTask); + VvmLog.i(TAG, "postponing " + mTask); mTask.setExecutionTime(mTask.getTimeMillis() + mPostponeMillis); } } diff --git a/java/com/android/voicemail/impl/scheduling/RetryPolicy.java b/java/com/android/voicemail/impl/scheduling/RetryPolicy.java index a8e4a3d3c..b8703ea15 100644 --- a/java/com/android/voicemail/impl/scheduling/RetryPolicy.java +++ b/java/com/android/voicemail/impl/scheduling/RetryPolicy.java @@ -17,6 +17,7 @@ package com.android.voicemail.impl.scheduling; import android.content.Intent; +import android.os.Bundle; import android.telecom.PhoneAccountHandle; import com.android.voicemail.impl.VoicemailStatus; import com.android.voicemail.impl.VvmLog; @@ -60,11 +61,11 @@ public class RetryPolicy implements Policy { } @Override - public void onCreate(BaseTask task, Intent intent, int flags, int startId) { + public void onCreate(BaseTask task, Bundle extras) { mTask = task; - mRetryCount = intent.getIntExtra(EXTRA_RETRY_COUNT, 0); + mRetryCount = extras.getInt(EXTRA_RETRY_COUNT, 0); if (mRetryCount > 0) { - VvmLog.d( + VvmLog.i( TAG, "retry #" + mRetryCount + " for " + mTask + " queued, executing in " + mRetryDelayMillis); mTask.setExecutionTime(mTask.getTimeMillis() + mRetryDelayMillis); @@ -85,10 +86,10 @@ public class RetryPolicy implements Policy { public void onCompleted() { if (!mFailed || !hasMoreRetries()) { if (!mFailed) { - VvmLog.d(TAG, mTask.toString() + " completed successfully"); + VvmLog.i(TAG, mTask + " completed successfully"); } if (!hasMoreRetries()) { - VvmLog.d(TAG, "Retry limit for " + mTask + " reached"); + VvmLog.i(TAG, "Retry limit for " + mTask + " reached"); } VvmLog.i(TAG, "committing deferred status: " + mVoicemailStatusEditor.getValues()); mVoicemailStatusEditor.deferredApply(); diff --git a/java/com/android/voicemail/impl/scheduling/Task.java b/java/com/android/voicemail/impl/scheduling/Task.java index 2d08f5b03..447a9db7b 100644 --- a/java/com/android/voicemail/impl/scheduling/Task.java +++ b/java/com/android/voicemail/impl/scheduling/Task.java @@ -17,26 +17,24 @@ package com.android.voicemail.impl.scheduling; import android.content.Context; -import android.content.Intent; +import android.os.Bundle; import android.support.annotation.MainThread; import android.support.annotation.WorkerThread; import android.telecom.PhoneAccountHandle; import java.util.Objects; /** - * A task for {@link TaskSchedulerService} to execute. Since the task is sent through a intent to - * the scheduler, The task must be constructable with the intent. Specifically, It must have a - * constructor with zero arguments, and have all relevant data packed inside the intent. Use {@link - * TaskSchedulerService#createIntent(Context, Class)} to create a intent that will construct the - * Task. + * A task for {@link TaskSchedulerService} to execute. Since the task is sent through a bundle to + * the scheduler, The task must be constructable with the bundle. Specifically, It must have a + * constructor with zero arguments, and have all relevant data packed inside the bundle. Use {@link + * Tasks#createIntent(Context, Class)} to create a intent that will construct the Task. * *

Only {@link #onExecuteInBackgroundThread()} is run on the worker thread. */ public interface Task { - /** * TaskId to indicate it has not be set. If a task does not provide a default TaskId it should be - * set before {@link Task#onCreate(Context, Intent, int, int) returns} + * set before {@link Task#onCreate(Context, Bundle)} returns */ int TASK_INVALID = -1; @@ -49,6 +47,7 @@ public interface Task { int TASK_UPLOAD = 1; int TASK_SYNC = 2; int TASK_ACTIVATION = 3; + int TASK_STATUS_CHECK = 4; /** * Used to differentiate between types of tasks. If a task with the same TaskId is already in the @@ -87,8 +86,29 @@ public interface Task { TaskId getId(); + /** + * Serializes the task into a bundle, which will be stored in a {@link android.app.job.JobInfo} + * and used to reconstruct the task even if the app is terminated. The task will be initialized + * with {@link #onCreate(Context, Bundle)}. + */ + Bundle toBundle(); + + /** + * A task object is created through reflection, calling the default constructor. The actual + * initialization is done in this method. If the task is not a new instance, but being restored + * from a bundle, {@link #onRestore(Bundle)} will be called afterwards. + */ + @MainThread + void onCreate(Context context, Bundle extras); + + /** + * Called after {@link #onCreate(Context, Bundle)} if the task is being restored from a Bundle + * instead creating a new instance. For example, if the task is stored in {@link + * TaskSchedulerJobService} during a long sleep, this will be called when the job is ran again and + * the tasks are being restored from the saved state. + */ @MainThread - void onCreate(Context context, Intent intent, int flags, int startId); + void onRestore(Bundle extras); /** * @return number of milliSeconds the scheduler should wait before running this task. A value less diff --git a/java/com/android/voicemail/impl/scheduling/TaskQueue.java b/java/com/android/voicemail/impl/scheduling/TaskQueue.java new file mode 100644 index 000000000..fc5aa947a --- /dev/null +++ b/java/com/android/voicemail/impl/scheduling/TaskQueue.java @@ -0,0 +1,149 @@ +/* + * 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.voicemail.impl.scheduling; + +import android.content.Context; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import com.android.voicemail.impl.Assert; +import com.android.voicemail.impl.VvmLog; +import com.android.voicemail.impl.scheduling.Task.TaskId; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Queue; + +/** + * A queue that manages priority and duplication of {@link Task}. A task is identified by a {@link + * TaskId}, which consists of an integer representing the operation the task, and a {@link + * android.telecom.PhoneAccountHandle} representing which SIM it is operated on. + */ +class TaskQueue implements Iterable { + + private final Queue queue = new ArrayDeque<>(); + + public List toBundles() { + List result = new ArrayList<>(queue.size()); + for (Task task : queue) { + result.add(Tasks.toBundle(task)); + } + return result; + } + + public void fromBundles(Context context, List pendingTasks) { + Assert.isTrue(queue.isEmpty()); + for (Bundle pendingTask : pendingTasks) { + Task task = Tasks.createTask(context, pendingTask); + task.onRestore(pendingTask); + add(task); + } + } + + /** + * Add a new task to the queue. A new task with a TaskId collision will be discarded, and {@link + * Task#onDuplicatedTaskAdded(Task)} will be called on the existing task. + * + * @return {@code true} if the task is added, or {@code false} if the task is discarded due to + * collision. + */ + public boolean add(Task task) { + if (task.getId().id == Task.TASK_INVALID) { + throw new AssertionError("Task id was not set to a valid value before adding."); + } + if (task.getId().id != Task.TASK_ALLOW_DUPLICATES) { + Task oldTask = getTask(task.getId()); + if (oldTask != null) { + oldTask.onDuplicatedTaskAdded(task); + VvmLog.i("TaskQueue.add", "duplicated task added"); + return false; + } + } + queue.add(task); + return true; + } + + public void remove(Task task) { + queue.remove(task); + } + + public Task getTask(TaskId id) { + Assert.isMainThread(); + for (Task task : queue) { + if (task.getId().equals(id)) { + return task; + } + } + return null; + } + + /** + * Packed return value of {@link #getNextTask(long)}. If a runnable task is found {@link + * #minimalWaitTimeMillis} will be {@code null}. If no tasks is runnable {@link #task} will be + * {@code null}, and {@link #minimalWaitTimeMillis} will contain the time to wait. If there are no + * tasks at all both will be {@code null}. + */ + static final class NextTask { + @Nullable final Task task; + @Nullable final Long minimalWaitTimeMillis; + + NextTask(@Nullable Task task, @Nullable Long minimalWaitTimeMillis) { + this.task = task; + this.minimalWaitTimeMillis = minimalWaitTimeMillis; + } + } + + /** + * The next task is the first task with {@link Task#getReadyInMilliSeconds()} return a value less + * then {@code readyToleranceMillis}, in insertion order. If no task matches this criteria, the + * minimal value of {@link Task#getReadyInMilliSeconds()} is returned instead. If there are no + * tasks at all, the minimalWaitTimeMillis will also be null. + */ + @NonNull + NextTask getNextTask(long readyToleranceMillis) { + Long minimalWaitTime = null; + for (Task task : queue) { + long waitTime = task.getReadyInMilliSeconds(); + if (waitTime < readyToleranceMillis) { + return new NextTask(task, 0L); + } else { + if (minimalWaitTime == null || waitTime < minimalWaitTime) { + minimalWaitTime = waitTime; + } + } + } + return new NextTask(null, minimalWaitTime); + } + + public void clear() { + queue.clear(); + } + + public int size() { + return queue.size(); + } + + public boolean isEmpty() { + return queue.isEmpty(); + } + + @Override + public Iterator iterator() { + return queue.iterator(); + } +} diff --git a/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java b/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java new file mode 100644 index 000000000..eab410eb0 --- /dev/null +++ b/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java @@ -0,0 +1,158 @@ +/* + * 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.voicemail.impl.scheduling; + +import android.annotation.TargetApi; +import android.app.job.JobInfo; +import android.app.job.JobParameters; +import android.app.job.JobScheduler; +import android.app.job.JobService; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.Build.VERSION_CODES; +import android.os.Bundle; +import android.os.IBinder; +import android.os.Parcelable; +import android.support.annotation.MainThread; +import com.android.dialer.constants.ScheduledJobIds; +import com.android.voicemail.impl.Assert; +import com.android.voicemail.impl.VvmLog; +import java.util.ArrayList; +import java.util.List; + +/** + * A {@link JobService} that will trigger the background execution of {@link TaskSchedulerService}. + */ +@TargetApi(VERSION_CODES.O) +public class TaskSchedulerJobService extends JobService implements TaskSchedulerService.Job { + + private static final String TAG = "TaskSchedulerJobService"; + + private static final String EXTRA_TASK_EXTRAS_ARRAY = "extra_task_extras_array"; + + private JobParameters jobParameters; + private TaskSchedulerService scheduler; + + private final ServiceConnection mConnection = + new ServiceConnection() { + + @Override + public void onServiceConnected(ComponentName className, IBinder binder) { + VvmLog.i(TAG, "TaskSchedulerService connected"); + scheduler = ((TaskSchedulerService.LocalBinder) binder).getService(); + scheduler.onStartJob( + TaskSchedulerJobService.this, + getBundleList( + jobParameters.getTransientExtras().getParcelableArray(EXTRA_TASK_EXTRAS_ARRAY))); + } + + @Override + public void onServiceDisconnected(ComponentName unused) { + // local service, process should always be killed together. + Assert.fail(); + } + }; + + @Override + @MainThread + public boolean onStartJob(JobParameters params) { + jobParameters = params; + bindService( + new Intent(this, TaskSchedulerService.class), mConnection, Context.BIND_AUTO_CREATE); + return true /* job still running in background */; + } + + @Override + @MainThread + public boolean onStopJob(JobParameters params) { + scheduler.onStopJob(); + jobParameters = null; + return false /* don't reschedule. TaskScheduler service will post a new job */; + } + + /** + * Schedule a job to run the {@code pendingTasks}. If a job is already scheduled it will be + * appended to the back of the queue and the job will be rescheduled. + * + * @param delayMillis delay before running the job. Must be 0 if{@code isNewJob} is true. + * @param isNewJob a new job will be forced to run immediately. + */ + @MainThread + public static void scheduleJob( + Context context, List pendingTasks, long delayMillis, boolean isNewJob) { + Assert.isMainThread(); + JobScheduler jobScheduler = context.getSystemService(JobScheduler.class); + JobInfo pendingJob = jobScheduler.getPendingJob(ScheduledJobIds.VVM_TASK_SCHEDULER_JOB); + VvmLog.i(TAG, "scheduling job with " + pendingTasks.size() + " tasks"); + if (pendingJob != null) { + if (isNewJob) { + List existingTasks = + getBundleList( + pendingJob.getTransientExtras().getParcelableArray(EXTRA_TASK_EXTRAS_ARRAY)); + VvmLog.i(TAG, "merging job with " + existingTasks.size() + " existing tasks"); + TaskQueue queue = new TaskQueue(); + queue.fromBundles(context, existingTasks); + for (Bundle pendingTask : pendingTasks) { + queue.add(Tasks.createTask(context, pendingTask)); + } + pendingTasks = queue.toBundles(); + } + VvmLog.i(TAG, "canceling existing job."); + jobScheduler.cancel(ScheduledJobIds.VVM_TASK_SCHEDULER_JOB); + } + Bundle extras = new Bundle(); + extras.putParcelableArray( + EXTRA_TASK_EXTRAS_ARRAY, pendingTasks.toArray(new Bundle[pendingTasks.size()])); + JobInfo.Builder builder = + new JobInfo.Builder( + ScheduledJobIds.VVM_TASK_SCHEDULER_JOB, + new ComponentName(context, TaskSchedulerJobService.class)) + .setTransientExtras(extras) + .setMinimumLatency(delayMillis) + .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY); + if (isNewJob) { + Assert.isTrue(delayMillis == 0); + builder.setOverrideDeadline(0); + VvmLog.i(TAG, "running job instantly."); + } + jobScheduler.schedule(builder.build()); + VvmLog.i(TAG, "job scheduled"); + } + + /** + * The system will hold a wakelock when {@link #onStartJob(JobParameters)} is called to ensure the + * device will not sleep when the job is still running. Finish the job so the system will release + * the wakelock + */ + @Override + public void finish() { + VvmLog.i(TAG, "finishing job and unbinding TaskSchedulerService"); + jobFinished(jobParameters, false); + jobParameters = null; + unbindService(mConnection); + } + + private static List getBundleList(Parcelable[] parcelables) { + List result = new ArrayList<>(parcelables.length); + for (Parcelable parcelable : parcelables) { + result.add((Bundle) parcelable); + } + return result; + } +} diff --git a/java/com/android/voicemail/impl/scheduling/TaskSchedulerService.java b/java/com/android/voicemail/impl/scheduling/TaskSchedulerService.java index 81bd36fee..5ad2447de 100644 --- a/java/com/android/voicemail/impl/scheduling/TaskSchedulerService.java +++ b/java/com/android/voicemail/impl/scheduling/TaskSchedulerService.java @@ -16,20 +16,18 @@ package com.android.voicemail.impl.scheduling; -import android.app.AlarmManager; -import android.app.PendingIntent; +import android.annotation.TargetApi; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Binder; +import android.os.Build.VERSION_CODES; +import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.Looper; import android.os.Message; -import android.os.PowerManager; -import android.os.PowerManager.WakeLock; -import android.os.SystemClock; import android.support.annotation.MainThread; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; @@ -37,20 +35,50 @@ import android.support.annotation.WorkerThread; import com.android.voicemail.impl.Assert; import com.android.voicemail.impl.NeededForTesting; import com.android.voicemail.impl.VvmLog; -import com.android.voicemail.impl.scheduling.Task.TaskId; -import java.util.ArrayDeque; -import java.util.Queue; +import com.android.voicemail.impl.scheduling.TaskQueue.NextTask; +import java.util.List; /** - * A service to queue and run {@link Task} on a worker thread. Only one task will be ran at a time, - * and same task cannot exist in the queue at the same time. The service will be started when a - * intent is received, and stopped when there are no more tasks in the queue. + * A service to queue and run {@link Task} with the {@link android.app.job.JobScheduler}. A task is + * queued using {@link Context#startService(Intent)}. The intent should contain enough information + * in {@link Intent#getExtras()} to construct the task (see {@link Tasks#createIntent(Context, + * Class)}). + * + *

All tasks are ran in the background with a wakelock being held by the {@link + * android.app.job.JobScheduler}, which is between {@link #onStartJob(Job, List)} and {@link + * #finishJob()}. The {@link TaskSchedulerJobService} also has a {@link TaskQueue}, but the data is + * stored in the {@link android.app.job.JobScheduler} instead of the process memory, so if the + * process is killed the queued tasks will be restored. If a new task is added, a new {@link + * TaskSchedulerJobService} will be scheduled to run the task. If the job is already scheduled, the + * new task will be pushed into the queue of the scheduled job. If the job is already running, the + * job will be queued in process memory. + * + *

Only one task will be ran at a time, and same task cannot exist in the queue at the same time. + * Refer to {@link TaskQueue} for queuing and execution order. + * + *

If there are still tasks in the queue but none are executable immediately, the service will + * enter a "sleep", pushing all remaining task into a new job and end the current job. + * + *

The service will be started when a intent is received, and stopped when there are no more + * tasks in the queue. + * + *

{@link android.app.job.JobScheduler} is not used directly due to: + * + *

    + *
  • The {@link android.telecom.PhoneAccountHandle} used to differentiate task can not be easily + * mapped into an integer for job id + *
  • A job cannot be mutated to store information such as retry count. + *
*/ +@SuppressWarnings("AndroidApiChecker") /* stream() */ +@TargetApi(VERSION_CODES.O) public class TaskSchedulerService extends Service { - private static final String TAG = "VvmTaskScheduler"; + interface Job { + void finish(); + } - private static final String ACTION_WAKEUP = "action_wakeup"; + private static final String TAG = "VvmTaskScheduler"; private static final int READY_TOLERANCE_MILLISECONDS = 100; @@ -58,15 +86,13 @@ public class TaskSchedulerService extends Service { * Threshold to determine whether to do a short or long sleep when a task is scheduled in the * future. * - *

A short sleep will continue to held the wake lock and use {@link - * Handler#postDelayed(Runnable, long)} to wait for the next task. + *

A short sleep will continue the job and use {@link Handler#postDelayed(Runnable, long)} to + * wait for the next task. * - *

A long sleep will release the wake lock and set a {@link AlarmManager} alarm. The alarm is - * exact and will wake up the device. Note: as this service is run in the telephony process it - * does not seem to be restricted by doze or sleep, it will fire exactly at the moment. The - * unbundled version should take doze into account. + *

A long sleep will finish the job and schedule a new one. The exact execution time is + * subjected to {@link android.app.job.JobScheduler} battery optimization, and is not exact. */ - private static final int SHORT_SLEEP_THRESHOLD_MILLISECONDS = 60_000; + private static final int SHORT_SLEEP_THRESHOLD_MILLISECONDS = 10_000; /** * When there are no more tasks to be run the service should be stopped. But when all tasks has * finished there might still be more tasks in the message queue waiting to be processed, @@ -75,14 +101,9 @@ public class TaskSchedulerService extends Service { */ private static final int STOP_DELAY_MILLISECONDS = 5_000; - private static final String EXTRA_CLASS_NAME = "extra_class_name"; - - private static final String WAKE_LOCK_TAG = "TaskSchedulerService_wakelock"; - // The thread to run tasks on private volatile WorkerThreadHandler mWorkerThreadHandler; - private Context mContext = this; /** * Used by tests to turn task handling into a single threaded process by calling {@link * Handler#handleMessage(Message)} directly @@ -91,21 +112,27 @@ public class TaskSchedulerService extends Service { private MainThreadHandler mMainThreadHandler; - private WakeLock mWakeLock; + // Binder given to clients + private final IBinder mBinder = new LocalBinder(); /** Main thread only, access through {@link #getTasks()} */ - private final Queue mTasks = new ArrayDeque<>(); + private final TaskQueue mTasks = new TaskQueue(); private boolean mWorkerThreadIsBusy = false; + private Job mJob; + private final Runnable mStopServiceWithDelay = new Runnable() { + @MainThread @Override public void run() { - VvmLog.d(TAG, "Stopping service"); + VvmLog.i(TAG, "Stopping service"); + finishJob(); stopSelf(); } }; + /** Should attempt to run the next task when a task has finished or been added. */ private boolean mTaskAutoRunDisabledForTesting = false; @@ -122,7 +149,7 @@ public class TaskSchedulerService extends Service { Assert.isNotMainThread(); Task task = (Task) msg.obj; try { - VvmLog.v(TAG, "executing task " + task); + VvmLog.i(TAG, "executing task " + task); task.onExecuteInBackgroundThread(); } catch (Throwable throwable) { VvmLog.e(TAG, "Exception while executing task " + task + ":", throwable); @@ -157,10 +184,6 @@ public class TaskSchedulerService extends Service { @MainThread public void onCreate() { super.onCreate(); - mWakeLock = - getSystemService(PowerManager.class) - .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG); - mWakeLock.setReferenceCounted(false); HandlerThread thread = new HandlerThread("VvmTaskSchedulerService"); thread.start(); @@ -171,27 +194,27 @@ public class TaskSchedulerService extends Service { @Override public void onDestroy() { mWorkerThreadHandler.getLooper().quit(); - mWakeLock.release(); } @Override @MainThread public int onStartCommand(@Nullable Intent intent, int flags, int startId) { Assert.isMainThread(); - // maybeRunNextTask() will release the wakelock either by entering a long sleep or stopping - // the service. - mWakeLock.acquire(); - if (ACTION_WAKEUP.equals(intent.getAction())) { - VvmLog.d(TAG, "woke up by AlarmManager"); + if (intent == null) { + VvmLog.w(TAG, "null intent received"); + return START_NOT_STICKY; + } + Task task = Tasks.createTask(this, intent.getExtras()); + Assert.isTrue(task != null); + addTask(task); + + mMainThreadHandler.removeCallbacks(mStopServiceWithDelay); + VvmLog.i(TAG, "task added"); + if (mJob == null) { + scheduleJob(0, true); } else { - Task task = createTask(intent, flags, startId); - if (task == null) { - VvmLog.e(TAG, "cannot create task form intent"); - } else { - addTask(task); - } + maybeRunNextTask(); } - maybeRunNextTask(); // STICKY means the service will be automatically restarted will the last intent if it is // killed. return START_NOT_STICKY; @@ -201,66 +224,14 @@ public class TaskSchedulerService extends Service { @VisibleForTesting void addTask(Task task) { Assert.isMainThread(); - if (task.getId().id == Task.TASK_INVALID) { - throw new AssertionError("Task id was not set to a valid value before adding."); - } - if (task.getId().id != Task.TASK_ALLOW_DUPLICATES) { - Task oldTask = getTask(task.getId()); - if (oldTask != null) { - oldTask.onDuplicatedTaskAdded(task); - return; - } - } - mMainThreadHandler.removeCallbacks(mStopServiceWithDelay); getTasks().add(task); - maybeRunNextTask(); - } - - @MainThread - @Nullable - private Task getTask(TaskId taskId) { - Assert.isMainThread(); - for (Task task : getTasks()) { - if (task.getId().equals(taskId)) { - return task; - } - } - return null; } @MainThread - private Queue getTasks() { - Assert.isMainThread(); - return mTasks; - } - - /** Create an intent that will queue the task */ - public static Intent createIntent(Context context, Class task) { - Intent intent = new Intent(context, TaskSchedulerService.class); - intent.putExtra(EXTRA_CLASS_NAME, task.getName()); - return intent; - } - @VisibleForTesting - @MainThread - @Nullable - Task createTask(@Nullable Intent intent, int flags, int startId) { + TaskQueue getTasks() { Assert.isMainThread(); - if (intent == null) { - return null; - } - String className = intent.getStringExtra(EXTRA_CLASS_NAME); - VvmLog.d(TAG, "create task:" + className); - if (className == null) { - throw new IllegalArgumentException("EXTRA_CLASS_NAME expected"); - } - try { - Task task = (Task) Class.forName(className).newInstance(); - task.onCreate(mContext, intent, flags, startId); - return task; - } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) { - throw new IllegalArgumentException(e); - } + return mTasks; } @MainThread @@ -282,37 +253,31 @@ public class TaskSchedulerService extends Service { @MainThread void runNextTask() { Assert.isMainThread(); - // The current alarm is no longer valid, a new one will be set up if required. - getSystemService(AlarmManager.class).cancel(getWakeupIntent()); if (getTasks().isEmpty()) { prepareStop(); return; } - Long minimalWaitTime = null; - for (Task task : getTasks()) { - long waitTime = task.getReadyInMilliSeconds(); - if (waitTime < READY_TOLERANCE_MILLISECONDS) { - task.onBeforeExecute(); - Message message = mWorkerThreadHandler.obtainMessage(); - message.obj = task; - mWorkerThreadIsBusy = true; - mMessageSender.send(message); - return; - } else { - if (minimalWaitTime == null || waitTime < minimalWaitTime) { - minimalWaitTime = waitTime; - } - } + NextTask nextTask = getTasks().getNextTask(READY_TOLERANCE_MILLISECONDS); + + if (nextTask.task != null) { + nextTask.task.onBeforeExecute(); + Message message = mWorkerThreadHandler.obtainMessage(); + message.obj = nextTask.task; + mWorkerThreadIsBusy = true; + mMessageSender.send(message); + return; } - VvmLog.d(TAG, "minimal wait time:" + minimalWaitTime); - if (!mTaskAutoRunDisabledForTesting && minimalWaitTime != null) { + VvmLog.i(TAG, "minimal wait time:" + nextTask.minimalWaitTimeMillis); + if (!mTaskAutoRunDisabledForTesting && nextTask.minimalWaitTimeMillis != null) { // No tasks are currently ready. Sleep until the next one should be. // If a new task is added during the sleep the service will wake immediately. - sleep(minimalWaitTime); + sleep(nextTask.minimalWaitTimeMillis); } } + @MainThread private void sleep(long timeMillis) { + VvmLog.i(TAG, "sleep for " + timeMillis + " millis"); if (timeMillis < SHORT_SLEEP_THRESHOLD_MILLISECONDS) { mMainThreadHandler.postDelayed( new Runnable() { @@ -324,34 +289,24 @@ public class TaskSchedulerService extends Service { timeMillis); return; } - - // Tasks does not have a strict timing requirement, use AlarmManager.set() so the OS could - // optimize the battery usage. As this service currently run in the telephony process the - // OS give it privileges to behave the same as setExact(), but set() is the targeted - // behavior once this is unbundled. - getSystemService(AlarmManager.class) - .set( - AlarmManager.ELAPSED_REALTIME_WAKEUP, - SystemClock.elapsedRealtime() + timeMillis, - getWakeupIntent()); - mWakeLock.release(); - VvmLog.d(TAG, "Long sleep for " + timeMillis + " millis"); + finishJob(); + mMainThreadHandler.post(() -> scheduleJob(timeMillis, false)); } - private PendingIntent getWakeupIntent() { - Intent intent = new Intent(ACTION_WAKEUP, null, this, getClass()); - return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); + private List serializePendingTasks() { + return getTasks().toBundles(); } private void prepareStop() { - VvmLog.d( + VvmLog.i( TAG, - "No more tasks, stopping service if no task are added in " + "no more tasks, stopping service if no task are added in " + STOP_DELAY_MILLISECONDS + " millis"); mMainThreadHandler.postDelayed(mStopServiceWithDelay, STOP_DELAY_MILLISECONDS); } + @NeededForTesting static class MessageSender { public void send(Message message) { @@ -359,11 +314,6 @@ public class TaskSchedulerService extends Service { } } - @NeededForTesting - void setContextForTest(Context context) { - mContext = context; - } - @NeededForTesting void setTaskAutoRunDisabledForTest(boolean value) { mTaskAutoRunDisabledForTesting = value; @@ -374,15 +324,65 @@ public class TaskSchedulerService extends Service { mMessageSender = sender; } - @NeededForTesting - void clearTasksForTest() { + /** + * The {@link TaskSchedulerJobService} has started and all queued task should be executed in the + * worker thread. + */ + @MainThread + public void onStartJob(Job job, List pendingTasks) { + VvmLog.i(TAG, "onStartJob"); + mJob = job; + mTasks.fromBundles(this, pendingTasks); + maybeRunNextTask(); + } + + /** + * The {@link TaskSchedulerJobService} is being terminated by the system (timeout or network + * lost). A new job will be queued to resume all pending tasks. The current unfinished job may be + * ran again. + */ + @MainThread + public void onStopJob() { + VvmLog.e(TAG, "onStopJob"); + if (isJobRunning()) { + finishJob(); + mMainThreadHandler.post(() -> scheduleJob(0, true)); + } + } + + /** + * Serializes all pending tasks and schedule a new {@link TaskSchedulerJobService}. + * + * @param delayMillis the delay before stating the job, see {@link + * android.app.job.JobInfo.Builder#setMinimumLatency(long)}. This must be 0 if {@code + * isNewJob} is true. + * @param isNewJob a new job will be requested to run immediately, bypassing all requirements. + */ + @MainThread + private void scheduleJob(long delayMillis, boolean isNewJob) { + Assert.isMainThread(); + TaskSchedulerJobService.scheduleJob(this, serializePendingTasks(), delayMillis, isNewJob); mTasks.clear(); } + /** + * Signals {@link TaskSchedulerJobService} the current session of tasks has finished, and the wake + * lock can be released. Note: this only takes effect after the main thread has been returned. If + * a new job need to be scheduled, it should be posted on the main thread handler instead of + * calling directly. + */ + @MainThread + private void finishJob() { + Assert.isMainThread(); + VvmLog.i(TAG, "finishing Job"); + mJob.finish(); + mJob = null; + } + @Override @Nullable public IBinder onBind(Intent intent) { - return new LocalBinder(); + return mBinder; } @NeededForTesting @@ -393,4 +393,8 @@ public class TaskSchedulerService extends Service { return TaskSchedulerService.this; } } + + private boolean isJobRunning() { + return mJob != null; + } } diff --git a/java/com/android/voicemail/impl/scheduling/Tasks.java b/java/com/android/voicemail/impl/scheduling/Tasks.java new file mode 100644 index 000000000..34debaf29 --- /dev/null +++ b/java/com/android/voicemail/impl/scheduling/Tasks.java @@ -0,0 +1,73 @@ +/* + * 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.voicemail.impl.scheduling; + +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import com.android.voicemail.impl.VvmLog; + +/** Common operations on {@link Task} */ +final class Tasks { + + private Tasks() {} + + static final String EXTRA_CLASS_NAME = "extra_class_name"; + + /** + * Create a task from a bundle. The bundle is created either with {@link #toBundle(Task)} or + * {@link #createIntent(Context, Class)} from the target {@link Task} + */ + public static Task createTask(Context context, Bundle extras) { + // The extra contains custom parcelables which cannot be unmarshalled by the framework class + // loader. + extras.setClassLoader(context.getClassLoader()); + String className = extras.getString(EXTRA_CLASS_NAME); + VvmLog.i("Task.createTask", "create task:" + className); + if (className == null) { + throw new IllegalArgumentException("EXTRA_CLASS_NAME expected"); + } + try { + Task task = (Task) Class.forName(className).getDeclaredConstructor().newInstance(); + task.onCreate(context, extras); + return task; + } catch (ReflectiveOperationException e) { + throw new IllegalArgumentException(e); + } + } + + /** + * Serializes necessary states to a bundle that can be used to restore the task with {@link + * #createTask(Context, Bundle)} + */ + public static Bundle toBundle(Task task) { + Bundle result = task.toBundle(); + result.putString(EXTRA_CLASS_NAME, task.getClass().getName()); + return result; + } + + /** + * Create an intent that when called with {@link Context#startService(Intent)}, will queue the + * task. Implementations of {@link Task} should use the result of this and fill in + * necessary information. + */ + public static Intent createIntent(Context context, Class task) { + Intent intent = new Intent(context, TaskSchedulerService.class); + intent.putExtra(EXTRA_CLASS_NAME, task.getName()); + return intent; + } +} diff --git a/java/com/android/voicemail/impl/settings/VisualVoicemailSettingsUtil.java b/java/com/android/voicemail/impl/settings/VisualVoicemailSettingsUtil.java index 4c95e7783..9ce32a97c 100644 --- a/java/com/android/voicemail/impl/settings/VisualVoicemailSettingsUtil.java +++ b/java/com/android/voicemail/impl/settings/VisualVoicemailSettingsUtil.java @@ -22,6 +22,7 @@ import com.android.voicemail.VoicemailComponent; import com.android.voicemail.impl.OmtpVvmCarrierConfigHelper; import com.android.voicemail.impl.R; import com.android.voicemail.impl.VisualVoicemailPreferences; +import com.android.voicemail.impl.VvmLog; import com.android.voicemail.impl.sync.VvmAccountManager; /** Save whether or not a particular account is enabled in shared to be retrieved later. */ @@ -31,6 +32,7 @@ public class VisualVoicemailSettingsUtil { public static void setEnabled( Context context, PhoneAccountHandle phoneAccount, boolean isEnabled) { + VvmLog.i("VisualVoicemailSettingsUtil.setEnable", phoneAccount + " enabled:" + isEnabled); new VisualVoicemailPreferences(context, phoneAccount) .edit() .putBoolean(IS_ENABLED_KEY, isEnabled) diff --git a/java/com/android/voicemail/impl/settings/VoicemailChangePinActivity.java b/java/com/android/voicemail/impl/settings/VoicemailChangePinActivity.java index 330dc3621..b22a765cf 100644 --- a/java/com/android/voicemail/impl/settings/VoicemailChangePinActivity.java +++ b/java/com/android/voicemail/impl/settings/VoicemailChangePinActivity.java @@ -45,8 +45,7 @@ import android.widget.EditText; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; import android.widget.Toast; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; import com.android.voicemail.impl.OmtpConstants; import com.android.voicemail.impl.OmtpConstants.ChangePinResult; import com.android.voicemail.impl.OmtpEvents; @@ -59,6 +58,7 @@ import com.android.voicemail.impl.imap.ImapHelper; import com.android.voicemail.impl.imap.ImapHelper.InitializingException; import com.android.voicemail.impl.mail.MessagingException; import com.android.voicemail.impl.sync.VvmNetworkRequestCallback; +import com.android.voicemail.impl.utils.LoggerUtils; /** * Dialog to change the voicemail PIN. The TUI (Telephony User Interface) PIN is used when accessing @@ -278,7 +278,8 @@ public class VoicemailChangePinActivity extends Activity activity.handleOmtpEvent(OmtpEvents.CONFIG_PIN_SET); activity.finish(); - Logger.get(activity).logImpression(DialerImpression.Type.VVM_CHANGE_PIN_COMPLETED); + LoggerUtils.logImpressionOnMainThread( + activity, DialerImpression.Type.VVM_CHANGE_PIN_COMPLETED); Toast.makeText( activity, activity.getString(R.string.change_pin_succeeded), Toast.LENGTH_SHORT) .show(); diff --git a/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java b/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java index 716f503ff..423fd11b4 100644 --- a/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java +++ b/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java @@ -27,8 +27,8 @@ import android.support.annotation.Nullable; import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import com.android.dialer.common.Assert; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; import com.android.voicemail.impl.OmtpVvmCarrierConfigHelper; @@ -164,8 +164,6 @@ public class VoicemailSettingsFragment extends PreferenceFragment VisualVoicemailSettingsUtil.isEnabled(getContext(), phoneAccountHandle)); autoArchiveSwitchPreference.setOnPreferenceChangeListener(this); - autoArchiveSwitchPreference.setSummary( - getText(R.string.voicemail_visual_voicemail_auto_archive_temporary_disclaimer)); autoArchiveSwitchPreference.setChecked( VisualVoicemailSettingsUtil.isArchiveEnabled(getContext(), phoneAccountHandle)); } else { diff --git a/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java b/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java index 1d1a639c5..5decf6376 100644 --- a/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java +++ b/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Google Inc. All Rights Reserved. + * Copyright (C) 2016 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. @@ -16,13 +16,21 @@ package com.android.voicemail.impl.sms; +import android.annotation.TargetApi; +import android.app.PendingIntent; import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.os.Build.VERSION_CODES; import android.os.Bundle; +import android.support.annotation.Nullable; +import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; +import android.telephony.TelephonyManager; import android.telephony.VisualVoicemailSms; +import com.android.voicemail.VoicemailClient; import com.android.voicemail.impl.OmtpConstants; import com.android.voicemail.impl.OmtpVvmCarrierConfigHelper; -import com.android.voicemail.impl.TelephonyManagerStub; import com.android.voicemail.impl.VvmLog; /** @@ -30,37 +38,95 @@ import com.android.voicemail.impl.VvmLog; * * @see OmtpVvmCarrierConfigHelper#isLegacyModeEnabled() */ +@TargetApi(VERSION_CODES.O) public class LegacyModeSmsHandler { private static final String TAG = "LegacyModeSmsHandler"; + private static final int CALL_VOICEMAIL_REQUEST_CODE = 1; + private static final int LAUNCH_VOICEMAIL_SETTINGS_REQUEST_CODE = 2; + public static void handle(Context context, VisualVoicemailSms sms) { - VvmLog.v(TAG, "processing VVM SMS on legacy mode"); + VvmLog.i(TAG, "processing VVM SMS on legacy mode"); String eventType = sms.getPrefix(); Bundle data = sms.getFields(); PhoneAccountHandle handle = sms.getPhoneAccountHandle(); if (eventType.equals(OmtpConstants.SYNC_SMS_PREFIX)) { SyncMessage message = new SyncMessage(data); - VvmLog.v( + VvmLog.i( TAG, "Received SYNC sms for " + handle + " with event " + message.getSyncTriggerEvent()); switch (message.getSyncTriggerEvent()) { case OmtpConstants.NEW_MESSAGE: case OmtpConstants.MAILBOX_UPDATE: - // The user has called into the voicemail and the new message count could - // change. - // For some carriers new message count could be set to 0 even if there are still - // unread messages, to clear the message waiting indicator. - VvmLog.v(TAG, "updating MWI"); - - // Setting voicemail message count to non-zero will show the telephony voicemail - // notification, and zero will clear it. - TelephonyManagerStub.showVoicemailNotification(message.getNewMessageCount()); + sendLegacyVoicemailNotification(context, handle, message.getNewMessageCount()); + break; default: break; } } } + + private static void sendLegacyVoicemailNotification( + Context context, PhoneAccountHandle phoneAccountHandle, int messageCount) { + // The user has called into the voicemail and the new message count could + // change. + // For some carriers new message count could be set to 0 even if there are still + // unread messages, to clear the message waiting indicator. + + VvmLog.i(TAG, "sending voicemail notification"); + Intent intent = new Intent(VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL); + intent.setPackage(context.getPackageName()); + intent.putExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle); + // Setting voicemail message count to non-zero will show the telephony voicemail + // notification, and zero will clear it. + intent.putExtra(TelephonyManager.EXTRA_NOTIFICATION_COUNT, messageCount); + + String voicemailNumber = getVoicemailNumber(context, phoneAccountHandle); + PendingIntent callVoicemailPendingIntent = null; + PendingIntent launchVoicemailSettingsPendingIntent = null; + + if (voicemailNumber != null) { + callVoicemailPendingIntent = + PendingIntent.getActivity( + context, + CALL_VOICEMAIL_REQUEST_CODE, + new Intent( + Intent.ACTION_CALL, Uri.fromParts(PhoneAccount.SCHEME_VOICEMAIL, "", null)), + PendingIntent.FLAG_UPDATE_CURRENT); + } else { + Intent launchVoicemailSettingsIntent = + new Intent(TelephonyManager.ACTION_CONFIGURE_VOICEMAIL); + launchVoicemailSettingsIntent.putExtra(TelephonyManager.EXTRA_HIDE_PUBLIC_SETTINGS, true); + + launchVoicemailSettingsPendingIntent = + PendingIntent.getActivity( + context, + LAUNCH_VOICEMAIL_SETTINGS_REQUEST_CODE, + launchVoicemailSettingsIntent, + PendingIntent.FLAG_UPDATE_CURRENT); + } + + intent.putExtra(TelephonyManager.EXTRA_VOICEMAIL_NUMBER, voicemailNumber); + intent.putExtra(TelephonyManager.EXTRA_CALL_VOICEMAIL_INTENT, callVoicemailPendingIntent); + intent.putExtra( + TelephonyManager.EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT, + launchVoicemailSettingsPendingIntent); + + context.sendBroadcast(intent); + } + + @Nullable + private static String getVoicemailNumber(Context context, PhoneAccountHandle phoneAccountHandle) { + TelephonyManager telephonyManager = + context + .getSystemService(TelephonyManager.class) + .createForPhoneAccountHandle(phoneAccountHandle); + if (telephonyManager == null) { + return null; + } + return telephonyManager.getVoiceMailNumber(); + } } diff --git a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java index 83a3960dd..af934dd3c 100644 --- a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java +++ b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java @@ -24,8 +24,7 @@ import android.support.v4.os.BuildCompat; import android.telecom.PhoneAccountHandle; import android.text.TextUtils; import android.util.ArrayMap; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; import com.android.voicemail.VoicemailComponent; import com.android.voicemail.impl.ActivationTask; import com.android.voicemail.impl.Assert; @@ -41,6 +40,7 @@ import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil; import com.android.voicemail.impl.sync.VvmNetworkRequest.NetworkWrapper; import com.android.voicemail.impl.sync.VvmNetworkRequest.RequestFailedException; +import com.android.voicemail.impl.utils.LoggerUtils; import com.android.voicemail.impl.utils.VoicemailDatabaseUtil; import java.util.List; import java.util.Map; @@ -98,7 +98,7 @@ public class OmtpVvmSyncService { } OmtpVvmCarrierConfigHelper config = new OmtpVvmCarrierConfigHelper(mContext, phoneAccount); - Logger.get(mContext).logImpression(DialerImpression.Type.VVM_SYNC_STARTED); + LoggerUtils.logImpressionOnMainThread(mContext, DialerImpression.Type.VVM_SYNC_STARTED); // DATA_IMAP_OPERATION_STARTED posting should not be deferred. This event clears all data // channel errors, which should happen when the task starts, not when it ends. It is the // "Sync in progress..." status. @@ -136,7 +136,7 @@ public class OmtpVvmSyncService { imapHelper.updateQuota(); autoDeleteAndArchiveVM(imapHelper, phoneAccount); imapHelper.handleEvent(OmtpEvents.DATA_IMAP_OPERATION_COMPLETED); - Logger.get(mContext).logImpression(DialerImpression.Type.VVM_SYNC_COMPLETED); + LoggerUtils.logImpressionOnMainThread(mContext, DialerImpression.Type.VVM_SYNC_COMPLETED); } else { task.fail(); } @@ -158,14 +158,15 @@ public class OmtpVvmSyncService { > AUTO_DELETE_ARCHIVE_VM_THRESHOLD) { deleteAndArchiveVM(imapHelper); imapHelper.updateQuota(); - Logger.get(mContext) - .logImpression(DialerImpression.Type.VVM_ARCHIVE_AUTO_DELETED_VM_FROM_SERVER); + LoggerUtils.logImpressionOnMainThread( + mContext, DialerImpression.Type.VVM_ARCHIVE_AUTO_DELETED_VM_FROM_SERVER); } else { VvmLog.i(TAG, "no need to archive and auto delete VM, quota below threshold"); } } else { - VvmLog.i(TAG, "isArchiveAllowedAndEnabled is false"); - Logger.get(mContext).logImpression(DialerImpression.Type.VVM_ARCHIVE_AUTO_DELETE_TURNED_OFF); + VvmLog.i(TAG, "autoDeleteAndArchiveVM is turned off"); + LoggerUtils.logImpressionOnMainThread( + mContext, DialerImpression.Type.VVM_ARCHIVE_AUTO_DELETE_TURNED_OFF); } } @@ -214,7 +215,7 @@ public class OmtpVvmSyncService { boolean downloadSuccess = true; if (SYNC_FULL_SYNC.equals(action) || SYNC_UPLOAD_ONLY.equals(action)) { - uploadSuccess = upload(imapHelper); + uploadSuccess = upload(account, imapHelper); } if (SYNC_FULL_SYNC.equals(action) || SYNC_DOWNLOAD_ONLY.equals(action)) { downloadSuccess = download(imapHelper, account); @@ -242,9 +243,9 @@ public class OmtpVvmSyncService { new TranscriptionFetchedCallback(mContext, voicemail), voicemail.getSourceData()); } - private boolean upload(ImapHelper imapHelper) { - List readVoicemails = mQueryHelper.getReadVoicemails(); - List deletedVoicemails = mQueryHelper.getDeletedVoicemails(); + private boolean upload(PhoneAccountHandle phoneAccountHandle, ImapHelper imapHelper) { + List readVoicemails = mQueryHelper.getReadVoicemails(phoneAccountHandle); + List deletedVoicemails = mQueryHelper.getDeletedVoicemails(phoneAccountHandle); boolean success = true; @@ -271,7 +272,7 @@ public class OmtpVvmSyncService { private boolean download(ImapHelper imapHelper, PhoneAccountHandle account) { List serverVoicemails = imapHelper.fetchAllVoicemails(); - List localVoicemails = mQueryHelper.getAllVoicemails(); + List localVoicemails = mQueryHelper.getAllVoicemails(account); if (localVoicemails == null || serverVoicemails == null) { // Null value means the query failed. @@ -302,7 +303,8 @@ public class OmtpVvmSyncService { if (!TextUtils.isEmpty(remoteVoicemail.getTranscription()) && TextUtils.isEmpty(localVoicemail.getTranscription())) { - Logger.get(mContext).logImpression(DialerImpression.Type.VVM_TRANSCRIPTION_DOWNLOADED); + LoggerUtils.logImpressionOnMainThread( + mContext, DialerImpression.Type.VVM_TRANSCRIPTION_DOWNLOADED); mQueryHelper.updateWithTranscription(localVoicemail, remoteVoicemail.getTranscription()); } } @@ -312,7 +314,8 @@ public class OmtpVvmSyncService { boolean prefetchEnabled = shouldPerformPrefetch(account, imapHelper); for (Voicemail remoteVoicemail : remoteMap.values()) { if (!TextUtils.isEmpty(remoteVoicemail.getTranscription())) { - Logger.get(mContext).logImpression(DialerImpression.Type.VVM_TRANSCRIPTION_DOWNLOADED); + LoggerUtils.logImpressionOnMainThread( + mContext, DialerImpression.Type.VVM_TRANSCRIPTION_DOWNLOADED); } Uri uri = VoicemailDatabaseUtil.insert(mContext, remoteVoicemail); if (prefetchEnabled) { diff --git a/java/com/android/voicemail/impl/sync/SyncOneTask.java b/java/com/android/voicemail/impl/sync/SyncOneTask.java index e57235e4b..19419ec8a 100644 --- a/java/com/android/voicemail/impl/sync/SyncOneTask.java +++ b/java/com/android/voicemail/impl/sync/SyncOneTask.java @@ -18,18 +18,21 @@ package com.android.voicemail.impl.sync; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.telecom.PhoneAccountHandle; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.Voicemail; import com.android.voicemail.impl.VoicemailStatus; import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.RetryPolicy; +import com.android.voicemail.impl.utils.LoggerUtils; /** * Task to download a single voicemail from the server. This task is initiated by a SMS notifying * the new voicemail arrival, and ignores the duplicated tasks constraint. */ +@UsedByReflection(value = "Tasks.java") public class SyncOneTask extends BaseTask { private static final int RETRY_TIMES = 2; @@ -56,11 +59,12 @@ public class SyncOneTask extends BaseTask { addPolicy(new RetryPolicy(RETRY_TIMES, RETRY_INTERVAL_MILLIS)); } - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - mPhone = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE); - mSyncType = intent.getStringExtra(EXTRA_SYNC_TYPE); - mVoicemail = intent.getParcelableExtra(EXTRA_VOICEMAIL); + @Override + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + mPhone = extras.getParcelable(EXTRA_PHONE_ACCOUNT_HANDLE); + mSyncType = extras.getString(EXTRA_SYNC_TYPE); + mVoicemail = extras.getParcelable(EXTRA_VOICEMAIL); } @Override @@ -71,7 +75,7 @@ public class SyncOneTask extends BaseTask { @Override public Intent createRestartIntent() { - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_AUTO_RETRY_SYNC); + LoggerUtils.logImpressionOnMainThread(getContext(), DialerImpression.Type.VVM_AUTO_RETRY_SYNC); Intent intent = super.createRestartIntent(); intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, mPhone); intent.putExtra(EXTRA_SYNC_TYPE, mSyncType); diff --git a/java/com/android/voicemail/impl/sync/SyncTask.java b/java/com/android/voicemail/impl/sync/SyncTask.java index a9e592068..27f803401 100644 --- a/java/com/android/voicemail/impl/sync/SyncTask.java +++ b/java/com/android/voicemail/impl/sync/SyncTask.java @@ -18,14 +18,17 @@ package com.android.voicemail.impl.sync; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.telecom.PhoneAccountHandle; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.MinimalIntervalPolicy; import com.android.voicemail.impl.scheduling.RetryPolicy; +import com.android.voicemail.impl.utils.LoggerUtils; /** System initiated sync request. */ +@UsedByReflection(value = "Tasks.java") public class SyncTask extends BaseTask { // Try sync for a total of 5 times, should take around 5 minutes before finally giving up. @@ -55,10 +58,11 @@ public class SyncTask extends BaseTask { addPolicy(new MinimalIntervalPolicy(MINIMAL_INTERVAL_MILLIS)); } - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - mPhone = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE); - mSyncType = intent.getStringExtra(EXTRA_SYNC_TYPE); + @Override + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + mPhone = extras.getParcelable(EXTRA_PHONE_ACCOUNT_HANDLE); + mSyncType = extras.getString(EXTRA_SYNC_TYPE); } @Override @@ -69,7 +73,7 @@ public class SyncTask extends BaseTask { @Override public Intent createRestartIntent() { - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_AUTO_RETRY_SYNC); + LoggerUtils.logImpressionOnMainThread(getContext(), DialerImpression.Type.VVM_AUTO_RETRY_SYNC); Intent intent = super.createRestartIntent(); intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, mPhone); intent.putExtra(EXTRA_SYNC_TYPE, mSyncType); diff --git a/java/com/android/voicemail/impl/sync/UploadTask.java b/java/com/android/voicemail/impl/sync/UploadTask.java index 7d1a79756..403074572 100644 --- a/java/com/android/voicemail/impl/sync/UploadTask.java +++ b/java/com/android/voicemail/impl/sync/UploadTask.java @@ -18,7 +18,9 @@ package com.android.voicemail.impl.sync; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.telecom.PhoneAccountHandle; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.VoicemailStatus; import com.android.voicemail.impl.VvmLog; import com.android.voicemail.impl.scheduling.BaseTask; @@ -28,6 +30,7 @@ import com.android.voicemail.impl.scheduling.PostponePolicy; * Upload task triggered by database changes. Will wait until the database has been stable for * {@link #POSTPONE_MILLIS} to execute. */ +@UsedByReflection(value = "Tasks.java") public class UploadTask extends BaseTask { private static final String TAG = "VvmUploadTask"; @@ -45,8 +48,8 @@ public class UploadTask extends BaseTask { } @Override - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); } @Override diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java index fc8119a80..bfc2e5f20 100644 --- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java +++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java @@ -25,7 +25,9 @@ import android.net.Uri; import android.os.Build.VERSION_CODES; import android.provider.VoicemailContract; import android.provider.VoicemailContract.Voicemails; +import android.support.annotation.NonNull; import android.telecom.PhoneAccountHandle; +import android.text.TextUtils; import com.android.dialer.common.Assert; import com.android.voicemail.impl.Voicemail; import java.util.ArrayList; @@ -52,6 +54,12 @@ public class VoicemailsQueryHelper { Voicemails.DIRTY + "=1 AND " + Voicemails.DELETED + "!=1 AND " + Voicemails.IS_READ + "=1"; static final String DELETED_SELECTION = Voicemails.DELETED + "=1"; static final String ARCHIVED_SELECTION = Voicemails.ARCHIVED + "=0"; + private static final String PHONE_ACCOUNT_HANDLE_SELECTION = + "(" + + Voicemails.PHONE_ACCOUNT_COMPONENT_NAME + + "=? AND " + + Voicemails.PHONE_ACCOUNT_ID + + "=?)"; private Context mContext; private ContentResolver mContentResolver; @@ -68,8 +76,8 @@ public class VoicemailsQueryHelper { * * @return A list of read voicemails. */ - public List getReadVoicemails() { - return getLocalVoicemails(READ_SELECTION); + public List getReadVoicemails(@NonNull PhoneAccountHandle phoneAccountHandle) { + return getLocalVoicemails(phoneAccountHandle, READ_SELECTION); } /** @@ -77,8 +85,8 @@ public class VoicemailsQueryHelper { * * @return A list of deleted voicemails. */ - public List getDeletedVoicemails() { - return getLocalVoicemails(DELETED_SELECTION); + public List getDeletedVoicemails(@NonNull PhoneAccountHandle phoneAccountHandle) { + return getLocalVoicemails(phoneAccountHandle, DELETED_SELECTION); } /** @@ -86,8 +94,8 @@ public class VoicemailsQueryHelper { * * @return A list of all locally stored voicemails. */ - public List getAllVoicemails() { - return getLocalVoicemails(null); + public List getAllVoicemails(@NonNull PhoneAccountHandle phoneAccountHandle) { + return getLocalVoicemails(phoneAccountHandle, null); } /** @@ -96,8 +104,20 @@ public class VoicemailsQueryHelper { * @param selection A filter declaring which rows to return. {@code null} returns all rows. * @return A list of voicemails according to the selection statement. */ - private List getLocalVoicemails(String selection) { - Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, null, null); + private List getLocalVoicemails( + @NonNull PhoneAccountHandle phoneAccountHandle, String selection) { + + String[] selectionArgs = + new String[] { + phoneAccountHandle.getComponentName().flattenToString(), phoneAccountHandle.getId() + }; + if (TextUtils.isEmpty(selection)) { + selection = PHONE_ACCOUNT_HANDLE_SELECTION; + } else { + selection = PHONE_ACCOUNT_HANDLE_SELECTION + " AND (" + selection + ")"; + } + + Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, selectionArgs, null); if (cursor == null) { return null; } diff --git a/java/com/android/voicemail/impl/utils/LoggerUtils.java b/java/com/android/voicemail/impl/utils/LoggerUtils.java new file mode 100644 index 000000000..070772f2f --- /dev/null +++ b/java/com/android/voicemail/impl/utils/LoggerUtils.java @@ -0,0 +1,33 @@ +/* + * 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.voicemail.impl.utils; + +import android.content.Context; +import android.support.annotation.AnyThread; +import com.android.dialer.common.concurrent.ThreadUtil; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.logging.Logger; + +/** Common utility method when using {@link Logger} */ +public class LoggerUtils { + + /** Posts the impression logging to the main thread so it will be thread safe. */ + @AnyThread + public static void logImpressionOnMainThread(Context context, DialerImpression.Type impression) { + ThreadUtil.postOnUiThread(() -> Logger.get(context).logImpression(impression)); + } +} diff --git a/java/com/android/voicemail/stub/StubVoicemailClient.java b/java/com/android/voicemail/stub/StubVoicemailClient.java index 172b3ffcc..e2b470799 100644 --- a/java/com/android/voicemail/stub/StubVoicemailClient.java +++ b/java/com/android/voicemail/stub/StubVoicemailClient.java @@ -36,6 +36,15 @@ public final class StubVoicemailClient implements VoicemailClient { return false; } + @Override + public boolean isVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle) { + return false; + } + + @Override + public void setVoicemailEnabled( + Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) {} + @Override public void appendOmtpVoicemailSelectionClause( Context context, StringBuilder where, List selectionArgs) {} @@ -67,4 +76,9 @@ public final class StubVoicemailClient implements VoicemailClient { public Intent getSetPinIntent(Context context, PhoneAccountHandle phoneAccountHandle) { return new Intent(TelephonyManager.ACTION_CONFIGURE_VOICEMAIL); } + + @Override + public boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle) { + return false; + } } -- cgit v1.2.3