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

register accounts on startup

parent 940a9db6
Branches
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ as that of the covered work.
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/pts_main"
android:background="#000000"
android:background="@drawable/bg_72"
android:paddingBottom="@dimen/contact_drawer_handle_height" />
<ImageView
......
......@@ -104,6 +104,11 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<Bundle>, A
}
mCallbacks = (Callbacks) activity;
try {
mCallbacks.getService().registerAllAccounts();
} catch (RemoteException e) {
e.printStackTrace();
}
getLoaderManager().initLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
}
......@@ -230,7 +235,6 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<Bundle>, A
mAccountAdapter.removeAll();
ArrayList<Account> accounts = bun.getParcelableArrayList(AccountsLoader.ACCOUNTS);
mAccountAdapter.addAll(accounts);
}
@Override
......
......@@ -20,6 +20,7 @@ interface ISipService {
void setAccountOrder(in String order);
Map getAccountDetails(in String accountID);
Map getAccountTemplate();
void registerAllAccounts();
void setAccountDetails(in String accountId, in Map accountDetails);
List getCredentials(in String accountID);
void setCredentials(in String accountID, in List creds);
......
......@@ -128,6 +128,8 @@ public class SipService extends Service {
notificationManager.onServiceCreate();
mediaManager.startService();
}
/* called for each startService() */
......@@ -1328,6 +1330,17 @@ public class SipService extends Service {
});
}
@Override
public void registerAllAccounts() throws RemoteException {
getExecutor().execute(new SipRunnable() {
@Override
protected void doRun() throws SameThreadException, RemoteException {
Log.i(TAG, "SipService.registerAllAccounts() thread running...");
configurationManagerJNI.registerAllAccounts();
}
});
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment