From 41e60bf6dd533d1641b64ebeecd3148dd396c370 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 14 Mar 2013 12:29:27 +0900 Subject: [PATCH] Clean up StaticInnerHandlerWrapper a bit Change-Id: Ib07efe6da1eb2f0fd9ef68ca71502c98f7e19f4b --- .../latin/StaticInnerHandlerWrapper.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/StaticInnerHandlerWrapper.java b/java/src/com/android/inputmethod/latin/StaticInnerHandlerWrapper.java index 89d9ea844..e50af4d2d 100644 --- a/java/src/com/android/inputmethod/latin/StaticInnerHandlerWrapper.java +++ b/java/src/com/android/inputmethod/latin/StaticInnerHandlerWrapper.java @@ -22,17 +22,17 @@ import android.os.Looper; import java.lang.ref.WeakReference; public class StaticInnerHandlerWrapper extends Handler { - final private WeakReference mOuterInstanceRef; + private final WeakReference mOuterInstanceRef; - public StaticInnerHandlerWrapper(T outerInstance) { - super(); - if (outerInstance == null) throw new NullPointerException("outerInstance is null"); - mOuterInstanceRef = new WeakReference(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(outerInstance); }