forked from upstream-mirrors/OpenTracks
Making the "Show track" button after an import clear the stack.
This commit is contained in:
@@ -158,8 +158,10 @@ public class ImportActivity extends Activity {
|
|||||||
public void onClick(DialogInterface arg0, int arg1) {
|
public void onClick(DialogInterface arg0, int arg1) {
|
||||||
long lastTrackId = trackIds[trackIds.length - 1];
|
long lastTrackId = trackIds[trackIds.length - 1];
|
||||||
Uri trackUri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, lastTrackId);
|
Uri trackUri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, lastTrackId);
|
||||||
|
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setDataAndType(trackUri, TracksColumns.CONTENT_ITEMTYPE);
|
intent.setDataAndType(trackUri, TracksColumns.CONTENT_ITEMTYPE);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user