Skip to content
Snippets Groups Projects
Commit 41e60bf6 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Clean up StaticInnerHandlerWrapper a bit

Change-Id: Ib07efe6da1eb2f0fd9ef68ca71502c98f7e19f4b
parent a38e14fd
No related branches found
No related tags found
No related merge requests found
......@@ -22,17 +22,17 @@ import android.os.Looper;
import java.lang.ref.WeakReference;
public class StaticInnerHandlerWrapper<T> extends Handler {
final private WeakReference<T> mOuterInstanceRef;
private final WeakReference<T> mOuterInstanceRef;
public StaticInnerHandlerWrapper(T outerInstance) {
super();
if (outerInstance == null) throw new NullPointerException("outerInstance is null");
mOuterInstanceRef = new WeakReference<T>(outerInstance);
public StaticInnerHandlerWrapper(final T outerInstance) {
this(outerInstance, Looper.myLooper());
}
public StaticInnerHandlerWrapper(T outerInstance, Looper looper) {
public StaticInnerHandlerWrapper(final T outerInstance, final Looper looper) {
super(looper);
if (outerInstance == null) throw new NullPointerException("outerInstance is null");
if (outerInstance == null) {
throw new NullPointerException("outerInstance is null");
}
mOuterInstanceRef = new WeakReference<T>(outerInstance);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment