diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-04-17 20:52:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-17 20:52:07 +0000 |
commit | d46a360dccc672f4ccf8b9e6f789b6984addd526 (patch) | |
tree | 2a0d42063d6224acf47524468ef737154f9f5807 /java | |
parent | 7e66a8b5621c9e01f536e62eb66ca988d683a8f6 (diff) | |
parent | 12243dee79feee46d6b2b127620261b1f7093d3c (diff) |
Merge "More improvements call flow."
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/incallui/InCallActivity.java | 11 | ||||
-rw-r--r-- | java/com/android/incallui/InCallPresenter.java | 5 |
2 files changed, 15 insertions, 1 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index 0c57dff7b..91f557bd5 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -1347,9 +1347,11 @@ public class InCallActivity extends TransactionSafeFragmentActivity if (didShowSpeakEasyScreen) { if (lastShownSpeakEasyScreenUniqueCallid.equals(call.getUniqueCallId())) { + LogUtil.i("InCallActivity.showSpeakEasyFragment", "found existing fragment"); return false; } hideSpeakEasyFragment(transaction); + LogUtil.i("InCallActivity.showSpeakEasyFragment", "hid existing fragment"); } Optional<Fragment> speakEasyFragment = speakEasyCallManager.getSpeakEasyFragment(call); @@ -1357,6 +1359,10 @@ public class InCallActivity extends TransactionSafeFragmentActivity transaction.add(R.id.main, speakEasyFragment.get(), Tags.SPEAK_EASY_SCREEN); didShowSpeakEasyScreen = true; lastShownSpeakEasyScreenUniqueCallid = call.getUniqueCallId(); + LogUtil.i( + "InCallActivity.showSpeakEasyFragment", + "set fragment for call %s", + lastShownSpeakEasyScreenUniqueCallid); return true; } return false; @@ -1381,11 +1387,16 @@ public class InCallActivity extends TransactionSafeFragmentActivity return false; } + @VisibleForTesting public void setSpeakEasyCallManager(SpeakEasyCallManager speakEasyCallManager) { this.speakEasyCallManager = speakEasyCallManager; } + @Nullable public SpeakEasyCallManager getSpeakEasyCallManager() { + if (this.speakEasyCallManager == null) { + this.speakEasyCallManager = InCallPresenter.getInstance().getSpeakEasyCallManager(); + } return speakEasyCallManager; } diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index 7468b83ac..1dc150d56 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -513,7 +513,6 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud this.inCallActivity = inCallActivity; this.inCallActivity.setExcludeFromRecents(false); - this.inCallActivity.setSpeakEasyCallManager(this.speakEasyCallManager); // By the time the UI finally comes up, the call may already be disconnected. // If that's the case, we may need to show an error dialog. @@ -569,6 +568,10 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud Trace.endSection(); } + public SpeakEasyCallManager getSpeakEasyCallManager() { + return this.speakEasyCallManager; + } + public void setManageConferenceActivity( @Nullable ManageConferenceActivity manageConferenceActivity) { this.manageConferenceActivity = manageConferenceActivity; |