From 1e0abfe5208e24a510233f1b96b185e512cd7b09 Mon Sep 17 00:00:00 2001 From: Tingting Date: Mon, 6 Dec 2021 02:27:45 +0000 Subject: [PATCH] Update javadoc for default account API. Test: m update-api Bug: 202334972 Change-Id: Ib72021af06b35c8fbef948628efbe20bfc2cd77d --- core/java/android/provider/ContactsContract.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 5036abc66a0ba..a87ac4854eddc 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -8790,6 +8790,8 @@ public final class ContactsContract { /** * Get the account that is set as the default account for new contacts, which should be * initially selected when creating a new contact on contact management apps. + * If the setting has not been set by any app, it will return null. Once the setting + * is set to non-null Account, it can still be set to null in the future. * * @param resolver the ContentResolver to query. * @return the default account for new contacts, or null if it's not set or set to NULL @@ -8804,7 +8806,13 @@ public final class ContactsContract { /** * Sets the account as the default account that should be initially selected - * when creating a new contact on contact management apps. + * when creating a new contact on contact management apps. Apps can only set one of + * the following accounts as the default account: + *
    + *
  1. null or custom local account + *
  2. SIM account + *
  3. AccountManager accounts + *
* * @param resolver the ContentResolver to query. * @param account the account to be set to default.