From 30901a6152614d7aa1fa89d56372f7b362b74b25 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Wed, 10 Jan 2018 00:03:45 -0600 Subject: TunnelController: Use helper function to unwrap the Throwable Signed-off-by: Samuel Holland --- .../main/java/com/wireguard/android/fragment/TunnelController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/wireguard/android') diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelController.java b/app/src/main/java/com/wireguard/android/fragment/TunnelController.java index 8b86749d..ca40654e 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelController.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelController.java @@ -47,8 +47,8 @@ public final class TunnelController { if (throwable == null) return; final Context context = view.getContext(); - if (throwable instanceof WgQuickBackend.ModuleNotLoadedException || - throwable.getCause() instanceof WgQuickBackend.ModuleNotLoadedException) { + if (ExceptionLoggers.unwrap(throwable) + instanceof WgQuickBackend.ModuleNotLoadedException) { final String message = context.getString(R.string.not_supported_message); final String title = context.getString(R.string.not_supported_title); final AlertDialog dialog = new AlertDialog.Builder(context) -- cgit v1.2.3