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);
|
||||
|
||||
logIntent(callIntent);
|
||||
if (savedInstanceState == null) {
|
||||
logIntent(callIntent);
|
||||
|
||||
if (callIntent.getAction() == CallIntent.Action.ANSWER_VIDEO) {
|
||||
enableVideoIfAvailable = true;
|
||||
} else if (callIntent.getAction() == CallIntent.Action.ANSWER_AUDIO || callIntent.isStartedFromFullScreen()) {
|
||||
enableVideoIfAvailable = false;
|
||||
if (callIntent.getAction() == CallIntent.Action.ANSWER_VIDEO) {
|
||||
enableVideoIfAvailable = true;
|
||||
} else if (callIntent.getAction() == CallIntent.Action.ANSWER_AUDIO || callIntent.isStartedFromFullScreen()) {
|
||||
enableVideoIfAvailable = false;
|
||||
} else {
|
||||
enableVideoIfAvailable = callIntent.shouldEnableVideoIfAvailable();
|
||||
callIntent.setShouldEnableVideoIfAvailable(false);
|
||||
}
|
||||
|
||||
processIntent(callIntent);
|
||||
} else {
|
||||
enableVideoIfAvailable = callIntent.shouldEnableVideoIfAvailable();
|
||||
callIntent.setShouldEnableVideoIfAvailable(false);
|
||||
Log.d(TAG, "Activity likely rotated, not processing intent");
|
||||
}
|
||||
|
||||
processIntent(callIntent);
|
||||
|
||||
registerSystemPipChangeListeners();
|
||||
|
||||
windowLayoutInfoConsumer = new WindowLayoutInfoConsumer();
|
||||
|
|
Loading…
Add table
Reference in a new issue