From bac19fcc3c430405440527d36400ecb8726f9e5c Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 29 Nov 2022 22:29:00 +0100 Subject: clean up, null view references --- .../java/se.leap.bitmaskclient.base.fragments/EipFragment.java | 6 ++++++ .../normal/java/se/leap/bitmaskclient/base/views/MainButton.java | 9 +-------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'app/src/normal') diff --git a/app/src/normal/java/se.leap.bitmaskclient.base.fragments/EipFragment.java b/app/src/normal/java/se.leap.bitmaskclient.base.fragments/EipFragment.java index cccd6c23..2e291aad 100644 --- a/app/src/normal/java/se.leap.bitmaskclient.base.fragments/EipFragment.java +++ b/app/src/normal/java/se.leap.bitmaskclient.base.fragments/EipFragment.java @@ -268,6 +268,12 @@ public class EipFragment extends Fragment implements Observer { eipStatus.deleteObserver(this); providerObservable.deleteObserver(this); torStatusObservable.deleteObserver(this); + background = null; + mainButton = null; + locationButton = null; + mainDescription = null; + subDescription = null; + stateView = null; } private void saveStatus(boolean restartOnBoot) { diff --git a/app/src/normal/java/se/leap/bitmaskclient/base/views/MainButton.java b/app/src/normal/java/se/leap/bitmaskclient/base/views/MainButton.java index d8766e6b..715063b5 100644 --- a/app/src/normal/java/se/leap/bitmaskclient/base/views/MainButton.java +++ b/app/src/normal/java/se/leap/bitmaskclient/base/views/MainButton.java @@ -17,12 +17,6 @@ public class MainButton extends RelativeLayout { private static final String TAG = MainButton.class.getSimpleName(); AppCompatImageView button; - VMainButtonBinding binding; - - private boolean isOn = false; - private boolean isProcessing = false; - private boolean isError = true; - public MainButton(Context context) { super(context); @@ -47,7 +41,7 @@ public class MainButton extends RelativeLayout { } private void initLayout(Context context) { - binding = VMainButtonBinding.inflate(LayoutInflater.from(context), this, true); + VMainButtonBinding binding = VMainButtonBinding.inflate(LayoutInflater.from(context), this, true); button = binding.button; } @@ -60,5 +54,4 @@ public class MainButton extends RelativeLayout { isOn ? R.drawable.button_circle_stop : R.drawable.button_circle_start)); } } - } -- cgit v1.2.3