Fixed window memory leaks when rotating task edit screen while control sets are open

pull/14/head
Sam Bosley 12 years ago
parent 1c22549a13
commit 16a18f5d1f

@ -670,7 +670,9 @@ public class EditPeopleControlSet extends PopupControlSet {
@Override
public String writeToModel(Task t) {
// do nothing, we use a separate method
if (initialized && dialog != null)
dialog.dismiss();
// do nothing else, we use a separate method
return null;
}

@ -69,6 +69,13 @@ public final class AlarmControlSet extends TaskEditControlSet {
pickerDialog = new DateAndTimeDialog(activity, 0);
}
@Override
public String writeToModel(Task task) {
if (initialized && pickerDialog != null)
pickerDialog.dismiss();
return super.writeToModel(task);
}
@Override
protected String writeToModelAfterInitialized(Task task) {
LinkedHashSet<Long> alarms = new LinkedHashSet<Long>();

@ -144,6 +144,13 @@ public abstract class PopupControlSet extends TaskEditControlSet {
refreshDisplayView();
}
@Override
public String writeToModel(Task task) {
if (initialized && dialog != null)
dialog.dismiss();
return super.writeToModel(task);
}
@Override
public void readFromTask(Task task) {
super.readFromTask(task);

Loading…
Cancel
Save