This should fix the crash when going back to the app after removing a permission

This commit is contained in:
Sylvain Berfini 2018-10-29 11:50:38 +01:00
parent 4c4ad79fd6
commit 9dcb7fbfec
2 changed files with 3 additions and 9 deletions

View file

@ -292,12 +292,11 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
break;
}
mAlwaysChangingPhoneAngle = rotation;
if (LinphoneManager.isInstanciated()) {
LinphoneManager.getLc().setDeviceRotation(rotation);
onNewIntent(getIntent());
}
mAlwaysChangingPhoneAngle = rotation;
onNewIntent(getIntent());
}
private void initButtons() {

View file

@ -34,12 +34,7 @@ public class LinphoneGenericActivity extends Activity {
/*After a crash, Android restart the last Activity so we need to check
* if all dependencies are load
*/
if (!LinphoneService.isReady()) {
finish();
startService(getIntent().setClass(this, LinphoneService.class));
return;
}
if (!LinphoneManager.isInstanciated()) {
if (!LinphoneService.isReady() || !LinphoneManager.isInstanciated()) {
finish();
startActivity(getIntent().setClass(this, LinphoneLauncherActivity.class));
return;