Browse Source

layout: never use suggestions

IP addresses and key material could be potentially sensitive. We also
don't want any interactions with the suggestive text APIs. So, we mark
it as both a visible password and we turn off suggestions. This will fix
the length limit, too, in Android 8.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
master
Jason A. Donenfeld 6 years ago
parent
commit
6361628e16
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      app/src/main/res/layout/tunnel_editor_fragment.xml
  2. +4
    -4
      app/src/main/res/layout/tunnel_editor_peer.xml

+ 4
- 4
app/src/main/res/layout/tunnel_editor_fragment.xml View File

@@ -70,7 +70,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/interface_name_label" android:layout_below="@+id/interface_name_label"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={name}" android:text="@={name}"
app:filter="@{NameInputFilter.newInstance()}" /> app:filter="@{NameInputFilter.newInstance()}" />


@@ -90,7 +90,7 @@
android:layout_below="@+id/private_key_label" android:layout_below="@+id/private_key_label"
android:layout_toStartOf="@+id/generate_private_key_button" android:layout_toStartOf="@+id/generate_private_key_button"
android:contentDescription="@string/public_key_description" android:contentDescription="@string/public_key_description"
android:inputType="textVisiblePassword"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.privateKey}" android:text="@={config.interface.privateKey}"
app:filter="@{KeyInputFilter.newInstance()}" /> app:filter="@{KeyInputFilter.newInstance()}" />


@@ -142,7 +142,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_below="@+id/addresses_label" android:layout_below="@+id/addresses_label"
android:layout_toStartOf="@+id/listen_port_text" android:layout_toStartOf="@+id/listen_port_text"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.address}" /> android:text="@={config.interface.address}" />


<TextView <TextView
@@ -184,7 +184,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_below="@+id/dns_servers_label" android:layout_below="@+id/dns_servers_label"
android:layout_toStartOf="@+id/mtu_text" android:layout_toStartOf="@+id/mtu_text"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.dns}" /> android:text="@={config.interface.dns}" />


<TextView <TextView


+ 4
- 4
app/src/main/res/layout/tunnel_editor_peer.xml View File

@@ -61,7 +61,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/public_key_label" android:layout_below="@+id/public_key_label"
android:inputType="textVisiblePassword"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.publicKey}" android:text="@={item.publicKey}"
app:filter="@{KeyInputFilter.newInstance()}" /> app:filter="@{KeyInputFilter.newInstance()}" />


@@ -79,7 +79,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/pre_shared_key_label" android:layout_below="@+id/pre_shared_key_label"
android:hint="@string/hint_optional" android:hint="@string/hint_optional"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.preSharedKey}" /> android:text="@={item.preSharedKey}" />


<TextView <TextView
@@ -95,7 +95,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/allowed_ips_label" android:layout_below="@+id/allowed_ips_label"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.allowedIPs}" /> android:text="@={item.allowedIPs}" />


<TextView <TextView
@@ -115,7 +115,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_below="@+id/endpoint_label" android:layout_below="@+id/endpoint_label"
android:layout_toStartOf="@+id/persistent_keepalive_text" android:layout_toStartOf="@+id/persistent_keepalive_text"
android:inputType="textNoSuggestions"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.endpoint}" /> android:text="@={item.endpoint}" />


<TextView <TextView


Loading…
Cancel
Save