summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--InCallUI/src/com/android/incallui/AnswerFragment.java6
-rw-r--r--InCallUI/src/com/android/incallui/BaseFragment.java11
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonFragment.java6
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java6
4 files changed, 7 insertions, 22 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerFragment.java b/InCallUI/src/com/android/incallui/AnswerFragment.java
index 40462ce1f..e105289b2 100644
--- a/InCallUI/src/com/android/incallui/AnswerFragment.java
+++ b/InCallUI/src/com/android/incallui/AnswerFragment.java
@@ -72,12 +72,6 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente
}
@Override
- public void onDestroyView() {
- super.onDestroyView();
- getPresenter().onUiUnready(this);
- }
-
- @Override
public void showAnswerUi(boolean show) {
getView().setVisibility(show ? View.VISIBLE : View.GONE);
}
diff --git a/InCallUI/src/com/android/incallui/BaseFragment.java b/InCallUI/src/com/android/incallui/BaseFragment.java
index a348ce49a..ae207f3a1 100644
--- a/InCallUI/src/com/android/incallui/BaseFragment.java
+++ b/InCallUI/src/com/android/incallui/BaseFragment.java
@@ -18,12 +18,9 @@ package com.android.incallui;
import android.app.Fragment;
import android.os.Bundle;
-import android.view.View;
-
-import com.android.internal.util.Preconditions;
/**
- *
+ * Parent for all fragments that use Presenters and Ui design.
*/
public abstract class BaseFragment<T extends Presenter<U>, U extends Ui> extends Fragment {
@@ -51,4 +48,10 @@ public abstract class BaseFragment<T extends Presenter<U>, U extends Ui> extends
super.onActivityCreated(savedInstanceState);
mPresenter.onUiReady(getUi());
}
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ mPresenter.onUiUnready(getUi());
+ }
}
diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java
index bd193818a..1c3e737e6 100644
--- a/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -127,12 +127,6 @@ public class CallButtonFragment
}
@Override
- public void onDestroyView() {
- super.onDestroyView();
- getPresenter().onUiUnready(this);
- }
-
- @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
}
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index d880b973a..60090365f 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -111,12 +111,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
}
@Override
- public void onDestroyView() {
- super.onDestroyView();
- getPresenter().onUiUnready(this);
- }
-
- @Override
public void setVisible(boolean on) {
if (on) {
getView().setVisibility(View.VISIBLE);