Separated database table logic and added SocialProvider.
Created a second ContentProvider to handle social stream data, called
"Activities" here. Designed schema after the data provided by various
online stream sources, including the "Atom Activity Extensions" RFC
Internet-Draft available at http://activitystrea.ms/.
Because social data references Contacts data directly by _ID, we keep
the data behind both ContentProviders in a single database to improve
join query performance.
To make sure that both ContentProviders use the same underlying
database through a single SQLiteDatabase instance, we only allow access
to OpenHelper as a singleton.
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4b0230e..52d5d44 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -6,14 +6,21 @@
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<application
- android:label="ContactsProvider2"
- >
+ android:label="ContactsProvider2">
+
<provider android:name="ContactsProvider2"
android:authorities="com.android.contacts"
android:syncable="false"
android:multiprocess="false"
android:readPermission="android.permission.READ_CONTACTS"
- android:writePermission="android.permission.WRITE_CONTACTS"
- />
+ android:writePermission="android.permission.WRITE_CONTACTS" />
+
+ <!-- TODO: create permissions for social data -->
+ <provider android:name="SocialProvider"
+ android:authorities="com.android.social"
+ android:syncable="false"
+ android:multiprocess="false"
+ android:readPermission="android.permission.READ_CONTACTS"
+ android:writePermission="android.permission.WRITE_CONTACTS" />
</application>
</manifest>