Don't keep a reference to context here,

it's a leak and not used anyway.
This commit is contained in:
tzugen 2021-06-21 19:11:30 +02:00
parent 6fca6d918c
commit d4c0f62b1d
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,6 @@ package org.moire.ultrasonic.view;
import android.content.Context; import android.content.Context;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import timber.log.Timber;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AbsListView; import android.widget.AbsListView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
@ -14,6 +13,8 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import timber.log.Timber;
/** /**
* A View that is periodically refreshed * A View that is periodically refreshed
* @deprecated * @deprecated
@ -26,12 +27,10 @@ public class UpdateView extends LinearLayout
private static Handler backgroundHandler; private static Handler backgroundHandler;
private static Handler uiHandler; private static Handler uiHandler;
private static Runnable updateRunnable; private static Runnable updateRunnable;
private static Context context;
public UpdateView(Context context) public UpdateView(Context context)
{ {
super(context); super(context);
UpdateView.context = context;
setLayoutParams(new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); setLayoutParams(new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
INSTANCES.put(this, null); INSTANCES.put(this, null);