|
@@ -10,7 +10,6 @@ import android.app.Activity; |
|
|
import android.content.Context; |
|
|
import android.content.Context; |
|
|
import android.os.Bundle; |
|
|
import android.os.Bundle; |
|
|
import android.support.annotation.NonNull; |
|
|
import android.support.annotation.NonNull; |
|
|
import android.support.design.widget.CoordinatorLayout; |
|
|
|
|
|
import android.support.design.widget.Snackbar; |
|
|
import android.support.design.widget.Snackbar; |
|
|
import android.util.Log; |
|
|
import android.util.Log; |
|
|
import android.view.LayoutInflater; |
|
|
import android.view.LayoutInflater; |
|
@@ -59,8 +58,7 @@ public class TunnelEditorFragment extends BaseFragment { |
|
|
message = getString(R.string.config_save_error, savedTunnel.getName(), error); |
|
|
message = getString(R.string.config_save_error, savedTunnel.getName(), error); |
|
|
Log.e(TAG, message, throwable); |
|
|
Log.e(TAG, message, throwable); |
|
|
if (binding != null) { |
|
|
if (binding != null) { |
|
|
final CoordinatorLayout container = binding.mainContainer; |
|
|
|
|
|
Snackbar.make(container, message, Snackbar.LENGTH_LONG).show(); |
|
|
|
|
|
|
|
|
Snackbar.make(binding.mainContainer, message, Snackbar.LENGTH_LONG).show(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -125,8 +123,7 @@ public class TunnelEditorFragment extends BaseFragment { |
|
|
final String tunnelName = tunnel == null ? binding.getConfig().getName() : tunnel.getName(); |
|
|
final String tunnelName = tunnel == null ? binding.getConfig().getName() : tunnel.getName(); |
|
|
final String message = getString(R.string.config_save_error, tunnelName, error); |
|
|
final String message = getString(R.string.config_save_error, tunnelName, error); |
|
|
Log.e(TAG, message, e); |
|
|
Log.e(TAG, message, e); |
|
|
final CoordinatorLayout container = binding.mainContainer; |
|
|
|
|
|
Snackbar.make(container, error, Snackbar.LENGTH_LONG).show(); |
|
|
|
|
|
|
|
|
Snackbar.make(binding.mainContainer, error, Snackbar.LENGTH_LONG).show(); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
if (tunnel == null) { |
|
|
if (tunnel == null) { |
|
@@ -178,8 +175,7 @@ public class TunnelEditorFragment extends BaseFragment { |
|
|
message = getString(R.string.tunnel_create_error, error); |
|
|
message = getString(R.string.tunnel_create_error, error); |
|
|
Log.e(TAG, message, throwable); |
|
|
Log.e(TAG, message, throwable); |
|
|
if (binding != null) { |
|
|
if (binding != null) { |
|
|
final CoordinatorLayout container = binding.mainContainer; |
|
|
|
|
|
Snackbar.make(container, message, Snackbar.LENGTH_LONG).show(); |
|
|
|
|
|
|
|
|
Snackbar.make(binding.mainContainer, message, Snackbar.LENGTH_LONG).show(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -198,8 +194,7 @@ public class TunnelEditorFragment extends BaseFragment { |
|
|
message = getString(R.string.tunnel_rename_error, error); |
|
|
message = getString(R.string.tunnel_rename_error, error); |
|
|
Log.e(TAG, message, throwable); |
|
|
Log.e(TAG, message, throwable); |
|
|
if (binding != null) { |
|
|
if (binding != null) { |
|
|
final CoordinatorLayout container = binding.mainContainer; |
|
|
|
|
|
Snackbar.make(container, message, Snackbar.LENGTH_LONG).show(); |
|
|
|
|
|
|
|
|
Snackbar.make(binding.mainContainer, message, Snackbar.LENGTH_LONG).show(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|