Do not display assistant when rotating the device once user has left it if there are no account configured yet
This commit is contained in:
parent
2268568e3a
commit
1fe3e20131
1 changed files with 14 additions and 1 deletions
|
@ -140,6 +140,17 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
return instance;
|
||||
throw new RuntimeException("LinphoneActivity not instantiated yet");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
outState.putSerializable("CurrentFragment", currentFragment);
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -161,7 +172,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
wizard.setClass(this, RemoteProvisioningLoginActivity.class);
|
||||
wizard.putExtra("Domain", LinphoneManager.getInstance().wizardLoginViewDomain);
|
||||
startActivityForResult(wizard, REMOTE_PROVISIONING_LOGIN_ACTIVITY);
|
||||
} else if (useFirstLoginActivity && LinphonePreferences.instance().isFirstLaunch() || LinphoneManager.getLc().getProxyConfigList().length == 0) {
|
||||
} else if (savedInstanceState == null && (useFirstLoginActivity && LinphonePreferences.instance().isFirstLaunch() || LinphoneManager.getLc().getProxyConfigList().length == 0)) {
|
||||
if (LinphonePreferences.instance().getAccountCount() > 0) {
|
||||
LinphonePreferences.instance().firstLaunchSuccessful();
|
||||
} else {
|
||||
|
@ -187,6 +198,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
currentFragment = nextFragment = FragmentsAvailable.EMPTY;
|
||||
if (savedInstanceState == null) {
|
||||
changeCurrentFragment(FragmentsAvailable.DIALER, getIntent().getExtras());
|
||||
} else {
|
||||
changeCurrentFragment(((FragmentsAvailable)savedInstanceState.getSerializable("CurrentFragment")), getIntent().getExtras());
|
||||
}
|
||||
|
||||
mListener = new LinphoneCoreListenerBase(){
|
||||
|
|
Loading…
Reference in a new issue