summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-05-17 00:35:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-17 00:35:21 +0000
commit71dc28b11eedd0e7c99fe11b832f1301f262ce33 (patch)
tree8da463d36a451e498c9d82c216c424139fae68c7 /packages/SystemUI/src
parent27fb0eec9013b0526ced25d1f9c28f5b9f681ade (diff)
parenta449dc033b79775b8945d9cc5a035a6deb145065 (diff)
downloadframeworks_base-71dc28b11eedd0e7c99fe11b832f1301f262ce33.zip
frameworks_base-71dc28b11eedd0e7c99fe11b832f1301f262ce33.tar.gz
frameworks_base-71dc28b11eedd0e7c99fe11b832f1301f262ce33.tar.bz2
Merge "Refactoring RecentsActivityValues into TaskDescription, and ensuring they are resolved when set. (Bug 14995928, 14832629)"
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java13
2 files changed, 11 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java
index 1ca0476..1c12ac2 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java
@@ -400,15 +400,14 @@ public class RecentsTaskLoader {
ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId);
if (info == null) continue;
- ActivityManager.RecentsActivityValues av = t.activityValues;
+ ActivityManager.TaskDescription av = t.taskDescription;
String activityLabel = null;
BitmapDrawable activityIcon = null;
int activityColor = 0;
if (av != null) {
- activityLabel = (av.label != null ? av.label.toString() :
- ssp.getActivityLabel(info));
- activityIcon = (av.icon != null) ? new BitmapDrawable(res, av.icon) : null;
- activityColor = av.colorPrimary;
+ activityLabel = (av.getLabel() != null ? av.getLabel() : ssp.getActivityLabel(info));
+ activityIcon = (av.getIcon() != null) ? new BitmapDrawable(res, av.getIcon()) : null;
+ activityColor = av.getPrimaryColor();
} else {
activityLabel = ssp.getActivityLabel(info);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java
index 8d82883..59d0ea6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java
@@ -96,18 +96,19 @@ public class SystemServicesProxy {
int packageIndex = i % Constants.DebugFlags.App.SystemServicesProxyMockPackageCount;
ComponentName cn = new ComponentName("com.android.test" + packageIndex,
"com.android.test" + i + ".Activity");
+ String description = "" + i + " - " +
+ Long.toString(Math.abs(new Random().nextLong()), 36);
// Create the recent task info
ActivityManager.RecentTaskInfo rti = new ActivityManager.RecentTaskInfo();
rti.id = rti.persistentId = i;
rti.baseIntent = new Intent();
rti.baseIntent.setComponent(cn);
- rti.activityValues = new ActivityManager.RecentsActivityValues();
- rti.description = "" + i + " - " +
- Long.toString(Math.abs(new Random().nextLong()), 36);
+ rti.description = description;
if (i % 2 == 0) {
- rti.activityValues.label = rti.description;
- rti.activityValues.icon = Bitmap.createBitmap(mDummyIcon);
- rti.activityValues.colorPrimary = new Random().nextInt();
+ rti.taskDescription = new ActivityManager.TaskDescription(description,
+ Bitmap.createBitmap(mDummyIcon), new Random().nextInt());
+ } else {
+ rti.taskDescription = new ActivityManager.TaskDescription();
}
tasks.add(rti);
}