forked from upstream-mirrors/OpenTracks
When screen rotates, another activity is shown on the foreground.
Thus onPause, need to remove the dialog to prevent the activity from leaking the dialog window.
This commit is contained in:
+11
@@ -80,9 +80,20 @@ public class UploadServiceChooserActivity extends Activity {
|
||||
Intent intent = getIntent();
|
||||
trackId = intent.getLongExtra(TRACK_ID, -1L);
|
||||
sendType = intent.getParcelableExtra(SEND_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
showDialog(SERVICE_PICKER_DIALOG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
removeDialog(SERVICE_PICKER_DIALOG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog(int id) {
|
||||
switch (id) {
|
||||
|
||||
Reference in New Issue
Block a user