From a0076bf76b31e8864494b02a755110a40181977d Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 15 Sep 2014 10:45:20 -0700 Subject: Remove CallerInfoCache update broadcast intent Bug: 17499855 Change-Id: I3d7cacf1418d3df21da3abcb7d69bb5441633640 --- src/com/android/contacts/ContactSaveService.java | 7 --- .../contacts/util/CallerInfoCacheUtils.java | 52 ---------------------- 2 files changed, 59 deletions(-) delete mode 100644 src/com/android/contacts/util/CallerInfoCacheUtils.java diff --git a/src/com/android/contacts/ContactSaveService.java b/src/com/android/contacts/ContactSaveService.java index cc687ecb9..bb0370567 100644 --- a/src/com/android/contacts/ContactSaveService.java +++ b/src/com/android/contacts/ContactSaveService.java @@ -53,7 +53,6 @@ import com.android.contacts.common.model.RawContactDelta; import com.android.contacts.common.model.RawContactDeltaList; import com.android.contacts.common.model.RawContactModifier; import com.android.contacts.common.model.account.AccountWithDataSet; -import com.android.contacts.util.CallerInfoCacheUtils; import com.android.contacts.util.ContactPhotoUtils; import com.google.common.collect.Lists; @@ -188,10 +187,8 @@ public class ContactSaveService extends IntentService { String action = intent.getAction(); if (ACTION_NEW_RAW_CONTACT.equals(action)) { createRawContact(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } else if (ACTION_SAVE_CONTACT.equals(action)) { saveContact(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } else if (ACTION_CREATE_GROUP.equals(action)) { createGroup(intent); } else if (ACTION_RENAME_GROUP.equals(action)) { @@ -208,16 +205,12 @@ public class ContactSaveService extends IntentService { clearPrimary(intent); } else if (ACTION_DELETE_CONTACT.equals(action)) { deleteContact(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } else if (ACTION_JOIN_CONTACTS.equals(action)) { joinContacts(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } else if (ACTION_SET_SEND_TO_VOICEMAIL.equals(action)) { setSendToVoicemail(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } else if (ACTION_SET_RINGTONE.equals(action)) { setRingtone(intent); - CallerInfoCacheUtils.sendUpdateCallerInfoCacheIntent(this); } } diff --git a/src/com/android/contacts/util/CallerInfoCacheUtils.java b/src/com/android/contacts/util/CallerInfoCacheUtils.java deleted file mode 100644 index 9e53159d6..000000000 --- a/src/com/android/contacts/util/CallerInfoCacheUtils.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2012 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.contacts.util; - -import android.content.Context; -import android.content.Intent; - -/** - * Utilities for managing CallerInfoCache. - * - * The cache lives in Phone package and is used as fallback storage when database lookup is slower - * than expected. It remembers some information necessary for responding to incoming calls - * (e.g. custom ringtone settings, send-to-voicemail). - * - * Even though the cache will be updated periodically, Contacts app can request the cache update - * via broadcast Intent. This class provides that mechanism, and possibly other misc utilities - * for the update mechanism. - */ -public final class CallerInfoCacheUtils { - private static final String UPDATE_CALLER_INFO_CACHE = - "com.android.phone.UPDATE_CALLER_INFO_CACHE"; - - private CallerInfoCacheUtils() { - } - - /** - * Sends an Intent, notifying CallerInfo cache should be updated. - * - * Note: CallerInfo is *not* part of public API, and no guarantee is available around its - * specific behavior. In practice this will only be used by Phone package, but may change - * in the future. - * - * See also CallerInfoCache in Phone package for more information. - */ - public static void sendUpdateCallerInfoCacheIntent(Context context) { - context.sendBroadcast(new Intent(UPDATE_CALLER_INFO_CACHE)); - } -} \ No newline at end of file -- cgit v1.2.3 From 019f6a1623713b9be85ef1a3f3ca60f0a84267e8 Mon Sep 17 00:00:00 2001 From: Paul Soulos Date: Fri, 12 Sep 2014 10:45:43 -0700 Subject: Fixes photo authority issues in Contacts bug: 17462942 Change-Id: Ie67a2a3643cddff7fe83f1a5571ef027617cfa74 --- res/values/strings.xml | 3 +++ src/com/android/contacts/util/ContactPhotoUtils.java | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 2d3940763..6a903eca5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -722,4 +722,7 @@ You: %s + + com.android.contacts.files + diff --git a/src/com/android/contacts/util/ContactPhotoUtils.java b/src/com/android/contacts/util/ContactPhotoUtils.java index 2b1c19a28..3f79da5b7 100644 --- a/src/com/android/contacts/util/ContactPhotoUtils.java +++ b/src/com/android/contacts/util/ContactPhotoUtils.java @@ -28,6 +28,7 @@ import android.provider.MediaStore; import android.support.v4.content.FileProvider; import android.util.Log; +import com.android.contacts.R; import com.google.common.io.Closeables; import java.io.ByteArrayOutputStream; @@ -49,8 +50,6 @@ public class ContactPhotoUtils { private static final String PHOTO_DATE_FORMAT = "'IMG'_yyyyMMdd_HHmmss"; - public static final String FILE_PROVIDER_AUTHORITY = "com.android.contacts.files"; - /** * Generate a new, unique file to be used as an out-of-band communication * channel, since hi-res Bitmaps are too big to serialize into a Bundle. @@ -58,12 +57,16 @@ public class ContactPhotoUtils { * cropper/etc.), and read by us once they are finished writing it. */ public static Uri generateTempImageUri(Context context) { - return FileProvider.getUriForFile(context, FILE_PROVIDER_AUTHORITY, + final String fileProviderAuthority = context.getResources().getString( + R.string.photo_file_provider_authority); + return FileProvider.getUriForFile(context, fileProviderAuthority, new File(pathForTempPhoto(context, generateTempPhotoFileName()))); } public static Uri generateTempCroppedImageUri(Context context) { - return FileProvider.getUriForFile(context, FILE_PROVIDER_AUTHORITY, + final String fileProviderAuthority = context.getResources().getString( + R.string.photo_file_provider_authority); + return FileProvider.getUriForFile(context, fileProviderAuthority, new File(pathForTempPhoto(context, generateTempCroppedPhotoFileName()))); } -- cgit v1.2.3 From 245ec09f85ca74849cfca777adba700ea91c3c16 Mon Sep 17 00:00:00 2001 From: Brian Attwell Date: Fri, 26 Sep 2014 11:41:23 -0700 Subject: Remove all file authority l10ns DO NOT MERGE Bug: 17668051 Change-Id: I8218122fa4c0b17b841740db00a216ed3a67ff55 --- res/values-af/strings.xml | 1 - res/values-am/strings.xml | 1 - res/values-ar/strings.xml | 1 - res/values-bg/strings.xml | 1 - res/values-ca/strings.xml | 1 - res/values-cs/strings.xml | 1 - res/values-da/strings.xml | 1 - res/values-de/strings.xml | 1 - res/values-el/strings.xml | 1 - res/values-en-rGB/strings.xml | 1 - res/values-en-rIN/strings.xml | 1 - res/values-es-rUS/strings.xml | 1 - res/values-es/strings.xml | 1 - res/values-et-rEE/strings.xml | 1 - res/values-fa/strings.xml | 1 - res/values-fr-rCA/strings.xml | 1 - res/values-fr/strings.xml | 1 - res/values-hi/strings.xml | 1 - res/values-hr/strings.xml | 1 - res/values-hu/strings.xml | 1 - res/values-in/strings.xml | 1 - res/values-it/strings.xml | 1 - res/values-iw/strings.xml | 1 - res/values-ja/strings.xml | 1 - res/values-ka-rGE/strings.xml | 1 - res/values-nb/strings.xml | 1 - res/values-ne-rNP/strings.xml | 1 - res/values-nl/strings.xml | 1 - res/values-pl/strings.xml | 1 - res/values-pt-rPT/strings.xml | 1 - res/values-ru/strings.xml | 1 - res/values-sk/strings.xml | 1 - res/values-sl/strings.xml | 1 - res/values-sr/strings.xml | 1 - res/values-sv/strings.xml | 1 - res/values-sw/strings.xml | 1 - 36 files changed, 36 deletions(-) diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index 7a5e56eb1..dd56f896b 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -255,5 +255,4 @@ "gemis" "onlangse oproep. %s. klik om terug te bel" "Jy: %s" - "com.android.kontakte.lêers" diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml index 4882acfe2..14e4bf060 100644 --- a/res/values-am/strings.xml +++ b/res/values-am/strings.xml @@ -255,5 +255,4 @@ "ያመለጡ" "የቅርብ ጊዜ ጥሪ። %s። መልሰው ለመደወል ጠቅ ያድርጉ" "እርስዎ፦ %s" - "com.android.contacts.files" diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 482067d65..619145fa2 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -255,5 +255,4 @@ "الفائتة" "مكالمة حديثة. %s. انقر لرد الاتصال" "أنت: %s" - "com.android.contacts.files" diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index 35d631054..7dee0207c 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -255,5 +255,4 @@ "пропуснато" "Скорошно обаждане. %s. Кликнете, за да се обадите обратно" "Вие: %s" - "com.android.contacts.files" diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 4eceab344..46ab36587 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -255,5 +255,4 @@ "perdudes" "trucada recent. %s. fes clic per tornar la trucada" "Usuari: %s" - "com.android.contacts.files" diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 744e039ff..9fd8e5cbe 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -255,5 +255,4 @@ "zmeškaný" "nedávný hovor. %s. kliknutím zavoláte zpět" "Vy: %s" - "com.android.contacts.files" diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 59634175b..4ea0f65da 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -255,5 +255,4 @@ "ubesvarede" "seneste opkald. %s. klik for at ringe tilbage" "Dig: %s" - "com.android.contacts.files" diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index cd665def8..35bddc067 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -255,5 +255,4 @@ "Verpasst" "Letzter Anruf. %s. Für Rückruf klicken." "Ich: %s" - "com.android.contacts.files" diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 233722543..ce4c977cd 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -255,5 +255,4 @@ "αναπάντητες" "πρόσφατη κλήση. %s. κάντε κλικ για επιστροφή κλήσης" "Εσείς: %s" - "com.android.contacts.files" diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml index ed29f0c7a..26150692d 100644 --- a/res/values-en-rGB/strings.xml +++ b/res/values-en-rGB/strings.xml @@ -255,5 +255,4 @@ "missed" "recent call. %s. click to call back" "You: %s" - "com.android.contacts.files" diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml index ed29f0c7a..26150692d 100644 --- a/res/values-en-rIN/strings.xml +++ b/res/values-en-rIN/strings.xml @@ -255,5 +255,4 @@ "missed" "recent call. %s. click to call back" "You: %s" - "com.android.contacts.files" diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index e20a811d2..e3faf8541 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -255,5 +255,4 @@ "perdida" "Llamada reciente. %s. Haz clic para devolver la llamada." "Tú: %s" - "com.android.contacts.files" diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index ca329e88f..4b960ac5c 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -255,5 +255,4 @@ "perdida" "llamada reciente. %s. Haz clic para devolver la llamada" "Tú: %s" - "com.android.contacts.files" diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml index b449faa77..5013d9158 100644 --- a/res/values-et-rEE/strings.xml +++ b/res/values-et-rEE/strings.xml @@ -255,5 +255,4 @@ "vastamata" "viimane kõne. %s. klõpsake tagasihelistamiseks" "Teie: %s" - "com.android.contacts.files" diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index e2e319836..8f4ffe2bd 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -255,5 +255,4 @@ "بی‌پاسخ" "تماس اخیر. %s. برای تماس مجدد کلیک کنید" "شما: %s" - "com.android.contacts.files" diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml index de64508a0..27eb9306b 100644 --- a/res/values-fr-rCA/strings.xml +++ b/res/values-fr-rCA/strings.xml @@ -255,5 +255,4 @@ "manqué" "appel récent. %s. cliquez pour rappeler" "Vous : %s" - "com.android.contacts.files" diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index a5e55cb2c..cc357e633 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -255,5 +255,4 @@ "manqué" "Appel récent. %s. Cliquez pour rappeler." "Vous : %s" - "com.android.contacts.files" diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index f02b68c5e..5b0375b22 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -255,5 +255,4 @@ "छूटा" "हाल ही का कॉल. %s. वापस कॉल करने के लिए क्लिक करें" "आप: %s" - "com.android.contacts.files" diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index cab9b5ffd..792fdc897 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -255,5 +255,4 @@ "propušteno" "nedavni poziv. %s. kliknite za uzvrat" "Vi: %s" - "com.android.contacts.files" diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index bb4ebb39c..bbc2df893 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -255,5 +255,4 @@ "nem fogadott" "legutóbbi hívás. %s. a visszahíváshoz kattintson" "Ön: %s" - "com.android.contacts.files" diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index f368393ed..69d44df91 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -255,5 +255,4 @@ "tak terjawab" "panggilan terbaru. %s. klik untuk menelepon balik" "Anda: %s" - "com.android.contacts.files" diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 99aa7f417..31890badb 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -255,5 +255,4 @@ "senza risposta" "chiamata recente. %s. fai clic per richiamare" "Tu: %s" - "com.android.contacts.files" diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index f5d12887f..9351cf577 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -255,5 +255,4 @@ "לא נענתה" "שיחה אחרונה. %s. לחץ כדי להתקשר חזרה" "אתה: %s" - "com.android.contacts.files" diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 1e78793df..246cd3a55 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -255,5 +255,4 @@ "不在着信" "最近の通話。%s。折り返し電話するにはタップしてください。" "あなた: %s" - "com.android.contacts.files" diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml index 3a8b82d63..80676a957 100644 --- a/res/values-ka-rGE/strings.xml +++ b/res/values-ka-rGE/strings.xml @@ -255,5 +255,4 @@ "გამოტოვებული" "ბოლო დროის ზარი. %s. დააწკაპუნეთ გადასარეკად" "თქვენ: %s" - "com.android.contacts.files" diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 6e5d5511f..726441d28 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -255,5 +255,4 @@ "tapte" "nylig oppringning. %s. klikk for å ringe tilbake" "Du: %s" - "com.android.contacts.files" diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml index a20d43d58..e4d7e297b 100644 --- a/res/values-ne-rNP/strings.xml +++ b/res/values-ne-rNP/strings.xml @@ -255,5 +255,4 @@ "छुटेको" "हालैको कल। %s। फिर्ता कल गर्न क्लिक गर्नुहोस्" "तपाईँ: %s" - "com.android.contacts.files" diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 309f37712..905d6fed4 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -255,5 +255,4 @@ "gemist" "recente oproep. %s. klik om terug te bellen" "U: %s" - "com.android.contacts.files" diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 9d06764e2..31f136e00 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -255,5 +255,4 @@ "nieodebrane" "Ostatni telefon. %s. Kliknij, by oddzwonić." "Ty: %s" - "com.android.contacts.files" diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index b186bcfc0..2e738aca6 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -255,5 +255,4 @@ "não atendida" "chamada recente. %s. clique para ligar de volta" "O utilizador: %s" - "com.android.contacts.files" diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 81fdbdf40..1f6fa512e 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -255,5 +255,4 @@ "пропущенный" "Недавний вызов. %s. Нажмите, чтобы перезвонить" "Вы: %s" - "com.android.contacts.files" diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index f5ea9dbb4..7d3d014a7 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -255,5 +255,4 @@ "zmeškaný" "nedávny hovor. %s. kliknutím zavolajte späť" "Vy: %s" - "com.android.contacts.files" diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index d20b4f8fc..d121fa10a 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -255,5 +255,4 @@ "Zgrešeni" "Nedavni klic. %s. Kliknite za povratni klic." "Vi: %s" - "com.android.contacts.files" diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index 432ac185a..c17ab6dfd 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -255,5 +255,4 @@ "пропуштени" "Недавни позив. %s. Кликните да бисте узвратили позив" "Ви: %s" - "com.android.contacts.files" diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 896f403a8..f05e2552a 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -255,5 +255,4 @@ "missade" "samtal. %s. Klicka om du vill ringa upp" "Du: %s" - "com.android.contacts.files" diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml index a87316d92..d68adcb93 100644 --- a/res/values-sw/strings.xml +++ b/res/values-sw/strings.xml @@ -255,5 +255,4 @@ "ulizokosa kupokea" "simu ya hivi majuzi. %s. bofya ili uipigie" "Wewe: %s" - "com.android.contacts.files" -- cgit v1.2.3 From afb2029e23b16ed957c2a903b178991121b01bb2 Mon Sep 17 00:00:00 2001 From: Brian Attwell Date: Fri, 3 Oct 2014 15:45:18 -0700 Subject: Don't crash QuickContacts because of null uri When composeQuickContactActivity() is passed a null uri, then startActivity throws the following exception: ActivityNotFoundException: No Activity found to handle Intent { act=android.provider.action.QUICK_CONTACT flg=0x20000000 (has extras) } I can't reproduce this. So lets just fix the crash. Inside contact list fragments, ignore clicks on views bound to null uris. We don't need to change Dialer. It already handles these cases. Note that we can't fix this by checking for null URIs inside ContactEntryListFragment. One of the Dialer subclasses of ContactEntryListFragment requires null URIs. Bug: 17807956 Change-Id: I41dd878b23b8cc3e9b8ad49e12675a4da9ced466 --- src/com/android/contacts/list/ContactPickerFragment.java | 3 +++ .../android/contacts/list/DefaultContactBrowseListFragment.java | 7 ++++++- src/com/android/contacts/list/EmailAddressPickerFragment.java | 3 +++ src/com/android/contacts/list/PostalAddressPickerFragment.java | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/com/android/contacts/list/ContactPickerFragment.java b/src/com/android/contacts/list/ContactPickerFragment.java index 442f5c7e7..0503d3397 100644 --- a/src/com/android/contacts/list/ContactPickerFragment.java +++ b/src/com/android/contacts/list/ContactPickerFragment.java @@ -128,6 +128,9 @@ public class ContactPickerFragment extends ContactEntryListFragment