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

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

Bubble layout change.

- Flip back-to-call button icon.
- Use different button height for portrait and landscape. In order to make it work, we also create new ViewHolder object when bubble shows and remove reset() when bubble hides.

Bug: 67605985
Test: NewBubbleImplIntegrationTest, NewBubbleImplTest, NewReturnToCallControllerTest
PiperOrigin-RevId: 184768224
Change-Id: If4e613b12e39c647c34f4cb63a7f934043d42ec7
parent c1fb2177
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -19,7 +19,11 @@
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?attr/colorControlNormal">
  <group
      android:pivotX="12"
      android:scaleX="-1">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
  </group>
</vector>
 No newline at end of file
+3 −10
Original line number Diff line number Diff line
@@ -119,14 +119,6 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
    }
  }

  private void hideAndReset() {
    if (bubble != null) {
      bubble.hideAndReset();
    } else {
      LogUtil.i("ReturnToCallController.reset", "reset() called without calling show()");
    }
  }

  private void show() {
    if (bubble == null) {
      bubble = startBubble();
@@ -189,7 +181,7 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
      if (!TelecomUtil.isInCall(context) || CallList.getInstance().getIncomingCall() != null) {
        bubble.showText(context.getText(R.string.incall_call_ended));
      }
      hideAndReset();
      hide();
    } else {
      startContactInfoSearch();
    }
@@ -258,7 +250,8 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
    // Return to call
    actions.add(
        Action.builder()
            .setIconDrawable(context.getDrawable(R.drawable.quantum_ic_exit_to_app_vd_theme_24))
            .setIconDrawable(
                context.getDrawable(R.drawable.quantum_ic_exit_to_app_flip_vd_theme_24))
            .setIntent(fullScreen)
            .setName(context.getText(R.string.bubble_return_to_call))
            .setCheckable(false)
+0 −3
Original line number Diff line number Diff line
@@ -37,9 +37,6 @@ public interface NewBubble {
  /** Hide the bubble. */
  void hide();

  /** Hide the bubble and reset to initial state */
  void hideAndReset();

  /** Returns whether the bubble is currently visible */
  boolean isVisible();

+0 −3
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@ public class NewBubbleStub implements NewBubble {
  @Override
  public void hide() {}

  @Override
  public void hideAndReset() {}

  @Override
  public boolean isVisible() {
    return false;