Fix crash that happens sometimes
This commit is contained in:
parent
1f54b20397
commit
b33f2fc103
1 changed files with 15 additions and 13 deletions
|
@ -1370,20 +1370,22 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
fragmentsHistory.remove(fragmentsHistory.size() - 1);
|
fragmentsHistory.remove(fragmentsHistory.size() - 1);
|
||||||
FragmentsAvailable newFragmentType = fragmentsHistory.get(fragmentsHistory.size() - 1);
|
if (fragmentsHistory.size() > 0) {
|
||||||
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
FragmentsAvailable newFragmentType = fragmentsHistory.get(fragmentsHistory.size() - 1);
|
||||||
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
|
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
||||||
ll.setVisibility(View.VISIBLE);
|
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
|
||||||
} else {
|
ll.setVisibility(View.VISIBLE);
|
||||||
if (newFragmentType == FragmentsAvailable.DIALER
|
|
||||||
|| newFragmentType == FragmentsAvailable.ABOUT
|
|
||||||
|| newFragmentType == FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT
|
|
||||||
|| newFragmentType == FragmentsAvailable.ABOUT_INSTEAD_OF_SETTINGS
|
|
||||||
|| newFragmentType == FragmentsAvailable.SETTINGS
|
|
||||||
|| newFragmentType == FragmentsAvailable.ACCOUNT_SETTINGS) {
|
|
||||||
ll.setVisibility(View.GONE);
|
|
||||||
} else {
|
} else {
|
||||||
ll.setVisibility(View.INVISIBLE);
|
if (newFragmentType == FragmentsAvailable.DIALER
|
||||||
|
|| newFragmentType == FragmentsAvailable.ABOUT
|
||||||
|
|| newFragmentType == FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT
|
||||||
|
|| newFragmentType == FragmentsAvailable.ABOUT_INSTEAD_OF_SETTINGS
|
||||||
|
|| newFragmentType == FragmentsAvailable.SETTINGS
|
||||||
|
|| newFragmentType == FragmentsAvailable.ACCOUNT_SETTINGS) {
|
||||||
|
ll.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
ll.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue