mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-25 11:34:24 +00:00
Fix Auto/Save activities for GB.
This commit is contained in:
parent
d991d65225
commit
853e12693d
res/layout
src/org/thoughtcrime/securesms
@ -3,29 +3,30 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="10px">
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip">
|
||||
|
||||
<TextView android:id="@+id/description_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5px"
|
||||
android:text="You have received a message from someone who supports TextSecure encrypted sessions. Would you like to initiate a key exchange so you can communicate securely?"/>
|
||||
<TextView android:id="@+id/description_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5px"
|
||||
android:text="You have received a message from someone who supports TextSecure encrypted sessions. Would you like to initiate a key exchange so you can communicate securely?"/>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10px"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10px"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button android:id="@+id/initiate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Initiate Exchange"
|
||||
android:gravity="center"/>
|
||||
<Button android:id="@+id/initiate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Initiate Exchange"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:text="Cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:text="Cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,47 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginTop="5dip"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="Identity Name:" />
|
||||
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="16dip">
|
||||
android:id="@+id/identity_name"
|
||||
android:layout_margin="16dip"/>
|
||||
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dip"
|
||||
android:text="Identity Name:" />
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:gravity="right">
|
||||
|
||||
<EditText android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dip"
|
||||
android:id="@+id/identity_name"
|
||||
android:text="" />
|
||||
<TableLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="*">
|
||||
<TableRow>
|
||||
<Button android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="Cancel"
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_marginRight="15dip"
|
||||
android:layout_marginLeft="16dip"/>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:gravity="right">
|
||||
|
||||
<TableLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="*">
|
||||
<TableRow>
|
||||
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:layout_marginRight="17dip"
|
||||
android:id="@+id/cancel_button"
|
||||
android:text="Cancel"/>
|
||||
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:id="@+id/ok_button"
|
||||
android:text="Ok"/>
|
||||
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OK"
|
||||
android:id="@+id/ok_button"
|
||||
android:layout_marginRight="16dip"/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -16,14 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.KeyExchangeInitiator;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.LocalKeyRecord;
|
||||
import org.thoughtcrime.securesms.database.RemoteKeyRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
@ -32,6 +24,15 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.KeyExchangeInitiator;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.LocalKeyRecord;
|
||||
import org.thoughtcrime.securesms.database.RemoteKeyRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
/**
|
||||
* Activity which prompts the user to initiate a secure
|
||||
* session. Initiated by whitespace tag detection from
|
||||
@ -40,7 +41,7 @@ import android.widget.Button;
|
||||
* @author Moxie Marlinspike
|
||||
*
|
||||
*/
|
||||
public class AutoInitiateActivity extends Activity {
|
||||
public class AutoInitiateActivity extends SherlockActivity {
|
||||
|
||||
private long threadId;
|
||||
private Recipient recipient;
|
||||
@ -94,7 +95,7 @@ public class AutoInitiateActivity extends Activity {
|
||||
}
|
||||
|
||||
public static boolean isValidAutoInitiateSituation(Context context, MasterSecret masterSecret,
|
||||
Recipient recipient, String message, long threadId)
|
||||
Recipient recipient, String message, long threadId)
|
||||
{
|
||||
return
|
||||
isMessageTagged(message) &&
|
||||
|
@ -16,13 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@ -32,13 +25,21 @@ import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
/**
|
||||
* Activity that provides interface for users to save
|
||||
* identity keys they receive.
|
||||
*
|
||||
* @author Moxie Marlinspike
|
||||
*/
|
||||
public class SaveIdentityActivity extends Activity {
|
||||
public class SaveIdentityActivity extends SherlockActivity {
|
||||
|
||||
private MasterSecret masterSecret;
|
||||
private IdentityKey identityKey;
|
||||
@ -56,6 +57,7 @@ public class SaveIdentityActivity extends Activity {
|
||||
initializeListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
MemoryCleaner.clean(masterSecret);
|
||||
super.onDestroy();
|
||||
|
Loading…
x
Reference in New Issue
Block a user