From acf80bddd07d5579cdb20a888b3f9e99e53030a5 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 28 Feb 2014 18:46:01 +0100 Subject: [PATCH] rebranding --- AndroidManifest.xml | 20 +-- .../siacs/conversations}/BuildConfig.java | 2 +- .../chat => eu/siacs/conversations}/R.java | 68 +++---- res/drawable-hdpi/ic_action_group.png | Bin 0 -> 859 bytes res/drawable-hdpi/ic_action_person.png | Bin 0 -> 573 bytes res/drawable-mdpi/ic_action_group.png | Bin 0 -> 557 bytes res/drawable-mdpi/ic_action_person.png | Bin 0 -> 468 bytes res/drawable-xhdpi/ic_action_group.png | Bin 0 -> 1086 bytes res/drawable-xhdpi/ic_action_person.png | Bin 0 -> 781 bytes res/drawable-xxhdpi/ic_action_group.png | Bin 0 -> 1560 bytes res/drawable-xxhdpi/ic_action_person.png | Bin 0 -> 1004 bytes res/menu/conversations.xml | 13 +- res/values/strings.xml | 5 +- .../conversations}/crypto/OtrEngine.java | 10 +- .../conversations}/crypto/PgpEngine.java | 2 +- .../entities/AbstractEntity.java | 2 +- .../conversations}/entities/Account.java | 6 +- .../conversations}/entities/Contact.java | 4 +- .../conversations}/entities/Conversation.java | 19 +- .../conversations}/entities/Message.java | 2 +- .../conversations/entities/MucOptions.java | 5 + .../conversations}/entities/Presences.java | 2 +- .../persistance/DatabaseBackend.java | 12 +- .../persistance/OnPhoneContactsMerged.java | 2 +- .../services/XmppConnectionService.java | 168 +++++++++--------- .../ui/ConversationActivity.java | 43 +++-- .../ui/ConversationFragment.java | 20 +-- .../ui/DialogContactDetails.java | 11 +- .../siacs/conversations}/ui/EditAccount.java | 11 +- .../ui/ManageAccountActivity.java | 12 +- .../ui/NewConversationActivity.java | 20 +-- .../ui/OnAccountListChangedListener.java | 2 +- .../ui/OnConversationListChangedListener.java | 2 +- .../ui/OnRosterFetchedListener.java | 5 +- .../conversations}/ui/SettingsActivity.java | 2 +- .../conversations}/ui/SettingsFragment.java | 4 +- .../siacs/conversations}/ui/XmppActivity.java | 6 +- .../siacs/conversations}/utils/DNSHelper.java | 2 +- .../conversations}/utils/MessageParser.java | 14 +- .../utils/OnPhoneContactsLoadedListener.java | 2 +- .../conversations}/utils/PhoneHelper.java | 2 +- .../siacs/conversations}/utils/SASL.java | 2 +- .../siacs/conversations}/utils/UIHelper.java | 17 +- .../siacs/conversations}/utils/Validator.java | 2 +- .../siacs/conversations}/xml/Element.java | 2 +- .../siacs/conversations}/xml/Tag.java | 2 +- .../siacs/conversations}/xml/TagWriter.java | 2 +- .../siacs/conversations}/xml/XmlReader.java | 2 +- .../siacs/conversations}/xmpp/IqPacket.java | 4 +- .../conversations}/xmpp/MessagePacket.java | 4 +- .../xmpp/OnIqPacketReceived.java | 4 +- .../xmpp/OnMessagePacketReceived.java | 4 +- .../xmpp/OnPresencePacketReceived.java | 4 +- .../conversations}/xmpp/OnStatusChanged.java | 4 +- .../conversations}/xmpp/PresencePacket.java | 4 +- .../conversations}/xmpp/XmppConnection.java | 16 +- 56 files changed, 295 insertions(+), 278 deletions(-) rename gen/{de/gultsch/chat => eu/siacs/conversations}/BuildConfig.java (79%) rename gen/{de/gultsch/chat => eu/siacs/conversations}/R.java (78%) create mode 100644 res/drawable-hdpi/ic_action_group.png create mode 100644 res/drawable-hdpi/ic_action_person.png create mode 100644 res/drawable-mdpi/ic_action_group.png create mode 100644 res/drawable-mdpi/ic_action_person.png create mode 100644 res/drawable-xhdpi/ic_action_group.png create mode 100644 res/drawable-xhdpi/ic_action_person.png create mode 100644 res/drawable-xxhdpi/ic_action_group.png create mode 100644 res/drawable-xxhdpi/ic_action_person.png rename src/{de/gultsch/chat => eu/siacs/conversations}/crypto/OtrEngine.java (96%) rename src/{de/gultsch/chat => eu/siacs/conversations}/crypto/PgpEngine.java (99%) rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/AbstractEntity.java (92%) rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/Account.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/Contact.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/Conversation.java (94%) rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/Message.java (98%) create mode 100644 src/eu/siacs/conversations/entities/MucOptions.java rename src/{de/gultsch/chat => eu/siacs/conversations}/entities/Presences.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/persistance/DatabaseBackend.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/persistance/OnPhoneContactsMerged.java (64%) rename src/{de/gultsch/chat => eu/siacs/conversations}/services/XmppConnectionService.java (87%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/ConversationActivity.java (93%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/ConversationFragment.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/DialogContactDetails.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/EditAccount.java (93%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/ManageAccountActivity.java (96%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/NewConversationActivity.java (95%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/OnAccountListChangedListener.java (73%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/OnConversationListChangedListener.java (73%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/OnRosterFetchedListener.java (59%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/SettingsActivity.java (91%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/SettingsFragment.java (83%) rename src/{de/gultsch/chat => eu/siacs/conversations}/ui/XmppActivity.java (88%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/DNSHelper.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/MessageParser.java (94%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/OnPhoneContactsLoadedListener.java (82%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/PhoneHelper.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/SASL.java (94%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/UIHelper.java (95%) rename src/{de/gultsch/chat => eu/siacs/conversations}/utils/Validator.java (90%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xml/Element.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xml/Tag.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xml/TagWriter.java (97%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xml/XmlReader.java (98%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/IqPacket.java (88%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/MessagePacket.java (95%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/OnIqPacketReceived.java (56%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/OnMessagePacketReceived.java (59%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/OnPresencePacketReceived.java (59%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/OnStatusChanged.java (50%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/PresencePacket.java (67%) rename src/{de/gultsch/chat => eu/siacs/conversations}/xmpp/XmppConnection.java (97%) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 28640fc70..d511bef57 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,6 +1,6 @@ @@ -18,10 +18,10 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Holo.Light" > - + @@ -36,19 +36,19 @@ + android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity" > + android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity" > UdP&%NJkG#nfp92^|}V?3yXX}8<$;PEW;`R8OZnciCipmY|}0F-azaRBlRwv-myq=V-$<=8~ zvp8lsixHbcjS&l$y%fVT!?SU(6bg~I16gl1oqoVI=6wJg2aLN2be;}hEU$h1KEeB` zlFV9THT;k85Kku9cT8S0%1RVZA8^e{6%PnLfc8P6a1YF;RMw+Wf)VJ5?>^Rq5HvDS zKBV#~kF+%VW=CZiT{I4iMtb+H!dsvB~@O!?768dV*|j*XMCrp zJ!O11Dc}W2I^%`3d7fx5lWIMxXmAPRJZ3(H6=aDK7us2fr(w!aPU$n~8|IV+=oe@#bBi)AHx;GDiyxuD znXHwMSi4YWo^1n}9qgH6f0F9~rSg)M5ZDgtrC*Jj$}}0l%?67|YtK!1P)v liw+JB4h{|uHtb@?P)NoT2edg zONyxl3wC-I3zq*eJM1ia7{pYQVMxG2GF5{Z0>gRBU2?N*Wv}n{gK$rB)3j;dJE!mK zoK{PrP$(3NKa6%6jmB}@$K`b6@oSoer@)0iA zsBq6uGSmnn-hKP-2$8=*9XotxN9e5A>%A-%i_h8w(6qVBnKF4eBoR*#@m-Wd;5h(; zg5>!~415R#9)I7?_e5X`CDc~sBVYt~LsN%rzt{wkcfTXV}+}43d zr*qULyC0F)ahdl+)>gFwtdGI|ov{U&;MvIG9JyWlA|FrWy9UO5F9)gNp5*O&{Vi=& z??yppKsK6Bt@~|unND0z-rDL(6YTVG!&X@G&o;!6bq*=u@ONe)KlbfgGSC<@X1^Uu zR?r0G=Mw#jM@k4u$lF9rj3sRs>Kw#pn&hQMfaT!z+@8{3&T=fcVT*p|n~&Qb2#7Dris>9xWx!CCsDuqI!P$(2q_z_?L%;tYYNJMwr00000 LNkvXXu0mjfvIqx? literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_group.png b/res/drawable-mdpi/ic_action_group.png new file mode 100644 index 0000000000000000000000000000000000000000..06dbeecd9ecbed3f74126796c03b030adffcf6b1 GIT binary patch literal 557 zcmV+|0@D47P))064~xL%Rs^h9tJV5X3Ba*941uE*l@0I=B2n!G;Jl0F9_Z$%#=tE| z#6|4xl}JEXz_~-6uyO_vsigNxOS7bP3fz?}?*teDC;Z+5FUZVRSK7DK_!>AgQknp# zB?){0$G`!WTr&WzcC36QO;&+sdzDi5D=7#3buw%$tOxUpQAoX;kSsX7qy^ vM(=>OtkTY5zo}{dyXFXPq>)CHdDsGWA00000NkvXXu0mjfoYeqn literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_person.png b/res/drawable-mdpi/ic_action_person.png new file mode 100644 index 0000000000000000000000000000000000000000..359da1c124a16fb2c03c9c6cdd83a9ad5a24d680 GIT binary patch literal 468 zcmV;_0W1EAP)`CV+)Vb#KtJ8a}`Y#Ik65D0aX_ApQmoR#1Vn7f*sMhN`_twOjzo z)4){C22EJnK=xap*c0?}0w^90Eg^RT9eI@&B_XI3w1jd&#qM#aZ$Uxs3@wO`11(=b zv$_E22#^DOk?H{kr21ep(DLInuZ)liCr&8$JJ90CG^-7v^?);4@PjZc9mqiA-T=x6 zg~DE-qrOq>0H{whu>?6G0E&|7ghGay2%i^|VL7ZM1m&3H_-aN%C1DtumLpfsVPu5> z)b}Y=C~akdp|B5ED6kN4{VfLS0AXl(G5Ek}vwYM61MUET00RKPq-2upj;8Sd0000< KMNUMnLSTaC)V22j literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_group.png b/res/drawable-xhdpi/ic_action_group.png new file mode 100644 index 0000000000000000000000000000000000000000..ea3f24e73af90009474ef271afd230c14a4228b7 GIT binary patch literal 1086 zcmV-E1i|}>P)1F%?17pb-_VY-MV(#Ksa!WlnUMxyWED=nST350Q$#mwC%9oBP?jU5|TArpjt_$VQqa$;YS6-0}xfSrhH5)zXt|oE)KXqn45#>GONwzCX zI9ptBw>+ZdCh^1ZF-zM2P1296)heh~tJp4MEv>_6T)*J{TIdx%!TO8mcKH2Vh|eb6 z^WdH5JPLq!KXUtdK;tLe!!GYVTygJ31V8MZdwgE`EI@7LWkly!;bQUS%ud$%B4l5T z+wa)JXSDu+JdnlmS2}Zuvj)b`8K*21eyZ~@6m|Fri1?HrUBwJTPzht15f|se-MFC$ z$4|rB9k>7C^BxWjntP9rTGcsCcmO^VFWO*Et-U-hHaYB*;YcjdVmT>(G z&f-34m~VX>T;>l*`(8}wSi-S2pq92md$l9V+s2j2v-;dKY5X9aA4#ELr%ZJkIg_`? zGIWeZWgDIevto=#$znm_7fMwD$gCf%>|^XL=2^ACN&;&J-vhFcBOy4B!*B6jF2sH%c2QBFelG>r*Tk}1+S7k>JKmXdhaRTz!khNaTZ{T z7~}|1A9x(6b%I%i-^$Q}%d#$VMtLEW6p)R!TuNjfG5?}qy52}ms}g0iHCraCes5WT z%i5bV#>!|!7JrpoDL;g|c(yePulhHbEJDiYi_$1S^WR{y(DHYgeW1cKj8*?QJy8_C zA{>8<#x?P<9|e%*_c=FoRK4#+!TJq_R#_(+X|w-bd4Ow`2X3JX;2NE>pq)1tWdP)gB*aA7yNAs z@(l9CMTW~@cm*D(ApVM`mIpk_7Xrd zbZl^6J=X07x;@|^$Bv%{Wg5d;0vZglOT%UYY77L_Y$l-2KtSDQ0@e;ffad-p2Aw0D z3E)U!wT`i=S-DXn?Zw#|Xz14?iN~;(fRJ*3HGF-AbT+fnbE35?avy4e#HU81GRr#Z#KGNcw0(SJO4Y4m?igyo#&8xM#f5 zGO3f-Bx?x|V0_<{jvQ5CoXH?Vkp#)PG2!;C1Smw{dhVnk0uAqj;R6o6*l&jDo&ddK zH}UEdgB;WM00IsVpjr0m7{k-xX_X*`Vg~%SO&caIhtPy~xS93vV{Ptq785C{YUfj}S-2m}IwKp+qZ1OkCTAP@)yXXtfhp!@s#A%DE$4W0vR zB38WJ@s{v*bA5fC5CP^w2O&>+oA9=)`TB;pn70KdBP9a#1P{VKMB&@Og10M9#D)kc z7yg((j%sLpl@;-gld$w@zJ1SxAMwXK-kv-7Jbd%@a5(I(*Xx7`cr5(6MUzv6kdv^- zNmvpA4~0Kzu*<*~68atp9|Rw@&^3^dauROaoc~VC!Vmak*5VLm80tPv0#Nw7E%pz6 z&z~d#7;c6hxS$ZT>{js1QnotA7D{n9*jI3Lu_6hYGJgO*=uD9ePHvQLg;zr%n9R}8gY3YV(GTZAm>?{jsnhGrgO)_SM7p{b^Q@<6FewT<$GD_ z`rh>Do;#`&1)WRb8tkhc=VgDOZM;G4U*3GbEU2eMj!lm|R?+NbeFF)nd9^E;FU(t5 z$t#qN7J3F+q$)`#l4g&j-z1{nzzK|Vy7`K>*rxVJg0}wmN20kwTOKO%gI`jn8%qEF zrOu{I&%%V>u=34|2RmXCk)I3Rw?+b*ikV_uA7#O5?1;g8KWh3xa{>e*s`gG()C{nR zzw)#Lm-zc4$8R#h%&9W ziED%aoYVno2iV2Svak_1;iqUf?_+)WoeCsm`NPk$Y#NWeOj&+a@{#a`y9i?>d{IU? zz7q+u_^F%e_cR1QKmn;Hm4%g=*@5ck9%^2gqk%DM^+qD0%3-Yy_9q`J4B6u&B=UO~ zqVP*hlsK=fyihi;1PM;95#adD{ufcxaJ3vcC{;io-xPhFuomwk^ePJf*r6GGM1rsy zB4%C|PSH%p3bW`!_z!ZXG7@?f%+9I9L1w4R;t~ga!1Q_%<5f&YY=>17o0I=h_4~IzFi7pjrrrivkT3e8`(~?gfqE zaQN1uBLr>y&IfU^Ua#+%r+~5X7Q@92B*E5QwcWhiI7Q{?k;Ulayh!U6S?8sLI#A}+ zOS5z6oB#gSVl+0YV}fig!`p%~M3L>yE?URB8L(tVCoKP>ccCvr#dv8$2zd!wE2W4U zPA?T4EVNXSNe7q!27;rm8p3J^1+A4LESZ9~uO?N>lAA!kVd2kF^Pe;S0Am_AeSNjx zu<(7nm?5LlJH&kwe!C>}8xTI2oGu<~2NEDJ`0cWj9mm3lXylM}7c-ngHwnN*rt3KB zBmo$123tTtpnL7emlY7P?LpKj0#IWHTSUOX)hckc0=Dro-$5q`Fucs?GeQ^twT+7v zFlO6}F%ht31P}-W0)apv5C{YUfj}S-2m}IwKp+qZ1cF2S6<`4Uu`ww_1Myb?0000< KMNUMnLSTZGUeO}} literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_person.png b/res/drawable-xxhdpi/ic_action_person.png new file mode 100644 index 0000000000000000000000000000000000000000..fd1bcdd4539884bf5237c649d7992d9831dddff6 GIT binary patch literal 1004 zcmVAMV~hxs!`d>K~! z2QneibiEyA;zxA&NbSzS>Fqh+_xt@;nx<z{i!L~JEPmcoutchQPBIEAT53YB4|0W_dA$q! z;vBK6h%`;Nwlt(5{SRGKEU>ZJ+M^|nelY{2^MJ*f>@(()m0O8#g`ehRz6(hKMC*cR zg#V_I{zQL{3tlpKX(^#y^XVM6-0?%szdzCF|0St`isD=z>2XPnzPL6~;%Fz%S@SKQ z>3mD+YgbbpeSryw^_tqZvTT|wtS6@UF{29cRT*$%f{jwjz82o`tjOM^t>ACZynn|t zX{qI!HSQ0vQPJGo{^5vSz8)mL@2Qmmnb{B(tl!sQ6RaV#1zGcyjq6 zZO7uEU6nC3Eo0Sz+%00000000000000000000037m1 afB^t`*axuJxE1OE0000 + android:showAsAction="ifRoom" + android:icon="@drawable/ic_action_person" + android:title="@string/action_contact_details" /> + - Secure Conversations + Conversations Settings New conversation Manage accounts Archive conversation - Contact details + Contact details + Conferenece details Secure conversation Add account New Conversation diff --git a/src/de/gultsch/chat/crypto/OtrEngine.java b/src/eu/siacs/conversations/crypto/OtrEngine.java similarity index 96% rename from src/de/gultsch/chat/crypto/OtrEngine.java rename to src/eu/siacs/conversations/crypto/OtrEngine.java index cdd71d61b..eca01a736 100644 --- a/src/de/gultsch/chat/crypto/OtrEngine.java +++ b/src/eu/siacs/conversations/crypto/OtrEngine.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.crypto; +package eu.siacs.conversations.crypto; import java.math.BigInteger; import java.security.KeyFactory; @@ -17,10 +17,10 @@ import org.json.JSONObject; import android.content.Context; import android.util.Log; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.persistance.DatabaseBackend; -import de.gultsch.chat.xml.Element; -import de.gultsch.chat.xmpp.MessagePacket; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.persistance.DatabaseBackend; +import eu.siacs.conversations.xml.Element; +import eu.siacs.conversations.xmpp.MessagePacket; import net.java.otr4j.OtrEngineHost; import net.java.otr4j.OtrException; diff --git a/src/de/gultsch/chat/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java similarity index 99% rename from src/de/gultsch/chat/crypto/PgpEngine.java rename to src/eu/siacs/conversations/crypto/PgpEngine.java index 6d94e577f..ba000c045 100644 --- a/src/de/gultsch/chat/crypto/PgpEngine.java +++ b/src/eu/siacs/conversations/crypto/PgpEngine.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.crypto; +package eu.siacs.conversations.crypto; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/src/de/gultsch/chat/entities/AbstractEntity.java b/src/eu/siacs/conversations/entities/AbstractEntity.java similarity index 92% rename from src/de/gultsch/chat/entities/AbstractEntity.java rename to src/eu/siacs/conversations/entities/AbstractEntity.java index 31a19fc0b..0297fa662 100644 --- a/src/de/gultsch/chat/entities/AbstractEntity.java +++ b/src/eu/siacs/conversations/entities/AbstractEntity.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import java.io.Serializable; diff --git a/src/de/gultsch/chat/entities/Account.java b/src/eu/siacs/conversations/entities/Account.java similarity index 97% rename from src/de/gultsch/chat/entities/Account.java rename to src/eu/siacs/conversations/entities/Account.java index c8f6d0639..a596aba15 100644 --- a/src/de/gultsch/chat/entities/Account.java +++ b/src/eu/siacs/conversations/entities/Account.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import java.security.interfaces.DSAPublicKey; @@ -8,8 +8,8 @@ import net.java.otr4j.crypto.OtrCryptoException; import org.json.JSONException; import org.json.JSONObject; -import de.gultsch.chat.crypto.OtrEngine; -import de.gultsch.chat.xmpp.XmppConnection; +import eu.siacs.conversations.crypto.OtrEngine; +import eu.siacs.conversations.xmpp.XmppConnection; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; diff --git a/src/de/gultsch/chat/entities/Contact.java b/src/eu/siacs/conversations/entities/Contact.java similarity index 98% rename from src/de/gultsch/chat/entities/Contact.java rename to src/eu/siacs/conversations/entities/Contact.java index a8c9fa621..0eed39ed2 100644 --- a/src/de/gultsch/chat/entities/Contact.java +++ b/src/eu/siacs/conversations/entities/Contact.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import java.io.Serializable; import java.util.HashSet; @@ -9,7 +9,7 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; -import de.gultsch.chat.xml.Element; +import eu.siacs.conversations.xml.Element; import android.content.ContentValues; import android.database.Cursor; diff --git a/src/de/gultsch/chat/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java similarity index 94% rename from src/de/gultsch/chat/entities/Conversation.java rename to src/eu/siacs/conversations/entities/Conversation.java index 3f83010ce..d1186a7d2 100644 --- a/src/de/gultsch/chat/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -1,11 +1,11 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import java.security.interfaces.DSAPublicKey; import java.util.ArrayList; import java.util.List; -import de.gultsch.chat.crypto.OtrEngine; -import de.gultsch.chat.xmpp.XmppConnection; +import eu.siacs.conversations.crypto.OtrEngine; +import eu.siacs.conversations.xmpp.XmppConnection; import net.java.otr4j.OtrException; import net.java.otr4j.crypto.OtrCryptoEngineImpl; @@ -59,6 +59,8 @@ public class Conversation extends AbstractEntity { public int nextMessageEncryption = Message.ENCRYPTION_NONE; + private transient MucOptions mucOptions = null; + public Conversation(String name, Account account, String contactJid, int mode) { this(java.util.UUID.randomUUID().toString(), name, null, account.getUuid(), contactJid, System @@ -268,4 +270,15 @@ public class Conversation extends AbstractEntity { } return this.otrFingerprint; } + + public MucOptions getMucOptions() { + if (this.mucOptions == null) { + this.mucOptions = new MucOptions(); + } + return this.mucOptions ; + } + + public void resetMucOptions() { + this.mucOptions = null; + } } diff --git a/src/de/gultsch/chat/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java similarity index 98% rename from src/de/gultsch/chat/entities/Message.java rename to src/eu/siacs/conversations/entities/Message.java index 58e4ef63a..0fce2a5b6 100644 --- a/src/de/gultsch/chat/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import android.content.ContentValues; import android.database.Cursor; diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java new file mode 100644 index 000000000..4a738e65c --- /dev/null +++ b/src/eu/siacs/conversations/entities/MucOptions.java @@ -0,0 +1,5 @@ +package eu.siacs.conversations.entities; + +public class MucOptions { + +} diff --git a/src/de/gultsch/chat/entities/Presences.java b/src/eu/siacs/conversations/entities/Presences.java similarity index 97% rename from src/de/gultsch/chat/entities/Presences.java rename to src/eu/siacs/conversations/entities/Presences.java index aabc84404..af7926a8b 100644 --- a/src/de/gultsch/chat/entities/Presences.java +++ b/src/eu/siacs/conversations/entities/Presences.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.entities; +package eu.siacs.conversations.entities; import java.util.Hashtable; import java.util.Iterator; diff --git a/src/de/gultsch/chat/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java similarity index 97% rename from src/de/gultsch/chat/persistance/DatabaseBackend.java rename to src/eu/siacs/conversations/persistance/DatabaseBackend.java index 18fad7c42..1a6f934a7 100644 --- a/src/de/gultsch/chat/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -1,14 +1,14 @@ -package de.gultsch.chat.persistance; +package eu.siacs.conversations.persistance; import java.util.ArrayList; import java.util.List; import java.util.UUID; -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.entities.Presences; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.entities.Presences; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; diff --git a/src/de/gultsch/chat/persistance/OnPhoneContactsMerged.java b/src/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java similarity index 64% rename from src/de/gultsch/chat/persistance/OnPhoneContactsMerged.java rename to src/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java index a7918efb9..6a457b17f 100644 --- a/src/de/gultsch/chat/persistance/OnPhoneContactsMerged.java +++ b/src/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.persistance; +package eu.siacs.conversations.persistance; public interface OnPhoneContactsMerged { public void phoneContactsMerged(); diff --git a/src/de/gultsch/chat/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java similarity index 87% rename from src/de/gultsch/chat/services/XmppConnectionService.java rename to src/eu/siacs/conversations/services/XmppConnectionService.java index 7ff099573..218d5088b 100644 --- a/src/de/gultsch/chat/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.services; +package eu.siacs.conversations.services; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -14,31 +14,31 @@ import net.java.otr4j.OtrException; import net.java.otr4j.session.Session; import net.java.otr4j.session.SessionStatus; -import de.gultsch.chat.crypto.PgpEngine; -import de.gultsch.chat.crypto.PgpEngine.OpenPgpException; -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.entities.Presences; -import de.gultsch.chat.persistance.DatabaseBackend; -import de.gultsch.chat.persistance.OnPhoneContactsMerged; -import de.gultsch.chat.ui.OnAccountListChangedListener; -import de.gultsch.chat.ui.OnConversationListChangedListener; -import de.gultsch.chat.ui.OnRosterFetchedListener; -import de.gultsch.chat.utils.MessageParser; -import de.gultsch.chat.utils.OnPhoneContactsLoadedListener; -import de.gultsch.chat.utils.PhoneHelper; -import de.gultsch.chat.utils.UIHelper; -import de.gultsch.chat.xml.Element; -import de.gultsch.chat.xmpp.IqPacket; -import de.gultsch.chat.xmpp.MessagePacket; -import de.gultsch.chat.xmpp.OnIqPacketReceived; -import de.gultsch.chat.xmpp.OnMessagePacketReceived; -import de.gultsch.chat.xmpp.OnPresencePacketReceived; -import de.gultsch.chat.xmpp.OnStatusChanged; -import de.gultsch.chat.xmpp.PresencePacket; -import de.gultsch.chat.xmpp.XmppConnection; +import eu.siacs.conversations.crypto.PgpEngine; +import eu.siacs.conversations.crypto.PgpEngine.OpenPgpException; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.entities.Presences; +import eu.siacs.conversations.persistance.DatabaseBackend; +import eu.siacs.conversations.persistance.OnPhoneContactsMerged; +import eu.siacs.conversations.ui.OnAccountListChangedListener; +import eu.siacs.conversations.ui.OnConversationListChangedListener; +import eu.siacs.conversations.ui.OnRosterFetchedListener; +import eu.siacs.conversations.utils.MessageParser; +import eu.siacs.conversations.utils.OnPhoneContactsLoadedListener; +import eu.siacs.conversations.utils.PhoneHelper; +import eu.siacs.conversations.utils.UIHelper; +import eu.siacs.conversations.xml.Element; +import eu.siacs.conversations.xmpp.IqPacket; +import eu.siacs.conversations.xmpp.MessagePacket; +import eu.siacs.conversations.xmpp.OnIqPacketReceived; +import eu.siacs.conversations.xmpp.OnMessagePacketReceived; +import eu.siacs.conversations.xmpp.OnPresencePacketReceived; +import eu.siacs.conversations.xmpp.OnStatusChanged; +import eu.siacs.conversations.xmpp.PresencePacket; +import eu.siacs.conversations.xmpp.XmppConnection; import android.app.NotificationManager; import android.app.Service; import android.content.Context; @@ -188,71 +188,73 @@ public class XmppConnectionService extends Service { @Override public void onPresencePacketReceived(Account account, PresencePacket packet) { - String[] fromParts = packet.getAttribute("from").split("/"); - Contact contact = findContact(account, fromParts[0]); - if (contact == null) { - // most likely muc, self or roster not synced - Log.d(LOGTAG, - "got presence for non contact " + packet.toString()); - return; - } - String type = packet.getAttribute("type"); - if (type == null) { - Element show = packet.findChild("show"); - if (show == null) { - contact.updatePresence(fromParts[1], Presences.ONLINE); - } else if (show.getContent().equals("away")) { - contact.updatePresence(fromParts[1], Presences.AWAY); - } else if (show.getContent().equals("xa")) { - contact.updatePresence(fromParts[1], Presences.XA); - } else if (show.getContent().equals("chat")) { - contact.updatePresence(fromParts[1], Presences.CHAT); - } else if (show.getContent().equals("dnd")) { - contact.updatePresence(fromParts[1], Presences.DND); + 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("/"); + Contact contact = findContact(account, fromParts[0]); + if (contact == null) { + // most likely self or roster not synced + return; } - PgpEngine pgp = getPgpEngine(); - if (pgp!=null) { - Element x = packet.findChild("x"); - if ((x != null) - && (x.getAttribute("xmlns").equals("jabber:x:signed"))) { - try { - Log.d(LOGTAG,"pgp signature for contact" +packet.getAttribute("from")); - contact.setPgpKeyId(pgp.fetchKeyId(packet.findChild("status") - .getContent(), x.getContent())); - } catch (OpenPgpException e) { - Log.d(LOGTAG,"faulty pgp. just ignore"); + String type = packet.getAttribute("type"); + if (type == null) { + Element show = packet.findChild("show"); + if (show == null) { + contact.updatePresence(fromParts[1], Presences.ONLINE); + } else if (show.getContent().equals("away")) { + contact.updatePresence(fromParts[1], Presences.AWAY); + } else if (show.getContent().equals("xa")) { + contact.updatePresence(fromParts[1], Presences.XA); + } else if (show.getContent().equals("chat")) { + contact.updatePresence(fromParts[1], Presences.CHAT); + } else if (show.getContent().equals("dnd")) { + contact.updatePresence(fromParts[1], Presences.DND); + } + PgpEngine pgp = getPgpEngine(); + if (pgp!=null) { + Element x = packet.findChild("x"); + if ((x != null) + && (x.getAttribute("xmlns").equals("jabber:x:signed"))) { + try { + Log.d(LOGTAG,"pgp signature for contact" +packet.getAttribute("from")); + contact.setPgpKeyId(pgp.fetchKeyId(packet.findChild("status") + .getContent(), x.getContent())); + } catch (OpenPgpException e) { + Log.d(LOGTAG,"faulty pgp. just ignore"); + } } } - } - databaseBackend.updateContact(contact); - } else if (type.equals("unavailable")) { - if (fromParts.length != 2) { - // Log.d(LOGTAG,"received presence with no resource "+packet.toString()); - } else { - contact.removePresence(fromParts[1]); databaseBackend.updateContact(contact); - } - } else if (type.equals("subscribe")) { - if (contact - .getSubscriptionOption(Contact.Subscription.PREEMPTIVE_GRANT)) { - sendPresenceUpdatesTo(contact); - contact.setSubscriptionOption(Contact.Subscription.FROM); - contact.resetSubscriptionOption(Contact.Subscription.PREEMPTIVE_GRANT); - replaceContactInConversation(contact.getJid(), contact); - databaseBackend.updateContact(contact); - if ((contact - .getSubscriptionOption(Contact.Subscription.ASKING)) - && (!contact - .getSubscriptionOption(Contact.Subscription.TO))) { - requestPresenceUpdatesFrom(contact); + } else if (type.equals("unavailable")) { + if (fromParts.length != 2) { + // Log.d(LOGTAG,"received presence with no resource "+packet.toString()); + } else { + contact.removePresence(fromParts[1]); + databaseBackend.updateContact(contact); + } + } else if (type.equals("subscribe")) { + if (contact + .getSubscriptionOption(Contact.Subscription.PREEMPTIVE_GRANT)) { + sendPresenceUpdatesTo(contact); + contact.setSubscriptionOption(Contact.Subscription.FROM); + contact.resetSubscriptionOption(Contact.Subscription.PREEMPTIVE_GRANT); + replaceContactInConversation(contact.getJid(), contact); + databaseBackend.updateContact(contact); + if ((contact + .getSubscriptionOption(Contact.Subscription.ASKING)) + && (!contact + .getSubscriptionOption(Contact.Subscription.TO))) { + requestPresenceUpdatesFrom(contact); + } + } else { + // TODO: ask user to handle it maybe } } else { - // TODO: ask user to handle it maybe + //Log.d(LOGTAG, packet.toString()); } - } else { - Log.d(LOGTAG, packet.toString()); + replaceContactInConversation(contact.getJid(), contact); } - replaceContactInConversation(contact.getJid(), contact); } }; diff --git a/src/de/gultsch/chat/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java similarity index 93% rename from src/de/gultsch/chat/ui/ConversationActivity.java rename to src/eu/siacs/conversations/ui/ConversationActivity.java index 88d30bc52..7660b8fd9 100644 --- a/src/de/gultsch/chat/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -1,22 +1,16 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; -import org.openintents.openpgp.OpenPgpSignatureResult; -import org.openintents.openpgp.util.OpenPgpConstants; - -import de.gultsch.chat.R; -import de.gultsch.chat.R.id; -import de.gultsch.chat.crypto.PgpEngine; -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 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.Message; +import eu.siacs.conversations.utils.UIHelper; import android.net.Uri; import android.os.Bundle; import android.app.AlertDialog; @@ -25,7 +19,6 @@ import android.app.NotificationManager; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.content.IntentSender.SendIntentException; import android.graphics.Typeface; import android.support.v4.widget.SlidingPaneLayout; import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener; @@ -67,7 +60,6 @@ public class ConversationActivity extends XmppActivity { @Override public void onConversationListChanged() { - final Conversation currentConv = getSelectedConversation(); conversationList.clear(); conversationList.addAll(xmppConnectionService .getConversations()); @@ -104,8 +96,6 @@ public class ConversationActivity extends XmppActivity { xmppConnectionService.createContact(contact); } }; - private boolean contactInserted = false; - public List getConversationList() { 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.setShadowResource(R.drawable.es_slidingpane_shadow); spl.setSliderFadeColor(0); @@ -257,19 +247,26 @@ public class ConversationActivity extends XmppActivity { public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.conversations, menu); 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()) { - ((MenuItem) menu.findItem(R.id.action_archive)).setVisible(false); - ((MenuItem) menu.findItem(R.id.action_details)).setVisible(false); + menuArchive.setVisible(false); + menuMucDetails.setVisible(false); + menuContactDetails.setVisible(false); menuSecure.setVisible(false); } else { ((MenuItem) menu.findItem(R.id.action_add)).setVisible(false); if (this.getSelectedConversation()!=null) { 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); - ((MenuItem) menu.findItem(R.id.action_archive)).setTitle("Leave conference"); + menuArchive.setTitle("Leave conference"); } else { + menuContactDetails.setVisible(true); + menuMucDetails.setVisible(false); if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) { menuSecure.setIcon(R.drawable.ic_action_secure); } @@ -302,7 +299,7 @@ public class ConversationActivity extends XmppActivity { xmppConnectionService.archiveConversation(conv); selectedConversation = conversationList.get(0); break; - case R.id.action_details: + case R.id.action_contact_details: DialogContactDetails details = new DialogContactDetails(); Contact contact = this.getSelectedConversation().getContact(); if (contact != null) { diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java similarity index 97% rename from src/de/gultsch/chat/ui/ConversationFragment.java rename to src/eu/siacs/conversations/ui/ConversationFragment.java index af07fdbb8..ff06fafcc 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import java.io.FileNotFoundException; import java.util.ArrayList; @@ -10,15 +10,15 @@ import java.util.Set; import net.java.otr4j.session.SessionStatus; -import de.gultsch.chat.R; -import de.gultsch.chat.crypto.PgpEngine.OpenPgpException; -import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException; -import de.gultsch.chat.entities.Contact; -import de.gultsch.chat.entities.Conversation; -import de.gultsch.chat.entities.Message; -import de.gultsch.chat.services.XmppConnectionService; -import de.gultsch.chat.utils.PhoneHelper; -import de.gultsch.chat.utils.UIHelper; +import eu.siacs.conversations.R; +import eu.siacs.conversations.crypto.PgpEngine.OpenPgpException; +import eu.siacs.conversations.crypto.PgpEngine.UserInputRequiredException; +import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.utils.PhoneHelper; +import eu.siacs.conversations.utils.UIHelper; import android.app.AlertDialog; import android.app.Fragment; import android.content.DialogInterface; diff --git a/src/de/gultsch/chat/ui/DialogContactDetails.java b/src/eu/siacs/conversations/ui/DialogContactDetails.java similarity index 97% rename from src/de/gultsch/chat/ui/DialogContactDetails.java rename to src/eu/siacs/conversations/ui/DialogContactDetails.java index 324a7aacd..1210bc3cb 100644 --- a/src/de/gultsch/chat/ui/DialogContactDetails.java +++ b/src/eu/siacs/conversations/ui/DialogContactDetails.java @@ -1,9 +1,9 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; -import de.gultsch.chat.R; -import de.gultsch.chat.entities.Contact; -import de.gultsch.chat.entities.Presences; -import de.gultsch.chat.utils.UIHelper; +import eu.siacs.conversations.R; +import eu.siacs.conversations.entities.Contact; +import eu.siacs.conversations.entities.Presences; +import eu.siacs.conversations.utils.UIHelper; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; @@ -13,7 +13,6 @@ import android.os.Bundle; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Intents; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; diff --git a/src/de/gultsch/chat/ui/EditAccount.java b/src/eu/siacs/conversations/ui/EditAccount.java similarity index 93% rename from src/de/gultsch/chat/ui/EditAccount.java rename to src/eu/siacs/conversations/ui/EditAccount.java index 88aa76f55..3ec741742 100644 --- a/src/de/gultsch/chat/ui/EditAccount.java +++ b/src/eu/siacs/conversations/ui/EditAccount.java @@ -1,13 +1,11 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; -import de.gultsch.chat.R; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.utils.Validator; +import eu.siacs.conversations.R; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.utils.Validator; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -16,7 +14,6 @@ import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.EditText; -import android.widget.RelativeLayout; import android.widget.TextView; public class EditAccount extends DialogFragment { diff --git a/src/de/gultsch/chat/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java similarity index 96% rename from src/de/gultsch/chat/ui/ManageAccountActivity.java rename to src/eu/siacs/conversations/ui/ManageAccountActivity.java index bcc5306d8..22b82e77f 100644 --- a/src/de/gultsch/chat/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -1,13 +1,13 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import java.util.ArrayList; import java.util.List; -import de.gultsch.chat.R; -import de.gultsch.chat.crypto.PgpEngine; -import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.ui.EditAccount.EditAccountListener; +import eu.siacs.conversations.R; +import eu.siacs.conversations.crypto.PgpEngine; +import eu.siacs.conversations.crypto.PgpEngine.UserInputRequiredException; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.ui.EditAccount.EditAccountListener; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; diff --git a/src/de/gultsch/chat/ui/NewConversationActivity.java b/src/eu/siacs/conversations/ui/NewConversationActivity.java similarity index 95% rename from src/de/gultsch/chat/ui/NewConversationActivity.java rename to src/eu/siacs/conversations/ui/NewConversationActivity.java index ac178fad7..628a30479 100644 --- a/src/de/gultsch/chat/ui/NewConversationActivity.java +++ b/src/eu/siacs/conversations/ui/NewConversationActivity.java @@ -1,22 +1,20 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; -import de.gultsch.chat.R; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.entities.Contact; -import de.gultsch.chat.entities.Conversation; -import de.gultsch.chat.utils.UIHelper; -import de.gultsch.chat.utils.Validator; +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.utils.UIHelper; +import eu.siacs.conversations.utils.Validator; import android.net.Uri; import android.os.Bundle; -import android.provider.ContactsContract; import android.text.Editable; import android.text.TextWatcher; -import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -35,13 +33,9 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; -import android.content.CursorLoader; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.content.Loader; -import android.content.Loader.OnLoadCompleteListener; -import android.database.Cursor; public class NewConversationActivity extends XmppActivity { diff --git a/src/de/gultsch/chat/ui/OnAccountListChangedListener.java b/src/eu/siacs/conversations/ui/OnAccountListChangedListener.java similarity index 73% rename from src/de/gultsch/chat/ui/OnAccountListChangedListener.java rename to src/eu/siacs/conversations/ui/OnAccountListChangedListener.java index 4af5ac9bc..98ef445ec 100644 --- a/src/de/gultsch/chat/ui/OnAccountListChangedListener.java +++ b/src/eu/siacs/conversations/ui/OnAccountListChangedListener.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; public interface OnAccountListChangedListener { public void onAccountListChangedListener(); diff --git a/src/de/gultsch/chat/ui/OnConversationListChangedListener.java b/src/eu/siacs/conversations/ui/OnConversationListChangedListener.java similarity index 73% rename from src/de/gultsch/chat/ui/OnConversationListChangedListener.java rename to src/eu/siacs/conversations/ui/OnConversationListChangedListener.java index 08b2bfb13..2a922e218 100644 --- a/src/de/gultsch/chat/ui/OnConversationListChangedListener.java +++ b/src/eu/siacs/conversations/ui/OnConversationListChangedListener.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; public interface OnConversationListChangedListener { public void onConversationListChanged(); diff --git a/src/de/gultsch/chat/ui/OnRosterFetchedListener.java b/src/eu/siacs/conversations/ui/OnRosterFetchedListener.java similarity index 59% rename from src/de/gultsch/chat/ui/OnRosterFetchedListener.java rename to src/eu/siacs/conversations/ui/OnRosterFetchedListener.java index ad3f6592b..d69ce35b7 100644 --- a/src/de/gultsch/chat/ui/OnRosterFetchedListener.java +++ b/src/eu/siacs/conversations/ui/OnRosterFetchedListener.java @@ -1,7 +1,8 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import java.util.List; -import de.gultsch.chat.entities.Contact; + +import eu.siacs.conversations.entities.Contact; public interface OnRosterFetchedListener { public void onRosterFetched(List roster); diff --git a/src/de/gultsch/chat/ui/SettingsActivity.java b/src/eu/siacs/conversations/ui/SettingsActivity.java similarity index 91% rename from src/de/gultsch/chat/ui/SettingsActivity.java rename to src/eu/siacs/conversations/ui/SettingsActivity.java index 886c05cca..abaf8c687 100644 --- a/src/de/gultsch/chat/ui/SettingsActivity.java +++ b/src/eu/siacs/conversations/ui/SettingsActivity.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; import android.app.Activity; import android.os.Bundle; diff --git a/src/de/gultsch/chat/ui/SettingsFragment.java b/src/eu/siacs/conversations/ui/SettingsFragment.java similarity index 83% rename from src/de/gultsch/chat/ui/SettingsFragment.java rename to src/eu/siacs/conversations/ui/SettingsFragment.java index 3ca4841af..7e1c36989 100644 --- a/src/de/gultsch/chat/ui/SettingsFragment.java +++ b/src/eu/siacs/conversations/ui/SettingsFragment.java @@ -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.preference.PreferenceFragment; diff --git a/src/de/gultsch/chat/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java similarity index 88% rename from src/de/gultsch/chat/ui/XmppActivity.java rename to src/eu/siacs/conversations/ui/XmppActivity.java index 66c92b72e..5114e640c 100644 --- a/src/de/gultsch/chat/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -1,7 +1,7 @@ -package de.gultsch.chat.ui; +package eu.siacs.conversations.ui; -import de.gultsch.chat.services.XmppConnectionService; -import de.gultsch.chat.services.XmppConnectionService.XmppConnectionBinder; +import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import android.app.Activity; import android.content.ComponentName; import android.content.Context; diff --git a/src/de/gultsch/chat/utils/DNSHelper.java b/src/eu/siacs/conversations/utils/DNSHelper.java similarity index 98% rename from src/de/gultsch/chat/utils/DNSHelper.java rename to src/eu/siacs/conversations/utils/DNSHelper.java index f19b1b6f0..46fd69286 100644 --- a/src/de/gultsch/chat/utils/DNSHelper.java +++ b/src/eu/siacs/conversations/utils/DNSHelper.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/de/gultsch/chat/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java similarity index 94% rename from src/de/gultsch/chat/utils/MessageParser.java rename to src/eu/siacs/conversations/utils/MessageParser.java index a12ef58c9..dc0cd35cf 100644 --- a/src/de/gultsch/chat/utils/MessageParser.java +++ b/src/eu/siacs/conversations/utils/MessageParser.java @@ -1,16 +1,16 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import java.util.List; import net.java.otr4j.session.Session; import net.java.otr4j.session.SessionStatus; import android.util.Log; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.entities.Conversation; -import de.gultsch.chat.entities.Message; -import de.gultsch.chat.services.XmppConnectionService; -import de.gultsch.chat.xml.Element; -import de.gultsch.chat.xmpp.MessagePacket; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.xml.Element; +import eu.siacs.conversations.xmpp.MessagePacket; public class MessageParser { diff --git a/src/de/gultsch/chat/utils/OnPhoneContactsLoadedListener.java b/src/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java similarity index 82% rename from src/de/gultsch/chat/utils/OnPhoneContactsLoadedListener.java rename to src/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java index c4df4ac30..fa8cea04c 100644 --- a/src/de/gultsch/chat/utils/OnPhoneContactsLoadedListener.java +++ b/src/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import java.util.Hashtable; diff --git a/src/de/gultsch/chat/utils/PhoneHelper.java b/src/eu/siacs/conversations/utils/PhoneHelper.java similarity index 98% rename from src/de/gultsch/chat/utils/PhoneHelper.java rename to src/eu/siacs/conversations/utils/PhoneHelper.java index 14773caa4..e28f817e7 100644 --- a/src/de/gultsch/chat/utils/PhoneHelper.java +++ b/src/eu/siacs/conversations/utils/PhoneHelper.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import java.util.Hashtable; diff --git a/src/de/gultsch/chat/utils/SASL.java b/src/eu/siacs/conversations/utils/SASL.java similarity index 94% rename from src/de/gultsch/chat/utils/SASL.java rename to src/eu/siacs/conversations/utils/SASL.java index 266f0cb29..cda1f97be 100644 --- a/src/de/gultsch/chat/utils/SASL.java +++ b/src/eu/siacs/conversations/utils/SASL.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import android.util.Base64; diff --git a/src/de/gultsch/chat/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java similarity index 95% rename from src/de/gultsch/chat/utils/UIHelper.java rename to src/eu/siacs/conversations/utils/UIHelper.java index 5e81f0990..f79fe14cf 100644 --- a/src/de/gultsch/chat/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -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.util.Date; import java.util.List; -import de.gultsch.chat.R; -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.ui.ConversationActivity; +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.Message; +import eu.siacs.conversations.ui.ConversationActivity; import android.app.Activity; import android.app.AlertDialog; @@ -32,7 +30,6 @@ import android.preference.PreferenceManager; import android.provider.ContactsContract.Contacts; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; diff --git a/src/de/gultsch/chat/utils/Validator.java b/src/eu/siacs/conversations/utils/Validator.java similarity index 90% rename from src/de/gultsch/chat/utils/Validator.java rename to src/eu/siacs/conversations/utils/Validator.java index a29ffa0ae..fce953aef 100644 --- a/src/de/gultsch/chat/utils/Validator.java +++ b/src/eu/siacs/conversations/utils/Validator.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.utils; +package eu.siacs.conversations.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/de/gultsch/chat/xml/Element.java b/src/eu/siacs/conversations/xml/Element.java similarity index 98% rename from src/de/gultsch/chat/xml/Element.java rename to src/eu/siacs/conversations/xml/Element.java index 01deb1d20..ad95ef9ce 100644 --- a/src/de/gultsch/chat/xml/Element.java +++ b/src/eu/siacs/conversations/xml/Element.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.xml; +package eu.siacs.conversations.xml; import java.util.ArrayList; import java.util.Hashtable; diff --git a/src/de/gultsch/chat/xml/Tag.java b/src/eu/siacs/conversations/xml/Tag.java similarity index 98% rename from src/de/gultsch/chat/xml/Tag.java rename to src/eu/siacs/conversations/xml/Tag.java index 275229cf4..970cf0aed 100644 --- a/src/de/gultsch/chat/xml/Tag.java +++ b/src/eu/siacs/conversations/xml/Tag.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.xml; +package eu.siacs.conversations.xml; import java.util.Hashtable; import java.util.Iterator; diff --git a/src/de/gultsch/chat/xml/TagWriter.java b/src/eu/siacs/conversations/xml/TagWriter.java similarity index 97% rename from src/de/gultsch/chat/xml/TagWriter.java rename to src/eu/siacs/conversations/xml/TagWriter.java index 844f5253e..109078ca1 100644 --- a/src/de/gultsch/chat/xml/TagWriter.java +++ b/src/eu/siacs/conversations/xml/TagWriter.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.xml; +package eu.siacs.conversations.xml; import java.io.IOException; import java.io.OutputStream; diff --git a/src/de/gultsch/chat/xml/XmlReader.java b/src/eu/siacs/conversations/xml/XmlReader.java similarity index 98% rename from src/de/gultsch/chat/xml/XmlReader.java rename to src/eu/siacs/conversations/xml/XmlReader.java index 0ff2e7858..131141ddd 100644 --- a/src/de/gultsch/chat/xml/XmlReader.java +++ b/src/eu/siacs/conversations/xml/XmlReader.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.xml; +package eu.siacs.conversations.xml; import java.io.IOException; import java.io.InputStream; diff --git a/src/de/gultsch/chat/xmpp/IqPacket.java b/src/eu/siacs/conversations/xmpp/IqPacket.java similarity index 88% rename from src/de/gultsch/chat/xmpp/IqPacket.java rename to src/eu/siacs/conversations/xmpp/IqPacket.java index d7672540d..2319fd28b 100644 --- a/src/de/gultsch/chat/xmpp/IqPacket.java +++ b/src/eu/siacs/conversations/xmpp/IqPacket.java @@ -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 { diff --git a/src/de/gultsch/chat/xmpp/MessagePacket.java b/src/eu/siacs/conversations/xmpp/MessagePacket.java similarity index 95% rename from src/de/gultsch/chat/xmpp/MessagePacket.java rename to src/eu/siacs/conversations/xmpp/MessagePacket.java index 160a8c0ad..a014155fc 100644 --- a/src/de/gultsch/chat/xmpp/MessagePacket.java +++ b/src/eu/siacs/conversations/xmpp/MessagePacket.java @@ -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 static final int TYPE_CHAT = 0; diff --git a/src/de/gultsch/chat/xmpp/OnIqPacketReceived.java b/src/eu/siacs/conversations/xmpp/OnIqPacketReceived.java similarity index 56% rename from src/de/gultsch/chat/xmpp/OnIqPacketReceived.java rename to src/eu/siacs/conversations/xmpp/OnIqPacketReceived.java index 0a2e0361d..4e09282c3 100644 --- a/src/de/gultsch/chat/xmpp/OnIqPacketReceived.java +++ b/src/eu/siacs/conversations/xmpp/OnIqPacketReceived.java @@ -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 void onIqPacketReceived(Account account, IqPacket packet); diff --git a/src/de/gultsch/chat/xmpp/OnMessagePacketReceived.java b/src/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java similarity index 59% rename from src/de/gultsch/chat/xmpp/OnMessagePacketReceived.java rename to src/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java index 30f6c29bd..3d169300d 100644 --- a/src/de/gultsch/chat/xmpp/OnMessagePacketReceived.java +++ b/src/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java @@ -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 void onMessagePacketReceived(Account account, MessagePacket packet); diff --git a/src/de/gultsch/chat/xmpp/OnPresencePacketReceived.java b/src/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java similarity index 59% rename from src/de/gultsch/chat/xmpp/OnPresencePacketReceived.java rename to src/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java index 4c9767791..058d8be91 100644 --- a/src/de/gultsch/chat/xmpp/OnPresencePacketReceived.java +++ b/src/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java @@ -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 void onPresencePacketReceived(Account account, PresencePacket packet); diff --git a/src/de/gultsch/chat/xmpp/OnStatusChanged.java b/src/eu/siacs/conversations/xmpp/OnStatusChanged.java similarity index 50% rename from src/de/gultsch/chat/xmpp/OnStatusChanged.java rename to src/eu/siacs/conversations/xmpp/OnStatusChanged.java index f79305e35..ad1d98cb9 100644 --- a/src/de/gultsch/chat/xmpp/OnStatusChanged.java +++ b/src/eu/siacs/conversations/xmpp/OnStatusChanged.java @@ -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 void onStatusChanged(Account account); diff --git a/src/de/gultsch/chat/xmpp/PresencePacket.java b/src/eu/siacs/conversations/xmpp/PresencePacket.java similarity index 67% rename from src/de/gultsch/chat/xmpp/PresencePacket.java rename to src/eu/siacs/conversations/xmpp/PresencePacket.java index 947afe7af..3d77ce151 100644 --- a/src/de/gultsch/chat/xmpp/PresencePacket.java +++ b/src/eu/siacs/conversations/xmpp/PresencePacket.java @@ -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 { private PresencePacket(String name) { diff --git a/src/de/gultsch/chat/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java similarity index 97% rename from src/de/gultsch/chat/xmpp/XmppConnection.java rename to src/eu/siacs/conversations/xmpp/XmppConnection.java index 1b9aa0c3a..4583c145b 100644 --- a/src/de/gultsch/chat/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1,4 +1,4 @@ -package de.gultsch.chat.xmpp; +package eu.siacs.conversations.xmpp; import java.io.IOException; import java.io.InputStream; @@ -19,13 +19,13 @@ import org.xmlpull.v1.XmlPullParserException; import android.os.Bundle; import android.os.PowerManager; import android.util.Log; -import de.gultsch.chat.entities.Account; -import de.gultsch.chat.utils.DNSHelper; -import de.gultsch.chat.utils.SASL; -import de.gultsch.chat.xml.Element; -import de.gultsch.chat.xml.Tag; -import de.gultsch.chat.xml.XmlReader; -import de.gultsch.chat.xml.TagWriter; +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.utils.DNSHelper; +import eu.siacs.conversations.utils.SASL; +import eu.siacs.conversations.xml.Element; +import eu.siacs.conversations.xml.Tag; +import eu.siacs.conversations.xml.TagWriter; +import eu.siacs.conversations.xml.XmlReader; public class XmppConnection implements Runnable {