fix two crashes
This commit is contained in:
parent
cf1b35025f
commit
62e89d42f2
2 changed files with 9 additions and 5 deletions
|
@ -452,10 +452,13 @@ public class LinphoneActivity extends TabActivity implements ContactPicked
|
||||||
|
|
||||||
Log.d("Phone orientation changed to ", degrees);
|
Log.d("Phone orientation changed to ", degrees);
|
||||||
int rotation = (360 - degrees) % 360;
|
int rotation = (360 - degrees) % 360;
|
||||||
LinphoneManager.getLc().setDeviceRotation(rotation);
|
LinphoneCore lc=LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
LinphoneCall currentCall = LinphoneManager.getLc().getCurrentCall();
|
if (lc!=null){
|
||||||
if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParamsCopy().getVideoEnabled()) {
|
lc.setDeviceRotation(rotation);
|
||||||
LinphoneManager.getLc().updateCall(currentCall, null);
|
LinphoneCall currentCall = lc.getCurrentCall();
|
||||||
|
if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParamsCopy().getVideoEnabled()) {
|
||||||
|
lc.updateCall(currentCall, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,8 @@ public class VideoCallActivity extends Activity implements
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!AndroidCameraConfiguration.hasSeveralCameras()) {
|
if (!AndroidCameraConfiguration.hasSeveralCameras()) {
|
||||||
findViewById(R.id.switch_camera).setVisibility(View.GONE);
|
View v=findViewById(R.id.switch_camera);
|
||||||
|
if (v!=null) v.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Version.isXLargeScreen(this)) {
|
if (Version.isXLargeScreen(this)) {
|
||||||
|
|
Loading…
Reference in a new issue