From 8d08f3969a15efa0cc9104a5f4eee89364b0523e Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 26 Sep 2017 17:38:17 -0700 Subject: [PATCH] Switch from secure indicator to insecure indicator Instead of cluttering Signal messages with a little padlock, let's highlight the insecurity of SMS messages instead. // FREEBIE --- res/drawable-hdpi/ic_unlocked_white_18dp.png | Bin 0 -> 814 bytes res/drawable-mdpi/ic_unlocked_white_18dp.png | Bin 0 -> 543 bytes res/drawable-xhdpi/ic_unlocked_white_18dp.png | Bin 0 -> 1112 bytes .../ic_unlocked_white_18dp.png | Bin 0 -> 1679 bytes .../ic_unlocked_white_18dp.png | Bin 0 -> 650 bytes res/layout/conversation_item_received.xml | 17 +++++----- res/layout/conversation_item_sent.xml | 29 ++++++++++-------- .../securesms/ConversationItem.java | 6 ++-- 8 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 res/drawable-hdpi/ic_unlocked_white_18dp.png create mode 100644 res/drawable-mdpi/ic_unlocked_white_18dp.png create mode 100644 res/drawable-xhdpi/ic_unlocked_white_18dp.png create mode 100644 res/drawable-xxhdpi/ic_unlocked_white_18dp.png create mode 100644 res/drawable-xxxhdpi/ic_unlocked_white_18dp.png diff --git a/res/drawable-hdpi/ic_unlocked_white_18dp.png b/res/drawable-hdpi/ic_unlocked_white_18dp.png new file mode 100644 index 0000000000000000000000000000000000000000..b1168e31dd018510f3d0dff9f30cb39f927ea698 GIT binary patch literal 814 zcmV+}1JV46P){1PY;3zC{a%#bY>6hTYr)G>%lv7t+)L#MVvo%{nz7ez{kx>Rt`r64Xv z+aaKni^VB+u}Fm^)zS|d^1;o$$LG2Cob;G#dy6k5=brbx=Q+>&yzf2NGR|SPZJQkP z`Fy%mDm`wsT3=n)6&S1Ka{2k>HWhz&sJ=H_k+A-;=atLe`xD=YURgPLZ5 zX$%bw^@8Cy-}lAt?rw2@etx*WzdtiGGjnTeYwM-wc?54vOibjW0tcxTi^YfB*=#mH z=5o3J^_XNbX>4zAzv7|$`};2P8r^p}>F3Y`B3!=WYyoAarusq0ww@Y`{i zCiJtoy{68Vb5rBIg#2c7+QD`Hq&2!KNhwadQJGiH( z$HsXV=yNie4BO`pPPw9WiTNksbUJ;RoRb5kJfNth+sGAlj{Gc>i2 z=F1{>h&fvNrmC=FDes0o{CX8=cf6L3?lVqY7NjVdHkOx{?-vS%tFyDSw`;Z97x=jz zsWpx65~D6Ifzd|K^tgqEg*^Sxv#nxXUTv_uFe#UPDr2gF`{0LkCHQx6aIiyvSc0?d z1TbH3GRtPO<6~oE*;Fdkzzr539UXndLp4(8lR|3j%g4QXz5WK%lIHiLNWre?w3i{< zO}_hVp^J$`BG^PweiTf?jqTX400030|7%r>p19(wkN^Mx07*qoM6N<$g8EaFMF0Q* literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_unlocked_white_18dp.png b/res/drawable-mdpi/ic_unlocked_white_18dp.png new file mode 100644 index 0000000000000000000000000000000000000000..3638a79920dd8a7aa8c1664d4b033124bbec4f64 GIT binary patch literal 543 zcmV+)0^t3LP)L!-WW*=O@`u+YpTtz06xxQYnt+%jLDs`Kq@WsF25JqPZ1d{0Q_j?t_ z>63%5QIo-7@Vru~JVOHpx(ODbm@Ab^w`Q~17u4Gghr?IhZudi>P;m13{7p;#$58aI zk0NLB;x;N0HOe4{7R?9(HtsZg2w#AHAcWxC?UtEMC@_L_(x22y6Yv~o2G<+Zkw=D9 zAx&2mr$SmJCEQ}Mcn=NkR;$(fo6Y8{P7KW=610s&bgA@oI{i4G&vyvzR;$$~tm_WV zed%M+V0vI8;xB8p+RJvk{oQe#lXAKIgn&fZuuY)x7{a?W50!SvT8^*oG{ zX#+|{C>)!U)^W{RY2m&7@dW;zG!C)Ti zwV9p@hZqwHZZ`Rl7e?dejMa7i&pCbHnZ51YIWq^(8CtMC`|Q1DeQT}#t+kJu(z~eq zGd@19q*AHZn$2bkqhMK91J9Can%`!#+4q)~mY#6y_lBsdieVVa#>U3&LZR@r4XM}b zHb8ADd>8W5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HI zq;2&#^CKi!Uv_qOhM9C_{EzIZQ>WPDW+XiKm@_EDDIY;g+aPHMm(L$Rew@{){v7}S Z|Nj{6-M;6}x*Grh002ovPDHLkV1golGT{IK literal 0 HcmV?d00001 diff --git a/res/drawable-xxxhdpi/ic_unlocked_white_18dp.png b/res/drawable-xxxhdpi/ic_unlocked_white_18dp.png new file mode 100644 index 0000000000000000000000000000000000000000..220934afd044de05f4f96293693a27157b0e603f GIT binary patch literal 650 zcmV;50(Jd~P)W=3K@T!y+d)WLl==l8lMS z5BVaSvMy_0S8R%LDjX80?<{lP9{4ujQ0Xf(Hn79IKu6CQHVuA*u3j63$5h;<#wx4S z=tizRH@U}QePWKY!PRrzWA{|Vj44<5o9l=rMj|nzR5%V9&V<{kgut@{`v#^@3cswv#29SD|OE+USmAlHp6&kEZY8V}V%($Lp!u4x^4CTEfu{3+txngd{lkL5fLWXvIM@6d|b%0 k$a|W`piMTopHQ*<0%~vpG|8N2rvLx|07*qoM6N<$f^iumyZ`_I literal 0 HcmV?d00001 diff --git a/res/layout/conversation_item_received.xml b/res/layout/conversation_item_received.xml index 491e69ca21..385bcbb31b 100644 --- a/res/layout/conversation_item_received.xml +++ b/res/layout/conversation_item_received.xml @@ -113,15 +113,16 @@ android:orientation="horizontal" android:gravity="left"> - @@ -135,8 +136,10 @@ app:offset="0" android:layout_gravity="center_vertical|end" android:alpha=".65" - android:layout_width="10dp" + android:layout_width="8dp" android:layout_height="11dp" + android:layout_marginRight="3dp" + android:layout_marginEnd="3dp" android:visibility="gone" tools:visibility="visible"/> diff --git a/res/layout/conversation_item_sent.xml b/res/layout/conversation_item_sent.xml index 38c4df8a59..3d0d76aeb9 100644 --- a/res/layout/conversation_item_sent.xml +++ b/res/layout/conversation_item_sent.xml @@ -76,9 +76,9 @@ android:layout_gravity="right"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone"/> + android:paddingTop="1dip"/> + android:paddingTop="1dip"/> + tools:text="30 mins"/> - diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index 899699a48f..f858c9d6ba 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -117,7 +117,7 @@ public class ConversationItem extends LinearLayout private TextView groupSender; private TextView groupSenderProfileName; private View groupSenderHolder; - private ImageView secureImage; + private ImageView insecureImage; private AvatarImageView contactPhoto; private DeliveryStatusView deliveryStatusIndicator; private AlertView alertView; @@ -162,7 +162,7 @@ public class ConversationItem extends LinearLayout this.indicatorText = (TextView) findViewById(R.id.indicator_text); this.groupSender = (TextView) findViewById(R.id.group_message_sender); this.groupSenderProfileName = (TextView) findViewById(R.id.group_message_sender_profile); - this.secureImage = (ImageView) findViewById(R.id.secure_indicator); + this.insecureImage = (ImageView) findViewById(R.id.insecure_indicator); this.deliveryStatusIndicator = (DeliveryStatusView) findViewById(R.id.delivery_status); this.alertView = (AlertView) findViewById(R.id.indicators_parent); this.contactPhoto = (AvatarImageView) findViewById(R.id.contact_photo); @@ -432,7 +432,7 @@ public class ConversationItem extends LinearLayout private void setStatusIcons(MessageRecord messageRecord) { indicatorText.setVisibility(View.GONE); - secureImage.setVisibility(messageRecord.isSecure() ? View.VISIBLE : View.GONE); + insecureImage.setVisibility(messageRecord.isSecure() ? View.GONE : View.VISIBLE); bodyText.setCompoundDrawablesWithIntrinsicBounds(0, 0, messageRecord.isKeyExchange() ? R.drawable.ic_menu_login : 0, 0); dateText.setText(DateUtils.getExtendedRelativeTimeSpanString(getContext(), locale, messageRecord.getTimestamp()));