Protect MyTracksProvider based on the MyTracks settings bit.

Move MyTracksProvider to DatabaseProvider and protect the DatabaseProvider
using the AndroidManifest.xml.

Create a MyTracksProviderUtilFactory to create an instance of
MyTracksProviderUtils that accesses the DatabaseProvider.

Recreate MyTracksProvider by extending DatabaseProvider.
The recreated provider checks access, changes the authority,
and invokes the DatabaseProvider methods.
This commit is contained in:
Jimmy Shih
2011-10-07 16:23:59 -07:00
parent 1ffd77595d
commit 9e5204934f
42 changed files with 752 additions and 560 deletions
+6
View File
@@ -34,6 +34,12 @@ limitations under the License.
android:readPermission="com.google.android.apps.mytracks.READ_TRACK_DATA"
android:writePermission="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
<provider android:name="com.google.android.apps.mytracks.content.DatabaseProvider"
android:authorities="com.google.android.apps.mytracks.content"
android:exported="false"
android:readPermission="com.google.android.apps.mytracks.READ_TRACK_DATA"
android:writePermission="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
<activity android:name="com.google.android.apps.mytracks.MyTracks"
android:label="My Tracks"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale">