Fix calling PIP stuck when calls ends on device lock screen.
Fixes #11090
This commit is contained in:
parent
e3d3129e6d
commit
5f0341cd53
1 changed files with 10 additions and 2 deletions
|
@ -140,7 +140,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||||
Log.i(TAG, "onPause");
|
Log.i(TAG, "onPause");
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
if (!isInPipMode()) {
|
if (!isInPipMode() || isFinishing()) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,9 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||||
Log.i(TAG, "onStop");
|
Log.i(TAG, "onStop");
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
|
||||||
EventBus.getDefault().unregister(this);
|
if (!isInPipMode() || isFinishing()) {
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (!viewModel.isCallStarting()) {
|
if (!viewModel.isCallStarting()) {
|
||||||
CallParticipantsState state = viewModel.getCallParticipantsState().getValue();
|
CallParticipantsState state = viewModel.getCallParticipantsState().getValue();
|
||||||
|
@ -167,6 +169,12 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
|
Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
|
||||||
|
|
Loading…
Add table
Reference in a new issue