From 1a86dd10c11413cf0301a14b1837dbf703f2b9de Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 1 Jun 2010 08:17:58 -0700 Subject: Use the built-in handler instead of allocating another one. Change-Id: Ia2e5db99b751d3f299c4a9b587ef718212bd8161 --- packages/SystemUI/src/com/android/systemui/statusbar/Clock.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java index c944808..9fc8df5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java @@ -25,7 +25,6 @@ import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Typeface; import android.graphics.drawable.Drawable; -import android.os.Handler; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.format.DateFormat; @@ -49,7 +48,6 @@ import com.android.internal.R; * minutes. */ public class Clock extends TextView { - private final Handler mHandler = new Handler(); private boolean mAttached; private Calendar mCalendar; private String mClockFormatString; @@ -86,7 +84,7 @@ public class Clock extends TextView { filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED); - getContext().registerReceiver(mIntentReceiver, filter, null, mHandler); + getContext().registerReceiver(mIntentReceiver, filter, null, getHandler()); } // NOTE: It's safe to do these after registering the receiver since the receiver always runs -- cgit v1.1