From 95c8324f129263680b77ab0f26cd02c6d3e359e6 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sun, 27 Sep 2026 04:03:16 +0200 Subject: [PATCH] fix: let contacts apps edit contacts of the bulwark account #34 AOSP Contacts, and the apps built on its account-type parser, check the EditSchema in `xml/contacts.xml` and drop the whole account type when it breaks one of their rules: every data kind with a type column needs `` children, the other kinds must have none, and name, photo, nickname, organization, note and group membership need maxOccurs="1". The schema from ed2525e listed phone, email, postal, event and relationship without types, so the editors would not have offered the Bulwark account at all. The kinds now list the types device sync maps to JSContact, and the rules are written down in the file so the next edit keeps them. Checked on the API 32 emulator (AOSP Contacts): with a Bulwark account present, "Create new contact" offers it and opens the editor saving to it. --- android/app/src/main/res/xml/contacts.xml | 64 +++++++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/res/xml/contacts.xml b/android/app/src/main/res/xml/contacts.xml index d6247191..1aff029f 100644 --- a/android/app/src/main/res/xml/contacts.xml +++ b/android/app/src/main/res/xml/contacts.xml @@ -3,6 +3,13 @@ How Contacts apps show and edit contacts of the Bulwark account (#34). The EditSchema lists exactly the data kinds device sync maps to JSContact (docs/device-sync.md, "Contacts mapping"); apps offer nothing else. + + AOSP Contacts drops the whole account type when this schema breaks its rules + (BaseAccountType): every kind with a type column needs children and + the others must have none, name needs maxOccurs="1" and every supports* + attribute true (supportsDisplayName for older releases), and photo, + nickname, organization, note and group_membership need maxOccurs="1". + A Type's maxOccurs limits that type only; birthday gets none unless given. --> @@ -15,14 +22,61 @@ supportsPhoneticMiddleName="true" supportsPhoneticGivenName="true" /> - - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + +