summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-15 16:00:50 +0100
committercyBerta <cyberta@riseup.net>2021-11-15 16:00:50 +0100
commit79c01db669fc68b1071f0c2e62eae1e4be66bbb8 (patch)
tree009cd86fc5f5f5e85cfd42e4ceba8bdeae14f0eb /app/src
parent78b06a47b6c7e3de5706893eeebb01bef89060d8 (diff)
remove unused code
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java b/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
index 1a8fa09b..b12f2b00 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
@@ -5,9 +5,7 @@ import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.AnimationDrawable;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
@@ -18,29 +16,21 @@ import androidx.annotation.DrawableRes;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
-import java.lang.ref.WeakReference;
-
import se.leap.bitmaskclient.R;
public class MainButton extends RelativeLayout {
private static final String TAG = MainButton.class.getSimpleName();
- interface MainButtonListener {
- void onButtonClicked();
- }
-
AppCompatImageView glow;
AppCompatImageView shadowLight;
AnimationDrawable glowAnimation;
- WeakReference<MainButtonListener> callback;
private boolean isOn = false;
private boolean isProcessing = false;
private boolean isError = true;
-
public MainButton(Context context) {
super(context);
initLayout(context);
@@ -63,10 +53,6 @@ public class MainButton extends RelativeLayout {
initLayout(context);
}
- public void setMainButtonListener(MainButtonListener callback) {
- this.callback = new WeakReference<>(callback);
- }
-
private void initLayout(Context context) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rootview = inflater.inflate(R.layout.v_main_btn, this, true);
@@ -74,21 +60,6 @@ public class MainButton extends RelativeLayout {
glow = rootview.findViewById(R.id.vpn_btn_glow);
glowAnimation = (AnimationDrawable) glow.getBackground();
shadowLight = rootview.findViewById(R.id.vpn_btn_shadow_light);
-
- rootview.setOnGenericMotionListener(new OnGenericMotionListener() {
- @Override
- public boolean onGenericMotion(View v, MotionEvent event) {
- switch (event.getAction()) {
- case MotionEvent.ACTION_BUTTON_PRESS:
- Log.d(TAG, "onbuttonPrees");
- break;
- case MotionEvent.ACTION_BUTTON_RELEASE:
- Log.d(TAG, "onButtonRelease");
- break;
- }
- return false;
- }
- });
}