diff options
author | Gilles Debunne <debunne@google.com> | 2010-06-16 18:32:00 -0700 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2010-06-16 18:38:13 -0700 |
commit | 3030193dc179b3010f2dd3bffe9c1dec54da38fc (patch) | |
tree | e9c52a7df9fb0fd7710423aff21f87cd464e3cc7 /core/java/android/appwidget | |
parent | 2f7a247c921ad1b86b7ba79cdb0431233827ad57 (diff) | |
download | frameworks_base-3030193dc179b3010f2dd3bffe9c1dec54da38fc.zip frameworks_base-3030193dc179b3010f2dd3bffe9c1dec54da38fc.tar.gz frameworks_base-3030193dc179b3010f2dd3bffe9c1dec54da38fc.tar.bz2 |
Removed warnings in LayoutInflater.
These changes are similar to those of CL 49296. They do not include the
generic fixes done on GenericInflater.java, which had issues and broke the build.
Added a asSubClass method in LayoutInflater which will (correctly) throw a
ClassCastException when the inflated class is not a View subclass.
Performance testing on these changes showed a 10% performance improvement,
which is still to be explained.
Change-Id: Id4d3b45f0945baccdbbda15fcce095e855b23c9a
Diffstat (limited to 'core/java/android/appwidget')
-rw-r--r-- | core/java/android/appwidget/AppWidgetHostView.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java index 5375193..f372529 100644 --- a/core/java/android/appwidget/AppWidgetHostView.java +++ b/core/java/android/appwidget/AppWidgetHostView.java @@ -23,9 +23,9 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; -import android.os.SystemClock; -import android.os.Parcelable; import android.os.Parcel; +import android.os.Parcelable; +import android.os.SystemClock; import android.util.AttributeSet; import android.util.Log; import android.util.SparseArray; @@ -58,7 +58,7 @@ public class AppWidgetHostView extends FrameLayout { // When we're inflating the initialLayout for a AppWidget, we only allow // views that are allowed in RemoteViews. static final LayoutInflater.Filter sInflaterFilter = new LayoutInflater.Filter() { - public boolean onLoadClass(Class clazz) { + public boolean onLoadClass(Class<?> clazz) { return clazz.isAnnotationPresent(RemoteViews.RemoteView.class); } }; @@ -276,6 +276,7 @@ public class AppWidgetHostView extends FrameLayout { } } + @Override protected boolean drawChild(Canvas canvas, View child, long drawingTime) { if (CROSSFADE) { int alpha; |