use of org.gateshipone.malp.mpdservice.profilemanagement.MPDServerProfile in project malp by gateship-one.
the class BackgroundService method connectMPDServer.
/**
* Gets last used server profile and then tries to connect to it.
* As SQLite should be safe to call from different processes, this process
* should be able to see changes to the profile database instantaneously.
*/
private void connectMPDServer() {
mConnecting = true;
MPDServerProfile profile = MPDProfileManager.getInstance(this).getAutoconnectProfile();
ConnectionManager.getInstance(getApplicationContext()).setParameters(profile, this);
/* Open the actual server connection */
ConnectionManager.getInstance(getApplicationContext()).reconnectLastServer(this);
}
Aggregations