[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] bug fix



commit 9e0bdcf147b1ceba26844195330507e6ff0619bf
Author: arrase <arrase@xxxxxxxxx>
Date:   Sun Nov 27 23:52:35 2016 +0100

    bug fix
---
 .../main/java/org/torproject/android/OrbotMainActivity.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 59dba4b..c1e37fb 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -623,7 +623,12 @@ public class OrbotMainActivity extends AppCompatActivity
                         );
 
                         if (onion != null && onion.getCount() > 0) {
+                            onion.moveToNext();
                             hostname = onion.getString(onion.getColumnIndex(HSContentProvider.HiddenService.NAME));
+
+                            if(hostname == null || hostname.length() < 1)
+                                continue;
+
                             nResult.putExtra("hs_host", hostname);
 
                             if (hsKeyPath != null) {
@@ -649,11 +654,10 @@ public class OrbotMainActivity extends AppCompatActivity
                             }
 
                             onion.close();
+                            setResult(RESULT_OK, nResult);
+                            finish();
                         }
                     }
-
-                    setResult(RESULT_OK, nResult);
-                    finish();
                 }
             }.start();
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits