diff --git a/Android.bp b/Android.bp
index 36923ab74fc494719c1d5ebeab490de1505af003..617d9cdc7910478fc756474ddc5d52e7c6651f96 100644
--- a/Android.bp
+++ b/Android.bp
@@ -44,6 +44,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/ic_launcher_background.png b/res/drawable-hdpi/ic_launcher_background.png
new file mode 100644
index 0000000000000000000000000000000000000000..239ffd7b7d30db42c447552e08274c33fd54e738
Binary files /dev/null and b/res/drawable-hdpi/ic_launcher_background.png differ
diff --git a/res/drawable-hdpi/ic_launcher_foreground.png b/res/drawable-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..239ffd7b7d30db42c447552e08274c33fd54e738
Binary files /dev/null and b/res/drawable-hdpi/ic_launcher_foreground.png differ
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/ic_launcher_background.png b/res/drawable-mdpi/ic_launcher_background.png
new file mode 100644
index 0000000000000000000000000000000000000000..65cb629deefefbce402cc6d8c040dc2eddd5802e
Binary files /dev/null and b/res/drawable-mdpi/ic_launcher_background.png differ
diff --git a/res/drawable-mdpi/ic_launcher_foreground.png b/res/drawable-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..42874a238179ce72e1c7258ef09d1420c527e238
Binary files /dev/null and b/res/drawable-mdpi/ic_launcher_foreground.png differ
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/ic_launcher_background.png b/res/drawable-xhdpi/ic_launcher_background.png
new file mode 100644
index 0000000000000000000000000000000000000000..d838054772d607aad73b6c5dc275f9ef7e65ea9d
Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher_background.png differ
diff --git a/res/drawable-xhdpi/ic_launcher_foreground.png b/res/drawable-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..50491f94231a7cdb9a7be0e86e58df57d30519bb
Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher_foreground.png differ
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/ic_launcher_background.png b/res/drawable-xxhdpi/ic_launcher_background.png
new file mode 100644
index 0000000000000000000000000000000000000000..cea07e4079c23a77303aa5c510b7856436b1e6b0
Binary files /dev/null and b/res/drawable-xxhdpi/ic_launcher_background.png differ
diff --git a/res/drawable-xxhdpi/ic_launcher_foreground.png b/res/drawable-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..cea07e4079c23a77303aa5c510b7856436b1e6b0
Binary files /dev/null and b/res/drawable-xxhdpi/ic_launcher_foreground.png differ
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/ic_launcher_background.png b/res/drawable-xxxhdpi/ic_launcher_background.png
new file mode 100644
index 0000000000000000000000000000000000000000..76adc8615d51c03f89fb044399d15b18a031c755
Binary files /dev/null and b/res/drawable-xxxhdpi/ic_launcher_background.png differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_foreground.png b/res/drawable-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..76adc8615d51c03f89fb044399d15b18a031c755
Binary files /dev/null and b/res/drawable-xxxhdpi/ic_launcher_foreground.png differ
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/dialog_background.xml b/res/drawable/dialog_background.xml
index 119b08b5d58c517478c2c8c6eeeb7eac7ce2c222..b974abcf371b98ab860a5d70dc90af7f8b134dea 100644
--- a/res/drawable/dialog_background.xml
+++ b/res/drawable/dialog_background.xml
@@ -17,6 +17,6 @@
-->
-
+
diff --git a/res/drawable/ic_launcher_background.xml b/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index fc4823054e0e3af053a38aecf3b95f595ab454d3..0000000000000000000000000000000000000000
--- a/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
diff --git a/res/drawable/ic_launcher_foreground.xml b/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 686ffa2b53b156a4f10f9ff3c8e061b36ebf17df..0000000000000000000000000000000000000000
--- a/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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/contact_editor_activity.xml b/res/layout/contact_editor_activity.xml
index 5843a58cddd8aff568636d4894cdf7252dae8c4c..e7eb9c91c8ec7cccecec52b92ed22a43427422a5 100644
--- a/res/layout/contact_editor_activity.xml
+++ b/res/layout/contact_editor_activity.xml
@@ -27,7 +27,7 @@
style="@style/EditorActionBarStyle"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
- android:background="?android:attr/colorPrimary"
+ android:background="@color/actionbar_background_color"
android:elevation="4dp"
app:navigationContentDescription="@string/cancel_button_content_description"
app:navigationIcon="@drawable/quantum_ic_close_vd_theme_24"
diff --git a/res/layout/contact_editor_fields.xml b/res/layout/contact_editor_fields.xml
index dd4e49982b5080608f41b222aebc18e4b85a3816..79d028c763bc64b3b70a022602e04cb4d451c68d 100644
--- a/res/layout/contact_editor_fields.xml
+++ b/res/layout/contact_editor_fields.xml
@@ -43,7 +43,7 @@
android:gravity="center_vertical"
android:text="@string/editor_more_fields"
android:textAlignment="viewStart"
- android:textColor="?android:attr/colorAccent"
+ android:textColor="@color/e_primary_text_color"
android:textSize="@dimen/expanding_entry_card_title_text_size"/>
diff --git a/res/layout/dialog_title.xml b/res/layout/dialog_title.xml
index 45f5f736769e60c7b92c7cc540fb9da390f1d4a1..63fcf0b23270121d92fd4d3fe7c9d17cef52def4 100644
--- a/res/layout/dialog_title.xml
+++ b/res/layout/dialog_title.xml
@@ -22,7 +22,7 @@
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textSize="20sp"
- android:textColor="@color/contacts_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:textAlignment="viewStart"
android:fontFamily="sans-serif-medium"
android:ellipsize="end"
diff --git a/res/layout/expanding_entry_card_item.xml b/res/layout/expanding_entry_card_item.xml
index dbbeee5fa4a703e119844f2977db4ffb468c2aaa..c044428d57168df7c0123fbc4128da3e20f0022f 100644
--- a/res/layout/expanding_entry_card_item.xml
+++ b/res/layout/expanding_entry_card_item.xml
@@ -67,24 +67,29 @@
android:layout_marginEnd="@dimen/expanding_entry_card_item_sub_header_icon_margin_right"
android:layout_marginBottom="@dimen/expanding_entry_card_item_sub_header_icon_margin_bottom" />
-
-
-
+ android:orientation="horizontal"
+ android:gravity="center"
+ >
+
+
+
+
+
+
+ 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..56997834a190049c28519917ec39da2e220e0d01 100644
--- a/res/mipmap-anydpi/ic_launcher.xml
+++ b/res/mipmap-anydpi/ic_launcher.xml
@@ -1,10 +1,21 @@
+ ~ Copyright (C) 2024 Murena SAS
+ ~
+ ~ 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/e_strings.xml b/res/values-de/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6bf4239408ed3cca11a08b86c9dd8a637293036a
--- /dev/null
+++ b/res/values-de/e_strings.xml
@@ -0,0 +1,24 @@
+
+
+ Exportiere vCard-Version
+ Kontakte ist eine Abänderung von LineageOS Kontakte
+ Quellcode
+ Information über Kontakte
+ Autoren
+ Lizenz
+ Kontakte ist eine quelloffene App für Android
+
\ No newline at end of file
diff --git a/res/values-fr/e_strings.xml b/res/values-fr/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..92cc2b1fd3580b78daece6cc988d26839fda43b6
--- /dev/null
+++ b/res/values-fr/e_strings.xml
@@ -0,0 +1,19 @@
+
+
+
+ Version d\'export de la vCard
+
\ No newline at end of file
diff --git a/res/values-is/e_strings.xml b/res/values-is/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..76fbe8cec557a788e22ce33ad038484398ce4098
--- /dev/null
+++ b/res/values-is/e_strings.xml
@@ -0,0 +1,24 @@
+
+
+ Flytja út vCard útgáfu
+ Grunnkóði
+ Notkunarleyfi
+ Contacts er tengiliðaforrit með opnum grunnkóða fyrir Android
+ Contacts tengiliðaforritið er kvíslað frá LineageOS Contacts
+ Höfundar
+ Upplýsingar um tengiliði
+
\ No newline at end of file
diff --git a/res/values-it/e_strings.xml b/res/values-it/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a0ca73d9902d80d62b1a381de7c83fe143ec5b23
--- /dev/null
+++ b/res/values-it/e_strings.xml
@@ -0,0 +1,24 @@
+
+
+ Esporta in formato vCard
+ Autori
+ Codice sorgente
+ Licenza
+ Info su Contatti
+ Contatti è una App open source per Android
+ Contatti è un fork di LineageOS Contacts
+
\ No newline at end of file
diff --git a/res/values-ja/e_strings.xml b/res/values-ja/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..282ec11e97ed0fbd279c3e4c2b89903b85767a81
--- /dev/null
+++ b/res/values-ja/e_strings.xml
@@ -0,0 +1,10 @@
+
+
+ 作者
+ ソースコード
+ ライセンス
+ 連絡先情報
+ vCardバージョンをエクスポート
+ ContactsはLineageOS Contactsのフォークです
+ Contactsはアンドロイド用のオープンソースのアプリケーションです
+
\ No newline at end of file
diff --git a/res/values-nb-rNO/e_strings.xml b/res/values-nb-rNO/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ad05d0075ad92c8091ec60e204be04a6e130ab1e
--- /dev/null
+++ b/res/values-nb-rNO/e_strings.xml
@@ -0,0 +1,10 @@
+
+
+ Kontakter er en videreutvikling av LineageOS Contacts
+ Utviklere
+ Kildekode
+ Lisens
+ Informasjon om Kontakter
+ Kontakter er en åpen kildekode-applikasjon for Android
+ Eksporter vCard-versjon
+
\ No newline at end of file
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index fc5bb301708cd0bc5668f3dc6753419ef60ff50e..a242b5e9c2bd4997502dc0dbca83e46ed75c21fd 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -5,14 +5,8 @@
-->
- @*android:color/system_neutral1_900
+ @color/background_primary
#dadada
-
-
- @*android:color/system_neutral1_900
- @*android:color/system_neutral1_900
-
- @android:color/system_accent1_100
diff --git a/res/values-nl/e_strings.xml b/res/values-nl/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5c0f88da5e5e30efce2ac97d75d220b7fedd4edd
--- /dev/null
+++ b/res/values-nl/e_strings.xml
@@ -0,0 +1,24 @@
+
+
+ Exporteer vCard versie
+ Contacten is gebaseerd op LineageOS Contacts
+ Broncode
+ Informatie over Contacten
+ Auteurs
+ Licentie
+ Contacten is een open source app voor Android
+
\ No newline at end of file
diff --git a/res/values-ru/e_strings.xml b/res/values-ru/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d1e7b3f4ffd4a0ae05e5fd7e4f6c29dbf81fe046
--- /dev/null
+++ b/res/values-ru/e_strings.xml
@@ -0,0 +1,19 @@
+
+
+
+ Экспорт vCard версии
+
\ No newline at end of file
diff --git a/res/values-sv/e_strings.xml b/res/values-sv/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2ff1d99d3813e91285f05d5789ad34198897a390
--- /dev/null
+++ b/res/values-sv/e_strings.xml
@@ -0,0 +1,24 @@
+
+
+ Exportera vCard-version
+ Kontakter är avgrenad från LineageOS Kontakter
+ Upphovsmän
+ Källkod
+ Licens
+ Information om Kontakter
+ Kontakter är en app med öppen källkod för Android
+
\ No newline at end of file
diff --git a/res/values-uk/e_strings.xml b/res/values-uk/e_strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..71e42678b174026855bdbf2e33c296b8da05e0c1
--- /dev/null
+++ b/res/values-uk/e_strings.xml
@@ -0,0 +1,10 @@
+
+
+ Застосунок створений на основі LineageOS Contacts
+ Вихідний код
+ Автори
+ Ліцензія
+ Контактні дані
+ Експорт vCard версії
+ Контакти - це додаток з відкритим кодом для Android
+
\ No newline at end of file
diff --git a/res/values-v27/styles.xml b/res/values-v27/styles.xml
index 3702fb20920629f8e9bb8c09dd3e07ffb9258638..cc9ffdd8f1d70fd598feff2159f03fd80e3b90db 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
@@ -50,10 +50,11 @@
- @style/PopupMenuStyle
- @color/navigation_bar_bg
- - true
+ - @bool/isLight
+ - @bool/isLight
-
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 429695ec7da25a14918373576489fe75da496e61..72907edddf6a9c797ce6753c7067c9b87e080dbd 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,40 +17,40 @@
#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
@*android:color/system_accent1_600
#0f000000
- #FFFFFF
+ @color/e_primary_text_color
- @color/primary_color
+ @color/e_action_bar
- #f6f6f6
+ @color/e_action_bar
- #bababa
+ @color/e_action_bar
- @*android:color/system_accent1_700
- @*android:color/system_accent1_600
+ @color/e_action_bar
+ @color/e_accent
- @*android:color/system_neutral1_900
- @*android:color/system_neutral1_800
+ @color/e_action_bar
+ @color/e_action_bar
@*android:color/system_neutral1_0
- @color/contacts_accent_color
- @android:color/system_accent1_600
+ @color/e_background
+ @color/e_accent
@*android:color/transparent
@@ -62,7 +62,7 @@
#ffffff
- #f4f4f4
+ @color/e_background
#2aad6f
#ff2e58
@@ -74,7 +74,7 @@
#7f7f7f
- #40000000
+ @color/e_disabled_color
#40000000
@@ -86,18 +86,18 @@
#4D000000
- #efefef
+ @color/e_background
#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
@*android:color/system_neutral1_800
@@ -112,7 +112,7 @@
#333333
- #737373
+ @color/e_secondary_text_color
#7f000000
@@ -127,35 +127,35 @@
These colors are also used by MaterialColorMapUtils to generate primary activity colors.
-->
- - @*android:color/system_accent1_300
- - @*android:color/system_accent2_300
- - @*android:color/system_accent3_300
- - @*android:color/system_accent1_400
- - @*android:color/system_accent2_400
- - @*android:color/system_accent3_400
- - @*android:color/system_accent1_500
- - @*android:color/system_accent2_500
- - @*android:color/system_accent3_500
- - @*android:color/system_accent1_600
- - @*android:color/system_accent2_600
- - @*android:color/system_accent3_600
+ - #0F94F6
+ - #00B4B4
+ - #008D96
+ - #44B04C
+ - #AFD83D
+ - #FFED21
+ - #FFC300
+ - #FF7A00
+ - #F8432E
+ - #ED1C61
+ - #ED1C61
+ - #5754DC
- - @*android:color/system_accent1_500
- - @*android:color/system_accent2_500
- - @*android:color/system_accent3_500
- - @*android:color/system_accent1_600
- - @*android:color/system_accent2_600
- - @*android:color/system_accent3_600
- - @*android:color/system_accent1_700
- - @*android:color/system_accent2_700
- - @*android:color/system_accent3_700
- - @*android:color/system_accent1_800
- - @*android:color/system_accent2_800
- - @*android:color/system_accent3_800
+ - #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
- @*android:color/system_neutral1_50
- @*android:color/system_neutral1_0
+ @color/e_background
+ @color/e_background
#d1041c
@@ -224,7 +224,7 @@
@color/actionbar_text_color_black
#dbdbdb
- @color/primary_color
+ @color/e_accent
#333333
@@ -236,13 +236,13 @@
#e0e0e0
- #E5E5E5
+ @android:color/transparent
- #FAFAFA
+ @color/e_drawer_background
- #E8E8E8
+ @color/navigation_drawer_item_background
#1A000000
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9bd8bbe2b901b65990977ef6c2320056b414aa0d..25841b3899cd46095cbbe3359eecaf5b859db545 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -143,7 +143,7 @@
20dp
8dp
13dp
- 16dp
+ 13dp
27dp
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..f5ffa90eb6c708e1cd784a057eb8a49cdf46cd07
--- /dev/null
+++ b/res/values/e_strings.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ Contacts is forked from LineageOS Contacts
+
+
+ Authors
+
+
+ Source code
+
+
+ Licence
+
+
+ Contacts information
+ Contacts is an open source App for Android
+
+
+ Export vCard version
+ VCF 2.1
+ VCF 3.0
+ VCF 4.0
+ v21_generic
+ v30_generic
+ v40_generic
+
diff --git a/res/values/lineage_colors.xml b/res/values/lineage_colors.xml
index fdac8e53dc982b626448f180be53e549f8d591d9..8a1a4964f0da95d5cc3672dfd47a507727ce83b2 100644
--- a/res/values/lineage_colors.xml
+++ b/res/values/lineage_colors.xml
@@ -15,5 +15,5 @@
limitations under the License.
-->
- @android:color/white
+ @color/e_action_bar
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d31ce80da46e2ec7e3ee40e375ad536fc8dca232..affe6fcb0b4e205b3bd5ccd282cbb8edb96865df 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -92,7 +92,7 @@
@@ -388,8 +391,7 @@
@@ -455,6 +457,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/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/AccountTypeManager.java b/src/com/android/contacts/model/AccountTypeManager.java
index 253097bac892724b1e4b9fbd4ccc868e7ba0cb4b..7cb86572021fc5b10ad9c782ef710ca4b94a3379 100644
--- a/src/com/android/contacts/model/AccountTypeManager.java
+++ b/src/com/android/contacts/model/AccountTypeManager.java
@@ -597,12 +597,29 @@ class AccountTypeManagerImpl extends AccountTypeManager
result.add(
typeProvider.getTypeForAccount(account).wrapAccount(mContext, account));
}
+
+ filterDuplicateAccounts(result);
+
AccountInfo.sortAccounts(null, result);
return result;
}
}, MoreExecutors.directExecutor());
}
+ private void filterDuplicateAccounts(List accountList) {
+ final List uniqueList = new ArrayList<>();
+
+ for (AccountInfo resultInfo: accountList) {
+ final boolean isPresent = uniqueList.stream().anyMatch(resultInfo::sameAccount);
+ if (!isPresent) {
+ uniqueList.add(resultInfo);
+ }
+ }
+
+ accountList.clear();
+ accountList.addAll(uniqueList);
+ }
+
@Override
public ListenableFuture> filterAccountsAsync(
final Predicate filter) {
diff --git a/src/com/android/contacts/model/GroupMembershipTools.java b/src/com/android/contacts/model/GroupMembershipTools.java
new file mode 100644
index 0000000000000000000000000000000000000000..5d506b31c6e4de8cc78883861ec7d256245a0886
--- /dev/null
+++ b/src/com/android/contacts/model/GroupMembershipTools.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2019-2023 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 .
+ */
+
+package com.android.contacts.model;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.ContactsContract;
+
+public class GroupMembershipTools {
+
+ public boolean isTypeGroupMembership(String mimeType) {
+ return ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType);
+ }
+
+ public String getGroupTitle(Context context, long groupId) {
+ final Uri groupUri = ContactsContract.Groups.CONTENT_URI;
+
+ final String[] projection = new String[]{
+ ContactsContract.Groups._ID,
+ ContactsContract.Groups.TITLE,
+ };
+ final String selection = ContactsContract.Groups.AUTO_ADD + " = ? AND " + ContactsContract.Groups.FAVORITES + " = ?";
+ final String[] selectionArgs = new String[]{"0", "0"};
+
+ try {
+ Cursor groupCursor = context.getContentResolver().query(groupUri, projection, selection, selectionArgs, null, null);
+ if (groupCursor.moveToFirst()) {
+ do {
+ final int groupIdColumnIndex = groupCursor.getColumnIndex(ContactsContract.Groups._ID);
+ final int groupTitleColumnIndex = groupCursor.getColumnIndex(ContactsContract.Groups.TITLE);
+ if (groupIdColumnIndex == -1 || groupTitleColumnIndex == -1) {
+ groupCursor.close();
+ return null;
+ }
+ final long id = groupCursor.getLong(groupIdColumnIndex);
+ final String title = groupCursor.getString(groupTitleColumnIndex);
+ if (groupId == id) {
+ groupCursor.close();
+ return title;
+ }
+ } while (groupCursor.moveToNext());
+ }
+ groupCursor.close();
+ return null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+}
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/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
index d462a0ee04a0cdf8128745abb8703cfb1b54b242..5ed14d8862541273b1bc5051cf0ca46e87447e60 100644
--- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
+++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
@@ -24,6 +24,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.ColorFilter;
+import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -617,6 +618,18 @@ public class ExpandingEntryCardView extends CardView {
thirdIcon.mutate();
thirdIcon.setColorFilter(mThemeColorFilter);
}
+ Drawable textIcon = entry.getTextIcon();
+ if (textIcon != null) {
+ textIcon.mutate();
+ if (entry.shouldApplyColor()) {
+ textIcon.setColorFilter(mThemeColorFilter);
+ } else {
+ final int textColor =
+ getResources().getColor(R.color.quickcontact_entry_sub_header_text_color);
+ textIcon.setColorFilter(textColor, PorterDuff.Mode.SRC_ATOP);
+ }
+ textIcon.setAlpha(200);
+ }
}
}
}
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index bff805c64904aa513dd22ee1bacdabfb0f2ccbfe..172481c72437da2cb2460894b1ffbf9c2351416e 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -109,6 +109,7 @@ import com.android.contacts.ShortcutIntentBuilder;
import com.android.contacts.ShortcutIntentBuilder.OnShortcutIntentCreatedListener;
import com.android.contacts.activities.ContactEditorActivity;
import com.android.contacts.activities.ContactSelectionActivity;
+import com.android.contacts.activities.PeopleActivity;
import com.android.contacts.activities.RequestPermissionsActivity;
import com.android.contacts.compat.CompatUtils;
import com.android.contacts.compat.EventCompat;
@@ -131,6 +132,7 @@ import com.android.contacts.logging.ScreenEvent.ScreenType;
import com.android.contacts.model.AccountTypeManager;
import com.android.contacts.model.Contact;
import com.android.contacts.model.ContactLoader;
+import com.android.contacts.model.GroupMembershipTools;
import com.android.contacts.model.RawContact;
import com.android.contacts.model.account.AccountType;
import com.android.contacts.model.dataitem.CustomDataItem;
@@ -138,6 +140,7 @@ import com.android.contacts.model.dataitem.DataItem;
import com.android.contacts.model.dataitem.DataKind;
import com.android.contacts.model.dataitem.EmailDataItem;
import com.android.contacts.model.dataitem.EventDataItem;
+import com.android.contacts.model.dataitem.GroupMembershipDataItem;
import com.android.contacts.model.dataitem.ImDataItem;
import com.android.contacts.model.dataitem.NicknameDataItem;
import com.android.contacts.model.dataitem.NoteDataItem;
@@ -281,6 +284,7 @@ public class QuickContactActivity extends ContactsActivity {
private QuickContactImageView mPhotoView;
private ExpandingEntryCardView mContactCard;
+ private ExpandingEntryCardView mLabelsCard;
private ExpandingEntryCardView mNoContactDetailsCard;
private ExpandingEntryCardView mAboutCard;
@@ -337,7 +341,6 @@ public class QuickContactActivity extends ContactsActivity {
Event.CONTENT_ITEM_TYPE,
Relation.CONTENT_ITEM_TYPE,
Im.CONTENT_ITEM_TYPE,
- GroupMembership.CONTENT_ITEM_TYPE,
Identity.CONTENT_ITEM_TYPE,
CustomDataItem.MIMETYPE_CUSTOM_FIELD,
Note.CONTENT_ITEM_TYPE);
@@ -354,6 +357,8 @@ public class QuickContactActivity extends ContactsActivity {
private static final String FRAGMENT_TAG_SELECT_ACCOUNT = "select_account_fragment";
+ private static final GroupMembershipTools groupMembershipTools = new GroupMembershipTools();
+
final OnClickListener mEntryClickHandler = new OnClickListener() {
@Override
public void onClick(View v) {
@@ -700,6 +705,7 @@ public class QuickContactActivity extends ContactsActivity {
mScroller = (MultiShrinkScroller) findViewById(R.id.multiscroller);
mContactCard = (ExpandingEntryCardView) findViewById(R.id.communication_card);
+ mLabelsCard = (ExpandingEntryCardView) findViewById(R.id.labels_card);
mNoContactDetailsCard = (ExpandingEntryCardView) findViewById(R.id.no_contact_data_card);
mAboutCard = (ExpandingEntryCardView) findViewById(R.id.about_card);
@@ -710,6 +716,9 @@ public class QuickContactActivity extends ContactsActivity {
mAboutCard.setOnClickListener(mEntryClickHandler);
mAboutCard.setOnCreateContextMenuListener(mEntryContextMenuListener);
+ mLabelsCard.setOnClickListener(mEntryClickHandler);
+ mLabelsCard.setOnCreateContextMenuListener(mEntryContextMenuListener);
+
mPhotoView = (QuickContactImageView) findViewById(R.id.photo);
final View transparentView = findViewById(R.id.transparent_view);
if (mScroller != null) {
@@ -1029,6 +1038,7 @@ public class QuickContactActivity extends ContactsActivity {
mOnlyOneEmail = emailDataItems != null && emailDataItems.size() == 1;
populateContactAndAboutCard(cp2DataCardModel, /* shouldAddPhoneticName */ true);
+ populateLabelsCard(mCachedCp2DataCardModel);
}
private void showActivity() {
@@ -1069,6 +1079,7 @@ public class QuickContactActivity extends ContactsActivity {
if (mHasIntentLaunched) {
mHasIntentLaunched = false;
populateContactAndAboutCard(mCachedCp2DataCardModel, /* shouldAddPhoneticName */ false);
+ populateLabelsCard(mCachedCp2DataCardModel);
}
maybeShowProgressDialog();
@@ -1180,6 +1191,31 @@ public class QuickContactActivity extends ContactsActivity {
Trace.endSection();
}
+ private void populateLabelsCard(Cp2DataCardModel cp2DataCardModel) {
+ mCachedCp2DataCardModel = cp2DataCardModel;
+ if (mHasIntentLaunched || cp2DataCardModel == null) {
+ return;
+ }
+
+ final List> labelEntries = cp2DataCardModel.labelEntries;
+ final String cardTitle = getString(R.string.groupsLabel);
+
+ mLabelsCard.setTitle(cardTitle);
+ mLabelsCard.initialize(labelEntries,
+ /* numInitialVisibleEntries = */ 1,
+ /* isExpanded = */ true,
+ /* isAlwaysExpanded = */ true,
+ mExpandingEntryCardViewListener,
+ mScroller);
+
+ if (labelEntries.size() > 0) {
+ mLabelsCard.setVisibility(View.VISIBLE);
+ return;
+ }
+
+ mLabelsCard.setVisibility(View.GONE);
+ }
+
/**
* Create a card that shows "Add email" and "Add phone number" entries in grey.
* When contact is a SIM contact, only shows "Add phone number".
@@ -1272,7 +1308,7 @@ public class QuickContactActivity extends ContactsActivity {
dataItem.setDataKind(dataKind);
final boolean hasData = !TextUtils.isEmpty(dataItem.buildDataString(this,
- dataKind));
+ dataKind)) || groupMembershipTools.isTypeGroupMembership(mimeType);
if (isMimeExcluded(mimeType) || !hasData) continue;
} else if (!tachyonEnabled) {
@@ -1300,8 +1336,17 @@ public class QuickContactActivity extends ContactsActivity {
*/
final List> dataItemsList = new ArrayList<>();
for (List mimeTypeDataItems : dataItemsMap.values()) {
- // Remove duplicate data items
- Collapser.collapseList(mimeTypeDataItems, this);
+ if (mimeTypeDataItems.isEmpty()) {
+ continue;
+ }
+
+ String mimeType = mimeTypeDataItems.get(0).getMimeType();
+
+ if (!groupMembershipTools.isTypeGroupMembership(mimeType)) {
+ // Remove duplicate data items
+ Collapser.collapseList(mimeTypeDataItems, this);
+ }
+
// Sort within mimetype
Collections.sort(mimeTypeDataItems, mWithinMimeTypeDataItemComparator);
// Add to the list of data item lists
@@ -1318,6 +1363,7 @@ public class QuickContactActivity extends ContactsActivity {
final List> contactCardEntries = new ArrayList<>();
final List> aboutCardEntries = buildAboutCardEntries(dataItemsMap);
+ final List> labelCardEntries = new ArrayList<>();
final MutableString aboutCardName = new MutableString();
for (int i = 0; i < dataItemsList.size(); ++i) {
@@ -1326,6 +1372,12 @@ public class QuickContactActivity extends ContactsActivity {
if (SORTED_ABOUT_CARD_MIMETYPES.contains(topDataItem.getMimeType())) {
// About card mimetypes are built in buildAboutCardEntries, skip here
continue;
+ } else if (groupMembershipTools.isTypeGroupMembership(topDataItem.getMimeType())) {
+ List labelEntries = dataItemsToEntries(dataItemsByMimeType,
+ aboutCardName);
+ if (labelEntries.size() > 0) {
+ labelCardEntries.add(labelEntries);
+ }
} else {
List contactEntries = dataItemsToEntries(dataItemsList.get(i),
aboutCardName);
@@ -1341,6 +1393,7 @@ public class QuickContactActivity extends ContactsActivity {
dataModel.customAboutCardName = aboutCardName.value;
dataModel.aboutCardEntries = aboutCardEntries;
dataModel.contactCardEntries = contactCardEntries;
+ dataModel.labelEntries = labelCardEntries;
dataModel.dataItemsMap = dataItemsMap;
dataModel.areAllRawContactsSimAccounts = data.areAllRawContactsSimAccounts(this);
return dataModel;
@@ -1380,6 +1433,7 @@ public class QuickContactActivity extends ContactsActivity {
public Map> dataItemsMap;
public List> aboutCardEntries;
public List> contactCardEntries;
+ public List> labelEntries;
public String customAboutCardName;
public boolean areAllRawContactsSimAccounts;
}
@@ -1678,7 +1732,7 @@ public class QuickContactActivity extends ContactsActivity {
}
primaryContentDescription.append(header);
alternateIntent =
- StructuredPostalUtils.getViewPostalAddressDirectionsIntent(postalAddress);
+ StructuredPostalUtils.getViewPostalAddressIntent(postalAddress);
alternateIntent.putExtra(EXTRA_ACTION_TYPE, ActionType.DIRECTIONS);
alternateIcon = context.getDrawable(R.drawable.quantum_ic_directions_vd_theme_24);
alternateContentDescription.append(res.getString(
@@ -1723,6 +1777,24 @@ public class QuickContactActivity extends ContactsActivity {
aboutCardName.value = res.getString(R.string.about_card_title);
}
}
+ } else if (dataItem instanceof GroupMembershipDataItem) {
+
+ final GroupMembershipDataItem group = (GroupMembershipDataItem) dataItem;
+ String groupTitle = groupMembershipTools.getGroupTitle(context, group.getGroupRowId());
+
+ if (!TextUtils.isEmpty(groupTitle)) {
+ text = groupTitle;
+ textIcon = res.getDrawable(R.drawable.quantum_ic_label_vd_theme_24);
+
+ entryContextMenuInfo = new EntryContextMenuInfo(text,
+ res.getString(R.string.groupsLabel), dataItem.getMimeType(),
+ dataItem.getId(), dataItem.isSuperPrimary());
+
+ intent = new Intent(context, PeopleActivity.class)
+ .setAction(PeopleActivity.ACTION_OPEN_GROUP_FROM_CONTACT)
+ .putExtra(PeopleActivity.EXTRA_GROUP_ID, group.getGroupRowId());
+ }
+
} else if (CallUtil.isTachyonEnabled(context) && MIMETYPE_TACHYON.equals(
dataItem.getMimeType())) {
// Skip these actions. They will be placed by the phone number.
@@ -2064,6 +2136,7 @@ public class QuickContactActivity extends ContactsActivity {
new PorterDuffColorFilter(mColorFilterColor, PorterDuff.Mode.SRC_ATOP);
mContactCard.setColorAndFilter(mColorFilterColor, mColorFilter);
mAboutCard.setColorAndFilter(mColorFilterColor, mColorFilter);
+ mLabelsCard.setColorAndFilter(mColorFilterColor, mColorFilter);
}
private void updateStatusBarColor() {
diff --git a/src/com/android/contacts/util/AccountSelectionUtil.java b/src/com/android/contacts/util/AccountSelectionUtil.java
index 2b226d0a101b596db8f954bfa4e3bdcf4b49f9e8..4cf2a88c8545ff21c9ded63260adc7197d2d9dda 100644
--- a/src/com/android/contacts/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/util/AccountSelectionUtil.java
@@ -116,7 +116,6 @@ public class AccountSelectionUtil {
}
final TextView text1 = (TextView) convertView.findViewById(android.R.id.text1);
- final TextView text2 = (TextView) convertView.findViewById(android.R.id.text2);
final ImageView icon = (ImageView) convertView.findViewById(android.R.id.icon);
final AccountWithDataSet account = this.getItem(position);
@@ -124,10 +123,7 @@ public class AccountSelectionUtil {
account.type, account.dataSet);
final Context context = getContext();
- text1.setText(accountType.getDisplayLabel(context));
- text2.setText(account.name);
- text2.setVisibility(context.getPackageName().equals(account.type) ?
- View.GONE : View.VISIBLE);
+ text1.setText(account.name);
icon.setImageDrawable(accountType.getDisplayIcon(getContext()));
return convertView;
diff --git a/src/com/android/contacts/util/AccountsListAdapter.java b/src/com/android/contacts/util/AccountsListAdapter.java
index cc80b7985f9f551e5afb0b8e0831909004dda175..63f9935cdd5cd6f9fae2be5bab6860e0f466592e 100644
--- a/src/com/android/contacts/util/AccountsListAdapter.java
+++ b/src/com/android/contacts/util/AccountsListAdapter.java
@@ -90,13 +90,9 @@ public final class AccountsListAdapter extends BaseAdapter {
R.layout.account_selector_list_item_condensed, parent, false);
final TextView text1 = (TextView) resultView.findViewById(android.R.id.text1);
- final TextView text2 = (TextView) resultView.findViewById(android.R.id.text2);
final ImageView icon = (ImageView) resultView.findViewById(android.R.id.icon);
- text1.setText(mAccounts.get(position).getTypeLabel());
- text2.setText(mAccounts.get(position).getNameLabel());
- text2.setVisibility(mAccounts.get(position).getNameLabel().equals(
- mAccounts.get(position).getTypeLabel()) ? View.GONE : View.VISIBLE);
+ text1.setText(mAccounts.get(position).getNameLabel());
icon.setImageDrawable(mAccounts.get(position).getIcon());
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/util/StructuredPostalUtils.java b/src/com/android/contacts/util/StructuredPostalUtils.java
index 6e46176ca8986d6e7be6199a3b90aa19291223f3..59d38ea43505e2f5e77793050d87d8a871a35aa4 100644
--- a/src/com/android/contacts/util/StructuredPostalUtils.java
+++ b/src/com/android/contacts/util/StructuredPostalUtils.java
@@ -30,12 +30,4 @@ public class StructuredPostalUtils {
public static Uri getPostalAddressUri(String postalAddress) {
return Uri.parse("geo:0,0?q=" + Uri.encode(postalAddress));
}
-
- public static Intent getViewPostalAddressDirectionsIntent(String postalAddress) {
- return new Intent(Intent.ACTION_VIEW, getPostalAddressDirectionsUri(postalAddress));
- }
-
- public static Uri getPostalAddressDirectionsUri(String postalAddress) {
- return Uri.parse("https://maps.google.com/maps?daddr=" + Uri.encode(postalAddress));
- }
}
diff --git a/src/com/android/contacts/vcard/ExportProcessor.java b/src/com/android/contacts/vcard/ExportProcessor.java
index fd5134c389ebe7215a6f3a181db6ccdf1dec8401..199249e6ac37d75d5f581211e438dc886da283ff 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;
@@ -139,14 +150,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);