[Android] Pre-fill folder path with '/home/username'

Geoffrey Métais git at videolan.org
Wed Mar 2 15:12:08 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar  2 11:36:01 2016 +0100| [ffc60ac3de92303a5958855fbda1a2652a18b12b] | committer: Geoffrey Métais

Pre-fill folder path with '/home/username'

> https://code.videolan.org/videolan/vlc-android/commit/ffc60ac3de92303a5958855fbda1a2652a18b12b
---

 vlc-android/src/org/videolan/vlc/gui/dialogs/NetworkServerDialog.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/NetworkServerDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/NetworkServerDialog.java
index c6732dc..eff3bcf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/NetworkServerDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/NetworkServerDialog.java
@@ -238,7 +238,8 @@ public class NetworkServerDialog extends DialogFragment implements AdapterView.O
 
     @Override
     public void onTextChanged(CharSequence s, int start, int before, int count) {
-        if (mEditUsername.hasFocus()) {
+        if (mEditUsername.hasFocus() &&
+                TextUtils.equals(mSpinnerProtocol.getSelectedItem().toString(),"SFTP")) {
             mEditFolder.removeTextChangedListener(this);
             mEditFolder.setText("/home/" + mEditUsername.getText().toString());
             mEditFolder.addTextChangedListener(this);



More information about the Android mailing list