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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/25780352',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/25780352', 'googleplex-android-review.googlesource.com/25840288'] into 24Q1-release.

Change-Id: I76bde343f53f05c299d0a88fe366fca5d38c8661
parents 909305e9 0e90acbb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1574,7 +1574,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
                        mSwipePipToHomeAnimator.getTaskId(),
                        mSwipePipToHomeAnimator.getComponentName(),
                        mSwipePipToHomeAnimator.getDestinationBounds(),
                        mSwipePipToHomeAnimator.getContentOverlay());
                        mSwipePipToHomeAnimator.getContentOverlay(),
                        mSwipePipToHomeAnimator.getAppBounds());

                windowAnim = mSwipePipToHomeAnimators;
            } else {
+3 −2
Original line number Diff line number Diff line
@@ -630,10 +630,11 @@ public class SystemUiProxy implements ISystemUiProxy {
     * should be responsible for cleaning up the overlay.
     */
    public void stopSwipePipToHome(int taskId, ComponentName componentName, Rect destinationBounds,
            SurfaceControl overlay) {
            SurfaceControl overlay, Rect appBounds) {
        if (mPip != null) {
            try {
                mPip.stopSwipePipToHome(taskId, componentName, destinationBounds, overlay);
                mPip.stopSwipePipToHome(taskId, componentName, destinationBounds, overlay,
                        appBounds);
            } catch (RemoteException e) {
                Log.w(TAG, "Failed call stopSwipePipToHome");
            }
+11 −6
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.accessibility.AccessibilityManager;

import androidx.annotation.WorkerThread;

@@ -44,7 +45,6 @@ import com.android.launcher3.pm.UserCache;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener;
import com.android.launcher3.util.DisplayController.Info;
import com.android.launcher3.util.FlagOp;
import com.android.launcher3.util.Preconditions;
import com.android.quickstep.util.CancellableTask;
import com.android.quickstep.util.TaskKeyLruCache;
@@ -62,6 +62,7 @@ import java.util.function.Consumer;
public class TaskIconCache implements DisplayInfoChangeListener {

    private final Executor mBgExecutor;
    private final AccessibilityManager mAccessibilityManager;

    private final Context mContext;
    private final TaskKeyLruCache<TaskCacheEntry> mIconCache;
@@ -78,6 +79,7 @@ public class TaskIconCache implements DisplayInfoChangeListener {
    public TaskIconCache(Context context, Executor bgExecutor, IconProvider iconProvider) {
        mContext = context;
        mBgExecutor = bgExecutor;
        mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
        mIconProvider = iconProvider;

        Resources res = context.getResources();
@@ -236,14 +238,17 @@ public class TaskIconCache implements DisplayInfoChangeListener {
            if ((index = mDefaultIcons.indexOfKey(userId)) >= 0) {
                return mDefaultIcons.valueAt(index).newIcon(mContext);
            } else {
                try (BaseIconFactory li = getIconFactory()) {
                    BitmapInfo info = mDefaultIconBase.withFlags(
                        UserCache.INSTANCE.get(mContext).getUserInfo(UserHandle.of(userId))
                                .applyBitmapInfoFlags(FlagOp.NO_OP));
                            li.getBitmapFlagOp(new IconOptions()
                                    .setUser(UserCache.INSTANCE.get(mContext)
                                            .getUserInfo(UserHandle.of(userId)))));
                    mDefaultIcons.put(userId, info);
                    return info.newIcon(mContext);
                }
            }
        }
    }

    @WorkerThread
    private BitmapInfo getBitmapInfo(Drawable drawable, int userId,
+4 −0
Original line number Diff line number Diff line
@@ -265,6 +265,10 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
        return mDestinationBounds;
    }

    public Rect getAppBounds() {
        return mAppBounds;
    }

    @Nullable
    public SurfaceControl getContentOverlay() {
        return mPipContentOverlay == null ? null : mPipContentOverlay.getLeash();
+7 −6
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ import androidx.core.graphics.ColorUtils;

import com.android.launcher3.dragndrop.FolderAdaptiveIcon;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.icons.BaseIconFactory;
import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.icons.ShortcutCachingLogic;
@@ -90,7 +91,6 @@ import com.android.launcher3.pm.UserCache;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.shortcuts.ShortcutRequest;
import com.android.launcher3.testing.shared.ResourceUtils;
import com.android.launcher3.util.FlagOp;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.Themes;
@@ -676,11 +676,12 @@ public final class Utilities {
        }

        if (badge == null) {
            try (LauncherIcons li = LauncherIcons.obtain(context)) {
                badge = BitmapInfo.LOW_RES_INFO.withFlags(
                            UserCache.INSTANCE.get(context)
                                    .getUserInfo(info.user)
                                    .applyBitmapInfoFlags(FlagOp.NO_OP))
                                li.getBitmapFlagOp(new BaseIconFactory.IconOptions().setUser(
                                        UserCache.INSTANCE.get(context).getUserInfo(info.user))))
                        .getBadgeDrawable(context, useTheme);
            }
            if (badge == null) {
                badge = new ColorDrawable(Color.TRANSPARENT);
            }