summaryrefslogtreecommitdiff
path: root/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn/LaunchVPN.java')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/LaunchVPN.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java
index ad5171e8..44e355ff 100644
--- a/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java
+++ b/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java
@@ -5,6 +5,7 @@
package de.blinkt.openvpn;
+import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
@@ -156,7 +157,6 @@ public class LaunchVPN extends Activity {
private void askForPW(final int type) {
final EditText entry = new EditText(this);
- final View userpwlayout = getLayoutInflater().inflate(R.layout.userpass, null, false);
entry.setSingleLine();
entry.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
@@ -166,6 +166,9 @@ public class LaunchVPN extends Activity {
dialog.setTitle(getString(R.string.pw_request_dialog_title, getString(type)));
dialog.setMessage(getString(R.string.pw_request_dialog_prompt, mSelectedProfile.mName));
+
+ @SuppressLint("InflateParams") final View userpwlayout = getLayoutInflater().inflate(R.layout.userpass, null, false);
+
if (type == R.string.password) {
((EditText) userpwlayout.findViewById(R.id.username)).setText(mSelectedProfile.mUsername);
((EditText) userpwlayout.findViewById(R.id.password)).setText(mSelectedProfile.mPassword);