diff options
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 89450c534..9eb54ee5e 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -101,6 +101,8 @@ public class InCallActivity extends Activity { @Override public void finish() { Logger.d(this, "finish()..."); + tearDownPresenters(); + super.finish(); // TODO(klp): Actually finish the activity for now. Revisit performance implications of @@ -220,6 +222,14 @@ public class InCallActivity extends Activity { mainPresenter.setActivity(this); } + private void tearDownPresenters() { + InCallPresenter mainPresenter = InCallPresenter.getInstance(); + + mainPresenter.removeListener(mCallButtonFragment.getPresenter()); + mainPresenter.removeListener(mCallCardFragment.getPresenter()); + mainPresenter.removeListener(mAnswerFragment.getPresenter()); + } + private void toast(String text) { final Toast toast = Toast.makeText(this, text, Toast.LENGTH_SHORT); |