diff options
author | Michael Jurka <mikejurka@google.com> | 2011-09-15 17:43:34 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-09-19 14:49:59 -0700 |
commit | 57e4d44f095fbcec7c614a45181d3e531e1bda26 (patch) | |
tree | a8d2c6a7719448de61f48807409007319ef9f6b4 /packages/SystemUI/src/com/android/systemui/recent | |
parent | 4f92c9bb8d8484fc9a0dfc1549beedbd1ae8bf01 (diff) | |
download | frameworks_base-57e4d44f095fbcec7c614a45181d3e531e1bda26.zip frameworks_base-57e4d44f095fbcec7c614a45181d3e531e1bda26.tar.gz frameworks_base-57e4d44f095fbcec7c614a45181d3e531e1bda26.tar.bz2 |
Speeding up Recent Apps
- removing unused calls on startup
- no longer compositing bitmaps against a background bitmap
Change-Id: If26812ef475d5d972d98dd1cb9f7f741eeb99dae
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recent')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index 0621b22..9bda158 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -128,7 +128,7 @@ public class RecentsPanelView extends RelativeLayout } public void setThumbnail(Bitmap thumbnail) { - mThumbnail = compositeBitmap(mDefaultThumbnailBackground, thumbnail); + mThumbnail = thumbnail; } public Bitmap getThumbnail() { @@ -478,13 +478,10 @@ public class RecentsPanelView extends RelativeLayout if (resolveInfo != null) { final ActivityInfo info = resolveInfo.activityInfo; final String title = info.loadLabel(pm).toString(); - // Drawable icon = info.loadIcon(pm); Drawable icon = getFullResIcon(resolveInfo, pm); if (title != null && title.length() > 0 && icon != null) { if (DEBUG) Log.v(TAG, "creating activity desc for id=" + recentInfo.id + ", label=" + title); - ActivityManager.TaskThumbnails thumbs = am.getTaskThumbnails( - recentInfo.persistentId); ActivityDescription item = new ActivityDescription(recentInfo, resolveInfo, intent, index, info.packageName); activityDescriptions.add(item); @@ -523,7 +520,9 @@ public class RecentsPanelView extends RelativeLayout synchronized (ad) { ad.mLabel = label; ad.mIcon = icon; - ad.setThumbnail(thumbs != null ? thumbs.mainThumbnail : mDefaultThumbnailBackground); + if (thumbs != null && thumbs.mainThumbnail != null) { + ad.setThumbnail(thumbs.mainThumbnail); + } } } @@ -651,21 +650,6 @@ public class RecentsPanelView extends RelativeLayout } } - private Bitmap compositeBitmap(Bitmap background, Bitmap thumbnail) { - Bitmap outBitmap = background.copy(background.getConfig(), true); - if (thumbnail != null) { - Canvas canvas = new Canvas(outBitmap); - Paint paint = new Paint(); - paint.setAntiAlias(true); - paint.setFilterBitmap(true); - paint.setAlpha(255); - canvas.drawBitmap(thumbnail, null, - new RectF(0, 0, outBitmap.getWidth(), outBitmap.getHeight()), paint); - canvas.setBitmap(null); - } - return outBitmap; - } - private void updateUiElements(Configuration config) { final int items = mActivityDescriptions.size(); |