show unverified devices warning in contact and account details

This commit is contained in:
Daniel Gultsch 2023-10-30 13:06:04 +01:00
parent 0bbc1193e3
commit 71b6492d61
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
8 changed files with 178 additions and 96 deletions

View file

@ -736,8 +736,12 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
return axolotlStore.getFingerprintCertificate(fingerprint); return axolotlStore.getFingerprintCertificate(fingerprint);
} }
public void setFingerprintTrust(String fingerprint, FingerprintStatus status) { public void setFingerprintTrust(final String fingerprint, final FingerprintStatus status) {
axolotlStore.setFingerprintStatus(fingerprint, status); axolotlStore.setFingerprintStatus(fingerprint, status);
// TODO we decided to call this after a fingerprint gets toggled to update the 'your contact
// is using unverified devices text'; however this means the entire screen gets redrawn
// after a toggle which might be annoying or cause other weird UI glitches
mXmppConnectionService.updateAccountUi();
} }
private ListenableFuture<XmppAxolotlSession> verifySessionWithPEP(final XmppAxolotlSession session) { private ListenableFuture<XmppAxolotlSession> verifySessionWithPEP(final XmppAxolotlSession session) {

View file

@ -97,6 +97,10 @@ public class FingerprintStatus implements Comparable<FingerprintStatus> {
return trust == Trust.TRUSTED || isVerified(); return trust == Trust.TRUSTED || isVerified();
} }
public boolean isUnverified() {
return trust == Trust.TRUSTED;
}
public boolean isVerified() { public boolean isVerified() {
return trust == Trust.VERIFIED || trust == Trust.VERIFIED_X509; return trust == Trust.VERIFIED || trust == Trust.VERIFIED_X509;
} }

View file

@ -455,6 +455,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
} }
boolean skippedInactive = false; boolean skippedInactive = false;
boolean showsInactive = false; boolean showsInactive = false;
boolean showUnverifiedWarning = false;
for (final XmppAxolotlSession session : sessions) { for (final XmppAxolotlSession session : sessions) {
final FingerprintStatus trust = session.getTrust(); final FingerprintStatus trust = session.getTrust();
hasKeys |= !trust.isCompromised(); hasKeys |= !trust.isCompromised();
@ -470,7 +471,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
boolean highlight = session.getFingerprint().equals(messageFingerprint); boolean highlight = session.getFingerprint().equals(messageFingerprint);
addFingerprintRow(binding.detailsContactKeys, session, highlight); addFingerprintRow(binding.detailsContactKeys, session, highlight);
} }
if (trust.isUnverified()) {
showUnverifiedWarning = true;
} }
}
binding.unverifiedWarning.setVisibility(showUnverifiedWarning ? View.VISIBLE : View.GONE);
if (showsInactive || skippedInactive) { if (showsInactive || skippedInactive) {
binding.showInactiveDevices.setText(showsInactive ? R.string.hide_inactive_devices : R.string.show_inactive_devices); binding.showInactiveDevices.setText(showsInactive ? R.string.hide_inactive_devices : R.string.show_inactive_devices);
binding.showInactiveDevices.setVisibility(View.VISIBLE); binding.showInactiveDevices.setVisibility(View.VISIBLE);
@ -480,7 +485,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
} else { } else {
binding.showInactiveDevices.setVisibility(View.GONE); binding.showInactiveDevices.setVisibility(View.GONE);
} }
binding.scanButton.setVisibility(hasKeys && isCameraFeatureAvailable() ? View.VISIBLE : View.GONE); final boolean isCameraFeatureAvailable = isCameraFeatureAvailable();
binding.scanButton.setVisibility(hasKeys && isCameraFeatureAvailable ? View.VISIBLE : View.GONE);
if (hasKeys) { if (hasKeys) {
binding.scanButton.setOnClickListener((v) -> ScanActivity.scan(this)); binding.scanButton.setOnClickListener((v) -> ScanActivity.scan(this));
} }

View file

@ -49,6 +49,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.crypto.axolotl.FingerprintStatus;
import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession;
import eu.siacs.conversations.databinding.ActivityEditAccountBinding; import eu.siacs.conversations.databinding.ActivityEditAccountBinding;
import eu.siacs.conversations.databinding.DialogPresenceBinding; import eu.siacs.conversations.databinding.DialogPresenceBinding;
@ -630,6 +631,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.accountRegisterNew.setVisibility(View.GONE); this.binding.accountRegisterNew.setVisibility(View.GONE);
} }
this.binding.actionEditYourName.setOnClickListener(this::onEditYourNameClicked); this.binding.actionEditYourName.setOnClickListener(this::onEditYourNameClicked);
this.binding.scanButton.setOnClickListener((v) -> ScanActivity.scan(this));
} }
private void onEditYourNameClicked(View view) { private void onEditYourNameClicked(View view) {
@ -1166,13 +1168,18 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.axolotlFingerprintBox.setVisibility(View.GONE); this.binding.axolotlFingerprintBox.setVisibility(View.GONE);
} }
boolean hasKeys = false; boolean hasKeys = false;
boolean showUnverifiedWarning = false;
binding.otherDeviceKeys.removeAllViews(); binding.otherDeviceKeys.removeAllViews();
for (XmppAxolotlSession session : mAccount.getAxolotlService().findOwnSessions()) { for (final XmppAxolotlSession session : mAccount.getAxolotlService().findOwnSessions()) {
if (!session.getTrust().isCompromised()) { final FingerprintStatus trust = session.getTrust();
if (!trust.isCompromised()) {
boolean highlight = session.getFingerprint().equals(messageFingerprint); boolean highlight = session.getFingerprint().equals(messageFingerprint);
addFingerprintRow(binding.otherDeviceKeys, session, highlight); addFingerprintRow(binding.otherDeviceKeys, session, highlight);
hasKeys = true; hasKeys = true;
} }
if (trust.isUnverified()) {
showUnverifiedWarning = true;
}
} }
if (hasKeys && Config.supportOmemo()) { //TODO: either the button should be visible if we print an active device or the device list should be fed with reactived devices if (hasKeys && Config.supportOmemo()) { //TODO: either the button should be visible if we print an active device or the device list should be fed with reactived devices
this.binding.otherDeviceKeysCard.setVisibility(View.VISIBLE); this.binding.otherDeviceKeysCard.setVisibility(View.VISIBLE);
@ -1182,6 +1189,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
} else { } else {
binding.clearDevices.setVisibility(View.VISIBLE); binding.clearDevices.setVisibility(View.VISIBLE);
} }
binding.unverifiedWarning.setVisibility(showUnverifiedWarning ? View.VISIBLE : View.GONE);
binding.scanButton.setVisibility(showUnverifiedWarning ? View.VISIBLE : View.GONE);
} else { } else {
this.binding.otherDeviceKeysCard.setVisibility(View.GONE); this.binding.otherDeviceKeysCard.setVisibility(View.GONE);
} }

View file

@ -205,6 +205,7 @@ public abstract class OmemoActivity extends XmppActivity {
@Override @Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
ScanActivity.onRequestPermissionResult(this, requestCode, grantResults); ScanActivity.onRequestPermissionResult(this, requestCode, grantResults);
} }
} }

View file

@ -186,6 +186,19 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/card_padding_list"/> android:padding="@dimen/card_padding_list"/>
<LinearLayout
android:id="@+id/unverified_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/card_padding_list">
<TextView
android:layout_marginHorizontal="@dimen/list_padding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"
android:text="@string/contact_uses_unverified_keys"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"

View file

@ -8,7 +8,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary"> android:background="?attr/color_background_secondary">
<include android:id="@+id/toolbar" <include
android:id="@+id/toolbar"
layout="@layout/toolbar" /> layout="@layout/toolbar" />
<ScrollView <ScrollView
@ -28,10 +29,10 @@
android:id="@+id/editor" android:id="@+id/editor"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"> android:layout_marginBottom="@dimen/activity_vertical_margin">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -45,7 +46,7 @@
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/avatar_item_distance" android:layout_marginRight="@dimen/avatar_item_distance"
android:contentDescription="@string/account_image_description" android:contentDescription="@string/account_image_description"
app:riv_corner_radius="8dp"/> app:riv_corner_radius="8dp" />
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -58,17 +59,17 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/account_settings_jabber_id" android:hint="@string/account_settings_jabber_id"
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint" app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"> app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
<AutoCompleteTextView <AutoCompleteTextView
android:id="@+id/account_jid" android:id="@+id/account_jid"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:textColor="?attr/edit_text_color" android:textColor="?attr/edit_text_color" />
style="@style/Widget.Conversations.EditText"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -76,21 +77,21 @@
android:id="@+id/account_password_layout" android:id="@+id/account_password_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"
app:passwordToggleDrawable="@drawable/visibility_toggle_drawable" app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
app:passwordToggleEnabled="true" app:passwordToggleEnabled="true"
app:passwordToggleTint="?android:textColorSecondary" app:passwordToggleTint="?android:textColorSecondary">
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error">
<eu.siacs.conversations.ui.widget.TextInputEditText <eu.siacs.conversations.ui.widget.TextInputEditText
android:id="@+id/account_password" android:id="@+id/account_password"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:hint="@string/password" android:hint="@string/password"
android:inputType="textPassword" android:inputType="textPassword"
android:textColor="?attr/edit_text_color" android:textColor="?attr/edit_text_color" />
style="@style/Widget.Conversations.EditText"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<LinearLayout <LinearLayout
@ -112,15 +113,15 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/account_settings_hostname" android:hint="@string/account_settings_hostname"
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint" app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"> app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
<EditText <EditText
android:id="@+id/hostname" android:id="@+id/hostname"
style="@style/Widget.Conversations.EditText"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textWebEmailAddress" android:inputType="textWebEmailAddress" />
style="@style/Widget.Conversations.EditText"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
@ -135,16 +136,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/account_settings_port" android:hint="@string/account_settings_port"
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint" app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"> app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
<EditText <EditText
android:id="@+id/port" android:id="@+id/port"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:inputType="number" android:inputType="number"
android:maxLength="5" android:maxLength="5" />
style="@style/Widget.Conversations.EditText"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -155,7 +156,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="@string/register_account"/> android:text="@string/register_account" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
@ -164,10 +165,10 @@
android:id="@+id/os_optimization" android:id="@+id/os_optimization"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:visibility="gone"> android:visibility="gone">
<LinearLayout <LinearLayout
@ -186,7 +187,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/battery_optimizations_enabled" android:text="@string/battery_optimizations_enabled"
android:textAppearance="@style/TextAppearance.Conversations.Title"/> android:textAppearance="@style/TextAppearance.Conversations.Title" />
<TextView <TextView
android:id="@+id/os_optimization_body" android:id="@+id/os_optimization_body"
@ -194,7 +195,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="@string/battery_optimizations_enabled_explained" android:text="@string/battery_optimizations_enabled_explained"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -212,7 +213,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:text="@string/disable" android:text="@string/disable"
android:textColor="?colorAccent"/> android:textColor="?colorAccent" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
@ -222,10 +223,10 @@
android:id="@+id/stats" android:id="@+id/stats"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:visibility="gone"> android:visibility="gone">
<LinearLayout <LinearLayout
@ -251,7 +252,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_session_established" android:text="@string/server_info_session_established"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/session_est" android:id="@+id/session_est"
@ -259,7 +260,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>
@ -282,7 +283,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_pep" android:text="@string/server_info_pep"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_pep" android:id="@+id/server_info_pep"
@ -291,7 +292,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -304,7 +305,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_blocking" android:text="@string/server_info_blocking"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_blocking" android:id="@+id/server_info_blocking"
@ -313,7 +314,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -326,7 +327,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_stream_management" android:text="@string/server_info_stream_management"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_sm" android:id="@+id/server_info_sm"
@ -335,7 +336,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -348,7 +349,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_external_service_discovery" android:text="@string/server_info_external_service_discovery"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_external_service" android:id="@+id/server_info_external_service"
@ -357,7 +358,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -370,7 +371,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_roster_version" android:text="@string/server_info_roster_version"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_roster_version" android:id="@+id/server_info_roster_version"
@ -379,7 +380,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -392,7 +393,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_carbon_messages" android:text="@string/server_info_carbon_messages"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_carbons" android:id="@+id/server_info_carbons"
@ -401,7 +402,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -414,7 +415,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_mam" android:text="@string/server_info_mam"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_mam" android:id="@+id/server_info_mam"
@ -423,7 +424,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -436,7 +437,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_csi" android:text="@string/server_info_csi"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_csi" android:id="@+id/server_info_csi"
@ -445,7 +446,7 @@
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1" android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -459,7 +460,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_push" android:text="@string/server_info_push"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_push" android:id="@+id/server_info_push"
@ -467,7 +468,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
</TableRow> </TableRow>
<TableRow <TableRow
@ -481,7 +482,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/server_info_http_upload" android:text="@string/server_info_http_upload"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<TextView <TextView
android:id="@+id/server_info_http_upload" android:id="@+id/server_info_http_upload"
@ -489,7 +490,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/> android:textAppearance="@style/TextAppearance.Conversations.Body1" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>
@ -512,14 +513,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/no_name_set_instructions" android:text="@string/no_name_set_instructions"
android:textAppearance="@style/TextAppearance.Conversations.Body1.Tertiary"/> android:textAppearance="@style/TextAppearance.Conversations.Body1.Tertiary" />
<TextView <TextView
android:id="@+id/your_name_desc" android:id="@+id/your_name_desc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/your_name" android:text="@string/your_name"
android:textAppearance="@style/TextAppearance.Conversations.Caption"/> android:textAppearance="@style/TextAppearance.Conversations.Caption" />
</LinearLayout> </LinearLayout>
<ImageButton <ImageButton
@ -532,7 +533,7 @@
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding" android:padding="@dimen/image_button_padding"
android:src="?attr/icon_edit_body" android:src="?attr/icon_edit_body"
android:visibility="visible"/> android:visibility="visible" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
@ -553,14 +554,14 @@
android:id="@+id/pgp_fingerprint" android:id="@+id/pgp_fingerprint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Conversations.Fingerprint"/> android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView <TextView
android:id="@+id/pgp_fingerprint_desc" android:id="@+id/pgp_fingerprint_desc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/openpgp_key_id" android:text="@string/openpgp_key_id"
android:textAppearance="@style/TextAppearance.Conversations.Caption"/> android:textAppearance="@style/TextAppearance.Conversations.Caption" />
</LinearLayout> </LinearLayout>
<ImageButton <ImageButton
@ -573,7 +574,7 @@
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding" android:padding="@dimen/image_button_padding"
android:src="?attr/icon_remove" android:src="?attr/icon_remove"
android:visibility="visible"/> android:visibility="visible" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
@ -594,13 +595,13 @@
android:id="@+id/axolotl_fingerprint" android:id="@+id/axolotl_fingerprint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Conversations.Fingerprint"/> android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView <TextView
android:id="@+id/own_fingerprint_desc" android:id="@+id/own_fingerprint_desc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Conversations.Caption"/> android:textAppearance="@style/TextAppearance.Conversations.Caption" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -620,7 +621,7 @@
android:contentDescription="@string/copy_omemo_clipboard_description" android:contentDescription="@string/copy_omemo_clipboard_description"
android:padding="@dimen/image_button_padding" android:padding="@dimen/image_button_padding"
android:src="?attr/icon_copy" android:src="?attr/icon_copy"
android:visibility="visible"/> android:visibility="visible" />
<ImageButton <ImageButton
android:id="@+id/action_regenerate_axolotl_key" android:id="@+id/action_regenerate_axolotl_key"
@ -631,7 +632,7 @@
android:contentDescription="@string/regenerate_omemo_key" android:contentDescription="@string/regenerate_omemo_key"
android:padding="@dimen/image_button_padding" android:padding="@dimen/image_button_padding"
android:src="?attr/icon_refresh" android:src="?attr/icon_refresh"
android:visibility="gone"/> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
@ -642,12 +643,17 @@
android:id="@+id/other_device_keys_card" android:id="@+id/other_device_keys_card"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:visibility="gone"> android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -660,23 +666,60 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/list_padding" android:layout_margin="@dimen/list_padding"
android:text="@string/other_devices" android:text="@string/other_devices"
android:textAppearance="@style/TextAppearance.Conversations.Title"/> android:textAppearance="@style/TextAppearance.Conversations.Title" />
<LinearLayout <LinearLayout
android:id="@+id/other_device_keys" android:id="@+id/other_device_keys"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"/> android:orientation="vertical" />
</LinearLayout>
<LinearLayout
android:id="@+id/unverified_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/card_padding_list">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/list_padding"
android:text="@string/unverified_devices"
android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/scan_button"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="@string/scan_qr_code"
android:textColor="?attr/colorAccent" />
<Button <Button
android:id="@+id/clear_devices" android:id="@+id/clear_devices"
style="@style/Widget.Conversations.Button.Borderless" style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:minWidth="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="@string/clear_other_devices" android:text="@string/clear_other_devices"
android:textColor="?colorAccent"/> android:textColor="?attr/colorAccent" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
@ -685,11 +728,11 @@
android:id="@+id/button_bar" android:id="@+id/button_bar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentStart="true"> android:layout_alignParentBottom="true">
<Button <Button
android:id="@+id/cancel_button" android:id="@+id/cancel_button"
@ -697,14 +740,14 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/cancel"/> android:text="@string/cancel" />
<View <View
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginBottom="7dp"
android:layout_marginTop="7dp" android:layout_marginTop="7dp"
android:background="?attr/divider"/> android:layout_marginBottom="7dp"
android:background="?attr/divider" />
<Button <Button
android:id="@+id/save_button" android:id="@+id/save_button"
@ -713,7 +756,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:enabled="false" android:enabled="false"
android:text="@string/save"/> android:text="@string/save" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -1018,4 +1018,6 @@
<string name="hide_notification">Hide notification</string> <string name="hide_notification">Hide notification</string>
<string name="log_out">Log out</string> <string name="log_out">Log out</string>
<string name="log_in">Log in</string> <string name="log_in">Log in</string>
<string name="contact_uses_unverified_keys">Your contact uses unverified devices. Scan their 2D barcode to perform verification and impede active MITM attacks.</string>
<string name="unverified_devices">You are using unverified devices. Scan the 2D barcodes of your other devices to perform verification and impede active MITM attack.</string>
</resources> </resources>