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
|
@ -141,6 +141,17 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
throw new RuntimeException("LinphoneActivity not instantiated yet");
|
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
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -161,7 +172,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
wizard.setClass(this, RemoteProvisioningLoginActivity.class);
|
wizard.setClass(this, RemoteProvisioningLoginActivity.class);
|
||||||
wizard.putExtra("Domain", LinphoneManager.getInstance().wizardLoginViewDomain);
|
wizard.putExtra("Domain", LinphoneManager.getInstance().wizardLoginViewDomain);
|
||||||
startActivityForResult(wizard, REMOTE_PROVISIONING_LOGIN_ACTIVITY);
|
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) {
|
if (LinphonePreferences.instance().getAccountCount() > 0) {
|
||||||
LinphonePreferences.instance().firstLaunchSuccessful();
|
LinphonePreferences.instance().firstLaunchSuccessful();
|
||||||
} else {
|
} else {
|
||||||
|
@ -187,6 +198,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
currentFragment = nextFragment = FragmentsAvailable.EMPTY;
|
currentFragment = nextFragment = FragmentsAvailable.EMPTY;
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
changeCurrentFragment(FragmentsAvailable.DIALER, getIntent().getExtras());
|
changeCurrentFragment(FragmentsAvailable.DIALER, getIntent().getExtras());
|
||||||
|
} else {
|
||||||
|
changeCurrentFragment(((FragmentsAvailable)savedInstanceState.getSerializable("CurrentFragment")), getIntent().getExtras());
|
||||||
}
|
}
|
||||||
|
|
||||||
mListener = new LinphoneCoreListenerBase(){
|
mListener = new LinphoneCoreListenerBase(){
|
||||||
|
|
Loading…
Reference in a new issue