@Override protected void doAddPhonebookIntoContact() { if (orm.isEnableSyncPhonebook() == false) { Message msg = handler.obtainMessage(SYNC_PHONEBOOK_ONE_ADDRESSBOOK); msg.getData().putLong("uid", phonebook.uid); SyncAddressBookHelper.processSyncAddressBook(mContext, true, null, msg); } else { Log.d(TAG, "sync phonebook to contact=" + phonebook); Message msg = handler.obtainMessage(SYNC_PHONEBOOK_ONE_ADDRESSBOOK); msg.getData().putLong("uid", phonebook.uid); SyncAddressBookHelper.checkIsEnableAddressbookSync(mContext, orm, msg); } }
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Log.d("checked", "is checked=" + isChecked); if (isChecked == true) { checkbox_sync_phonebook.setOnCheckedChangeListener(null); Message msg = handler.obtainMessage(EBABLE_CHECK); msg.getData().putBoolean("fromlogin", true); checkbox_sync_phonebook.setChecked(false); SyncAddressBookHelper.processSyncAddressBook( FacebookLoginActivity.this, isChecked, null, msg); } else { orm.EnableSyncPhonebook(false); } }