mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix to hide selfVideo when pip-view is tapped
on some devices (reproduced with Pixel2 on api level30) the own video became visible when the pip view was tapped. This fix should hide the own video. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
43b54e015f
commit
f9a28cb0aa
@ -269,6 +269,7 @@ public class CallActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.d(TAG, "onCreate");
|
||||
|
||||
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
||||
|
||||
@ -511,6 +512,7 @@ public class CallActivity extends BaseActivity {
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void initViews() {
|
||||
Log.d(TAG, "initViews");
|
||||
binding.callInfosLinearLayout.setVisibility(View.VISIBLE);
|
||||
binding.selfVideoViewWrapper.setVisibility(View.VISIBLE);
|
||||
|
||||
@ -574,6 +576,7 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void initGridAdapter() {
|
||||
Log.d(TAG, "initGridAdapter");
|
||||
int columns;
|
||||
int participantsInGrid = participantDisplayItems.size();
|
||||
if (getResources() != null && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
@ -1894,6 +1897,8 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void updateSelfVideoViewPosition() {
|
||||
Log.d(TAG, "updateSelfVideoViewPosition");
|
||||
if (!isInPipMode) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) binding.selfVideoRenderer.getLayoutParams();
|
||||
|
||||
DisplayMetrics displayMetrics = getApplicationContext().getResources().getDisplayMetrics();
|
||||
@ -1925,6 +1930,7 @@ public class CallActivity extends BaseActivity {
|
||||
binding.selfVideoViewWrapper.setY(newYafterRotate);
|
||||
binding.selfVideoViewWrapper.setX(newXafterRotatePx);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageEvent(PeerConnectionEvent peerConnectionEvent) {
|
||||
@ -2474,6 +2480,8 @@ public class CallActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
|
||||
Log.d(TAG, "onPictureInPictureModeChanged");
|
||||
Log.d(TAG, "isInPictureInPictureMode= " + isInPictureInPictureMode);
|
||||
isInPipMode = isInPictureInPictureMode;
|
||||
if (isInPictureInPictureMode) {
|
||||
mReceiver =
|
||||
@ -2528,6 +2536,7 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void updateUiForPipMode() {
|
||||
Log.d(TAG, "updateUiForPipMode");
|
||||
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(0, 0, 0, 0);
|
||||
@ -2550,6 +2559,7 @@ public class CallActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void updateUiForNormalMode() {
|
||||
Log.d(TAG, "updateUiForNormalMode");
|
||||
if (isVoiceOnlyCall) {
|
||||
binding.callControls.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user