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

Commit 4812a2e2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5357520 from b980947c to qt-release

Change-Id: Iefaa2fde40a9aa0a32ebaa343b5eca0584d8bce4
parents 184f2cb1 b980947c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ LOCAL_RESOURCE_DIR := \
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PROGUARD_ENABLED := full

LOCAL_PACKAGE_NAME := Launcher3QuickStepGoIconRecents
LOCAL_PACKAGE_NAME := Launcher3GoIconRecents
LOCAL_PRIVILEGED_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
+4 −6
Original line number Diff line number Diff line
@@ -18,13 +18,11 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <!-- TODO(114136250): Remove this temporary placeholder view for Go recents -->
    <TextView
    android:orientation="vertical">
    <androidx.recyclerview.widget.RecyclerView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/recent_task_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Stub!"
        android:textSize="40sp"/>
        android:scrollbars="none"/>
</com.android.quickstep.views.IconRecentsView>
 No newline at end of file
+7 −3
Original line number Diff line number Diff line
@@ -19,14 +19,12 @@ package com.android.launcher3.uioverrides;
import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;

import android.graphics.Rect;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.views.IconRecentsView;

/**
 * Definition for overview state
@@ -49,6 +47,12 @@ public class OverviewState extends LauncherState {
        return new float[] {1f, 0f};
    }

    @Override
    public void onStateEnabled(Launcher launcher) {
        IconRecentsView recentsView = launcher.getOverviewPanel();
        recentsView.onBeginTransitionToOverview();
    }

    @Override
    public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) {
        return new PageAlphaProvider(DEACCEL_2) {
+2 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import java.util.ArrayList;
 */
public abstract class RecentsUiFactory {
    
    public static final boolean GO_LOW_RAM_RECENTS_ENABLED = true;
    // Scale recents takes before animating in
    private static final float RECENTS_PREPARE_SCALE = 1.33f;

+63 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 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;

import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView.Adapter;

import com.android.systemui.shared.recents.model.Task;

import java.util.ArrayList;

/**
 * Recycler view adapter that dynamically inflates and binds {@link TaskHolder} instances with the
 * appropriate {@link Task} from the recents task list.
 */
public final class TaskAdapter extends Adapter<TaskHolder> {

    private static final int MAX_TASKS_TO_DISPLAY = 6;
    private static final String TAG = "TaskAdapter";
    private final TaskListLoader mLoader;

    public TaskAdapter(@NonNull TaskListLoader loader) {
        mLoader = loader;
    }

    @Override
    public TaskHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        // TODO: Swap in an actual task view here (view w/ icon, label, etc.)
        TextView stubView = new TextView(parent.getContext());
        return new TaskHolder(stubView);
    }

    @Override
    public void onBindViewHolder(TaskHolder holder, int position) {
        ArrayList<Task> tasks = mLoader.getCurrentTaskList();
        if (position >= tasks.size()) {
            // Task list has updated.
            return;
        }
        holder.bindTask(tasks.get(position));
    }

    @Override
    public int getItemCount() {
        return Math.min(mLoader.getCurrentTaskList().size(), MAX_TASKS_TO_DISPLAY);
    }
}
Loading