Fix call camera enable on rotation bug.
This commit is contained in:
parent
8d8c21f228
commit
d23c6fb41c
1 changed files with 13 additions and 9 deletions
|
@ -202,19 +202,23 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||||
|
|
||||||
lifecycleDisposable.add(controlsAndInfo);
|
lifecycleDisposable.add(controlsAndInfo);
|
||||||
|
|
||||||
logIntent(callIntent);
|
if (savedInstanceState == null) {
|
||||||
|
logIntent(callIntent);
|
||||||
|
|
||||||
if (callIntent.getAction() == CallIntent.Action.ANSWER_VIDEO) {
|
if (callIntent.getAction() == CallIntent.Action.ANSWER_VIDEO) {
|
||||||
enableVideoIfAvailable = true;
|
enableVideoIfAvailable = true;
|
||||||
} else if (callIntent.getAction() == CallIntent.Action.ANSWER_AUDIO || callIntent.isStartedFromFullScreen()) {
|
} else if (callIntent.getAction() == CallIntent.Action.ANSWER_AUDIO || callIntent.isStartedFromFullScreen()) {
|
||||||
enableVideoIfAvailable = false;
|
enableVideoIfAvailable = false;
|
||||||
|
} else {
|
||||||
|
enableVideoIfAvailable = callIntent.shouldEnableVideoIfAvailable();
|
||||||
|
callIntent.setShouldEnableVideoIfAvailable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
processIntent(callIntent);
|
||||||
} else {
|
} else {
|
||||||
enableVideoIfAvailable = callIntent.shouldEnableVideoIfAvailable();
|
Log.d(TAG, "Activity likely rotated, not processing intent");
|
||||||
callIntent.setShouldEnableVideoIfAvailable(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processIntent(callIntent);
|
|
||||||
|
|
||||||
registerSystemPipChangeListeners();
|
registerSystemPipChangeListeners();
|
||||||
|
|
||||||
windowLayoutInfoConsumer = new WindowLayoutInfoConsumer();
|
windowLayoutInfoConsumer = new WindowLayoutInfoConsumer();
|
||||||
|
|
Loading…
Add table
Reference in a new issue