summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recent
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-09-19 15:11:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-19 15:11:23 -0700
commitdf9d4e88db3765ad05b14bb3de420b9825fb59ec (patch)
tree16eef92f029565ce30c483714042d7a607ca3995 /packages/SystemUI/src/com/android/systemui/recent
parenta71483c7be0d563edd0f1c163219850665eec770 (diff)
parent57e4d44f095fbcec7c614a45181d3e531e1bda26 (diff)
downloadframeworks_base-df9d4e88db3765ad05b14bb3de420b9825fb59ec.zip
frameworks_base-df9d4e88db3765ad05b14bb3de420b9825fb59ec.tar.gz
frameworks_base-df9d4e88db3765ad05b14bb3de420b9825fb59ec.tar.bz2
Merge "Speeding up Recent Apps"
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recent')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java24
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 6fdc534..5eb3639 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -129,7 +129,7 @@ public class RecentsPanelView extends RelativeLayout
}
public void setThumbnail(Bitmap thumbnail) {
- mThumbnail = compositeBitmap(mDefaultThumbnailBackground, thumbnail);
+ mThumbnail = thumbnail;
}
public Bitmap getThumbnail() {
@@ -480,13 +480,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);
@@ -525,7 +522,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);
+ }
}
}
@@ -660,21 +659,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();