Skip to content
Snippets Groups Projects
Commit 80a9916d authored by Alexandre Lision's avatar Alexandre Lision
Browse files

MenuFragment: fixed bug with account selection

parent 6d75d060
No related branches found
No related tags found
No related merge requests found
......@@ -267,7 +267,6 @@ public class CallActivity extends Activity implements CallInterface, CallFragmen
HashMap<String, SipCall> callMap = (HashMap<String, SipCall>) service.getCallList();
HashMap<String, Conference> confMap = (HashMap<String, Conference>) service.getConferenceList();
if (callMap.size() == 0 && confMap.size() == 0) {
finishActivity(RESULT_FAILURE);
finish();
}
} catch (RemoteException e) {
......
......@@ -321,35 +321,35 @@ public class CallListFragment extends Fragment {
}
private void makeTransferDialog(int groupPosition) {
FragmentManager fm = getFragmentManager();
TransferDFragment editNameDialog = new TransferDFragment();
if (!mAdapter.getItem(groupPosition).hasMultipleParticipants()) {
Bundle b = new Bundle();
b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
editNameDialog.setArguments(b);
editNameDialog.setTargetFragment(this, REQUEST_TRANSFER);
editNameDialog.show(fm, "dialog");
} else {
Toast.makeText(getActivity(), "Transfer a Conference ?", Toast.LENGTH_SHORT).show();
}
}
private void makeConferenceDialog(int groupPosition) {
FragmentManager fm = getFragmentManager();
ConferenceDFragment confDialog = ConferenceDFragment.newInstance();
Bundle b = new Bundle();
b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
confDialog.setArguments(b);
confDialog.setTargetFragment(this, REQUEST_CONF);
confDialog.show(fm, "dialog");
}
// private void makeTransferDialog(int groupPosition) {
// FragmentManager fm = getFragmentManager();
// TransferDFragment editNameDialog = new TransferDFragment();
//
// if (!mAdapter.getItem(groupPosition).hasMultipleParticipants()) {
// Bundle b = new Bundle();
// b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
// b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
// editNameDialog.setArguments(b);
// editNameDialog.setTargetFragment(this, REQUEST_TRANSFER);
// editNameDialog.show(fm, "dialog");
// } else {
// Toast.makeText(getActivity(), "Transfer a Conference ?", Toast.LENGTH_SHORT).show();
// }
//
// }
//
// private void makeConferenceDialog(int groupPosition) {
// FragmentManager fm = getFragmentManager();
// ConferenceDFragment confDialog = ConferenceDFragment.newInstance();
//
// Bundle b = new Bundle();
// b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
// b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
// confDialog.setArguments(b);
// confDialog.setTargetFragment(this, REQUEST_CONF);
// confDialog.show(fm, "dialog");
//
// }
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
......
......@@ -204,8 +204,7 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<ArrayList<
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
mAccountAdapter.setSelectedAccount(-1);
}
});
......@@ -266,8 +265,6 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<ArrayList<
public void updateAllAccounts() {
if (getActivity() != null)
getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
mAccountAdapter.setSelectedAccount(-1);
}
public void updateAccount(Intent accountState) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment