Hide settings menu during calls
This commit is contained in:
parent
d49506881a
commit
75d7c37331
1 changed files with 12 additions and 0 deletions
|
@ -277,6 +277,18 @@ public class LinphoneActivity extends TabActivity implements SensorEventListener
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc == null)
|
||||
return true;
|
||||
// hide settings menu when in call
|
||||
// otherwise, exiting the 'setting' menu will cause exosip deletion/recreation...
|
||||
menu.findItem(R.id.menu_settings).setVisible(!lc.isIncall());
|
||||
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
|
|
Loading…
Reference in a new issue