Fix the end track confirmation dialog.

This commit is contained in:
Sandor Dornbush
2010-11-19 17:23:27 -08:00
parent 868092db10
commit 05d555f98d
@@ -1045,13 +1045,15 @@ public class MyTracks extends TabActivity implements OnTouchListener,
*/ */
public void stopRecording() { public void stopRecording() {
if (trackRecordingService != null) { if (trackRecordingService != null) {
// Save the track id as the shared preference will overwrite the recording track id.
long currentTrackId = recordingTrackId;
try { try {
trackRecordingService.endCurrentTrack(); trackRecordingService.endCurrentTrack();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(MyTracksConstants.TAG, "Unable to stop recording.", e); Log.e(MyTracksConstants.TAG, "Unable to stop recording.", e);
} }
Intent intent = new Intent(MyTracks.this, MyTracksDetails.class); Intent intent = new Intent(MyTracks.this, MyTracksDetails.class);
intent.putExtra("trackid", recordingTrackId); intent.putExtra("trackid", currentTrackId);
intent.putExtra("hasCancelButton", false); intent.putExtra("hasCancelButton", false);
startActivity(intent); startActivity(intent);
} }