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 ...@@ -267,7 +267,6 @@ public class CallActivity extends Activity implements CallInterface, CallFragmen
HashMap<String, SipCall> callMap = (HashMap<String, SipCall>) service.getCallList(); HashMap<String, SipCall> callMap = (HashMap<String, SipCall>) service.getCallList();
HashMap<String, Conference> confMap = (HashMap<String, Conference>) service.getConferenceList(); HashMap<String, Conference> confMap = (HashMap<String, Conference>) service.getConferenceList();
if (callMap.size() == 0 && confMap.size() == 0) { if (callMap.size() == 0 && confMap.size() == 0) {
finishActivity(RESULT_FAILURE);
finish(); finish();
} }
} catch (RemoteException e) { } catch (RemoteException e) {
......
...@@ -321,35 +321,35 @@ public class CallListFragment extends Fragment { ...@@ -321,35 +321,35 @@ public class CallListFragment extends Fragment {
} }
private void makeTransferDialog(int groupPosition) { // private void makeTransferDialog(int groupPosition) {
FragmentManager fm = getFragmentManager(); // FragmentManager fm = getFragmentManager();
TransferDFragment editNameDialog = new TransferDFragment(); // TransferDFragment editNameDialog = new TransferDFragment();
//
if (!mAdapter.getItem(groupPosition).hasMultipleParticipants()) { // if (!mAdapter.getItem(groupPosition).hasMultipleParticipants()) {
Bundle b = new Bundle(); // Bundle b = new Bundle();
b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition)); // b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
b.putParcelable("call_selected", mAdapter.getItem(groupPosition)); // b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
editNameDialog.setArguments(b); // editNameDialog.setArguments(b);
editNameDialog.setTargetFragment(this, REQUEST_TRANSFER); // editNameDialog.setTargetFragment(this, REQUEST_TRANSFER);
editNameDialog.show(fm, "dialog"); // editNameDialog.show(fm, "dialog");
} else { // } else {
Toast.makeText(getActivity(), "Transfer a Conference ?", Toast.LENGTH_SHORT).show(); // Toast.makeText(getActivity(), "Transfer a Conference ?", Toast.LENGTH_SHORT).show();
} // }
//
} // }
//
private void makeConferenceDialog(int groupPosition) { // private void makeConferenceDialog(int groupPosition) {
FragmentManager fm = getFragmentManager(); // FragmentManager fm = getFragmentManager();
ConferenceDFragment confDialog = ConferenceDFragment.newInstance(); // ConferenceDFragment confDialog = ConferenceDFragment.newInstance();
//
Bundle b = new Bundle(); // Bundle b = new Bundle();
b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition)); // b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
b.putParcelable("call_selected", mAdapter.getItem(groupPosition)); // b.putParcelable("call_selected", mAdapter.getItem(groupPosition));
confDialog.setArguments(b); // confDialog.setArguments(b);
confDialog.setTargetFragment(this, REQUEST_CONF); // confDialog.setTargetFragment(this, REQUEST_CONF);
confDialog.show(fm, "dialog"); // confDialog.show(fm, "dialog");
//
} // }
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
......
...@@ -204,8 +204,7 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<ArrayList< ...@@ -204,8 +204,7 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<ArrayList<
@Override @Override
public void onNothingSelected(AdapterView<?> arg0) { 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< ...@@ -266,8 +265,6 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<ArrayList<
public void updateAllAccounts() { public void updateAllAccounts() {
if (getActivity() != null) if (getActivity() != null)
getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this); getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
mAccountAdapter.setSelectedAccount(-1);
} }
public void updateAccount(Intent accountState) { 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