From 78998d0c93265a2c668df94d5240ef5f632fd7af Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 23 Jul 2012 13:42:29 -0700 Subject: [PATCH] Clean up key/identity verification Activites. 1) Get ride of the crazy button situation. 2) Actionbar-ify and abstract out the common actions. 3) Switch to full activities from dialog themes. --- AndroidManifest.xml | 35 +++- res/drawable-hdpi/ic_menu_barcode.png | Bin 0 -> 1727 bytes res/drawable-mdpi/ic_menu_barcode.png | Bin 0 -> 1010 bytes res/drawable-xhdpi/ic_menu_barcode.png | Bin 0 -> 2487 bytes res/layout/change_passphrase_activity.xml | 73 ++++---- res/layout/save_identity_activity.xml | 86 ++++----- res/layout/verify_identity_activity.xml | 97 ++++------ res/layout/verify_keys_activity.xml | 141 +++++--------- res/layout/view_identity_activity.xml | 63 ++++--- res/menu/conversation_secure_verified.xml | 2 +- res/menu/key_scanning.xml | 19 ++ res/menu/verify_keys.xml | 7 + .../securesms/KeyScanningActivity.java | 72 ++++---- .../securesms/KeyVerifyingActivity.java | 40 ++++ .../securesms/VerifyIdentityActivity.java | 172 ++++++------------ .../securesms/VerifyKeysActivity.java | 127 +++++-------- 16 files changed, 426 insertions(+), 508 deletions(-) create mode 100644 res/drawable-hdpi/ic_menu_barcode.png create mode 100644 res/drawable-mdpi/ic_menu_barcode.png create mode 100644 res/drawable-xhdpi/ic_menu_barcode.png create mode 100644 res/menu/key_scanning.xml create mode 100644 res/menu/verify_keys.xml create mode 100644 src/org/thoughtcrime/securesms/KeyVerifyingActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index e41c4179b8..653129bd3b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -43,18 +43,41 @@ android:label="Select Contacts" android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout"/> + + + + + + + + + + + - - - - - - diff --git a/res/drawable-hdpi/ic_menu_barcode.png b/res/drawable-hdpi/ic_menu_barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..6478e5c6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UAPG;!rZy5gOJ+6eKma zcCw42QP83MOn+j?yL`+wet`gQA~;H3;Q8eEw~Xg+B1Eq8M|;o6K%ya>YvV1b9DrBK}^!LAfvezEyR&v4>uH|3NE^499zGIZIae3paQH^FPPQhGcfjnePj=p?SjwOT zPB>&n+4sF*zyNR4c2Y3OpMNbIo|~ppl842=-kaBb2^%^}N~-=rtEiaUXy4mB*X+;5 zH>7aqoKPZKRUggor7y<*K%Ndm_87UCCR;_nczEquKX58%Zl_N5@XiNmT3bqSexUx+ z>qWMh%1bw;aftL|8&UtaJIDGWTTj&BpA4|YP3~y%!96bY^`ji>RgSsIo&WH~|8K}s V-CwV^%0&PG002ovPDHLkV1iNYDqH{n literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_menu_barcode.png b/res/drawable-mdpi/ic_menu_barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..5580874167842d593cc71d73ce1f024dbe99ace4 GIT binary patch literal 1010 zcmVkdg00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RX2Nwno2hywoT>t^c5*?aA^&*k&+ zO#cs5Vrr3Mw6T*?pL#_|lHSD3Se7IdRT4(##&H_?NS?+VbT2%8Cl2GkaW_umG|plk zix^^vAxf0Uv4};?V;-|OiIX^vPvTA-#Pd(<7?CzdH)<)}?@UzRckC}7@s=x|@Oz`{o0TG%Cmmy zXSUq&S1H}yGI7!oUG0-3>GZUkJKajIw0f8O%T@Hz(Jh5c2vq?^$SSI;ww?1;ZInT> zc8n@i5TXSZMOM@m`FT`osBXQpML}vA6cmG^%0dxqIk}hMywl6H%PNDcDEI6vzvEtl zXxyRDLf1=(Rzg{+agJdGgHsuSg;|3yS_aiZF{rY<6wjF~uL$yoXRpU#+otem@7eS( zTV`IcqWs$cJ1N6Ul~XLo=$bm!Uy*J#|2-pk7~!U9f$67 z)xJ*gRjC{dZ$G-f-|_Cz=B*unuJ ze)?G2F*jJ)b@Z=5~7)SjevvmL2Zsp&4HmxY6E?=GXJ@e zBHGvBP$$XFgQ*QsU0J$wxSE4VqFGspE^e8~CNBDc`~AeW6E}tG3m&rPl3imj8CmF7 z!!SbGzdi1IHxU+IaYOQD@XdDGL#q2#kDExSx_8r{++{=2r0)q{^m_*3CXUjF6tU)xc=05XAR$2hNCzCVC=l_$3F70CSTIE8?_zy z?H~8C&Jap^_2o73m$y$?1J&l`tlTW8w-jef`Z7NB=0RnAN3}KI_kS#RF-h gt!Mrj2cHr5KYQBiB!5yltN;K207*qoM6N<$f}(oxP5=M^ literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_menu_barcode.png b/res/drawable-xhdpi/ic_menu_barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..c267e852a7ae6b31bc7ca3a3098109ed3ab145d0 GIT binary patch literal 2487 zcmV;o2}t&dP)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RX2Nwnn6$&^b)&KwrNl8RORA}Dq zna{5zRTalS=iXaY-S1_X83-W(28F-~XizuEMs^^Hi5tR-#GMO6)Ua{kg2au9OGEq% z*l1WlG;Un7VL(Wb7(j85pTaP{;l1I#ey_Xg-s7T9-MZD&Zw&EAT+p5Fsj0qo?z!iD z&-eUz@cHZW*XOVQ%a{D`q)u)&^@Ghqwxwnv|5+V60*&r)y)O0l%jIhPC1ge1UCrzM ztG7ij8eK#rpm-9B;s8*p{7{GD2t*wRCsNS>a7croL?TcZ&WQ*PC9q(Q0ud$IbG=F}fQq#9 zc)~?iqXM4FZKt3ht?ctdY8-;6V0qVIx=%3x4Pxa?QS_au9r zj0VsGX5*C@I#RwX{YQ{Ch%Ygqh-nqy?#xQ_`fR!c^f_~9pu z0t8glE;VBt#GEkTJQ>Q#_jK*_r9xvcYRM;JdK5&Iw^G|yvw_R4Mnxo>m%=4eS4hTx z%GNAxvZerqzf)mQERcF;OKTYDtwIjAl$Do><8*?kt0Vh(f=)}9Oi1}o96ER<<9GFt5u9*$k=m@tCL7jMeopQ#j5s*`L6d`8C z$TUPD?HC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vN68T+`KK zxH?pmRDO25s?&Hi?#ch0vV zQzIldY?IV!;@Xc--|P)L>0gZI6KK*;-oJFgk;F;vx0B+Q>41xAhXYo=ealkuDUj6 z9Y+P7eb(xM#A-6JoYpCbUfR9(OgJT#91FvQqHVi-=`}&+irk}{?B|d3P({ze)9_TR_u#a}o3j#pK;;kl$DQI38ScV7GqGQ(&4>(}!; z4?MlcjC#XwEk~T>`TcwUyMH0P_i9fmy!aXA{Sz01NUa(9&mjN+002ovPDHLkV1gB& Bs&xPW literal 0 HcmV?d00001 diff --git a/res/layout/change_passphrase_activity.xml b/res/layout/change_passphrase_activity.xml index 639b18da7d..a6e34a2d04 100644 --- a/res/layout/change_passphrase_activity.xml +++ b/res/layout/change_passphrase_activity.xml @@ -1,64 +1,63 @@ - + - + + - - + + - - + + - + -