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

Commit c63e93de authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Merging ub-launcher3-master, build 5303876

Test: Manual

Bug: 116023881 n Bug: 118319143 n Bug: 120439430 n Bug: 122554807 n Bug: 123833655 n Bug: 123939586 n Bug: 124239413 n Bug: 124255113 n
Change-Id: I8673fcb3db51e3816ba2059c015eb7f897d0d375
parents 9b523459 5387c110
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -263,7 +263,9 @@ public class BaseIconFactory implements AutoCloseable {
     */
    public Bitmap createIconBitmap(Drawable icon, float scale, int size) {
        Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);

        if (icon == null) {
            return bitmap;
        }
        mCanvas.setBitmap(bitmap);
        mOldBounds.set(icon.getBounds());

+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ public abstract class BaseIconCache {
    }

    static final class IconDB extends SQLiteCacheHelper {
        private final static int RELEASE_VERSION = 25;
        private final static int RELEASE_VERSION = 26;

        public final static String TABLE_NAME = "icons";
        public final static String COLUMN_ROWID = "rowid";
+5.11 KiB (149 KiB)

File changed.

No diff preview for this file type.

+2 −6
Original line number Diff line number Diff line
@@ -612,14 +612,10 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
                float transX0 = floatingViewBounds[0] - offsetX;
                float transY0 = floatingViewBounds[1] - offsetY;

                // Animate window corner radius from 100% to windowCornerRadius.
                float windowCornerRadius = RecentsModel.INSTANCE.get(mLauncher)
                        .getWindowCornerRadius();
                float windowRadius = 0;
                if (RecentsModel.INSTANCE.get(mLauncher).supportsRoundedCornersOnWindows()) {
                    float circleRadius = iconWidth / 2f;
                    windowRadius = Utilities.mapRange(easePercent, circleRadius,
                            windowCornerRadius);
                    windowRadius = RecentsModel.INSTANCE.get(mLauncher)
                            .getWindowCornerRadius();
                }

                // Animate the window crop so that it starts off as a square, and then reveals
+0 −119
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 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.annotation.TargetApi;
import android.os.Build;
import android.view.Choreographer;
import android.view.MotionEvent;
import android.view.VelocityTracker;

/**
 * A TouchConsumer which defers all events on the UIThread until the consumer is created.
 */
@TargetApi(Build.VERSION_CODES.P)
public class DeferredTouchConsumer implements TouchConsumer {

    private final VelocityTracker mVelocityTracker;
    private final DeferredTouchProvider mTouchProvider;

    private MotionEventQueue mMyQueue;
    private TouchConsumer mTarget;

    public DeferredTouchConsumer(DeferredTouchProvider touchProvider) {
        mVelocityTracker = VelocityTracker.obtain();
        mTouchProvider = touchProvider;
    }

    @Override
    public void accept(MotionEvent event) {
        mTarget.accept(event);
    }

    @Override
    public void reset() {
        mTarget.reset();
    }

    @Override
    public void onQuickScrubStart() {
        mTarget.onQuickScrubStart();
    }

    @Override
    public void onQuickScrubEnd() {
        mTarget.onQuickScrubEnd();
    }

    @Override
    public void onQuickScrubProgress(float progress) {
        mTarget.onQuickScrubProgress(progress);
    }

    @Override
    public void onQuickStep(MotionEvent ev) {
        mTarget.onQuickStep(ev);
    }

    @Override
    public void onCommand(int command) {
        mTarget.onCommand(command);
    }

    @Override
    public void preProcessMotionEvent(MotionEvent ev) {
        mVelocityTracker.addMovement(ev);
    }

    @Override
    public Choreographer getIntrimChoreographer(MotionEventQueue queue) {
        mMyQueue = queue;
        return null;
    }

    @Override
    public void deferInit() {
        mTarget = mTouchProvider.createTouchConsumer(mVelocityTracker);
        mTarget.getIntrimChoreographer(mMyQueue);
    }

    @Override
    public boolean forceToLauncherConsumer() {
        return mTarget.forceToLauncherConsumer();
    }

    @Override
    public OtherActivityTouchConsumer.RecentsAnimationState getRecentsAnimationStateToReuse() {
        return mTarget.getRecentsAnimationStateToReuse();
    }

    @Override
    public boolean deferNextEventToMainThread() {
        // If our target is still null, defer the next target as well
        TouchConsumer target = mTarget;
        return target == null ? true : target.deferNextEventToMainThread();
    }

    @Override
    public void onShowOverviewFromAltTab() {
        mTarget.onShowOverviewFromAltTab();
    }

    public interface DeferredTouchProvider {

        TouchConsumer createTouchConsumer(VelocityTracker tracker);
    }
}
Loading