summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-08-05 09:42:04 -0700
committerSantos Cordon <santoscordon@google.com>2013-08-05 15:36:15 -0700
commit1b60e8c70bdcbf07c3efab310790134ecf81d4fd (patch)
tree53a677be4d17034d2907f06fc4b26571cdb947f9 /InCallUI/src/com/android/incallui/InCallActivity.java
parent258eb86d9f64ebebee4ec4e39af385364ca0c071 (diff)
Notifications in Phone (part 1)
- Added StatusBarNotification class to handle notifications - StatusBarNotification has tons of copied comments from NotificationMgr.java. Also has minimal code to make the notification pop up (without call-specific data). - Moved the UI start-up code from InCallPresenter to StatusBarNotification. Incoming phone calls need to display an alert above immersive (fullscreen) foreground activities and the way to do that is through notifications. The old phone app did the same thing...finally bringing over that functionality. Change-Id: I3324503e0d7bb1de00d8e7fab72d4b40519491dd
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java10
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);