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

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

Snap for 9406096 from 8a7dc2b2 to tm-qpr2-release

Change-Id: Ic05f10ecb4b98a247569f718e9e714cbe36d419f
parents ecf96f07 8a7dc2b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,6 +18,6 @@
    android:layout_width="@dimen/taskbar_icon_touch_size"
    android:layout_height="@dimen/taskbar_icon_touch_size"
    android:contentDescription="@string/all_apps_button_label"
    android:backgroundTint="@color/all_apps_button_bg_color"
    android:backgroundTint="@android:color/transparent"
    android:icon="@drawable/ic_all_apps_button"
    />
+5 −0
Original line number Diff line number Diff line
@@ -887,6 +887,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        return mControllers.taskbarStashController.isStashed();
    }

    /** Returns {@code true} if taskbar All Apps is open. */
    public boolean isTaskbarAllAppsOpen() {
        return mControllers.taskbarAllAppsController.isOpen();
    }

    /**
     * Called to start the taskbar translation spring to its settled translation (0).
     */
+8 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 */
package com.android.launcher3.taskbar;

import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;

import android.animation.PropertyValuesHolder;
import android.content.Context;
@@ -24,6 +24,7 @@ import android.provider.Settings;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.View;
import android.view.animation.Interpolator;
import android.widget.Button;

import com.android.launcher3.Insettable;
@@ -65,6 +66,11 @@ public class TaskbarEduView extends AbstractSlideInView<TaskbarOverlayContext>
        handleClose(animate, mTaskbarEduCallbacks.getCloseDuration());
    }

    @Override
    protected Interpolator getIdleInterpolator() {
        return EMPHASIZED;
    }

    @Override
    protected boolean isOfType(int type) {
        return (type & TYPE_TASKBAR_EDUCATION_DIALOG) != 0;
@@ -157,7 +163,7 @@ public class TaskbarEduView extends AbstractSlideInView<TaskbarOverlayContext>
        mIsOpen = true;
        mOpenCloseAnimator.setValues(
                PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED));
        mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE);
        mOpenCloseAnimator.setInterpolator(EMPHASIZED);
        mOpenCloseAnimator.setDuration(mTaskbarEduCallbacks.getOpenDuration()).start();
    }

+10 −2
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ public class TaskbarUIController {
     * Manually closes the overlay window.
     */
    public void hideOverlayWindow() {
        if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext)) {
        if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext)
                || mControllers.taskbarAllAppsController.isOpen()) {
            mControllers.taskbarOverlayController.hideWindow();
        }
    }
@@ -104,12 +105,19 @@ public class TaskbarUIController {
    }

    /**
     * Returns true iff taskbar is stashed.
     * Returns {@code true} iff taskbar is stashed.
     */
    public boolean isTaskbarStashed() {
        return mControllers.taskbarStashController.isStashed();
    }

    /**
     * Returns {@code true} iff taskbar All Apps is open.
     */
    public boolean isTaskbarAllAppsOpen() {
        return mControllers.taskbarAllAppsController.isOpen();
    }

    /**
     * Called at the end of the swipe gesture on Transient taskbar.
     */
+5 −2
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
    private final int mIconTouchSize;
    private final int mItemMarginLeftRight;
    private final int mItemPadding;
    private final boolean mIsRtl;

    private final TaskbarActivityContext mActivityContext;

@@ -100,6 +101,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        super(context, attrs, defStyleAttr, defStyleRes);
        mActivityContext = ActivityContext.lookupContext(context);
        mIconLayoutBounds = mActivityContext.getTransientTaskbarBounds();
        mIsRtl = Utilities.isRtl(getResources());

        Resources resources = getResources();
        mIconTouchSize = resources.getDimensionPixelSize(R.dimen.taskbar_icon_touch_size);
@@ -122,6 +124,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
            mAllAppsButton = LayoutInflater.from(context)
                    .inflate(R.layout.taskbar_all_apps_button, this, false);
            mAllAppsButton.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
            mAllAppsButton.setScaleX(mIsRtl ? -1 : 1);
            if (mActivityContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC)) {
                mAllAppsButton.setVisibility(GONE);
            }
@@ -254,11 +257,11 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        }

        if (mAllAppsButton != null) {
            int index = Utilities.isRtl(getResources()) ? 0 : getChildCount();
            int index = mIsRtl ? getChildCount() : 0;
            addView(mAllAppsButton, index);
        }
        if (mActivityContext.getDeviceProfile().isQsbInline) {
            addView(mQsb, Utilities.isRtl(getResources()) ? getChildCount() : 0);
            addView(mQsb, mIsRtl ? getChildCount() : 0);
            // Always set QSB to invisible after re-adding.
            mQsb.setVisibility(View.INVISIBLE);
        }
Loading