summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-04-19 23:43:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-04-19 23:43:14 +0000
commit4473e4b5e53ded7dffe86bdb344ff113ee72f9be (patch)
tree53374b2216c963caf9af29cec439f7c8545e9482
parent020c49741f90d47a0dcca09be01b47db75375193 (diff)
parentf1861059b421d52d3229687bc60a9f4a5a025be3 (diff)
Merge "Delete DialerCall#onDestroy since it's redudant with onRemovedFromCallList."
-rw-r--r--java/com/android/incallui/call/CallList.java1
-rw-r--r--java/com/android/incallui/call/DialerCall.java25
2 files changed, 9 insertions, 17 deletions
diff --git a/java/com/android/incallui/call/CallList.java b/java/com/android/incallui/call/CallList.java
index 04e02c45b..eccdceeca 100644
--- a/java/com/android/incallui/call/CallList.java
+++ b/java/com/android/incallui/call/CallList.java
@@ -745,7 +745,6 @@ public class CallList implements DialerCallDelegate {
call.setState(DialerCall.State.IDLE);
updateCallInMap(call);
notifyGenericListeners();
- call.onDestroy();
}
/**
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 4966110f7..3b7e4dc8f 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -541,22 +541,6 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
return countryIso;
}
- /**
- * Called when call is disconnected and removed from {@link CallList}, UI may already be destroyed
- * at this point. This is last chance to do something for the call.
- */
- public void onDestroy() {
- LogUtil.enterBlock("DialerCall.onDestroy");
- if (rttTranscript != null) {
- Futures.addCallback(
- RttTranscriptUtil.saveRttTranscript(context, rttTranscript),
- new DefaultFutureCallback<>(),
- MoreExecutors.directExecutor());
- // Sets to null so it won't be saved again when called multiple times.
- rttTranscript = null;
- }
- }
-
private void updateIsVoiceMailNumber() {
if (getHandle() != null && PhoneAccount.SCHEME_VOICEMAIL.equals(getHandle().getScheme())) {
isVoicemailNumber = true;
@@ -1608,8 +1592,17 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
}
void onRemovedFromCallList() {
+ LogUtil.enterBlock("DialerCall.onRemovedFromCallList");
// Ensure we clean up when this call is removed.
videoTechManager.dispatchRemovedFromCallList();
+ if (rttTranscript != null) {
+ Futures.addCallback(
+ RttTranscriptUtil.saveRttTranscript(context, rttTranscript),
+ new DefaultFutureCallback<>(),
+ MoreExecutors.directExecutor());
+ // Sets to null so it won't be saved again when called multiple times.
+ rttTranscript = null;
+ }
}
public com.android.dialer.logging.VideoTech.Type getSelectedAvailableVideoTechType() {