rebranding

This commit is contained in:
Daniel Gultsch 2014-02-28 18:46:01 +01:00
parent 03d96266f8
commit acf80bddd0
56 changed files with 295 additions and 278 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.gultsch.chat" package="eu.siacs.conversations"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0" > android:versionName="1.0" >
@ -18,10 +18,10 @@
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light" > android:theme="@android:style/Theme.Holo.Light" >
<service android:name="de.gultsch.chat.services.XmppConnectionService"/> <service android:name="eu.siacs.conversations.services.XmppConnectionService"/>
<activity <activity
android:name="de.gultsch.chat.ui.ConversationActivity" android:name="eu.siacs.conversations.ui.ConversationActivity"
android:label="Secure Conversations" android:label="Conversations"
android:windowSoftInputMode="stateHidden" android:windowSoftInputMode="stateHidden"
android:configChanges="orientation|screenSize"> android:configChanges="orientation|screenSize">
<intent-filter> <intent-filter>
@ -36,19 +36,19 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="de.gultsch.chat.ui.SettingsActivity" android:name="eu.siacs.conversations.ui.SettingsActivity"
android:label="Settings" android:label="Settings"
android:parentActivityName="de.gultsch.chat.ui.ConversationActivity" > android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity" >
</activity> </activity>
<activity <activity
android:name="de.gultsch.chat.ui.ManageAccountActivity" android:name="eu.siacs.conversations.ui.ManageAccountActivity"
android:label="Manage Accounts" android:label="Manage Accounts"
android:parentActivityName="de.gultsch.chat.ui.ConversationActivity" > android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity" >
</activity> </activity>
<activity <activity
android:name="de.gultsch.chat.ui.NewConversationActivity" android:name="eu.siacs.conversations.ui.NewConversationActivity"
android:label="@string/title_activity_new_conversation" android:label="@string/title_activity_new_conversation"
android:parentActivityName="de.gultsch.chat.ui.ConversationActivity" android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity"
android:windowSoftInputMode="stateHidden"> android:windowSoftInputMode="stateHidden">
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"

View file

@ -1,5 +1,5 @@
/** Automatically generated file. DO NOT MODIFY */ /** Automatically generated file. DO NOT MODIFY */
package de.gultsch.chat; package eu.siacs.conversations;
public final class BuildConfig { public final class BuildConfig {
public final static boolean DEBUG = true; public final static boolean DEBUG = true;

View file

@ -5,7 +5,7 @@
* should not be modified by hand. * should not be modified by hand.
*/ */
package de.gultsch.chat; package eu.siacs.conversations;
public final class R { public final class R {
public static final class array { public static final class array {
@ -31,37 +31,40 @@ public final class R {
public static final int ic_action_add_person=0x7f020002; public static final int ic_action_add_person=0x7f020002;
public static final int ic_action_cancel_launchersize=0x7f020003; public static final int ic_action_cancel_launchersize=0x7f020003;
public static final int ic_action_delete=0x7f020004; public static final int ic_action_delete=0x7f020004;
public static final int ic_action_refresh=0x7f020005; public static final int ic_action_group=0x7f020005;
public static final int ic_action_secure=0x7f020006; public static final int ic_action_person=0x7f020006;
public static final int ic_action_send=0x7f020007; public static final int ic_action_refresh=0x7f020007;
public static final int ic_action_send_now=0x7f020008; public static final int ic_action_secure=0x7f020008;
public static final int ic_action_unsecure=0x7f020009; public static final int ic_action_send=0x7f020009;
public static final int ic_launcher=0x7f02000a; public static final int ic_action_send_now=0x7f02000a;
public static final int ic_profile=0x7f02000b; public static final int ic_action_unsecure=0x7f02000b;
public static final int message_border=0x7f02000c; public static final int ic_launcher=0x7f02000c;
public static final int notification=0x7f02000d; public static final int ic_profile=0x7f02000d;
public static final int section_header=0x7f02000e; public static final int message_border=0x7f02000e;
public static final int notification=0x7f02000f;
public static final int section_header=0x7f020010;
} }
public static final class id { public static final class id {
public static final int account_confirm_password_desc=0x7f0a001c; public static final int account_confirm_password_desc=0x7f0a001c;
public static final int account_delete=0x7f0a0037; public static final int account_delete=0x7f0a0038;
public static final int account_disable=0x7f0a0038; public static final int account_disable=0x7f0a0039;
public static final int account_enable=0x7f0a0039; public static final int account_enable=0x7f0a003a;
public static final int account_jid=0x7f0a0000; public static final int account_jid=0x7f0a0000;
public static final int account_list=0x7f0a0029; public static final int account_list=0x7f0a0029;
public static final int account_password=0x7f0a0019; public static final int account_password=0x7f0a0019;
public static final int account_password_confirm2=0x7f0a001d; public static final int account_password_confirm2=0x7f0a001d;
public static final int account_status=0x7f0a0002; public static final int account_status=0x7f0a0002;
public static final int account_usetls=0x7f0a001a; public static final int account_usetls=0x7f0a001a;
public static final int action_accounts=0x7f0a0031; public static final int action_accounts=0x7f0a0032;
public static final int action_add=0x7f0a002d; public static final int action_add=0x7f0a002d;
public static final int action_add_account=0x7f0a0036; public static final int action_add_account=0x7f0a0037;
public static final int action_archive=0x7f0a0030; public static final int action_archive=0x7f0a0031;
public static final int action_details=0x7f0a002f; public static final int action_contact_details=0x7f0a002f;
public static final int action_refresh_contacts=0x7f0a003b; public static final int action_muc_details=0x7f0a0030;
public static final int action_refresh_contacts=0x7f0a003c;
public static final int action_security=0x7f0a002e; public static final int action_security=0x7f0a002e;
public static final int action_settings=0x7f0a0032; public static final int action_settings=0x7f0a0033;
public static final int announce_pgp=0x7f0a003a; public static final int announce_pgp=0x7f0a003b;
public static final int contactList=0x7f0a0006; public static final int contactList=0x7f0a0006;
public static final int contact_display_name=0x7f0a0008; public static final int contact_display_name=0x7f0a0008;
public static final int contact_jid=0x7f0a0009; public static final int contact_jid=0x7f0a0009;
@ -79,9 +82,9 @@ public final class R {
public static final int details_receive_presence=0x7f0a0014; public static final int details_receive_presence=0x7f0a0014;
public static final int details_send_presence=0x7f0a0013; public static final int details_send_presence=0x7f0a0013;
public static final int edit_account_register_new=0x7f0a001b; public static final int edit_account_register_new=0x7f0a001b;
public static final int encryption_choice_none=0x7f0a0033; public static final int encryption_choice_none=0x7f0a0034;
public static final int encryption_choice_otr=0x7f0a0034; public static final int encryption_choice_otr=0x7f0a0035;
public static final int encryption_choice_pgp=0x7f0a0035; public static final int encryption_choice_pgp=0x7f0a0036;
public static final int info_box=0x7f0a0022; public static final int info_box=0x7f0a0022;
public static final int list=0x7f0a0027; public static final int list=0x7f0a0027;
public static final int message_body=0x7f0a002b; public static final int message_body=0x7f0a002b;
@ -129,19 +132,20 @@ public final class R {
public static final class string { public static final class string {
public static final int action_accounts=0x7f050005; public static final int action_accounts=0x7f050005;
public static final int action_add=0x7f050004; public static final int action_add=0x7f050004;
public static final int action_add_account=0x7f050009; public static final int action_add_account=0x7f05000a;
public static final int action_archive=0x7f050006; public static final int action_archive=0x7f050006;
public static final int action_details=0x7f050007; public static final int action_contact_details=0x7f050007;
public static final int action_secure=0x7f050008; public static final int action_muc_details=0x7f050008;
public static final int action_secure=0x7f050009;
public static final int action_settings=0x7f050003; public static final int action_settings=0x7f050003;
public static final int announce_pgp=0x7f05000d; public static final int announce_pgp=0x7f05000e;
public static final int app_name=0x7f050002; public static final int app_name=0x7f050002;
public static final int encrypted_message=0x7f05000e; public static final int encrypted_message=0x7f05000f;
public static final int just_now=0x7f05000b; public static final int just_now=0x7f05000c;
public static final int openpgp_install_openkeychain_via=0x7f050001; public static final int openpgp_install_openkeychain_via=0x7f050001;
public static final int openpgp_list_preference_none=0x7f050000; public static final int openpgp_list_preference_none=0x7f050000;
public static final int sending=0x7f05000c; public static final int sending=0x7f05000d;
public static final int title_activity_new_conversation=0x7f05000a; public static final int title_activity_new_conversation=0x7f05000b;
} }
public static final class style { public static final class style {
/** /**

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,004 B

View file

@ -15,10 +15,17 @@
android:title="@string/action_secure" /> android:title="@string/action_secure" />
<item <item
android:id="@+id/action_details" android:id="@+id/action_contact_details"
android:orderInCategory="40" android:orderInCategory="40"
android:showAsAction="never" android:showAsAction="ifRoom"
android:title="@string/action_details" /> android:icon="@drawable/ic_action_person"
android:title="@string/action_contact_details" />
<item
android:id="@+id/action_muc_details"
android:orderInCategory="40"
android:showAsAction="ifRoom"
android:icon="@drawable/ic_action_group"
android:title="@string/action_muc_details" />
<item <item
android:id="@+id/action_archive" android:id="@+id/action_archive"

View file

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Secure Conversations</string> <string name="app_name">Conversations</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="action_add">New conversation</string> <string name="action_add">New conversation</string>
<string name="action_accounts">Manage accounts</string> <string name="action_accounts">Manage accounts</string>
<string name="action_archive">Archive conversation</string> <string name="action_archive">Archive conversation</string>
<string name="action_details">Contact details</string> <string name="action_contact_details">Contact details</string>
<string name="action_muc_details">Conferenece details</string>
<string name="action_secure">Secure conversation</string> <string name="action_secure">Secure conversation</string>
<string name="action_add_account">Add account</string> <string name="action_add_account">Add account</string>
<string name="title_activity_new_conversation">New Conversation</string> <string name="title_activity_new_conversation">New Conversation</string>

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.crypto; package eu.siacs.conversations.crypto;
import java.math.BigInteger; import java.math.BigInteger;
import java.security.KeyFactory; import java.security.KeyFactory;
@ -17,10 +17,10 @@ import org.json.JSONObject;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.persistance.DatabaseBackend; import eu.siacs.conversations.persistance.DatabaseBackend;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
import de.gultsch.chat.xmpp.MessagePacket; import eu.siacs.conversations.xmpp.MessagePacket;
import net.java.otr4j.OtrEngineHost; import net.java.otr4j.OtrEngineHost;
import net.java.otr4j.OtrException; import net.java.otr4j.OtrException;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.crypto; package eu.siacs.conversations.crypto;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import java.io.Serializable; import java.io.Serializable;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import java.security.interfaces.DSAPublicKey; import java.security.interfaces.DSAPublicKey;
@ -8,8 +8,8 @@ import net.java.otr4j.crypto.OtrCryptoException;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import de.gultsch.chat.crypto.OtrEngine; import eu.siacs.conversations.crypto.OtrEngine;
import de.gultsch.chat.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.XmppConnection;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.database.Cursor; import android.database.Cursor;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashSet; import java.util.HashSet;
@ -9,7 +9,7 @@ import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
import android.content.ContentValues; import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;

View file

@ -1,11 +1,11 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import java.security.interfaces.DSAPublicKey; import java.security.interfaces.DSAPublicKey;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.gultsch.chat.crypto.OtrEngine; import eu.siacs.conversations.crypto.OtrEngine;
import de.gultsch.chat.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.XmppConnection;
import net.java.otr4j.OtrException; import net.java.otr4j.OtrException;
import net.java.otr4j.crypto.OtrCryptoEngineImpl; import net.java.otr4j.crypto.OtrCryptoEngineImpl;
@ -59,6 +59,8 @@ public class Conversation extends AbstractEntity {
public int nextMessageEncryption = Message.ENCRYPTION_NONE; public int nextMessageEncryption = Message.ENCRYPTION_NONE;
private transient MucOptions mucOptions = null;
public Conversation(String name, Account account, public Conversation(String name, Account account,
String contactJid, int mode) { String contactJid, int mode) {
this(java.util.UUID.randomUUID().toString(), name, null, account.getUuid(), contactJid, System this(java.util.UUID.randomUUID().toString(), name, null, account.getUuid(), contactJid, System
@ -268,4 +270,15 @@ public class Conversation extends AbstractEntity {
} }
return this.otrFingerprint; return this.otrFingerprint;
} }
public MucOptions getMucOptions() {
if (this.mucOptions == null) {
this.mucOptions = new MucOptions();
}
return this.mucOptions ;
}
public void resetMucOptions() {
this.mucOptions = null;
}
} }

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import android.content.ContentValues; import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;

View file

@ -0,0 +1,5 @@
package eu.siacs.conversations.entities;
public class MucOptions {
}

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.entities; package eu.siacs.conversations.entities;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Iterator; import java.util.Iterator;

View file

@ -1,14 +1,14 @@
package de.gultsch.chat.persistance; package eu.siacs.conversations.persistance;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.entities.Message; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.entities.Presences; import eu.siacs.conversations.entities.Presences;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.database.Cursor; import android.database.Cursor;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.persistance; package eu.siacs.conversations.persistance;
public interface OnPhoneContactsMerged { public interface OnPhoneContactsMerged {
public void phoneContactsMerged(); public void phoneContactsMerged();

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.services; package eu.siacs.conversations.services;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -14,31 +14,31 @@ import net.java.otr4j.OtrException;
import net.java.otr4j.session.Session; import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus; import net.java.otr4j.session.SessionStatus;
import de.gultsch.chat.crypto.PgpEngine; import eu.siacs.conversations.crypto.PgpEngine;
import de.gultsch.chat.crypto.PgpEngine.OpenPgpException; import eu.siacs.conversations.crypto.PgpEngine.OpenPgpException;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.entities.Message; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.entities.Presences; import eu.siacs.conversations.entities.Presences;
import de.gultsch.chat.persistance.DatabaseBackend; import eu.siacs.conversations.persistance.DatabaseBackend;
import de.gultsch.chat.persistance.OnPhoneContactsMerged; import eu.siacs.conversations.persistance.OnPhoneContactsMerged;
import de.gultsch.chat.ui.OnAccountListChangedListener; import eu.siacs.conversations.ui.OnAccountListChangedListener;
import de.gultsch.chat.ui.OnConversationListChangedListener; import eu.siacs.conversations.ui.OnConversationListChangedListener;
import de.gultsch.chat.ui.OnRosterFetchedListener; import eu.siacs.conversations.ui.OnRosterFetchedListener;
import de.gultsch.chat.utils.MessageParser; import eu.siacs.conversations.utils.MessageParser;
import de.gultsch.chat.utils.OnPhoneContactsLoadedListener; import eu.siacs.conversations.utils.OnPhoneContactsLoadedListener;
import de.gultsch.chat.utils.PhoneHelper; import eu.siacs.conversations.utils.PhoneHelper;
import de.gultsch.chat.utils.UIHelper; import eu.siacs.conversations.utils.UIHelper;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
import de.gultsch.chat.xmpp.IqPacket; import eu.siacs.conversations.xmpp.IqPacket;
import de.gultsch.chat.xmpp.MessagePacket; import eu.siacs.conversations.xmpp.MessagePacket;
import de.gultsch.chat.xmpp.OnIqPacketReceived; import eu.siacs.conversations.xmpp.OnIqPacketReceived;
import de.gultsch.chat.xmpp.OnMessagePacketReceived; import eu.siacs.conversations.xmpp.OnMessagePacketReceived;
import de.gultsch.chat.xmpp.OnPresencePacketReceived; import eu.siacs.conversations.xmpp.OnPresencePacketReceived;
import de.gultsch.chat.xmpp.OnStatusChanged; import eu.siacs.conversations.xmpp.OnStatusChanged;
import de.gultsch.chat.xmpp.PresencePacket; import eu.siacs.conversations.xmpp.PresencePacket;
import de.gultsch.chat.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.XmppConnection;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.Service; import android.app.Service;
import android.content.Context; import android.content.Context;
@ -188,12 +188,13 @@ public class XmppConnectionService extends Service {
@Override @Override
public void onPresencePacketReceived(Account account, public void onPresencePacketReceived(Account account,
PresencePacket packet) { PresencePacket packet) {
if (packet.hasChild("x")&&(packet.findChild("x").getAttribute("xmlns").startsWith("http://jabber.org/protocol/muc"))) {
Log.d(LOGTAG,"got muc presence "+packet.toString());
} else {
String[] fromParts = packet.getAttribute("from").split("/"); String[] fromParts = packet.getAttribute("from").split("/");
Contact contact = findContact(account, fromParts[0]); Contact contact = findContact(account, fromParts[0]);
if (contact == null) { if (contact == null) {
// most likely muc, self or roster not synced // most likely self or roster not synced
Log.d(LOGTAG,
"got presence for non contact " + packet.toString());
return; return;
} }
String type = packet.getAttribute("type"); String type = packet.getAttribute("type");
@ -250,10 +251,11 @@ public class XmppConnectionService extends Service {
// TODO: ask user to handle it maybe // TODO: ask user to handle it maybe
} }
} else { } else {
Log.d(LOGTAG, packet.toString()); //Log.d(LOGTAG, packet.toString());
} }
replaceContactInConversation(contact.getJid(), contact); replaceContactInConversation(contact.getJid(), contact);
} }
}
}; };
private OnIqPacketReceived unknownIqListener = new OnIqPacketReceived() { private OnIqPacketReceived unknownIqListener = new OnIqPacketReceived() {

View file

@ -1,22 +1,16 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import org.openintents.openpgp.OpenPgpSignatureResult; import eu.siacs.conversations.R;
import org.openintents.openpgp.util.OpenPgpConstants; import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.R; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.R.id; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.crypto.PgpEngine; import eu.siacs.conversations.utils.UIHelper;
import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException;
import de.gultsch.chat.entities.Account;
import de.gultsch.chat.entities.Contact;
import de.gultsch.chat.entities.Conversation;
import de.gultsch.chat.entities.Message;
import de.gultsch.chat.utils.UIHelper;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.app.AlertDialog; import android.app.AlertDialog;
@ -25,7 +19,6 @@ import android.app.NotificationManager;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.support.v4.widget.SlidingPaneLayout; import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener; import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
@ -67,7 +60,6 @@ public class ConversationActivity extends XmppActivity {
@Override @Override
public void onConversationListChanged() { public void onConversationListChanged() {
final Conversation currentConv = getSelectedConversation();
conversationList.clear(); conversationList.clear();
conversationList.addAll(xmppConnectionService conversationList.addAll(xmppConnectionService
.getConversations()); .getConversations());
@ -104,8 +96,6 @@ public class ConversationActivity extends XmppActivity {
xmppConnectionService.createContact(contact); xmppConnectionService.createContact(contact);
} }
}; };
private boolean contactInserted = false;
public List<Conversation> getConversationList() { public List<Conversation> getConversationList() {
return this.conversationList; return this.conversationList;
@ -206,7 +196,7 @@ public class ConversationActivity extends XmppActivity {
} }
} }
}); });
spl = (SlidingPaneLayout) findViewById(id.slidingpanelayout); spl = (SlidingPaneLayout) findViewById(R.id.slidingpanelayout);
spl.setParallaxDistance(150); spl.setParallaxDistance(150);
spl.setShadowResource(R.drawable.es_slidingpane_shadow); spl.setShadowResource(R.drawable.es_slidingpane_shadow);
spl.setSliderFadeColor(0); spl.setSliderFadeColor(0);
@ -257,19 +247,26 @@ public class ConversationActivity extends XmppActivity {
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.conversations, menu); getMenuInflater().inflate(R.menu.conversations, menu);
MenuItem menuSecure = (MenuItem) menu.findItem(R.id.action_security); MenuItem menuSecure = (MenuItem) menu.findItem(R.id.action_security);
MenuItem menuArchive = (MenuItem) menu.findItem(R.id.action_archive);
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
if (spl.isOpen()) { if (spl.isOpen()) {
((MenuItem) menu.findItem(R.id.action_archive)).setVisible(false); menuArchive.setVisible(false);
((MenuItem) menu.findItem(R.id.action_details)).setVisible(false); menuMucDetails.setVisible(false);
menuContactDetails.setVisible(false);
menuSecure.setVisible(false); menuSecure.setVisible(false);
} else { } else {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(false); ((MenuItem) menu.findItem(R.id.action_add)).setVisible(false);
if (this.getSelectedConversation()!=null) { if (this.getSelectedConversation()!=null) {
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) { if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
((MenuItem) menu.findItem(R.id.action_security)).setVisible(false); menuMucDetails.setVisible(true);
menuContactDetails.setVisible(false);
menuSecure.setVisible(false); menuSecure.setVisible(false);
((MenuItem) menu.findItem(R.id.action_archive)).setTitle("Leave conference"); menuArchive.setTitle("Leave conference");
} else { } else {
menuContactDetails.setVisible(true);
menuMucDetails.setVisible(false);
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) { if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
menuSecure.setIcon(R.drawable.ic_action_secure); menuSecure.setIcon(R.drawable.ic_action_secure);
} }
@ -302,7 +299,7 @@ public class ConversationActivity extends XmppActivity {
xmppConnectionService.archiveConversation(conv); xmppConnectionService.archiveConversation(conv);
selectedConversation = conversationList.get(0); selectedConversation = conversationList.get(0);
break; break;
case R.id.action_details: case R.id.action_contact_details:
DialogContactDetails details = new DialogContactDetails(); DialogContactDetails details = new DialogContactDetails();
Contact contact = this.getSelectedConversation().getContact(); Contact contact = this.getSelectedConversation().getContact();
if (contact != null) { if (contact != null) {

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.ArrayList; import java.util.ArrayList;
@ -10,15 +10,15 @@ import java.util.Set;
import net.java.otr4j.session.SessionStatus; import net.java.otr4j.session.SessionStatus;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.crypto.PgpEngine.OpenPgpException; import eu.siacs.conversations.crypto.PgpEngine.OpenPgpException;
import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException; import eu.siacs.conversations.crypto.PgpEngine.UserInputRequiredException;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.entities.Message; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import de.gultsch.chat.utils.PhoneHelper; import eu.siacs.conversations.utils.PhoneHelper;
import de.gultsch.chat.utils.UIHelper; import eu.siacs.conversations.utils.UIHelper;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Fragment; import android.app.Fragment;
import android.content.DialogInterface; import android.content.DialogInterface;

View file

@ -1,9 +1,9 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Presences; import eu.siacs.conversations.entities.Presences;
import de.gultsch.chat.utils.UIHelper; import eu.siacs.conversations.utils.UIHelper;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.app.DialogFragment; import android.app.DialogFragment;
@ -13,7 +13,6 @@ import android.os.Bundle;
import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds;
import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents; import android.provider.ContactsContract.Intents;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;

View file

@ -1,13 +1,11 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.utils.Validator; import eu.siacs.conversations.utils.Validator;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.app.DialogFragment; import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -16,7 +14,6 @@ import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText; import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
public class EditAccount extends DialogFragment { public class EditAccount extends DialogFragment {

View file

@ -1,13 +1,13 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.crypto.PgpEngine; import eu.siacs.conversations.crypto.PgpEngine;
import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException; import eu.siacs.conversations.crypto.PgpEngine.UserInputRequiredException;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.ui.EditAccount.EditAccountListener; import eu.siacs.conversations.ui.EditAccount.EditAccountListener;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;

View file

@ -1,22 +1,20 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.utils.UIHelper; import eu.siacs.conversations.utils.UIHelper;
import de.gultsch.chat.utils.Validator; import eu.siacs.conversations.utils.Validator;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.ContactsContract;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -35,13 +33,9 @@ import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.CursorLoader;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnClickListener;
import android.content.Intent; import android.content.Intent;
import android.content.Loader;
import android.content.Loader.OnLoadCompleteListener;
import android.database.Cursor;
public class NewConversationActivity extends XmppActivity { public class NewConversationActivity extends XmppActivity {

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
public interface OnAccountListChangedListener { public interface OnAccountListChangedListener {
public void onAccountListChangedListener(); public void onAccountListChangedListener();

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
public interface OnConversationListChangedListener { public interface OnConversationListChangedListener {
public void onConversationListChanged(); public void onConversationListChanged();

View file

@ -1,7 +1,8 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import java.util.List; import java.util.List;
import de.gultsch.chat.entities.Contact;
import eu.siacs.conversations.entities.Contact;
public interface OnRosterFetchedListener { public interface OnRosterFetchedListener {
public void onRosterFetched(List<Contact> roster); public void onRosterFetched(List<Contact> roster);

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;

View file

@ -1,7 +1,7 @@
package de.gultsch.chat.ui; package eu.siacs.conversations.ui;
import de.gultsch.chat.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import de.gultsch.chat.services.XmppConnectionService.XmppConnectionBinder; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder;
import android.app.Activity; import android.app.Activity;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;

View file

@ -1,16 +1,16 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.util.List; import java.util.List;
import net.java.otr4j.session.Session; import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus; import net.java.otr4j.session.SessionStatus;
import android.util.Log; import android.util.Log;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.entities.Message; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
import de.gultsch.chat.xmpp.MessagePacket; import eu.siacs.conversations.xmpp.MessagePacket;
public class MessageParser { public class MessageParser {

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.util.Hashtable; import java.util.Hashtable;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.util.Hashtable; import java.util.Hashtable;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import android.util.Base64; import android.util.Base64;

View file

@ -1,17 +1,15 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.io.FileDescriptor;
import java.io.FileNotFoundException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import de.gultsch.chat.R; import eu.siacs.conversations.R;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.entities.Contact; import eu.siacs.conversations.entities.Contact;
import de.gultsch.chat.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import de.gultsch.chat.entities.Message; import eu.siacs.conversations.entities.Message;
import de.gultsch.chat.ui.ConversationActivity; import eu.siacs.conversations.ui.ConversationActivity;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
@ -32,7 +30,6 @@ import android.preference.PreferenceManager;
import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder; import android.support.v4.app.TaskStackBuilder;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.utils; package eu.siacs.conversations.utils;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.xml; package eu.siacs.conversations.xml;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Hashtable; import java.util.Hashtable;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.xml; package eu.siacs.conversations.xml;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Iterator; import java.util.Iterator;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.xml; package eu.siacs.conversations.xml;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.xml; package eu.siacs.conversations.xml;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
public class IqPacket extends Element { public class IqPacket extends Element {

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
public class MessagePacket extends Element { public class MessagePacket extends Element {
public static final int TYPE_CHAT = 0; public static final int TYPE_CHAT = 0;

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
public interface OnIqPacketReceived { public interface OnIqPacketReceived {
public void onIqPacketReceived(Account account, IqPacket packet); public void onIqPacketReceived(Account account, IqPacket packet);

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
public interface OnMessagePacketReceived { public interface OnMessagePacketReceived {
public void onMessagePacketReceived(Account account, MessagePacket packet); public void onMessagePacketReceived(Account account, MessagePacket packet);

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
public interface OnPresencePacketReceived { public interface OnPresencePacketReceived {
public void onPresencePacketReceived(Account account, PresencePacket packet); public void onPresencePacketReceived(Account account, PresencePacket packet);

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
public interface OnStatusChanged { public interface OnStatusChanged {
public void onStatusChanged(Account account); public void onStatusChanged(Account account);

View file

@ -1,6 +1,6 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
public class PresencePacket extends Element { public class PresencePacket extends Element {
private PresencePacket(String name) { private PresencePacket(String name) {

View file

@ -1,4 +1,4 @@
package de.gultsch.chat.xmpp; package eu.siacs.conversations.xmpp;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -19,13 +19,13 @@ import org.xmlpull.v1.XmlPullParserException;
import android.os.Bundle; import android.os.Bundle;
import android.os.PowerManager; import android.os.PowerManager;
import android.util.Log; import android.util.Log;
import de.gultsch.chat.entities.Account; import eu.siacs.conversations.entities.Account;
import de.gultsch.chat.utils.DNSHelper; import eu.siacs.conversations.utils.DNSHelper;
import de.gultsch.chat.utils.SASL; import eu.siacs.conversations.utils.SASL;
import de.gultsch.chat.xml.Element; import eu.siacs.conversations.xml.Element;
import de.gultsch.chat.xml.Tag; import eu.siacs.conversations.xml.Tag;
import de.gultsch.chat.xml.XmlReader; import eu.siacs.conversations.xml.TagWriter;
import de.gultsch.chat.xml.TagWriter; import eu.siacs.conversations.xml.XmlReader;
public class XmppConnection implements Runnable { public class XmppConnection implements Runnable {