Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoadPlan.java +7 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import android.app.ActivityManager; import android.app.KeyguardManager; import android.content.ComponentName; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; Loading Loading @@ -102,9 +103,14 @@ public class RecentsTaskLoadPlan { ActivityManager.RecentTaskInfo t = mRawTasks.get(i); // Compose the task key final ComponentName sourceComponent = t.origActivity != null // Activity alias if there is one ? t.origActivity // The real activity if there is no alias (or the target if there is one) : t.realActivity; final int windowingMode = t.configuration.windowConfiguration.getWindowingMode(); TaskKey taskKey = new TaskKey(t.persistentId, windowingMode, t.baseIntent, t.userId, t.lastActiveTime); sourceComponent, t.userId, t.lastActiveTime); boolean isFreeformTask = windowingMode == WINDOWING_MODE_FREEFORM; boolean isStackTask = !isFreeformTask; Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java +6 −1 Original line number Diff line number Diff line Loading @@ -60,12 +60,17 @@ public class Task { @ViewDebug.ExportedProperty(category="recents") public long lastActiveTime; // The source component name which started this task public final ComponentName sourceComponent; private int mHashCode; public TaskKey(int id, int windowingMode, Intent intent, int userId, long lastActiveTime) { public TaskKey(int id, int windowingMode, Intent intent, ComponentName sourceComponent, int userId, long lastActiveTime) { this.id = id; this.windowingMode = windowingMode; this.baseIntent = intent; this.sourceComponent = sourceComponent; this.userId = userId; this.lastActiveTime = lastActiveTime; updateHashCode(); Loading packages/SystemUI/shared/tests/src/com/android/systemui/shared/recents/model/HighResThumbnailLoaderTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.ComponentName; import android.os.Looper; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; Loading Loading @@ -61,7 +62,7 @@ public class HighResThumbnailLoaderTest extends SysuiSharedLibTestCase { MockitoAnnotations.initMocks(this); mLoader = new HighResThumbnailLoader(mMockActivityManagerWrapper, Looper.getMainLooper(), false /* reducedResolution */); mTask.key = new TaskKey(0, WINDOWING_MODE_UNDEFINED, null, 0, 0); mTask.key = new TaskKey(0, WINDOWING_MODE_UNDEFINED, null, null, 0, 0); when(mMockActivityManagerWrapper.getTaskThumbnail(anyInt(), anyBoolean())) .thenReturn(mThumbnailData); mLoader.setVisible(true); Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoadPlan.java +7 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import android.app.ActivityManager; import android.app.KeyguardManager; import android.content.ComponentName; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; Loading Loading @@ -102,9 +103,14 @@ public class RecentsTaskLoadPlan { ActivityManager.RecentTaskInfo t = mRawTasks.get(i); // Compose the task key final ComponentName sourceComponent = t.origActivity != null // Activity alias if there is one ? t.origActivity // The real activity if there is no alias (or the target if there is one) : t.realActivity; final int windowingMode = t.configuration.windowConfiguration.getWindowingMode(); TaskKey taskKey = new TaskKey(t.persistentId, windowingMode, t.baseIntent, t.userId, t.lastActiveTime); sourceComponent, t.userId, t.lastActiveTime); boolean isFreeformTask = windowingMode == WINDOWING_MODE_FREEFORM; boolean isStackTask = !isFreeformTask; Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java +6 −1 Original line number Diff line number Diff line Loading @@ -60,12 +60,17 @@ public class Task { @ViewDebug.ExportedProperty(category="recents") public long lastActiveTime; // The source component name which started this task public final ComponentName sourceComponent; private int mHashCode; public TaskKey(int id, int windowingMode, Intent intent, int userId, long lastActiveTime) { public TaskKey(int id, int windowingMode, Intent intent, ComponentName sourceComponent, int userId, long lastActiveTime) { this.id = id; this.windowingMode = windowingMode; this.baseIntent = intent; this.sourceComponent = sourceComponent; this.userId = userId; this.lastActiveTime = lastActiveTime; updateHashCode(); Loading
packages/SystemUI/shared/tests/src/com/android/systemui/shared/recents/model/HighResThumbnailLoaderTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.ComponentName; import android.os.Looper; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; Loading Loading @@ -61,7 +62,7 @@ public class HighResThumbnailLoaderTest extends SysuiSharedLibTestCase { MockitoAnnotations.initMocks(this); mLoader = new HighResThumbnailLoader(mMockActivityManagerWrapper, Looper.getMainLooper(), false /* reducedResolution */); mTask.key = new TaskKey(0, WINDOWING_MODE_UNDEFINED, null, 0, 0); mTask.key = new TaskKey(0, WINDOWING_MODE_UNDEFINED, null, null, 0, 0); when(mMockActivityManagerWrapper.getTaskThumbnail(anyInt(), anyBoolean())) .thenReturn(mThumbnailData); mLoader.setVisible(true); Loading