Protect TrackRecordingService to allow

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.
This commit is contained in:
Jimmy Shih
2011-10-05 16:45:32 -07:00
parent 969a677d7d
commit 2fa325dbf3
6 changed files with 195 additions and 68 deletions
-9
View File
@@ -28,15 +28,6 @@ limitations under the License.
<string name="track_stopped_broadcast_action">com.google.android.apps.mytracks.TRACK_STOPPED</string>
<string name="track_id_broadcast_extra">com.google.android.apps.mytracks.TRACK_ID</string>
<!-- TrackRecordingService actions -->
<string name="start_new_track_action">com.google.android.apps.mytracks.START_NEW_TRACK</string>
<!--
Setting this intent makes the new track the selected track.
This is not expected to work if the my tracks activity is currently active.
-->
<string name="select_new_track_extra">com.google.android.apps.mytracks.SELECT_NEW_TRACK</string>
<string name="end_current_track_action">com.google.android.apps.mytracks.END_CURRENT_TRACK</string>
<!-- My Tracks service constants -->
<string name="mytracks_service_class">com.google.android.apps.mytracks.services.TrackRecordingService</string>
<string name="mytracks_service_package">com.google.android.maps.mytracks</string>