mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +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
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
Log.d(TAG, "onCreate");
|
||||||
|
|
||||||
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
||||||
|
|
||||||
@ -511,6 +512,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
private void initViews() {
|
private void initViews() {
|
||||||
|
Log.d(TAG, "initViews");
|
||||||
binding.callInfosLinearLayout.setVisibility(View.VISIBLE);
|
binding.callInfosLinearLayout.setVisibility(View.VISIBLE);
|
||||||
binding.selfVideoViewWrapper.setVisibility(View.VISIBLE);
|
binding.selfVideoViewWrapper.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
@ -574,6 +576,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initGridAdapter() {
|
private void initGridAdapter() {
|
||||||
|
Log.d(TAG, "initGridAdapter");
|
||||||
int columns;
|
int columns;
|
||||||
int participantsInGrid = participantDisplayItems.size();
|
int participantsInGrid = participantDisplayItems.size();
|
||||||
if (getResources() != null && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
if (getResources() != null && getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||||
@ -1894,6 +1897,8 @@ public class CallActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateSelfVideoViewPosition() {
|
private void updateSelfVideoViewPosition() {
|
||||||
|
Log.d(TAG, "updateSelfVideoViewPosition");
|
||||||
|
if (!isInPipMode) {
|
||||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) binding.selfVideoRenderer.getLayoutParams();
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) binding.selfVideoRenderer.getLayoutParams();
|
||||||
|
|
||||||
DisplayMetrics displayMetrics = getApplicationContext().getResources().getDisplayMetrics();
|
DisplayMetrics displayMetrics = getApplicationContext().getResources().getDisplayMetrics();
|
||||||
@ -1925,6 +1930,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
binding.selfVideoViewWrapper.setY(newYafterRotate);
|
binding.selfVideoViewWrapper.setY(newYafterRotate);
|
||||||
binding.selfVideoViewWrapper.setX(newXafterRotatePx);
|
binding.selfVideoViewWrapper.setX(newXafterRotatePx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onMessageEvent(PeerConnectionEvent peerConnectionEvent) {
|
public void onMessageEvent(PeerConnectionEvent peerConnectionEvent) {
|
||||||
@ -2474,6 +2480,8 @@ public class CallActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
||||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
|
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
|
||||||
|
Log.d(TAG, "onPictureInPictureModeChanged");
|
||||||
|
Log.d(TAG, "isInPictureInPictureMode= " + isInPictureInPictureMode);
|
||||||
isInPipMode = isInPictureInPictureMode;
|
isInPipMode = isInPictureInPictureMode;
|
||||||
if (isInPictureInPictureMode) {
|
if (isInPictureInPictureMode) {
|
||||||
mReceiver =
|
mReceiver =
|
||||||
@ -2528,6 +2536,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateUiForPipMode() {
|
public void updateUiForPipMode() {
|
||||||
|
Log.d(TAG, "updateUiForPipMode");
|
||||||
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
params.setMargins(0, 0, 0, 0);
|
params.setMargins(0, 0, 0, 0);
|
||||||
@ -2550,6 +2559,7 @@ public class CallActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateUiForNormalMode() {
|
public void updateUiForNormalMode() {
|
||||||
|
Log.d(TAG, "updateUiForNormalMode");
|
||||||
if (isVoiceOnlyCall) {
|
if (isVoiceOnlyCall) {
|
||||||
binding.callControls.setVisibility(View.VISIBLE);
|
binding.callControls.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user