From 6361628e165d4275a47ae5f976c8891fb644b51a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 9 Jan 2018 00:23:33 +0100 Subject: [PATCH] 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 --- app/src/main/res/layout/tunnel_editor_fragment.xml | 8 ++++---- app/src/main/res/layout/tunnel_editor_peer.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/tunnel_editor_fragment.xml b/app/src/main/res/layout/tunnel_editor_fragment.xml index 1d387d5..69fd27f 100644 --- a/app/src/main/res/layout/tunnel_editor_fragment.xml +++ b/app/src/main/res/layout/tunnel_editor_fragment.xml @@ -70,7 +70,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/interface_name_label" - android:inputType="textNoSuggestions" + android:inputType="textNoSuggestions|textVisiblePassword" android:text="@={name}" app:filter="@{NameInputFilter.newInstance()}" /> @@ -90,7 +90,7 @@ android:layout_below="@+id/private_key_label" android:layout_toStartOf="@+id/generate_private_key_button" android:contentDescription="@string/public_key_description" - android:inputType="textVisiblePassword" + android:inputType="textNoSuggestions|textVisiblePassword" android:text="@={config.interface.privateKey}" app:filter="@{KeyInputFilter.newInstance()}" /> @@ -142,7 +142,7 @@ android:layout_alignParentStart="true" android:layout_below="@+id/addresses_label" android:layout_toStartOf="@+id/listen_port_text" - android:inputType="textNoSuggestions" + android:inputType="textNoSuggestions|textVisiblePassword" android:text="@={config.interface.address}" /> @@ -79,7 +79,7 @@ android:layout_height="wrap_content" android:layout_below="@+id/pre_shared_key_label" android:hint="@string/hint_optional" - android:inputType="textNoSuggestions" + android:inputType="textNoSuggestions|textVisiblePassword" android:text="@={item.preSharedKey}" />