From f5b1f0442770325e804f6b094b8527e026149987 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Tue, 9 Jun 2015 14:46:01 -0400 Subject: [PATCH] Fix horrible warning on every systemui startup. - Migrate away from deprecated getDrawable calls in DismissViewButton. Change-Id: If85d5b0f9cbfb76536ffb50d0daddd6e311f1339 --- .../com/android/systemui/statusbar/DismissViewButton.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DismissViewButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/DismissViewButton.java index 00665f4ca90d1..a323684f54c12 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/DismissViewButton.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/DismissViewButton.java @@ -48,15 +48,14 @@ public class DismissViewButton extends Button { public DismissViewButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); - mAnimatedDismissDrawable = (AnimatedVectorDrawable) getContext().getResources().getDrawable( + mAnimatedDismissDrawable = (AnimatedVectorDrawable) getContext().getDrawable( R.drawable.dismiss_all_shape_animation).mutate(); mAnimatedDismissDrawable.setCallback(this); mAnimatedDismissDrawable.setBounds(0, 0, mAnimatedDismissDrawable.getIntrinsicWidth(), mAnimatedDismissDrawable.getIntrinsicHeight()); - mStaticDismissDrawable = getContext().getResources().getDrawable( - R.drawable.dismiss_all_shape); + mStaticDismissDrawable = getContext().getDrawable(R.drawable.dismiss_all_shape); mStaticDismissDrawable.setBounds(0, 0, mStaticDismissDrawable.getIntrinsicWidth(),