Prevented crash on launch

This commit is contained in:
Erwan Croze 2017-01-05 15:24:20 +01:00
parent b01ae2ecb0
commit aec92a3c50

View file

@ -257,7 +257,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
} }
}; };
int missedCalls = (LinphoneManager.getInstance() != null) ? LinphoneManager.getLc().getMissedCallsCount() : 0; int missedCalls = (LinphoneManager.isInstanciated()) ? LinphoneManager.getLc().getMissedCallsCount() : 0;
displayMissedCalls(missedCalls); displayMissedCalls(missedCalls);
int rotation = getWindowManager().getDefaultDisplay().getRotation(); int rotation = getWindowManager().getDefaultDisplay().getRotation();
@ -276,7 +276,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
break; break;
} }
if (LinphoneManager.getInstance() != null) { if (LinphoneManager.isInstanciated()) {
LinphoneManager.getLc().setDeviceRotation(rotation); LinphoneManager.getLc().setDeviceRotation(rotation);
} }
mAlwaysChangingPhoneAngle = rotation; mAlwaysChangingPhoneAngle = rotation;