Skip to content
Snippets Groups Projects
Commit 30e7b777 authored by Thibault Wittemberg's avatar Thibault Wittemberg
Browse files

ui: do not display a dialog after SIP account creation

When adding a SIP account the dialog 'Account device added' was shown.
This dialog notifies the user that his Ring account is now available on
this device. It should not be presented when creating a SIP account.

Change-Id: I86066b6d9cbe9e33e9cac9fbb2fe1f8a7027c847
Tuleap: #1112
parent f79762c0
Branches
Tags
No related merge requests found
......@@ -195,6 +195,7 @@ public class AccountCreationFragment extends Fragment {
}
return true;
}
/***********************
* Ring Account Creation
***********************/
......@@ -239,6 +240,7 @@ public class AccountCreationFragment extends Fragment {
}
}
}
/************************
* Ring Account ADD
***********************/
......@@ -263,6 +265,7 @@ public class AccountCreationFragment extends Fragment {
initAccountCreation(null, mRingPin.getText().toString(), mRingAddPassword.getText().toString());
}
}
/************************
* SIP Account ADD
***********************/
......@@ -764,6 +767,7 @@ public class AccountCreationFragment extends Fragment {
@Override
protected final String doInBackground(HashMap<String, String>... accounts) {
final Account account = mCallbacks.getService().createAccount(accounts[0]);
account.stateListener = new Account.OnStateChangedListener() {
@Override
public void stateChanged(String state, int code) {
......@@ -775,6 +779,13 @@ public class AccountCreationFragment extends Fragment {
}
progress = null;
}
if (account.isSip()) {
getActivity().setResult(Activity.RESULT_OK, new Intent());
getActivity().finish();
return;
}
AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());
dialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment