commit d119de00600efb0e235246abf03979c7e7371eb5 Author: n8fr8 <nat...@guardianproject.info> Date: Tue Oct 26 09:03:36 2021 -0400
handle geoip failed loading and other potential NPE --- .../org/torproject/android/service/OrbotService.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java index e90be3f3..e02c6f1d 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java @@ -469,8 +469,15 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb if (Build.VERSION.SDK_INT >= 26) createNotificationChannel(); - CustomTorResourceInstaller installer = new CustomTorResourceInstaller(this, appBinHome); - installer.installGeoIP(); + try { + CustomTorResourceInstaller installer = new CustomTorResourceInstaller(this, appBinHome); + installer.installGeoIP(); + } + catch (IOException io) + { + Log.e(OrbotConstants.TAG, "Error installing geoip files", io); + logNotice("There was an error installing geoip files"); + } pluggableTransportInstall(); @@ -480,8 +487,8 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb } catch (Exception e) { //what error here - Log.e(OrbotConstants.TAG, "Error installing Orbot binaries", e); - logNotice("There was an error installing Orbot binaries"); + Log.e(OrbotConstants.TAG, "Error installing setting up Orbot", e); + logNotice("There was an error setting up Orbot"); } Log.i("OrbotService", "onCreate end"); @@ -960,7 +967,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb LocalBroadcastManager.getInstance(this).sendBroadcast(intent); - if (Prefs.useVpn()) + if (Prefs.useVpn() && mVpnManager != null) mVpnManager.handleIntent(new Builder(), intent); } _______________________________________________ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits