- \r
- // TODO: Delete this testing stuff.\r
- /*\r
- * private void addContact(Account account, String name, String username) {\r
- * Log.i("ASD", "Adding contact: " + name);\r
- * ArrayList<ContentProviderOperation> operationList = new\r
- * ArrayList<ContentProviderOperation>();\r
- * \r
- * //Create our RawContact ContentProviderOperation.Builder builder =\r
- * ContentProviderOperation.newInsert(RawContacts.CONTENT_URI);\r
- * builder.withValue(RawContacts.ACCOUNT_NAME, account.name);\r
- * builder.withValue(RawContacts.ACCOUNT_TYPE, account.type);\r
- * builder.withValue(RawContacts.SYNC1, username);\r
- * operationList.add(builder.build());\r
- * \r
- * //Create a Data record of common type 'StructuredName' for our RawContact\r
- * builder =\r
- * ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);\r
- * builder\r
- * .withValueBackReference(ContactsContract.CommonDataKinds.StructuredName\r
- * .RAW_CONTACT_ID, 0); builder.withValue(ContactsContract.Data.MIMETYPE,\r
- * ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);\r
- * builder\r
- * .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME,\r
- * name); operationList.add(builder.build());\r
- * \r
- * //Create a Data record of custom type\r
- * "vnd.android.cursor.item/vnd.fm.last.android.profile" to display a link\r
- * to the Last.fm profile builder =\r
- * ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);\r
- * builder.withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0);\r
- * builder.withValue(ContactsContract.Data.MIMETYPE,\r
- * "vnd.android.cursor.item/vnd.owncloud.contact.profile");\r
- * builder.withValue(ContactsContract.Data.DATA1, username);\r
- * builder.withValue(ContactsContract.Data.DATA2, "Last.fm Profile");\r
- * builder.withValue(ContactsContract.Data.DATA3, "View profile");\r
- * operationList.add(builder.build());\r
- * \r
- * try {\r
- * getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY,\r
- * operationList); } catch (Exception e) { Log.e("ASD",\r
- * "Something went wrong during creation! " + e); e.printStackTrace(); } }\r
- */\r