This commit is contained in:
iNPUTmice 2014-10-14 12:02:48 +02:00
parent bbb0693f4a
commit 4fdc6b2eac
15 changed files with 39 additions and 43 deletions

View file

@ -15,11 +15,11 @@ import org.openintents.openpgp.util.OpenPgpApi;
import org.openintents.openpgp.util.OpenPgpApi.IOpenPgpCallback;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.ui.UiCallback;

View file

@ -1,4 +1,4 @@
package eu.siacs.conversations;
package eu.siacs.conversations.entities;
import java.io.File;
import java.io.FileInputStream;
@ -18,6 +18,7 @@ import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.utils.CryptoHelper;
import android.util.Log;

View file

@ -12,8 +12,8 @@ import javax.net.ssl.HttpsURLConnection;
import android.util.Log;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.Downloadable;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.XmppConnectionService;

View file

@ -3,8 +3,8 @@ package eu.siacs.conversations.http;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import eu.siacs.conversations.AbstractConnectionManager;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.AbstractConnectionManager;
import eu.siacs.conversations.services.XmppConnectionService;
public class HttpConnectionManager extends AbstractConnectionManager {

View file

@ -30,9 +30,9 @@ import android.util.Base64OutputStream;
import android.util.Log;
import android.util.LruCache;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.ImageProvider;
import eu.siacs.conversations.utils.CryptoHelper;

View file

@ -1,6 +1,5 @@
package eu.siacs.conversations;
package eu.siacs.conversations.services;
import eu.siacs.conversations.services.XmppConnectionService;
public class AbstractConnectionManager {
protected XmppConnectionService mXmppConnectionService;

View file

@ -171,33 +171,31 @@ public class ConferenceDetailsActivity extends XmppActivity {
}
protected void registerListener() {
if (xmppConnectionServiceBound) {
xmppConnectionService
.setOnConversationListChangedListener(this.onConvChanged);
xmppConnectionService.setOnRenameListener(new OnRenameListener() {
xmppConnectionService
.setOnConversationListChangedListener(this.onConvChanged);
xmppConnectionService.setOnRenameListener(new OnRenameListener() {
@Override
public void onRename(final boolean success) {
runOnUiThread(new Runnable() {
@Override
public void onRename(final boolean success) {
runOnUiThread(new Runnable() {
@Override
public void run() {
populateView();
if (success) {
Toast.makeText(
ConferenceDetailsActivity.this,
getString(R.string.your_nick_has_been_changed),
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ConferenceDetailsActivity.this,
getString(R.string.nick_in_use),
Toast.LENGTH_SHORT).show();
}
@Override
public void run() {
populateView();
if (success) {
Toast.makeText(
ConferenceDetailsActivity.this,
getString(R.string.your_nick_has_been_changed),
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ConferenceDetailsActivity.this,
getString(R.string.nick_in_use),
Toast.LENGTH_SHORT).show();
}
});
}
});
}
}
});
}
});
}
private void populateView() {

View file

@ -736,11 +736,9 @@ public class ConversationActivity extends XmppActivity implements
}
public void registerListener() {
if (xmppConnectionServiceBound) {
xmppConnectionService.setOnConversationListChangedListener(this);
xmppConnectionService.setOnAccountListChangedListener(this);
xmppConnectionService.setOnRosterUpdateListener(this);
}
xmppConnectionService.setOnConversationListChangedListener(this);
xmppConnectionService.setOnAccountListChangedListener(this);
xmppConnectionService.setOnRosterUpdateListener(this);
}
@Override

View file

@ -13,10 +13,10 @@ import android.graphics.BitmapFactory;
import android.net.Uri;
import android.util.Log;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Downloadable;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.xml.Element;

View file

@ -7,10 +7,10 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import android.annotation.SuppressLint;
import android.util.Log;
import eu.siacs.conversations.AbstractConnectionManager;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.AbstractConnectionManager;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;

View file

@ -8,8 +8,8 @@ import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import android.util.Base64;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;

View file

@ -10,7 +10,7 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.utils.CryptoHelper;
public class JingleSocks5Transport extends JingleTransport {

View file

@ -1,6 +1,6 @@
package eu.siacs.conversations.xmpp.jingle;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.DownloadableFile;
public abstract class JingleTransport {
public abstract void connect(final OnTransportConnected callback);

View file

@ -1,6 +1,6 @@
package eu.siacs.conversations.xmpp.jingle;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.DownloadableFile;
public interface OnFileTransmissionStatusChanged {
public void onFileTransmitted(DownloadableFile file);

View file

@ -1,6 +1,6 @@
package eu.siacs.conversations.xmpp.jingle.stanzas;
import eu.siacs.conversations.DownloadableFile;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.xml.Element;
public class Content extends Element {