[tor-commits] [orbot/master] fix binary search

n8fr8 at torproject.org n8fr8 at torproject.org
Fri Jan 5 04:01:50 UTC 2018


commit 5c5790c80e9173c0d5eeafb121820e769e00c69e
Author: Unpublished <unpublished at gmx.net>
Date:   Tue Dec 12 10:48:31 2017 +0100

    fix binary search
    
    - tordApps needs to be sorted
---
 app/src/main/java/org/torproject/android/ui/AppManagerActivity.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
index 983a5028..c223d39c 100644
--- a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
@@ -37,8 +37,6 @@ import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
 import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.GridView;
 import android.widget.ImageView;
 import android.widget.ListAdapter;
@@ -226,6 +224,7 @@ public class AppManagerActivity extends AppCompatActivity implements OnClickList
         {
             tordApps[tordIdx++] = st.nextToken();
         }
+        Arrays.sort(tordApps);
 
         List<ApplicationInfo> lAppInfo = pMgr.getInstalledApplications(0);
 





More information about the tor-commits mailing list