Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6d21861 authored by yueg's avatar yueg Committed by Copybara-Service
Browse files

Fix bubble showing after dismiss bug.

Now we also show bubble in onCallListChange(), but we shouldn't show bubble after dismiss in this case.

Test: ReturnToCallControllerTest
PiperOrigin-RevId: 191101307
Change-Id: I13ff6bf4ae7ab574966c43c0e6fee13853899ba0
parent df36d8f1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ public interface Bubble {
  /** Returns whether the bubble is currently visible */
  boolean isVisible();

  /** Returns whether the bubble is currently dismissed */
  boolean isDismissed();

  /**
   * Set the info for this Bubble to display
   *
+5 −0
Original line number Diff line number Diff line
@@ -39,6 +39,11 @@ public class BubbleStub implements Bubble {
    return false;
  }

  @Override
  public boolean isDismissed() {
    return false;
  }

  @Override
  public void setBubbleInfo(@NonNull BubbleInfo bubbleInfo) {}

+3 −3
Original line number Diff line number Diff line
@@ -92,10 +92,10 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio
    endCall = createActionIntent(ReturnToCallActionReceiver.ACTION_END_CALL);
    fullScreen = createActionIntent(ReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);

    InCallPresenter.getInstance().addInCallUiListener(this);
    CallList.getInstance().addListener(this);
    AudioModeProvider.getInstance().addListener(this);
    audioState = AudioModeProvider.getInstance().getAudioState();
    InCallPresenter.getInstance().addInCallUiListener(this);
    CallList.getInstance().addListener(this);
  }

  public void tearDown() {
@@ -186,7 +186,7 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio
      return;
    }

    if ((bubble == null || !bubble.isVisible())
    if ((bubble == null || !(bubble.isVisible() || bubble.isDismissed()))
        && getCall() != null
        && !InCallPresenter.getInstance().isShowingInCallUi()) {
      LogUtil.i("ReturnToCallController.onCallListChange", "going to show bubble");