Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0864b1d authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Clean up StaticInnerHandlerWrapper a bit" into jb-mr2-dev

parents 0d5f214a 41e60bf6
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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);
    }