diff options
| author | Chet Haase <chet@google.com> | 2015-06-04 14:01:29 -0700 |
|---|---|---|
| committer | Chet Haase <chet@google.com> | 2015-06-05 14:41:51 +0000 |
| commit | e790c97787dbc05930ad0c4a708fad7cd7d3f2b9 (patch) | |
| tree | af7ab0e5712ad37ccbcf433122d94ad923e5ddca /packages | |
| parent | 44fdcf26421c4c2a59888739fa003a14e09e8391 (diff) | |
| download | frameworks_base-e790c97787dbc05930ad0c4a708fad7cd7d3f2b9.zip frameworks_base-e790c97787dbc05930ad0c4a708fad7cd7d3f2b9.tar.gz frameworks_base-e790c97787dbc05930ad0c4a708fad7cd7d3f2b9.tar.bz2 | |
Hide View.getBackgroundColor() prior to removal
Issue #21572678 API Review: android.view.View.getBackgroundColor()
Change-Id: Ia4fa9e207db3af6e076581bf23747eba6e56bb69
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java index 062ded2..6db4020 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java @@ -26,6 +26,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.RippleDrawable; @@ -200,7 +201,8 @@ public class TaskViewHeader extends FrameLayout { mActivityDescription.setContentDescription(t.contentDescription); // Try and apply the system ui tint - int existingBgColor = getBackgroundColor(); + int existingBgColor = (getBackground() instanceof ColorDrawable) ? + ((ColorDrawable) getBackground()).getColor() : 0; if (existingBgColor != t.colorPrimary) { mBackgroundColorDrawable.setColor(t.colorPrimary); mBackgroundColor = t.colorPrimary; |
