Fix tap jacking bug

Changes from 46452977f
This commit is contained in:
Niels Andriesse 2020-12-04 13:40:10 +11:00 committed by Anton Chekulaev
parent 54f730fdfd
commit 3cb7d2169d
8 changed files with 23 additions and 25 deletions

View File

@ -53,13 +53,15 @@ import androidx.appcompat.app.AlertDialog;
import com.annimon.stream.Stream;
import org.session.libsignal.libsignal.util.guava.Optional;
import org.session.libsignal.service.loki.api.opengroups.PublicChat;
import org.session.libsignal.service.loki.api.opengroups.PublicChatAPI;
import org.thoughtcrime.securesms.ApplicationContext;
import org.thoughtcrime.securesms.BindableConversationItem;
import org.thoughtcrime.securesms.MediaPreviewActivity;
import org.thoughtcrime.securesms.MessageDetailsActivity;
import org.thoughtcrime.securesms.attachments.DatabaseAttachment;
import org.thoughtcrime.securesms.components.ConversationItemAlertView;
import org.thoughtcrime.securesms.loki.views.MessageAudioView;
import org.thoughtcrime.securesms.components.ConversationItemFooter;
import org.thoughtcrime.securesms.components.ConversationItemThumbnail;
import org.thoughtcrime.securesms.components.DocumentView;
@ -72,7 +74,6 @@ import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.MmsDatabase;
import org.thoughtcrime.securesms.database.MmsSmsDatabase;
import org.thoughtcrime.securesms.database.SmsDatabase;
import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatch;
import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord;
import org.thoughtcrime.securesms.database.model.MessageRecord;
import org.thoughtcrime.securesms.database.model.MmsMessageRecord;
@ -85,8 +86,8 @@ import org.thoughtcrime.securesms.linkpreview.LinkPreview;
import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.utilities.MentionUtilities;
import org.thoughtcrime.securesms.loki.views.MessageAudioView;
import org.thoughtcrime.securesms.loki.views.ProfilePictureView;
import org.thoughtcrime.securesms.loki.views.TapJackingProofLinearLayout;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.mms.ImageSlide;
import org.thoughtcrime.securesms.mms.PartAuthority;
@ -107,9 +108,6 @@ import org.thoughtcrime.securesms.util.ThemeUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.views.Stub;
import org.session.libsignal.libsignal.util.guava.Optional;
import org.session.libsignal.service.loki.api.opengroups.PublicChat;
import org.session.libsignal.service.loki.api.opengroups.PublicChatAPI;
import java.util.Collections;
import java.util.HashSet;
@ -127,7 +125,7 @@ import network.loki.messenger.R;
*
*/
public class ConversationItem extends TapJackingProofLinearLayout
public class ConversationItem extends LinearLayout
implements RecipientModifiedListener, BindableConversationItem
{
private static final String TAG = ConversationItem.class.getSimpleName();

View File

@ -30,7 +30,7 @@
android:textColor="@color/text"
android:text="@string/activity_register_explanation" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
style="@style/SessionIDTextView"
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
@ -54,7 +54,7 @@
android:layout_marginRight="@dimen/massive_spacing"
android:text="@string/continue_2" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="match_parent"

View File

@ -36,7 +36,7 @@
android:textColor="@color/text"
android:text="@string/activity_seed_explanation" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
style="@style/SessionIDTextView"
android:id="@+id/seedTextView"
android:layout_width="match_parent"
@ -49,7 +49,7 @@
android:textAlignment="center"
android:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
android:id="@+id/revealButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -65,7 +65,7 @@
android:layout_height="0dp"
android:layout_weight="1"/>
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="196dp"

View File

@ -50,7 +50,7 @@
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -71,7 +71,7 @@
android:layout_marginRight="@dimen/large_spacing"
android:orientation="horizontal">
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.UnimportantFilled"
android:id="@+id/copyButton"
android:layout_width="0dp"
@ -79,7 +79,7 @@
android:layout_weight="1"
android:text="@string/copy" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.UnimportantFilled"
android:id="@+id/shareButton"
android:layout_width="0dp"

View File

@ -30,7 +30,7 @@
android:textColor="@color/text"
android:text="@string/activity_register_explanation" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
style="@style/SessionIDTextView"
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
@ -55,7 +55,7 @@
android:layout_marginRight="@dimen/massive_spacing"
android:text="@string/continue_2" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="match_parent"

View File

@ -36,7 +36,7 @@
android:textColor="@color/text"
android:text="@string/activity_seed_explanation" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
style="@style/SessionIDTextView"
android:id="@+id/seedTextView"
android:layout_width="match_parent"
@ -49,7 +49,7 @@
android:textAlignment="center"
android:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
android:id="@+id/revealButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -66,7 +66,7 @@
android:layout_height="0dp"
android:layout_weight="1"/>
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="196dp"

View File

@ -20,7 +20,7 @@
android:textAlignment="center"
android:textSize="@dimen/medium_font_size" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
style="@style/SessionIDTextView"
android:id="@+id/seedTextView"
android:layout_width="wrap_content"
@ -56,7 +56,7 @@
android:layout_weight="1"
android:text="@string/cancel" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Dialog.Unimportant"
android:id="@+id/copyButton"
android:layout_width="0dp"

View File

@ -49,7 +49,7 @@
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofTextView
<TextView
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -70,7 +70,7 @@
android:layout_marginRight="@dimen/large_spacing"
android:orientation="horizontal">
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.UnimportantFilled"
android:id="@+id/copyButton"
android:layout_width="0dp"
@ -78,7 +78,7 @@
android:layout_weight="1"
android:text="@string/copy" />
<org.thoughtcrime.securesms.loki.views.TapJackingProofButton
<Button
style="@style/Widget.Session.Button.Common.UnimportantFilled"
android:id="@+id/shareButton"
android:layout_width="0dp"