Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 878a547f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Convert GroupedTaskView to Kotlin" into main

parents 6243da46 5867d8e1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ public class TaskThumbnailCache {
     * @param callback The callback to receive the task after its data has been populated.
     * @return A cancelable handle to the request
     */
    public CancellableTask updateThumbnailInBackground(
    public CancellableTask<ThumbnailData> updateThumbnailInBackground(
            Task task, Consumer<ThumbnailData> callback) {
        Preconditions.assertUIThread();

@@ -184,8 +184,8 @@ public class TaskThumbnailCache {
        return newSize > oldSize;
    }

    private CancellableTask updateThumbnailInBackground(TaskKey key, boolean lowResolution,
            Consumer<ThumbnailData> callback) {
    private CancellableTask<ThumbnailData> updateThumbnailInBackground(TaskKey key,
            boolean lowResolution, Consumer<ThumbnailData> callback) {
        Preconditions.assertUIThread();

        ThumbnailData cachedThumbnail = mCache.getAndInvalidateIfModified(key);
+6 −11
Original line number Diff line number Diff line
@@ -191,24 +191,19 @@ class DesktopTaskView @JvmOverloads constructor(context: Context?, attrs: Attrib
    }

    override fun launchTaskAnimated(): RunnableList? {
        val recentsView = recentsView
        if (recentsView == null) {
            Log.d(TAG, "launchTaskAnimated - recentsView is null")
            return null
        }

        val recentsView = recentsView ?: return null
        val endCallback = RunnableList()
        val desktopController = recentsView.desktopRecentsController
        if (desktopController == null) {
        if (desktopController != null) {
            desktopController.launchDesktopFromRecents(this) { endCallback.executeAllAndDestroy() }
            Log.d(
                TAG,
                "launchTaskAnimated - recentsController is null: ${taskIds.contentToString()}"
                "launchTaskAnimated - launchDesktopFromRecents: ${taskIds.contentToString()}"
            )
        } else {
            desktopController.launchDesktopFromRecents(this) { endCallback.executeAllAndDestroy() }
            Log.d(
                TAG,
                "launchTaskAnimated - launchDesktopFromRecents: ${taskIds.contentToString()}"
                "launchTaskAnimated - recentsController is null: ${taskIds.contentToString()}"
            )
        }

@@ -222,7 +217,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context?, attrs: Attrib
        callback.accept(true)
    }

    public override fun refreshThumbnails(thumbnailDatas: HashMap<Int, ThumbnailData>?) {
    public override fun refreshThumbnails(thumbnailDatas: HashMap<Int, ThumbnailData?>?) {
        // Sets new thumbnails based on the incoming data and refreshes the rest.
        thumbnailDatas?.let {
            mTaskContainers.forEach {
+0 −560

File deleted.

Preview size limit exceeded, changes collapsed.

+529 −0

File added.

Preview size limit exceeded, changes collapsed.

+5 −1

File changed.

Preview size limit exceeded, changes collapsed.