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

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

Snap for 5767086 from 2355b7f2 to qt-qpr1-release

Change-Id: I05091135f81c00d7ea12b7eaa02b663897df7cad
parents e595b19b 2355b7f2
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -147,6 +147,17 @@ class NotificationWakeUpCoordinator @Inject constructor(
        mHeadsUpManagerPhone.addListener(this)
        statusBarStateController.addCallback(this)
        mDozeParameters = DozeParameters.getInstance(mContext)
        addListener(object : WakeUpListener {
            override fun onFullyHiddenChanged(isFullyHidden: Boolean) {
                if (isFullyHidden && mNotificationsVisibleForExpansion) {
                    // When the notification becomes fully invisible, let's make sure our expansion
                    // flag also changes. This can happen if the bouncer shows when dragging down
                    // and then the screen turning off, where we don't reset this state.
                    setNotificationsVisibleForExpansion(visible = false, animate = false,
                            increaseSpeed = false)
                }
            }
        });
    }

    fun setStackScroller(stackScroller: NotificationStackScrollLayout) {
+6 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.app.NotificationChannel.DEFAULT_CHANNEL_ID
import android.app.NotificationChannelGroup
import android.app.NotificationManager.IMPORTANCE_NONE
import android.content.Context
import android.content.DialogInterface
import android.graphics.Color
import android.graphics.PixelFormat
import android.graphics.drawable.Drawable
@@ -171,7 +172,6 @@ class ChannelEditorDialogController @Inject constructor(
    private fun done() {
        resetState()
        dialog.dismiss()
        onFinishListener?.onChannelEditorDialogFinished()
    }

    private fun resetState() {
@@ -261,6 +261,11 @@ class ChannelEditorDialogController @Inject constructor(
        dialog.apply {
            setContentView(R.layout.notif_half_shelf)
            setCanceledOnTouchOutside(true)
            setOnDismissListener(object : DialogInterface.OnDismissListener {
                override fun onDismiss(dialog: DialogInterface?) {
                    onFinishListener?.onChannelEditorDialogFinished()
                }
            })
            findViewById<ChannelEditorListView>(R.id.half_shelf_container).apply {
                controller = this@ChannelEditorDialogController
                appIcon = this@ChannelEditorDialogController.appIcon
+5 −2
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ public class StackScrollAlgorithm {
                : 0;
        float clipStart = 0;
        int childCount = algorithmState.visibleChildren.size();
        boolean firstHeadsUp = true;
        for (int i = 0; i < childCount; i++) {
            ExpandableView child = algorithmState.visibleChildren.get(i);
            ExpandableViewState state = child.getViewState();
@@ -173,7 +174,7 @@ public class StackScrollAlgorithm {
            boolean isHeadsUp = (child instanceof ExpandableNotificationRow)
                    && ((ExpandableNotificationRow) child).isPinned();
            if (mClipNotificationScrollToTop
                    && (!state.inShelf || isHeadsUp)
                    && (!state.inShelf || (isHeadsUp && !firstHeadsUp))
                    && newYTranslation < clipStart) {
                // The previous view is overlapping on top, clip!
                float overlapAmount = clipStart - newYTranslation;
@@ -181,7 +182,9 @@ public class StackScrollAlgorithm {
            } else {
                state.clipTopAmount = 0;
            }

            if (isHeadsUp) {
                firstHeadsUp = false;
            }
            if (!child.isTransparent()) {
                // Only update the previous values if we are not transparent,
                // otherwise we would clip to a transparent view.
+3 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone;

import static com.android.systemui.Interpolators.ALPHA_IN;
import static com.android.systemui.Interpolators.ALPHA_OUT;
import static com.android.systemui.Interpolators.LINEAR;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -33,7 +34,7 @@ import java.util.ArrayList;
 */
public class ButtonDispatcher {
    private final static int FADE_DURATION_IN = 150;
    private final static int FADE_DURATION_OUT = 100;
    private final static int FADE_DURATION_OUT = 1000;

    private final ArrayList<View> mViews = new ArrayList<>();

@@ -178,7 +179,7 @@ public class ButtonDispatcher {
            setVisibility(View.VISIBLE);
            mFadeAnimator = ValueAnimator.ofFloat(getAlpha(), alpha);
            mFadeAnimator.setDuration(duration);
            mFadeAnimator.setInterpolator(getAlpha() < alpha ? ALPHA_IN : ALPHA_OUT);
            mFadeAnimator.setInterpolator(LINEAR);
            mFadeAnimator.addListener(mFadeListener);
            mFadeAnimator.addUpdateListener(mAlphaListener);
            mFadeAnimator.start();
+19 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ class ActivityStarter {
    private boolean mNoAnimation;
    private boolean mKeepCurTransition;
    private boolean mAvoidMoveToFront;
    private boolean mFrozeTaskList;

    // We must track when we deliver the new intent since multiple code paths invoke
    // {@link #deliverNewIntent}. This is due to early returns in the code path. This flag is used
@@ -483,6 +484,7 @@ class ActivityStarter {
        mNoAnimation = starter.mNoAnimation;
        mKeepCurTransition = starter.mKeepCurTransition;
        mAvoidMoveToFront = starter.mAvoidMoveToFront;
        mFrozeTaskList = starter.mFrozeTaskList;

        mVoiceSession = starter.mVoiceSession;
        mVoiceInteractor = starter.mVoiceInteractor;
@@ -1093,6 +1095,14 @@ class ActivityStarter {

    void postStartActivityProcessing(ActivityRecord r, int result,
            ActivityStack startedActivityStack) {
        if (!ActivityManager.isStartResultSuccessful(result)) {
            if (mFrozeTaskList) {
                // If we specifically froze the task list as part of starting an activity, then
                // reset the frozen list state if it failed to start. This is normally otherwise
                // called when the freeze-timeout has elapsed.
                mSupervisor.mRecentTasks.resetFreezeTaskListReorderingOnTimeout();
            }
        }
        if (ActivityManager.isStartResultFatalError(result)) {
            return;
        }
@@ -1485,6 +1495,14 @@ class ActivityStarter {
                mLaunchParams.hasPreferredDisplay() ? mLaunchParams.mPreferredDisplayId
                        : DEFAULT_DISPLAY;

        // If requested, freeze the task list
        if (mOptions != null && mOptions.freezeRecentTasksReordering()
                && mSupervisor.mRecentTasks.isCallerRecents(r.launchedFromUid)
                && !mSupervisor.mRecentTasks.isFreezeTaskListReorderingSet()) {
            mFrozeTaskList = true;
            mSupervisor.mRecentTasks.setFreezeTaskListReordering();
        }

        // Do not start home activity if it cannot be launched on preferred display. We are not
        // doing this in ActivityStackSupervisor#canPlaceEntityOnDisplay because it might
        // fallback to launch on other displays.
@@ -1775,6 +1793,7 @@ class ActivityStarter {
        mNoAnimation = false;
        mKeepCurTransition = false;
        mAvoidMoveToFront = false;
        mFrozeTaskList = false;

        mVoiceSession = null;
        mVoiceInteractor = null;
Loading