TunnelController: Use helper function to unwrap the Throwable

Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2018-01-10 00:03:45 -06:00
parent 7b9c1a536c
commit 30901a6152

View File

@ -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)