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:
Jimmy Shih
2012-01-11 11:23:22 -08:00
parent dc019cd58d
commit 8f72c36351
@@ -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) {