mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 20:18:36 +00:00
Fix call camera enable on rotation bug.
This commit is contained in:
committed by
Greyson Parrelli
parent
8d8c21f228
commit
d23c6fb41c
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user