Skip to content
Snippets Groups Projects
Commit 48240e8f authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#16987: Fix Hangup action when call is in state NULL in CallActivity

parent cb66fa40
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,9 @@ public class CallActivity extends Activity implements OnClickListener
mCall.notifyServiceAnswer(service);
break;
case R.id.buttonhangup:
if(mCall.getCallStateInt() == SipCall.CALL_STATE_CURRENT) {
if((mCall.getCallStateInt() == SipCall.CALL_STATE_NONE) ||
(mCall.getCallStateInt() == SipCall.CALL_STATE_CURRENT)) {
mCall.notifyServiceHangup(service);
finish();
}
......
......@@ -85,7 +85,6 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC
private String incomingCallID = "";
private static final int REQUEST_CODE_PREFERENCES = 1;
ImageButton buttonCall, buttonHangup;
Button buttonService;
static Animation animation;
ContactListFragment mContactListFragment;
CallElementList mCallElementList;
......@@ -95,6 +94,10 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC
public AccountList mAccountList = new AccountList();
public CallList mCallList = new CallList(this);
private static final int ACTION_BAR_TAB_CONTACT = 0;
private static final int ACTION_BAR_TAB_CALL = 1;
private static final int ACTION_BAR_TAB_HISTORY = 2;
/**
* The {@link ViewPager} that will host the section contents.
*/
......@@ -154,7 +157,7 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC
actionBar.addTab(actionBar.newTab().setIcon(icon_res_id[i]).setText(mSectionsPagerAdapter.getPageTitle(i)).setTabListener(this));
}
actionBar.setSelectedNavigationItem(1);
actionBar.setSelectedNavigationItem(ACTION_BAR_TAB_CALL);
buttonCall = (ImageButton) findViewById(R.id.buttonCall);
buttonHangup = (ImageButton) findViewById(R.id.buttonHangUp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment