commit d3c11bed4bb03ae129d3f5ad330d2cf677b138b7
Author: Nathan Freitas <nat...@freitas.net>
Date:   Thu Jan 9 21:32:07 2014 -0500

    add geoip v6 file and support in TorService
---
 res/raw/geoip.mp3                                           |  Bin 1210843 -> 
609031 bytes
 res/raw/geoip6.mp3                                          |  Bin 0 -> 81420 
bytes
 src/org/torproject/android/service/TorBinaryInstaller.java  |    4 ++++
 src/org/torproject/android/service/TorService.java          |    6 ++++--
 src/org/torproject/android/service/TorServiceConstants.java |    2 ++
 5 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/res/raw/geoip.mp3 b/res/raw/geoip.mp3
index 4b5ce6d..3db9c63 100644
Binary files a/res/raw/geoip.mp3 and b/res/raw/geoip.mp3 differ
diff --git a/res/raw/geoip6.mp3 b/res/raw/geoip6.mp3
new file mode 100644
index 0000000..e5e5910
Binary files /dev/null and b/res/raw/geoip6.mp3 differ
diff --git a/src/org/torproject/android/service/TorBinaryInstaller.java 
b/src/org/torproject/android/service/TorBinaryInstaller.java
index 45705ae..3ff0a38 100644
--- a/src/org/torproject/android/service/TorBinaryInstaller.java
+++ b/src/org/torproject/android/service/TorBinaryInstaller.java
@@ -76,6 +76,10 @@ public class TorBinaryInstaller implements 
TorServiceConstants {
                is = context.getResources().openRawResource(R.raw.geoip);
                outFile = new File(installFolder, GEOIP_ASSET_KEY);
                streamToFile(is, outFile, false, true);
+               
+               is = context.getResources().openRawResource(R.raw.geoip6);
+               outFile = new File(installFolder, GEOIP6_ASSET_KEY);
+               streamToFile(is, outFile, false, true);
        
                return true;
        }
diff --git a/src/org/torproject/android/service/TorService.java 
b/src/org/torproject/android/service/TorService.java
index ff5da45..d26ca03 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -1645,9 +1645,10 @@ public class TorService extends Service implements 
TorServiceConstants, TorConst
         
         if (entranceNodes.length() > 0 || exitNodes.length() > 0 || 
excludeNodes.length() > 0)
         {
-               //only apple GeoIP if you need it
+               //only apply GeoIP if you need it
                File fileGeoIP = new File(appBinHome,GEOIP_ASSET_KEY);
-               
+               File fileGeoIP6 = new File(appBinHome,GEOIP6_ASSET_KEY);
+                       
                try
                {
                        if ((!fileGeoIP.exists()))
@@ -1658,6 +1659,7 @@ public class TorService extends Service implements 
TorServiceConstants, TorConst
                        }
                        
                        mBinder.updateConfiguration("GeoIPFile", 
fileGeoIP.getAbsolutePath(), false);
+                       mBinder.updateConfiguration("GeoIPv6File", 
fileGeoIP6.getAbsolutePath(), false);
 
                }
                catch (Exception e)
diff --git a/src/org/torproject/android/service/TorServiceConstants.java 
b/src/org/torproject/android/service/TorServiceConstants.java
index ce16be2..469427b 100644
--- a/src/org/torproject/android/service/TorServiceConstants.java
+++ b/src/org/torproject/android/service/TorServiceConstants.java
@@ -31,6 +31,8 @@ public interface TorServiceConstants {
        
        //geoip data file asset key
        public final static String GEOIP_ASSET_KEY = "geoip";
+       public final static String GEOIP6_ASSET_KEY = "geoip6";
+       
        
        //various console cmds
        public final static String SHELL_CMD_CHMOD = "chmod";



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

Reply via email to