diff --git a/Android.bp b/Android.bp index de9041260da6843bf41a42d09674b56cc74e7027..e02fef8216319a649cadc3a4c02c5b00167deae7 100644 --- a/Android.bp +++ b/Android.bp @@ -43,6 +43,7 @@ android_app { "com.android.vcard", "guava", "libphonenumber", + "elib", ], certificate: "shared", diff --git a/res/drawable-anydpi-v26/fab_pink.xml b/res/drawable-anydpi-v26/fab_pink.xml new file mode 100644 index 0000000000000000000000000000000000000000..deea9902974157bd0c23442f6e5a5da8a10c1f15 --- /dev/null +++ b/res/drawable-anydpi-v26/fab_pink.xml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/res/drawable-hdpi/person_white_540dp.png b/res/drawable-hdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-hdpi/person_white_540dp.png rename to res/drawable-hdpi/ic_person_white_base.png diff --git a/res/drawable-mdpi/person_white_540dp.png b/res/drawable-mdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-mdpi/person_white_540dp.png rename to res/drawable-mdpi/ic_person_white_base.png diff --git a/res/drawable-xhdpi/person_white_540dp.png b/res/drawable-xhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xhdpi/person_white_540dp.png rename to res/drawable-xhdpi/ic_person_white_base.png diff --git a/res/drawable-xxhdpi/person_white_540dp.png b/res/drawable-xxhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xxhdpi/person_white_540dp.png rename to res/drawable-xxhdpi/ic_person_white_base.png diff --git a/res/drawable-xxxhdpi/person_white_540dp.png b/res/drawable-xxxhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xxxhdpi/person_white_540dp.png rename to res/drawable-xxxhdpi/ic_person_white_base.png diff --git a/res/drawable/ic_launcher_background.xml b/res/drawable/ic_launcher_background.xml index fc4823054e0e3af053a38aecf3b95f595ab454d3..f1931a336b52de455c0e91be26e1ceddf98157c3 100644 --- a/res/drawable/ic_launcher_background.xml +++ b/res/drawable/ic_launcher_background.xml @@ -1,20 +1,38 @@ + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> - - + android:pathData="M0,0h108v108h-108z"> + + + + + + + diff --git a/res/drawable/ic_launcher_foreground.xml b/res/drawable/ic_launcher_foreground.xml index 686ffa2b53b156a4f10f9ff3c8e061b36ebf17df..e305355101dcc85afb9ccecebaf579c1acd9bd1c 100644 --- a/res/drawable/ic_launcher_foreground.xml +++ b/res/drawable/ic_launcher_foreground.xml @@ -1,36 +1,52 @@ + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/res/drawable/ic_launcher_monochrome.xml b/res/drawable/ic_launcher_monochrome.xml deleted file mode 100644 index fc64ec074b28902023890de67a69e7fb62712691..0000000000000000000000000000000000000000 --- a/res/drawable/ic_launcher_monochrome.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/res/drawable/person_white_540dp.xml b/res/drawable/person_white_540dp.xml new file mode 100644 index 0000000000000000000000000000000000000000..479c55cbb915fed9c5fe6833f065f0af5ed6c598 --- /dev/null +++ b/res/drawable/person_white_540dp.xml @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/res/drawable/quantum_ic_drawer_my_info_32.xml b/res/drawable/quantum_ic_drawer_my_info_32.xml index 4e310cb4a1a86f4fc715a6365d83f7ec35cf7845..b0b0f16afef5a854e1c9e64b39c4b83b0fe3323c 100644 --- a/res/drawable/quantum_ic_drawer_my_info_32.xml +++ b/res/drawable/quantum_ic_drawer_my_info_32.xml @@ -5,15 +5,11 @@ android:viewportHeight="32.0"> + android:fillColor="@color/e_accent"/> + android:fillColor="@color/e_background" /> + android:fillColor="@color/e_background" /> diff --git a/res/layout-land/people_activity_toolbar.xml b/res/layout-land/people_activity_toolbar.xml index 15f12f67189c5773114210e09f1d62b684f31a74..eb33d395780322b1ca2a65bf24c4e29f17e8e51e 100644 --- a/res/layout-land/people_activity_toolbar.xml +++ b/res/layout-land/people_activity_toolbar.xml @@ -29,7 +29,7 @@ android:id="@+id/toolbar_frame" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary"> + android:background="@color/actionbar_background_color"> diff --git a/res/layout/people_activity_toolbar.xml b/res/layout/people_activity_toolbar.xml index 4e8ea2f7e139305b78578826ca9544dc8ac6726b..1bc4652dd1a3b6edd47c28528e4061ef23300690 100644 --- a/res/layout/people_activity_toolbar.xml +++ b/res/layout/people_activity_toolbar.xml @@ -25,7 +25,7 @@ android:id="@+id/toolbar_frame" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary"> + android:background="@color/actionbar_background_color"> + android:tint="@color/e_primary_text_color" /> diff --git a/res/layout/selection_bar.xml b/res/layout/selection_bar.xml index 272a2fcf9d6b241c5fa30444190ae2291c00faeb..0d9f8a8ef4ee7fbdd740872e47ee99c482eb3c72 100644 --- a/res/layout/selection_bar.xml +++ b/res/layout/selection_bar.xml @@ -51,7 +51,7 @@ android:paddingEnd="16dp" android:paddingStart="16dp" android:text="@string/menu_add_contacts" - android:textColor="@color/primary_color" + android:textColor="@color/actionbar_text_color" android:textStyle="bold" android:visibility="gone"/> diff --git a/res/mipmap-anydpi/ic_launcher.xml b/res/mipmap-anydpi/ic_launcher.xml index b58c81ff94fc2cd9353409539d491f43b91966a5..f96ce541f683e53c5a539043520729dcaebe5b58 100644 --- a/res/mipmap-anydpi/ic_launcher.xml +++ b/res/mipmap-anydpi/ic_launcher.xml @@ -1,10 +1,23 @@ + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> - - - + + + + diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index d5aaf47e088b381bbe4bb76702057db6f0ad88e2..d138a60bd093e133f5af5e5a5b7ba93869d0839d 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -1,4 +1,4 @@ - + - - + --> "Kontakte" "Kontakte" "Kontakt hinzufügen" @@ -96,7 +93,7 @@ "Die Kontaktliste ist leer" "%s gespeichert" "Kontakt gespeichert" - "Verknüpfung der Kontakte wurde aufgehoben." + Verknüpfung der Kontakte wurde aufgehoben "Änderungen am Kontakt konnten nicht gespeichert werden" "Verknüpfung mit Kontakt konnte nicht aufgehoben werden" "Kontakt konnte nicht verknüpft werden" @@ -120,11 +117,11 @@ "Keine Kontakte" "\"%s\" zu den Kontakten hinzufügen?" "Namen meiner Kontakte" - "Klicke hier, um zum vorherigen Bildschirm zurückzukehren." + Klicke hier, um zum vorherigen Bildschirm zurückzukehren "Telefonnummer hinzufügen" "E-Mail-Adresse hinzufügen" "Für diese Aktion wurde keine App gefunden." - "Teilen" + Teilen "Zu Kontakten hinzufügen" "Hinzufügen" "{count,plural, =1{Kontakt teilen über}other{Kontakte teilen über}}" @@ -135,25 +132,25 @@ "Labelname" "Sprachchat" "Videochat" - "%1$s Kontakt" - "%1$s-Konto" - "Foto machen" + %1$s Kontakt + %1$s-Konto + Foto aufnehmen "Neues Foto aufnehmen" "Foto auswählen" "Neues Foto auswählen" - "Suche..." + Suche … "Datum" "Label" "Abbrechen" "Zurück" "Schließen" "Zur Bearbeitung des ausgewählten Kontakts wechseln? Die bisher eingegebenen Informationen werden kopiert." - "Verzeichnis %1$s" + %1$s "Einstellungen" "Einstellungen" "Hilfe & Feedback" - "%1$s%2$s" - "%1$s%2$s%3$s" + %1$s%2$s + %1$s%2$s%3$s "Telefonnummer" "Zu Kontakten hinzufügen" "Schließen" @@ -161,7 +158,7 @@ "Konto hinzufügen" "Importieren" "Neu erstellen…" - "Soll das Label \"%1$s\" gelöscht werden? (Die Kontakte selbst werden nicht gelöscht.)" + Soll das Kennzeichen „%1$s“ gelöscht werden\? (Die Kontakte selbst werden nicht gelöscht.) "Gib einen Namen für den Kontakt ein, bevor du ihn mit einem anderen Kontakt verknüpfst." "In die Zwischenablage kopieren" "Als Standard festlegen" @@ -192,7 +189,7 @@ "Mehr anzeigen" "Weniger anzeigen" "Info" - "Persönliche Kopie wird erstellt..." + Persönliche Kopie wird erstellt … "Festlegen" "Chat" "Organisation" @@ -229,7 +226,7 @@ "Vorschläge" "So sind deine Kontakte immer organisiert und übersichtlich" "Rückgängig machen" - "%s anrufen" + %s anrufen "Anruf (privat)" "Anruf (mobil)" "Anruf (geschäftl.)" @@ -248,10 +245,10 @@ "TTY/TDD anrufen" "Anruf Handy (geschäftl.)" "Anruf Pager (geschäftl.)" - "%s anrufen" + %s anrufen "Anruf (MMS)" "%s (Anruf)" - "SMS an %s senden" + SMS an %s senden "SMS (privat)" "Text (mobil)" "SMS (geschäftl.)" @@ -270,7 +267,7 @@ "SMS an TTY/TDD" "SMS an Handy (geschäftl.)" "SMS an Pager (geschäftl.)" - "SMS an %s" + SMS an %s "Text (MMS)" "%s (Nachricht)" "Videoanruf starten" @@ -324,7 +321,7 @@ "E-Mail (mobil)" "E-Mail (geschäftl.)" "E-Mail an" - "E-Mail an %s senden" + E-Mail an %s senden "E-Mail" "Straße" "Stadt" @@ -334,7 +331,7 @@ "Privatadresse anzeigen" "Arbeitsadresse anzeigen" "Adresse anzeigen" - "Adresse %s anzeigen" + Adresse %s anzeigen "Über AIM chatten" "Über Windows Live chatten" "Über Yahoo! chatten" @@ -361,9 +358,9 @@ "Alle Kontakte" "Synchronisierungsgruppe entfernen" "Synchronisierungsgruppe hinzufügen" - "Weitere Gruppen..." - "Wenn \"%s\" aus der Synchronisierung entfernt wird, werden auch alle nicht gruppierten Kontakte aus der Synchronisierung entfernt." - "Anzeigeoptionen werden gespeichert..." + Weitere Gruppen … + Wenn „%s“ aus der Synchronisierung entfernt wird, werden auch alle nicht gruppierten Kontakte aus der Synchronisierung entfernt. + Anzeigeoptionen werden gespeichert … "Benutzerdefinierte Ansicht" "Importierte Kontakte speichern unter:" "SIM-Karte" @@ -373,10 +370,10 @@ "VCF-Datei" "Keine Daten zum Importieren vorhanden" "Kontakte von vCard importieren?" - "Import von %s abbrechen?" - "Export von %s abbrechen?" + Importieren von %s abbrechen\? + Exportieren von %s abbrechen\? "vCard-Import/-Export nicht abgebrochen" - "Unbekannter Fehler" + Unbekannter Fehler. "\"%1$s\" konnte nicht geöffnet werden: %2$s." "Exportprogramm konnte nicht gestartet werden: \"%s\"." "Es ist kein exportierbarer Kontakt vorhanden." @@ -385,33 +382,33 @@ "E/A-Fehler" "Nicht genügend Speicherplatz. Die Datei ist möglicherweise zu groß." "Das Format wird nicht unterstützt." - "Export von %s abgeschlossen" + Export von %s abgeschlossen. "Kontakte wurden exportiert." "Das Exportieren der Kontakte ist abgeschlossen. Klicke auf die Benachrichtigung, um die Kontakte freizugeben." "Zum Teilen der Kontakte tippen." - "Export von %s abgebrochen" - "Kontaktdaten werden exportiert." + Export von %s abgebrochen. + Kontaktdaten werden exportiert. "Die Kontaktdaten werden gerade exportiert." "Datenbankinformationen konnten nicht abgerufen werden." "Keine Kontakte zum Exportieren vorhanden." "Das Programm zum Erstellen der vCard wurde nicht richtig gestartet." "Export nicht möglich" "Die Kontaktdaten wurden nicht exportiert.\nGrund: \"%s\"" - "%s wird importiert" + %s wird importiert "Lesen der vCard-Daten nicht möglich" - "Import der vCard %s abgeschlossen" - "Import von %s abgebrochen" - "%s wird demnächst importiert." + Import der vCard %s abgeschlossen + Import von %s abgebrochen + %s wird demnächst importiert. "Die Datei wird in Kürze importiert." "Die vCard-Importanfrage wurde abgelehnt. Bitte versuchen Sie es später erneut." "Die Kontakte werden in Kürze exportiert." "Die vCard-Exportanfrage wurde abgelehnt. Bitte versuchen Sie es später erneut." "Kontakt" "Caching der vCard(s) in lokalen temporären Speicher wird durchgeführt. Der eigentliche Import beginnt gleich." - "Importieren der vCard nicht möglich" + Importieren der vCard nicht möglich "Kontakt erhalten per NCF" - "Caching läuft..." - "%1$s/%2$s wird importiert: %3$s" + Caching läuft … + %1$s/%2$s wird importiert: %3$s "In VCF-Datei exportieren" "Sortieren nach" "Phonetischer Name" @@ -443,17 +440,17 @@ "Importieren" "Exportieren" "Blockierte Nummern" - "über %1$s" - "%1$s über %2$s" - "Suche beenden" - "Suche zurücksetzen" + über %1$s + %1$s über %2$s + Suche anhalten + Suchfeld löschen "Konto" "Diese SIM für alle Anrufe verwenden" "Mit einer Notiz anrufen" "Notiz eingeben, die beim Anrufen gesendet wird…" "SENDEN & ANRUFEN" - "%1$s/%2$s" - "%1$s%2$s" + %1$s / %2$s + %1$s%2$s "Build-Version" "Open Source-Lizenzen" "Lizenzdetails für Open-Source-Software" @@ -492,4 +489,7 @@ "Benachrichtigungen" "Ja" "Nein" - + Exportiere vCard-Version + sans-serif + sans-serif-medium + \ No newline at end of file diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 83cd256688e2c21acc12a814ff4e771397eadd49..44cb8ef865c6890fa0b12de387f6cc51738697d2 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -1,4 +1,4 @@ - + - - + --> "Contacts" "Contacts" "Ajouter le contact" @@ -454,7 +451,7 @@ "ENVOYER L\'OBJET ET APPELER" "%1$s/%2$s" "%1$s%2$s" - "Version de build" + Version "Licences Open Source" "Informations sur les licences des logiciels Open Source" "Règles de confidentialité" @@ -492,4 +489,5 @@ "Notifications" "Oui" "Non" - + Version d\'export de la vCard + \ No newline at end of file diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 49965945321c8808ae7af501ce63d8be97e29fa9..601a60b1b2e24889c4246e5dc3cc471a0cf20b57 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -1,4 +1,4 @@ - + - - + --> "Contatti" "Contatti" "Aggiungi contatto" @@ -221,8 +218,8 @@ "Elimina %s" "Suggerimenti" "Nuovo" - "Apri riquadro di navigazione a scomparsa" - "Chiudi riquadro navigazione a scomparsa" + Apro la barra di navigazione + Chiudo la barra di navigazione "Etichetta %s" "Etichette" "Account" @@ -325,7 +322,7 @@ "Invia email a ind. lavoro" "Invia email" "Invia un\'email a %s" - "Email" + Email "Indirizzo postale" "Città" "Provincia" @@ -445,8 +442,8 @@ "Numeri bloccati" "tramite %1$s" "%1$s tramite %2$s" - "interrompi ricerca" - "Cancella ricerca" + arresta la ricerca + Svuota la ricerca "Account" "Usa sempre questa per chiamare" "Chiama e invia una nota" @@ -492,4 +489,4 @@ "Notifiche" "Sì" "No" - + \ No newline at end of file diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml index e88ed65b735b8264018d4e9c42451af999fb7d1f..a242b5e9c2bd4997502dc0dbca83e46ed75c21fd 100644 --- a/res/values-night/colors.xml +++ b/res/values-night/colors.xml @@ -5,7 +5,7 @@ --> - #1f1f1f + @color/background_primary #dadada diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 39949dd045e894d5f72b25f9f9e8f8516997b5a9..82d4180ab7f48646e06455edd763913d9b32973e 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -135,25 +135,25 @@ "Labelnaam" "Voicechat" "Videochat" - "%1$s-contact" - "%1$s-account" - "Foto maken" + %1$s contact + %1$s account + Neem foto "Nieuwe foto nemen" "Foto kiezen" "Nieuwe foto selecteren" - "Zoeken..." + Zoeken… "Datum" "Labelen" "Annuleren" "Terug" "sluiten" "Wil je overschakelen naar het bewerken van het geselecteerde contact? Gegevens die je tot nu toe hebt ingevoerd, worden gekopieerd." - "Directory %1$s" + Map %1$s "Instellingen" - "Instellingen" + Instellingen "Hulp en feedback" - "%1$s%2$s" - "%1$s%2$s%3$s" + %1$s%2$s + %1$s%2$s%3$s "Telefoonnummer" "Toevoegen aan contacten" "Sluiten" @@ -161,7 +161,7 @@ "Account toevoegen" "Importeren" "Nieuwe maken…" - "Het label %1$s verwijderen? (Contacten zelf worden niet verwijderd.)" + Het label %1$s verwijderen\? (Contacten zullen niet verwijderd worden.) "Geef een contactnaam op voordat je dit contact linkt met een ander contact." "Kopiëren naar klembord" "Standaard instellen" @@ -177,7 +177,7 @@ "Mijn %1$s-profiel" "Voeg snel een account toe om een back-up van je contacten te maken op Google." "Nieuwe contacten worden opgeslagen in %1$s." - "Kies een standaardaccount voor nieuwe contacten" + Kies een standaardaccount voor nieuwe contacten: "Nieuw contact maken" "Contact bewerken" "Alleen bekijken" @@ -192,7 +192,7 @@ "Meer tonen" "Minder tonen" "Over" - "Een persoonlijke kopie maken..." + Een persoonlijke kopie maken… "Instellen" "Chat" "Organisatie" @@ -225,11 +225,11 @@ "Zijmenu sluiten" "Label %s" "Labels" - "Accounts" + Accounts "Suggesties" "Organiseer je contacten op een overzichtelijke en nuttige manier" "Ongedaan maken" - "%s bellen" + %s bellen "Thuis bellen" "Bellen naar mobiel" "Bellen naar werk" @@ -248,10 +248,10 @@ "Tekststelefoon bellen" "Bellen naar mobiel werk" "Bellen naar pager werk" - "%s bellen" + %s bellen "Bellen via MMS" "%s (bellen)" - "%s sms\'en" + SMS naar %s "Sms\'en naar huis" "Sms\'en naar mobiel" "Sms\'en naar werk" @@ -270,13 +270,13 @@ "Sms\'en naar teksttelefoon" "Sms\'en naar mobiel werk" "Sms\'en naar werkpager" - "Sms\'en naar %s" + SMS naar %s "Sms\'en via MMS" "%s (sms\'en)" "Videogesprek starten" "Lijst met regelmatige contacten wissen?" "Je wist de lijst met contacten waarmee je regelmatig contact opneemt in de apps Contacten en Telefoon, en e-mailapps moeten je voorkeursadressen weer opnieuw leren." - "Regelmatige contacten wissen..." + \"Regelmatig gecontacteerd\" wissen… "Beschikbaar" "Afwezig" "Bezet" @@ -324,7 +324,7 @@ "E-mailen naar mobiel" "E-mailen naar werk" "E-mail" - "%s e-mailen" + Email naar %s "E-mail" "Straat" "Plaats" @@ -334,7 +334,7 @@ "Woonadres bekijken" "Werkadres bekijken" "Adres bekijken" - "Adres voor %s bekijken" + Adres %s bekijken "Chatten via AIM" "Chatten via Windows Live" "Chatten via Yahoo" @@ -362,8 +362,8 @@ "Synchronisatiegroep verwijderen" "Synchronisatiegroep toevoegen" "Meer groepen…" - "Als je \'%s\' verwijdert uit de synchronisatie, worden ook contacten die niet bij een groep horen uit de synchronisatie verwijderd." - "Weergaveopties opslaan..." + Als je \"%s\" verwijdert uit de synchronisatie, worden ook contacten die niet bij een groep horen uit de synchronisatie verwijderd. + Weergaveopties opslaan… "Aangepaste weergave" "Geïmporteerde contacten opslaan in:" "Simkaart" @@ -373,8 +373,8 @@ "VCF-bestand" "Niets te importeren" "Contacten importeren van vCard?" - "Import van %s annuleren?" - "Export van %s annuleren?" + Import van %s annuleren\? + Export van %s annuleren\? "Kan vCard-import/export niet annuleren" "Onbekende fout." "Kan \'%1$s\' niet openen: %2$s." @@ -385,11 +385,11 @@ "I/O-fout" "Onvoldoende geheugen. Het bestand is mogelijk te groot." "De indeling wordt niet ondersteund." - "Exporteren van %s voltooid." + Exporteren van %s voltooid. "Contacten geëxporteerd." "De contacten zijn geëxporteerd. Klik op de melding om contacten te delen." "Tik om contacten te delen." - "Exporteren van %s geannuleerd." + Exporteren van%s geannuleerd. "Contactgegevens exporteren" "Contactgegevens worden geëxporteerd." "Kan databasegegevens niet ophalen." @@ -397,11 +397,11 @@ "De vCard-editor is niet correct gestart." "Kan niet exporteren" "De contactgegevens zijn niet geëxporteerd.\nReden: \'%s\'" - "%s importeren" + %s aan het importeren "Kan vCard-gegevens niet lezen" - "Importeren van vCard %s voltooid" - "Importeren van %s geannuleerd" - "%s wordt binnenkort geïmporteerd." + Importeren van vCard %s voltooid + Importeren van %s geannuleerd + %s wordt zo dadelijk geïmporteerd. "Het bestand wordt binnenkort geïmporteerd." "Verzoek voor vCard-import is geweigerd. Probeer het later opnieuw." "Contacten worden binnenkort geëxporteerd." @@ -411,7 +411,7 @@ "Kan vCard niet importeren." "Contact via NFC" "In cachegeheugen opslaan" - "Importeren %1$s/%2$s: %3$s" + Importeren %1$s/%2$s: %3$s "Exporteren naar VCF" "Sorteren op" "Fonetische naam" @@ -422,7 +422,7 @@ "Naamindeling" "Voornaam eerst" "Achternaam eerst" - "Accounts" + Accounts "Standaardaccount voor nieuwe contacten" "Mijn info" "Je profiel instellen" @@ -443,8 +443,8 @@ "Importeren" "Exporteren" "Geblokkeerde nummers" - "via %1$s" - "%1$s via %2$s" + via %1$s + %1$s via %2$s "stoppen met zoeken" "Zoekopdracht wissen" "Account" @@ -452,8 +452,8 @@ "Gesprek met een notitie" "Typ een notitie om te verzenden met het gesprek…" "VERZENDEN EN BELLEN" - "%1$s/%2$s" - "%1$s%2$s" + %1$s/%2$s + %1$s%2$s "Buildversie" "Opensource-licenties" "Licentiedetails voor open-sourcesoftware" @@ -492,4 +492,7 @@ "Meldingen" "Ja" "Nee" + sans-serif + Export vCard versie + sans-serif-medium diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index ccfdcd3401fd8a1db7342a3ce3beb025b278ce53..a40068cef63dc27b28d2b1f4423661f2bc36ceef 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -124,7 +124,7 @@ "Добавить номер телефона" "Добавить адрес электронной почты" "Действие не поддерживается ни в одном приложении." - "Поделиться" + Поделиться "Добавить в контакты" "Добавить" "{count,plural, =1{Выберите способ отправки}one{Выберите способ отправки}few{Выберите способ отправки}many{Выберите способ отправки}other{Выберите способ отправки}}" @@ -137,7 +137,7 @@ "Видеочат" "Контакт %1$s" "Аккаунт %1$s" - "Сфотографировать" + Сделать фото "Сфотографировать" "Выбрать фото" "Выбрать другое фото" @@ -150,7 +150,7 @@ "Переключиться на редактирование выбранного контакта? Введенная информация будет скопирована." "Каталог %1$s" "Настройки" - "Настройки" + Настройки "Справка/отзыв" "%1$s%2$s" "%1$s%2$s%3$s" @@ -445,7 +445,7 @@ "Заблокированные номера" "с помощью %1$s" "%1$s с помощью %2$s" - "прекратить поиск" + остановить поиск "Очистить условия поиска" "Аккаунт" "Всегда использовать для звонков" diff --git a/res/values-v27/styles.xml b/res/values-v27/styles.xml index e821cc1570095ac1bc85b2026cc30a0db2bfef1d..0187a5cabcdc155d5323a594dd0fd82bb687a702 100644 --- a/res/values-v27/styles.xml +++ b/res/values-v27/styles.xml @@ -12,8 +12,8 @@ @style/ListViewStyle @color/background_primary @color/primary_color_dark - @color/primary_color - @color/primary_color + @color/e_accent + @color/e_accent @style/ContactsAlertDialogTheme @dimen/contact_browser_list_item_height 24dip @@ -51,10 +51,11 @@ @style/PopupMenuStyle @color/navigation_bar_bg @color/navigation_bar_divider - true + @bool/isLight + @bool/isLight - diff --git a/res/values/colors.xml b/res/values/colors.xml index aeba877162416e230a0ebc87fdb750b3f7116d33..51eb19d11dc101137e13f531e7f8af49b7e81ec9 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,39 +17,39 @@ #F5F5F5 - #dd000000 + @color/e_primary_text_color - #89000000 + @color/e_secondary_text_color - #61000000 + @color/e_disabled_color - #737373 + @color/e_secondary_text_color #202020 #2a56c6 #0f000000 - #FFFFFF + @color/e_primary_text_color - @color/primary_color + @color/e_action_bar - #f6f6f6 + @color/e_action_bar - #bababa + @color/e_action_bar - #1c3aa9 - #2a56c6 + @color/e_action_bar + @color/e_accent - #546E7A - #607D8B + @color/e_action_bar + @color/e_action_bar #FFFFFF - @color/contacts_accent_color + @color/e_background #e0e0e0 @@ -61,7 +61,7 @@ #ffffff - #f4f4f4 + @color/e_background #2aad6f #ff2e58 @@ -73,7 +73,7 @@ #7f7f7f - #40000000 + @color/e_disabled_color #40000000 @@ -85,7 +85,7 @@ #4D000000 - #efefef + @color/e_background #0f9d58 @@ -97,12 +97,12 @@ #a0ffffff - #363636 + @color/e_primary_text_color - @color/dialtacts_secondary_text_color + @color/e_secondary_text_color - @color/dialtacts_theme_color + @color/e_primary_text_color #363636 @@ -117,7 +117,7 @@ #333333 - #737373 + @color/e_secondary_text_color #7f000000 @@ -132,39 +132,35 @@ These colors are also used by MaterialColorMapUtils to generate primary activity colors. --> - #DB4437 - #E91E63 - #9C27B0 - #673AB7 - #3F51B5 - #4285F4 - #039BE5 - #0097A7 - #009688 - #0F9D58 - #689F38 - #EF6C00 - #FF5722 - #757575 + #0F94F6 + #00B4B4 + #008D96 + #44B04C + #AFD83D + #FFED21 + #FFC300 + #FF7A00 + #F8432E + #ED1C61 + #ED1C61 + #5754DC - #C53929 - #C2185B - #7B1FA2 - #512DA8 - #303F9F - #3367D6 - #0277BD - #006064 - #00796B - #0B8043 - #33691E - #E65100 - #E64A19 - #424242 + #0F94F6 + #00B4B4 + #008D96 + #44B04C + #AFD83D + #FFED21 + #FFC300 + #FF7A00 + #F8432E + #ED1C61 + #ED1C61 + #5754DC - #ffffff + @color/e_primary_text_color @color/actionbar_background_color - #ffffff + @color/e_primary_text_color #8C000000 - #DF000000 + @color/actionbar_text_color #777777 - #000000 + @color/e_primary_text_color - #ffffff + @color/e_action_bar - #66000000 + @color/e_disabled_color @color/dialtacts_theme_color - #f9f9f9 + @color/e_background #FFFFFF @@ -233,7 +229,7 @@ @color/actionbar_text_color_black #dbdbdb - #f50057 + @color/e_accent #333333 @@ -245,13 +241,13 @@ #e0e0e0 - #E5E5E5 + @android:color/transparent - #FAFAFA + @color/e_drawer_background - #E8E8E8 + @color/navigation_drawer_item_background #1A000000 diff --git a/res/values/e_arrays.xml b/res/values/e_arrays.xml new file mode 100644 index 0000000000000000000000000000000000000000..a38cce56ce220eb09b4fdd4a9b123da167ba3f12 --- /dev/null +++ b/res/values/e_arrays.xml @@ -0,0 +1,28 @@ + + + + + @string/menu_export_type_vcf_21 + @string/menu_export_type_vcf_30 + @string/menu_export_type_vcf_40 + + + + @string/menu_export_type_vcf_21_value + @string/menu_export_type_vcf_30_value + @string/menu_export_type_vcf_40_value + + diff --git a/res/values/e_strings.xml b/res/values/e_strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..14e376dfe311edbe978ef25e43d34222e0d37e98 --- /dev/null +++ b/res/values/e_strings.xml @@ -0,0 +1,35 @@ + + + + + Contacts is forked from LineageOS Contacts + + + Authors + + + Source code + + + Licence + + + Contacts information + Contacts is an open source App for Android + + + Emergency information + diff --git a/res/values/lineage_colors.xml b/res/values/lineage_colors.xml index 6aee4d227e64eb119fedd830dd6af0037f8bc5a0..96b4c511d07bfbe7cb3edb746d168b360fb9aaaa 100644 --- a/res/values/lineage_colors.xml +++ b/res/values/lineage_colors.xml @@ -15,6 +15,6 @@ limitations under the License. --> - @android:color/white - #1f000000 + @color/e_action_bar + @android:color/transparent diff --git a/res/values/strings.xml b/res/values/strings.xml index d87be0ba3aa5ae522afcdc4663a8937d967bc49e..b69cdbc48c0f3efc827261443c7eec45b2c0011a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1549,4 +1549,13 @@ No + + Export vCard version + VCF 2.1 + VCF 3.0 + VCF 4.0 + v21_generic + v30_generic + v40_generic + \ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index 18401599eae2ae34631379d15d176998e116583f..64b5af0a618e790defec1a2f6d83f1dc0714ab4d 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -92,7 +92,7 @@ @@ -453,6 +455,8 @@ background and text color. See also android:style/Widget.Holo.TextView.ListSepar + + + + + + + + + + + + 1) { + if (mHasNewContact && mAccounts.size() > 1) { addAccountSelector(mCurrentRawContactDelta); } } diff --git a/src/com/android/contacts/lettertiles/LetterTileDrawable.java b/src/com/android/contacts/lettertiles/LetterTileDrawable.java index b80fd4f76dc458a77bc4c1ee25e036e5f07ac996..e5ef2ca378ba641e553c571f0434dc8c8cc40694 100644 --- a/src/com/android/contacts/lettertiles/LetterTileDrawable.java +++ b/src/com/android/contacts/lettertiles/LetterTileDrawable.java @@ -160,7 +160,6 @@ public class LetterTileDrawable extends Drawable { sPaint.getTextBounds(sFirstChar, 0, 1, sRect); sPaint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL)); sPaint.setColor(sTileFontColor); - sPaint.setAlpha(ALPHA); // Draw the letter in the canvas, vertically shifted up or down by the user-defined // offset diff --git a/src/com/android/contacts/list/ContactsUnavailableFragment.java b/src/com/android/contacts/list/ContactsUnavailableFragment.java index 048ce62e360d1b88d4feb343969ed7f93b1e6ea4..299a18455058a001bc8427eabc19c9c2badd08a6 100644 --- a/src/com/android/contacts/list/ContactsUnavailableFragment.java +++ b/src/com/android/contacts/list/ContactsUnavailableFragment.java @@ -131,7 +131,7 @@ public class ContactsUnavailableFragment extends Fragment implements OnClickList public void onClick(View v) { final int id = v.getId(); if (id == R.id.add_account_button) { - final Intent intent = ImplicitIntentsUtil.getIntentForAddingGoogleAccount(); + final Intent intent = ImplicitIntentsUtil.getIntentForAddingAccount(); ImplicitIntentsUtil.startActivityOutsideApp(getActivity(), intent); } else if (id == R.id.import_contacts_button) { diff --git a/src/com/android/contacts/model/account/AccountComparator.java b/src/com/android/contacts/model/account/AccountComparator.java index 70ccf494fb78694222497e7e2d1827d3f1e87f96..8bc8fbbf76707a9b6121630f02d3df900d1f3b9a 100644 --- a/src/com/android/contacts/model/account/AccountComparator.java +++ b/src/com/android/contacts/model/account/AccountComparator.java @@ -38,13 +38,13 @@ public class AccountComparator implements Comparator { return -1; } else if (a.name == null || a.type == null) { return 1; - } else if (isWritableGoogleAccount(a) && a.equals(mDefaultAccount)) { + } else if (isWritableEAccount(a) && a.equals(mDefaultAccount)) { return -1; - } else if (isWritableGoogleAccount(b) && b.equals(mDefaultAccount)) { + } else if (isWritableEAccount(b) && b.equals(mDefaultAccount)) { return 1; - } else if (isWritableGoogleAccount(a) && !isWritableGoogleAccount(b)) { + } else if (isWritableEAccount(a) && !isWritableEAccount(b)) { return -1; - } else if (isWritableGoogleAccount(b) && !isWritableGoogleAccount(a)) { + } else if (isWritableEAccount(b) && !isWritableEAccount(a)) { return 1; } else { int diff = a.name.compareToIgnoreCase(b.name); @@ -65,7 +65,7 @@ public class AccountComparator implements Comparator { } } - private static boolean isWritableGoogleAccount(AccountWithDataSet account) { - return GoogleAccountType.ACCOUNT_TYPE.equals(account.type) && account.dataSet == null; + private static boolean isWritableEAccount(AccountWithDataSet account) { + return "foundation.e.accountmanager.eelo.address_book".equals(account.type) && account.dataSet == null; } } diff --git a/src/com/android/contacts/preference/AboutPreferenceFragment.java b/src/com/android/contacts/preference/AboutPreferenceFragment.java index 378948033ac42c95473a48016d3e2f765935a76d..272cd043988243a4690a68ecde2396972d0bbca1 100644 --- a/src/com/android/contacts/preference/AboutPreferenceFragment.java +++ b/src/com/android/contacts/preference/AboutPreferenceFragment.java @@ -35,8 +35,13 @@ import com.android.contacts.activities.LicenseActivity; */ public class AboutPreferenceFragment extends PreferenceFragment { - public static final String PRIVACY_POLICY_URL = "http://www.google.com/policies/privacy"; - public static final String TERMS_OF_SERVICE_URL = "http://www.google.com/policies/terms"; + public static final String BUILD_VERSION_URL = "https://gitlab.e.foundation/e/os/android_packages_apps_Contacts/-/releases"; + public static final String ABOUT_APP_URL = "https://github.com/LineageOS/android_packages_apps_Contacts"; + public static final String LICENSE_URL = "https://gitlab.e.foundation/e/os/android_packages_apps_Contacts/-/blob/v1-r/NOTICE"; + public static final String AUTHORS_URL = "https://gitlab.e.foundation/e/os/android_packages_apps_Contacts"; + public static final String SOURCE_CODE_URL = "https://gitlab.e.foundation/e/os/android_packages_apps_Contacts"; + public static final String PRIVACY_POLICY_URL = "https://e.foundation/legal-notice-privacy/"; + public static final String TERMS_OF_SERVICE_URL = "https://e.foundation/legal-notice-privacy/"; public static AboutPreferenceFragment newInstance() { return new AboutPreferenceFragment(); @@ -60,12 +65,14 @@ public class AboutPreferenceFragment extends PreferenceFragment { // Nothing } - final Preference licensePreference = findPreference( - getString(R.string.pref_open_source_licenses_key)); - licensePreference.setIntent(new Intent(getActivity(), LicenseActivity.class)); - + final Preference buildVersionPreference = findPreference("pref_build_version"); + final Preference aboutAppPreference = findPreference("about_app"); + final Preference licensePreference = findPreference("license"); + final Preference authorsPreference = findPreference("authors"); + final Preference sourceCodePreference = findPreference("source_code"); final Preference privacyPolicyPreference = findPreference("pref_privacy_policy"); final Preference termsOfServicePreference = findPreference("pref_terms_of_service"); + final Preference openSourceLicensePreference = findPreference(getString(R.string.pref_open_source_licenses_key)); final Preference.OnPreferenceClickListener listener = new Preference.OnPreferenceClickListener() { @@ -76,6 +83,18 @@ public class AboutPreferenceFragment extends PreferenceFragment { startActivityForUrl(PRIVACY_POLICY_URL); } else if (preference == termsOfServicePreference) { startActivityForUrl(TERMS_OF_SERVICE_URL); + } else if (preference == buildVersionPreference) { + startActivityForUrl(BUILD_VERSION_URL); + } else if (preference == aboutAppPreference) { + startActivityForUrl(ABOUT_APP_URL); + } else if (preference == licensePreference) { + startActivityForUrl(LICENSE_URL); + } else if (preference == authorsPreference) { + startActivityForUrl(AUTHORS_URL); + } else if (preference == sourceCodePreference) { + startActivityForUrl(SOURCE_CODE_URL); + } else if (preference == openSourceLicensePreference) { + startActivity(new Intent(getActivity(), LicenseActivity.class)); } } catch (ActivityNotFoundException ex) { Toast.makeText(getContext(), getString(R.string.url_open_error_toast), @@ -85,6 +104,12 @@ public class AboutPreferenceFragment extends PreferenceFragment { } }; + buildVersionPreference.setOnPreferenceClickListener(listener); + aboutAppPreference.setOnPreferenceClickListener(listener); + licensePreference.setOnPreferenceClickListener(listener); + authorsPreference.setOnPreferenceClickListener(listener); + sourceCodePreference.setOnPreferenceClickListener(listener); + openSourceLicensePreference.setOnPreferenceClickListener(listener); privacyPolicyPreference.setOnPreferenceClickListener(listener); termsOfServicePreference.setOnPreferenceClickListener(listener); } diff --git a/src/com/android/contacts/util/MaterialColorMapUtils.java b/src/com/android/contacts/util/MaterialColorMapUtils.java index c1616cec7db9c7e7a96bf8dd6d1e36ffb212d0b7..7182104545adec6fb2663f9c76d7ba2f74376ec7 100644 --- a/src/com/android/contacts/util/MaterialColorMapUtils.java +++ b/src/com/android/contacts/util/MaterialColorMapUtils.java @@ -199,7 +199,7 @@ public class MaterialColorMapUtils { final boolean isGroupView = activity instanceof PeopleActivity && ((PeopleActivity) activity).isGroupView(); return isGroupView - ? ContextCompat.getColor(activity, R.color.group_primary_color) - : ContextCompat.getColor(activity, R.color.primary_color); + ? ContextCompat.getColor(activity, R.color.actionbar_background_color) + : ContextCompat.getColor(activity, R.color.actionbar_background_color); } } diff --git a/src/com/android/contacts/vcard/ExportProcessor.java b/src/com/android/contacts/vcard/ExportProcessor.java index 0b96ea19505122987aa384957f5be9771d3dde21..c3554757e963de42c9d94fc7fa6afd0d15babafb 100755 --- a/src/com/android/contacts/vcard/ExportProcessor.java +++ b/src/com/android/contacts/vcard/ExportProcessor.java @@ -15,25 +15,29 @@ */ package com.android.contacts.vcard; +import static com.android.vcard.VCardConfig.VCARD_TYPE_V21_GENERIC; +import static com.android.vcard.VCardConfig.VCARD_TYPE_V30_GENERIC; +import static com.android.vcard.VCardConfig.VCARD_TYPE_V40_GENERIC; + import android.app.Notification; import android.app.NotificationManager; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.content.SharedPreferences; import android.content.res.Resources; import android.net.Uri; import android.os.Handler; import android.os.Message; +import android.preference.PreferenceManager; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.RawContactsEntity; -import android.text.TextUtils; import android.util.Log; import android.widget.Toast; import com.android.contacts.R; import com.android.contactsbind.FeedbackHelper; import com.android.vcard.VCardComposer; -import com.android.vcard.VCardConfig; import java.io.BufferedWriter; import java.io.FileNotFoundException; @@ -41,6 +45,8 @@ import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; +import java.util.HashMap; +import java.util.Map; /** * Class for processing one export request from a user. Dropped after exporting requested Uri(s). @@ -50,6 +56,11 @@ public class ExportProcessor extends ProcessorBase { private static final String LOG_TAG = "VCardExport"; private static final boolean DEBUG = VCardService.DEBUG; + private static final String KEY_EXPORT_TYPE = "exportToVcfType"; + private static final String VCARD_TYPE_V21_GENERIC_STR = "v21_generic"; + private static final String VCARD_TYPE_V30_GENERIC_STR = "v30_generic"; + private static final String VCARD_TYPE_V40_GENERIC_STR = "v40_generic"; + private final VCardService mService; private final ContentResolver mResolver; private final NotificationManager mNotificationManager; @@ -133,14 +144,16 @@ public class ExportProcessor extends ProcessorBase { return; } - final String exportType = request.exportType; - final int vcardType; - if (TextUtils.isEmpty(exportType)) { - vcardType = VCardConfig.getVCardTypeFromString( - mService.getString(R.string.config_export_vcard_type)); - } else { - vcardType = VCardConfig.getVCardTypeFromString(exportType); - } + Map sVCardTypeMap = new HashMap<>(); + sVCardTypeMap.put(VCARD_TYPE_V21_GENERIC_STR, VCARD_TYPE_V21_GENERIC); + sVCardTypeMap.put(VCARD_TYPE_V30_GENERIC_STR, VCARD_TYPE_V30_GENERIC); + sVCardTypeMap.put(VCARD_TYPE_V40_GENERIC_STR, VCARD_TYPE_V40_GENERIC); + + final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences( + mService.getApplicationContext()); + final String defVcfType = pref.getString(KEY_EXPORT_TYPE, + VCARD_TYPE_V40_GENERIC_STR); + final int vcardType = sVCardTypeMap.get(defVcfType); composer = new VCardComposer(mService, vcardType, true); diff --git a/src/com/android/contacts/vcard/ImportProcessor.java b/src/com/android/contacts/vcard/ImportProcessor.java index c6fcccb8c2c9f6e63fa3afb6474c57a544774b61..bdeb35312dd7f9e3716d595e8a2013eb6380fe4a 100644 --- a/src/com/android/contacts/vcard/ImportProcessor.java +++ b/src/com/android/contacts/vcard/ImportProcessor.java @@ -30,6 +30,7 @@ import com.android.vcard.VCardInterpreter; import com.android.vcard.VCardParser; import com.android.vcard.VCardParser_V21; import com.android.vcard.VCardParser_V30; +import com.android.vcard.VCardParser_V40; import com.android.vcard.exception.VCardException; import com.android.vcard.exception.VCardNotSupportedException; import com.android.vcard.exception.VCardVersionException; @@ -135,7 +136,8 @@ public class ImportProcessor extends ProcessorBase implements VCardEntryHandler */ possibleVCardVersions = new int[] { ImportVCardActivity.VCARD_VERSION_V21, - ImportVCardActivity.VCARD_VERSION_V30 + ImportVCardActivity.VCARD_VERSION_V30, + ImportVCardActivity.VCARD_VERSION_V40 }; } else { possibleVCardVersions = new int[] { @@ -231,9 +233,10 @@ public class ImportProcessor extends ProcessorBase implements VCardEntryHandler // In the worst case, a user may call cancel() just before creating // mVCardParser. synchronized (this) { - mVCardParser = (vcardVersion == ImportVCardActivity.VCARD_VERSION_V30 ? - new VCardParser_V30(vcardType) : - new VCardParser_V21(vcardType)); + VCardParser useOldVcardParser = (vcardVersion == ImportVCardActivity.VCARD_VERSION_V30 ? + new VCardParser_V30(vcardType) : new VCardParser_V21(vcardType)); + mVCardParser = (vcardVersion == ImportVCardActivity.VCARD_VERSION_V40 ? + new VCardParser_V40(vcardType) : useOldVcardParser); if (isCancelled()) { Log.i(LOG_TAG, "ImportProcessor already recieves cancel request, so " + "send cancel request to vCard parser too."); diff --git a/src/com/android/contacts/vcard/ImportVCardActivity.java b/src/com/android/contacts/vcard/ImportVCardActivity.java index 38367c40f9b55a0118c140665cb375931745b2da..d89f1fdcd5f5d96e9c8fd7d68f91ba11cf63d356 100644 --- a/src/com/android/contacts/vcard/ImportVCardActivity.java +++ b/src/com/android/contacts/vcard/ImportVCardActivity.java @@ -49,6 +49,7 @@ import com.android.vcard.VCardEntryCounter; import com.android.vcard.VCardParser; import com.android.vcard.VCardParser_V21; import com.android.vcard.VCardParser_V30; +import com.android.vcard.VCardParser_V40; import com.android.vcard.VCardSourceDetector; import com.android.vcard.exception.VCardException; import com.android.vcard.exception.VCardNestedException; @@ -83,6 +84,7 @@ public class ImportVCardActivity extends Activity implements ImportVCardDialogFr /* package */ final static int VCARD_VERSION_AUTO_DETECT = 0; /* package */ final static int VCARD_VERSION_V21 = 1; /* package */ final static int VCARD_VERSION_V30 = 2; + /* package */ final static int VCARD_VERSION_V40 = 3; private static final int REQUEST_OPEN_DOCUMENT = 100; @@ -321,6 +323,7 @@ public class ImportVCardActivity extends Activity implements ImportVCardDialogFr int vcardVersion = VCARD_VERSION_V21; try { boolean shouldUseV30 = false; + boolean shouldUseV40 = false; InputStream is; if (data != null) { is = new ByteArrayInputStream(data); @@ -354,7 +357,28 @@ public class ImportVCardActivity extends Activity implements ImportVCardDialogFr mVCardParser.addInterpreter(detector); mVCardParser.parse(is); } catch (VCardVersionException e2) { - throw new VCardException("vCard with unspported version."); + try { + is.close(); + } catch (IOException e) { + + } + + shouldUseV40 = true; + if (data != null) { + is = new ByteArrayInputStream(data); + } else { + is = resolver.openInputStream(localDataUri); + } + mVCardParser = new VCardParser_V40(); + try { + counter = new VCardEntryCounter(); + detector = new VCardSourceDetector(); + mVCardParser.addInterpreter(counter); + mVCardParser.addInterpreter(detector); + mVCardParser.parse(is); + } catch (VCardVersionException e3) { + throw new VCardException("vCard with unspported version."); + } } } finally { if (is != null) { @@ -365,7 +389,8 @@ public class ImportVCardActivity extends Activity implements ImportVCardDialogFr } } - vcardVersion = shouldUseV30 ? VCARD_VERSION_V30 : VCARD_VERSION_V21; + int useOldvcardVersion = shouldUseV30 ? VCARD_VERSION_V30 : VCARD_VERSION_V21; + vcardVersion = shouldUseV40 ? VCARD_VERSION_V40 : useOldvcardVersion; } catch (VCardNestedException e) { Log.w(LOG_TAG, "Nested Exception is found (it may be false-positive)."); // Go through without throwing the Exception, as we may be able to detect the