1.http://blog.csdn.net/jdsjlzx/article/details/43702429
2./**
* Register an observer for provider status changes - we will need to
* reflect them in the UI.
*/
private void registerObserver() {
getContentResolver().registerContentObserver(
ContactsContract.Contacts.CONTENT_URI, true, mObserver);
getContentResolver().registerContentObserver(
CallLog.Calls.CONTENT_URI, true, mObserver);
}
private void unregisterObserver() {
getContentResolver().unregisterContentObserver(mObserver);
}
private ContentObserver mObserver = new ContentObserver(new Handler()) {
@Override
public void onChange(boolean selfChange) {
isContactChanged = true;
}
};