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

Commit deb51362 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11902131 from a58d4688 to 24Q3-release

Change-Id: I39ef2987c087e08fb74e3d4c3a709dfea5081bea
parents 02ad1b86 a58d4688
Loading
Loading
Loading
Loading
+9 −17
Original line number Diff line number Diff line
@@ -124,23 +124,15 @@
    </LinearLayout>

    <!-- Unused. Included only for compatibility with parent class. -->
    <LinearLayout
        android:id="@+id/group_action_buttons"
        android:layout_width="match_parent"
        android:layout_height="@dimen/overview_actions_height"
        android:layout_gravity="top|center_horizontal"
        android:orientation="horizontal"
        android:visibility="gone">

    <Button
        android:id="@+id/action_save_app_pair"
        style="@style/GoOverviewActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="top|center_horizontal"
        android:drawableStart="@drawable/ic_save_app_pair_up_down"
        android:text="@string/action_save_app_pair"
            android:theme="@style/ThemeControlHighlightWorkspaceColor" />

    </LinearLayout>
        android:theme="@style/ThemeControlHighlightWorkspaceColor"
        android:visibility="gone" />

</com.android.quickstep.views.GoOverviewActionsView>
 No newline at end of file
+9 −15
Original line number Diff line number Diff line
@@ -47,22 +47,16 @@

    </LinearLayout>

    <LinearLayout
        android:id="@+id/group_action_buttons"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/overview_actions_height"
        android:layout_gravity="bottom|center_horizontal"
        android:orientation="horizontal"
        android:visibility="gone">

    <!-- Currently, the only "group action button" is this save app pair button. If more are added,
    a new LinearLayout may be needed to contain them, but beware of increased memory usage. -->
    <Button
        android:id="@+id/action_save_app_pair"
        style="@style/OverviewActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/action_save_app_pair"
            android:theme="@style/ThemeControlHighlightWorkspaceColor" />

    </LinearLayout>
        android:theme="@style/ThemeControlHighlightWorkspaceColor"
        android:layout_gravity="bottom|center_horizontal"
        android:visibility="gone" />

</com.android.quickstep.views.OverviewActionsView>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -756,6 +756,9 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer

    @Override
    public boolean isSplitSelectionActive() {
        if (mSplitSelectStateController == null) {
            return false;
        }
        return mSplitSelectStateController.isSplitSelectActive();
    }

+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.quickstep.recents.data

import com.android.systemui.shared.recents.model.Task
import kotlinx.coroutines.flow.Flow

interface RecentTasksRepository {
    /** Gets all the recent tasks, refreshing from data sources if [forceRefresh] is true. */
    fun getAllTaskData(forceRefresh: Boolean = false): Flow<List<Task>>

    /**
     * Gets the data associated with a task that has id [taskId]. Flow will settle on null if the
     * task was not found.
     */
    fun getTaskDataById(taskId: Int): Flow<Task?>

    /**
     * Sets the tasks that are visible, indicating that properties relating to visuals need to be
     * populated e.g. icons/thumbnails etc.
     */
    fun setVisibleTasks(visibleTaskIdList: List<Int>)
}
+4 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ class TasksRepository(
    private val recentsModel: RecentTasksDataSource,
    private val taskThumbnailDataSource: TaskThumbnailDataSource,
    private val taskIconCache: TaskIconCache,
) {
) : RecentTasksRepository {
    private val groupedTaskData = MutableStateFlow(emptyList<GroupTask>())
    private val _taskData =
        groupedTaskData.map { groupTaskList -> groupTaskList.flatMap { it.tasks } }
@@ -53,17 +53,17 @@ class TasksRepository(
            tasks
        }

    fun getAllTaskData(forceRefresh: Boolean = false): Flow<List<Task>> {
    override fun getAllTaskData(forceRefresh: Boolean): Flow<List<Task>> {
        if (forceRefresh) {
            recentsModel.getTasks { groupedTaskData.value = it }
        }
        return taskData
    }

    fun getTaskDataById(taskId: Int): Flow<Task?> =
    override fun getTaskDataById(taskId: Int): Flow<Task?> =
        taskData.map { taskList -> taskList.firstOrNull { it.key.id == taskId } }

    fun setVisibleTasks(visibleTaskIdList: List<Int>) {
    override fun setVisibleTasks(visibleTaskIdList: List<Int>) {
        this.visibleTaskIds.value = visibleTaskIdList.toSet()
    }

Loading