Package com.aurelienpierre.sioul
Class DndContacts
java.lang.Object
com.aurelienpierre.sioul.DndContacts
The people who may reach you during do-not-disturb, as this phone's
contacts have them (crates/sioul-app/src/everywhere.rs): Android lets only
starred contacts through a mode, so Sioul says who on the list is not
starred here, and opens their contact for you to star it. Reading only
(READ_CONTACTS): Sioul never writes a star nor a contact; "Add to
contacts" opens the Contacts app's own form, filled, which you save.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static booleanadd(Context context, JSONObject person) The Contacts app's form for a new contact, filled: {name, phones, emails}.(package private) static boolean(package private) static booleanA contact opened in the Contacts app, where its star is.(package private) static JSONObjectstars(Context context, JSONObject asked) {people: [{id, phones}]} → {permission, people: [{id, state, contact}]}: "starred" when a contact with one of their numbers is starred, "not-starred" when one has a number but none is starred (its address to open), "unknown" when no contact has their numbers.
-
Constructor Details
-
DndContacts
private DndContacts()
-
-
Method Details
-
allowed
-
stars
{people: [{id, phones}]} → {permission, people: [{id, state, contact}]}: "starred" when a contact with one of their numbers is starred, "not-starred" when one has a number but none is starred (its address to open), "unknown" when no contact has their numbers.- Throws:
JSONException
-
open
A contact opened in the Contacts app, where its star is. -
add
The Contacts app's form for a new contact, filled: {name, phones, emails}. Saved by you, or not.
-