Figured it out:
Basically what you need is:
Uri queryUri = ContactsContract.Contacts.CONTENT_URI;
This would obey the user's address book setting - if the user has disabled showing SIM contacts, the query results would automatically exclude SIM contacts.
Hope this helps someone else.