diff options
author | Michael Jurka <mikejurka@google.com> | 2011-09-02 16:35:42 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-02 16:35:42 -0700 |
commit | 8064ec61d62be074a06f446c512560b9bcf63813 (patch) | |
tree | 29b4c9a06419ec7f55137016c7c55f52b1db836d /packages/SystemUI | |
parent | 929827b819415101d526ff68fb0b2c8adb885132 (diff) | |
parent | 9563cb813d9cff7a0bfdc1248f6cda9f13087be8 (diff) | |
download | frameworks_base-8064ec61d62be074a06f446c512560b9bcf63813.zip frameworks_base-8064ec61d62be074a06f446c512560b9bcf63813.tar.gz frameworks_base-8064ec61d62be074a06f446c512560b9bcf63813.tar.bz2 |
Merge "Use default thumbnail if getting app thumbnail fails"
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index d7bb3c4..fc33931 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -84,7 +84,7 @@ public class RecentsPanelView extends RelativeLayout private View mRecentsScrim; private View mRecentsGlowView; private ViewGroup mRecentsContainer; - private Bitmap mAppThumbnailBackground; + private Bitmap mDefaultThumbnailBackground; private boolean mShowing; private Choreographer mChoreo; @@ -125,7 +125,7 @@ public class RecentsPanelView extends RelativeLayout } public void setThumbnail(Bitmap thumbnail) { - mThumbnail = compositeBitmap(mAppThumbnailBackground, thumbnail); + mThumbnail = compositeBitmap(mDefaultThumbnailBackground, thumbnail); } public Bitmap getThumbnail() { @@ -339,8 +339,8 @@ public class RecentsPanelView extends RelativeLayout int width = (int) res.getDimension(R.dimen.status_bar_recents_thumbnail_width); int height = (int) res.getDimension(R.dimen.status_bar_recents_thumbnail_height); int color = res.getColor(R.drawable.status_bar_recents_app_thumbnail_background); - mAppThumbnailBackground = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); - Canvas c = new Canvas(mAppThumbnailBackground); + mDefaultThumbnailBackground = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + Canvas c = new Canvas(mDefaultThumbnailBackground); c.drawColor(color); } @@ -517,7 +517,7 @@ public class RecentsPanelView extends RelativeLayout synchronized (ad) { ad.mLabel = label; ad.mIcon = icon; - ad.setThumbnail(thumbs != null ? thumbs.mainThumbnail : null); + ad.setThumbnail(thumbs != null ? thumbs.mainThumbnail : mDefaultThumbnailBackground); } } @@ -577,7 +577,7 @@ public class RecentsPanelView extends RelativeLayout } mActivityDescriptions = getRecentTasks(); for (ActivityDescription ad : mActivityDescriptions) { - ad.setThumbnail(mAppThumbnailBackground); + ad.setThumbnail(mDefaultThumbnailBackground); } mListAdapter.notifyDataSetInvalidated(); if (mActivityDescriptions.size() > 0) { |