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 c59fc2cbc3
commit 86cb32f2c9
2 changed files with 3 additions and 9 deletions

View file

@ -293,12 +293,11 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
break; break;
} }
mAlwaysChangingPhoneAngle = rotation;
if (LinphoneManager.isInstanciated()) { if (LinphoneManager.isInstanciated()) {
LinphoneManager.getLc().setDeviceRotation(rotation); LinphoneManager.getLc().setDeviceRotation(rotation);
onNewIntent(getIntent());
} }
mAlwaysChangingPhoneAngle = rotation;
onNewIntent(getIntent());
} }
private void initButtons() { 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 /*After a crash, Android restart the last Activity so we need to check
* if all dependencies are load * if all dependencies are load
*/ */
if (!LinphoneService.isReady()) { if (!LinphoneService.isReady() || !LinphoneManager.isInstanciated()) {
finish();
startService(getIntent().setClass(this, LinphoneService.class));
return;
}
if (!LinphoneManager.isInstanciated()) {
finish(); finish();
startActivity(getIntent().setClass(this, LinphoneLauncherActivity.class)); startActivity(getIntent().setClass(this, LinphoneLauncherActivity.class));
return; return;