Only sends broadcast notifications if allowed by the settings bit.
Introduces a permission for internal MyTracks communication.
Thus the MyTracks app widget can use this permission to
always receive broadcast notifications when a track starts
and stops.
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.
external applications access based on the
sharing settings.
Protect all RPCs calls using the caller's
process id.
When the service is started, we cannot
tell whether the caller is MyTracks or
another app. Thus when the service
is started, we cannot access MyTracks
database or start/stop a recording.
Previsouly, only the MyTracks app
widget is using the service's start method
to start and stop a recording. Thus
create a private service, ControlRecordingService,
that only the MyTracks app widget can access and delegate
starting/stopping a recording to
TrackRecordingService.