From b059fa9e82acc98e9e4783ffbe6b34cdc8a18915 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 31 Oct 2019 09:26:55 +0100 Subject: show blocking state on EipFragment --- app/src/main/java/se/leap/bitmaskclient/EipFragment.java | 10 +++++++++- app/src/main/res/drawable/vpn_blocking.xml | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/vpn_blocking.xml diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java index 6c8254d6..0485e907 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java @@ -147,7 +147,7 @@ public class EipFragment extends Fragment implements Observer { - @Override + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); openVpnConnection = new EipFragmentServiceConnection(); @@ -407,6 +407,14 @@ public class EipFragment extends Fragment implements Observer { } else if (eipStatus.isDisconnecting()) { setMainButtonEnabled(false); showDisconnectingLayout(activity); + } else if (eipStatus.isBlocking()) { + setMainButtonEnabled(true); + vpnStateImage.setStateIcon(R.drawable.vpn_blocking); + vpnStateImage.stopProgress(false); + routedText.setText(getString(R.string.void_vpn_establish, getString(R.string.app_name))); + routedText.setVisibility(VISIBLE); + vpnRoute.setVisibility(GONE); + colorBackgroundALittle(); } else { mainButton.setText(activity.getString(R.string.vpn_button_turn_on)); setMainButtonEnabled(true); diff --git a/app/src/main/res/drawable/vpn_blocking.xml b/app/src/main/res/drawable/vpn_blocking.xml new file mode 100644 index 00000000..401668fb --- /dev/null +++ b/app/src/main/res/drawable/vpn_blocking.xml @@ -0,0 +1,12 @@ + + + + -- cgit v1.2.3