Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Make clear that device names are publicly readable (#3265)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty authored and BillCarsonFr committed Sep 24, 2019
1 parent ef15cdb commit a1b425d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ MatrixSdk:
Features:
- Use the hashed v2 lookup API for 3PIDs (#3257)
- Prompt to accept identity server policies before inviting them to a room (#3227)
- Make clear that device names are publicly readable (#3265)

Improvements:
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,10 @@ class VectorSettingsPreferencesFragment : PreferenceFragmentCompat(), SharedPref
val inflater = it.layoutInflater
val layout = inflater.inflate(R.layout.dialog_base_edit_text, null)

layout.findViewById<TextView>(R.id.edit_text_content).let { tv ->
tv.visibility = View.VISIBLE
tv.setText(R.string.device_name_warning)
}
val input = layout.findViewById<EditText>(R.id.edit_text)
input.setText(aDeviceInfoToRename.display_name)

Expand Down
9 changes: 9 additions & 0 deletions vector/src/main/res/layout/dialog_base_edit_text.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -10,6 +11,14 @@
android:paddingEnd="?dialogPreferredPadding"
android:paddingRight="?dialogPreferredPadding">

<TextView
android:id="@+id/edit_text_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:text="@string/device_name_warning"
tools:visibility="visible" />

<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
Expand Down
14 changes: 8 additions & 6 deletions vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,10 @@
<string name="settings_data_save_mode">Data save mode</string>
<string name="settings_data_save_mode_summary">Data save mode applies a specific filter so presence updates and typing notifications are filtered out.</string>

<string name="devices_details_dialog_title">Device details</string>
<string name="devices_details_dialog_title">Device information</string>
<string name="devices_details_id_title">ID</string>
<string name="devices_details_name_title">Name</string>
<string name="devices_details_device_name">Device Name</string>
<string name="devices_details_name_title">Public Name</string>
<string name="devices_details_device_name">Update Public Name</string>
<string name="devices_details_last_seen_title">Last seen</string>
<string name="devices_details_last_seen_format">%1$s @ %2$s</string>
<string name="devices_delete_dialog_text">This operation requires additional authentication.\nTo continue, please enter your password.</string>
Expand Down Expand Up @@ -966,9 +966,11 @@
<string name="encryption_information_decryption_error">Decryption error</string>

<string name="encryption_information_sender_device_information">Sender device information</string>
<string name="encryption_information_device_name">Device name</string>
<string name="encryption_information_name">Name</string>
<string name="encryption_information_device_id">Device ID</string>
<string name="encryption_information_device_name">Public name</string>
<string name="encryption_information_device_name_with_warning">Public name (visible to people you communicate with)</string>
<string name="device_name_warning">"A device's public name is visible to people you communicate with"</string>
<string name="encryption_information_name">Public name</string>
<string name="encryption_information_device_id">ID</string>
<string name="encryption_information_device_key">Device key</string>
<string name="encryption_information_verification">Verification</string>
<string name="encryption_information_ed25519_fingerprint">Ed25519 fingerprint</string>
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/xml/vector_settings_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@

<im.vector.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_NAME_PREFERENCE_KEY"
android:title="@string/encryption_information_device_name" />
android:title="@string/encryption_information_device_name_with_warning" />

<im.vector.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_ID_PREFERENCE_KEY"
Expand Down

0 comments on commit a1b425d

Please sign in to comment.