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

Commit cd5ed8b2 authored by Matthew Ng's avatar Matthew Ng
Browse files

Merging ub-launcher3-qt-dev, build 5508646

Test: Manual

Bug:112934365 [STOP SHIP BUG] Sysui Navigation Bar Prototype Tracking Bug:114136250 Have a more spartan RecentsActivity on android go Bug:118758133 Add logging to track undo box usage Bug:119992316 Widget screen won't close when tapping back or home button Bug:128857973 With dark display and black accent device theme, App list header not visible on all apps screen. Bug:129279637 [Logging] Long press|tap on app icon from Task should be logged Bug:129497226 Remove setInteractionState from the contract Bug:129723135 Broken tests: swipe from killed launcher doesn't open overview Bug:129806241 [a11y][Qt] Remove an app icon in Home screen, the popup "Item removed" with UNDO doesn't follow the settings of Time to take action. Bug:129985827 [Fully Gestural Navigation] Delay Recents animation when swiping up Bug:130851537 Recents and notification shelf both became nonresponsive after I "palmed" the screen while it was on. Bug:131095241 Recents Go should support landscape app => landscape thumbnail transition Bug:131303610 Backedup shortcut icons are not badged Bug:131339235 Don't layout empty task views if we have the real content Bug:131364673 [Failing test] FallbackRecentsTest
Change-Id: I04018e14bd6d9ba77005e72fe20f4a3ede886abf
parents d4e8bdbc 06e0d80d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,5 +18,5 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@android:color/darker_gray"/>
    <corners android:radius="2dp"/>
    <corners android:radius="@dimen/task_thumbnail_corner_radius"/>
</shape>
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     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.
-->
<resources>
    <dimen name="task_thumbnail_corner_radius">3dp</dimen>
</resources>
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -161,6 +161,13 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator {

    private void animateChangeImpl(ViewHolder viewHolder, long startDelay) {
        TaskItemView itemView = (TaskItemView) viewHolder.itemView;
        if (itemView.getAlpha() == 0) {
            // View is still not visible, so we can finish the change immediately.
            CONTENT_TRANSITION_PROGRESS.set(itemView, 1.0f);
            dispatchChangeFinished(viewHolder, true /* oldItem */);
            dispatchFinishedWhenDone();
            return;
        }
        final ObjectAnimator anim =
                ObjectAnimator.ofFloat(itemView, CONTENT_TRANSITION_PROGRESS, 0.0f, 1.0f);
        anim.setDuration(ITEM_CHANGE_DURATION).setStartDelay(startDelay);
+17 −2
Original line number Diff line number Diff line
@@ -16,17 +16,23 @@

package com.android.quickstep;

import static android.graphics.Shader.TileMode.CLAMP;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;

import androidx.annotation.NonNull;

import com.android.launcher3.R;
import com.android.systemui.shared.recents.model.ThumbnailData;

/**
@@ -39,11 +45,18 @@ public final class ThumbnailDrawable extends Drawable {
    private final Paint mPaint = new Paint();
    private final Matrix mMatrix = new Matrix();
    private final ThumbnailData mThumbnailData;
    private final BitmapShader mShader;
    private final RectF mDestRect = new RectF();
    private final int mCornerRadius;
    private int mRequestedOrientation;

    public ThumbnailDrawable(@NonNull ThumbnailData thumbnailData, int requestedOrientation) {
    public ThumbnailDrawable(Resources res, @NonNull ThumbnailData thumbnailData,
            int requestedOrientation) {
        mThumbnailData = thumbnailData;
        mRequestedOrientation = requestedOrientation;
        mCornerRadius = (int) res.getDimension(R.dimen.task_thumbnail_corner_radius);
        mShader = new BitmapShader(mThumbnailData.thumbnail, CLAMP, CLAMP);
        mPaint.setShader(mShader);
        updateMatrix();
    }

@@ -64,12 +77,13 @@ public final class ThumbnailDrawable extends Drawable {
        if (mThumbnailData.thumbnail == null) {
            return;
        }
        canvas.drawBitmap(mThumbnailData.thumbnail, mMatrix, mPaint);
        canvas.drawRoundRect(mDestRect, mCornerRadius, mCornerRadius, mPaint);
    }

    @Override
    protected void onBoundsChange(Rect bounds) {
        super.onBoundsChange(bounds);
        mDestRect.set(bounds);
        updateMatrix();
    }

@@ -125,5 +139,6 @@ public final class ThumbnailDrawable extends Drawable {
        }
        // Scale to fill.
        mMatrix.postScale(scaleX, scaleY);
        mShader.setLocalMatrix(mMatrix);
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -177,7 +177,8 @@ public final class TaskItemView extends LinearLayout {
            return mDefaultThumbnail;
        }
        int orientation = getResources().getConfiguration().orientation;
        return new ThumbnailDrawable(thumbnailData,  orientation /* requestedOrientation */);
        return new ThumbnailDrawable(getResources(), thumbnailData,
                orientation /* requestedOrientation */);
    }

    private @NonNull String getSafeLabel(@Nullable String label) {
Loading