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

Commit 6ebf3cdd authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5476456 from 51dc2a55 to rvc-release

Change-Id: If8eba48c863d8e0ab4dc4266d6317e59d486ea52
parents d3cffb87 51dc2a55
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -323,6 +323,17 @@ public class VideoCallPresenter
    InCallPresenter.InCallState inCallState = InCallPresenter.getInstance().getInCallState();
    onStateChange(inCallState, inCallState, CallList.getInstance());
    isVideoCallScreenUiReady = true;

    Point sourceVideoDimensions = getRemoteVideoSurfaceTexture().getSourceVideoDimensions();
    if (sourceVideoDimensions != null && primaryCall != null) {
      int width = primaryCall.getPeerDimensionWidth();
      int height = primaryCall.getPeerDimensionHeight();
      boolean updated = DialerCall.UNKNOWN_PEER_DIMENSIONS != width
          && DialerCall.UNKNOWN_PEER_DIMENSIONS != height;
      if (updated && (sourceVideoDimensions.x != width || sourceVideoDimensions.y != height)) {
        onUpdatePeerDimensions(primaryCall, width, height);
      }
    }
  }

  /** Called when the user interface is no longer ready to be used. */
+16 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa

  private static int idCounter = 0;

  public static final int UNKNOWN_PEER_DIMENSIONS = -1;

  /**
   * A counter used to append to restricted/private/hidden calls so that users can identify them in
   * a conversation. This value is reset in {@link CallList#onCallRemoved(Context, Call)} when there
@@ -386,6 +388,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
      };

  private long timeAddedMs;
  private int peerDimensionWidth = UNKNOWN_PEER_DIMENSIONS;
  private int peerDimensionHeight = UNKNOWN_PEER_DIMENSIONS;

  public DialerCall(
      Context context,
@@ -1558,6 +1562,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa

  @Override
  public void onPeerDimensionsChanged(int width, int height) {
    peerDimensionWidth = width;
    peerDimensionHeight = height;
    InCallVideoCallCallbackNotifier.getInstance().peerDimensionsChanged(this, width, height);
  }

@@ -1974,4 +1980,14 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
  public interface CannedTextResponsesLoadedListener {
    void onCannedTextResponsesLoaded(DialerCall call);
  }

  /** Gets peer dimension width. */
  public int getPeerDimensionWidth() {
    return peerDimensionWidth;
  }

  /** Gets peer dimension height. */
  public int getPeerDimensionHeight() {
    return peerDimensionHeight;
  }
}
+5 −5
Original line number Diff line number Diff line
@@ -541,13 +541,13 @@ public class VideoCallFragment extends Fragment
      return new Point();
    }
    if (isLandscape()) {
      int stableInsetEnd =
      int systemWindowInsetEnd =
          getView().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL
              ? getView().getRootWindowInsets().getStableInsetLeft()
              : -getView().getRootWindowInsets().getStableInsetRight();
      return new Point(stableInsetEnd, 0);
              ? getView().getRootWindowInsets().getSystemWindowInsetLeft()
              : -getView().getRootWindowInsets().getSystemWindowInsetRight();
      return new Point(systemWindowInsetEnd, 0);
    } else {
      return new Point(0, -getView().getRootWindowInsets().getStableInsetBottom());
      return new Point(0, -getView().getRootWindowInsets().getSystemWindowInsetBottom());
    }
  }