forked from upstream-mirrors/OpenTracks
Fix the end track confirmation dialog.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user