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

Commit ea855230 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge changes Ic1f3d681,Ib713b4d8,Ic7e9460f,Id78e47f9,I83c964eb into main

* changes:
  [flexiglass] Do not generateHeadsUpAnimation when dragging HUN
  [flexiglass] Reset stackTop when idle on Gone scene
  [flexiglass] Use intrinsicHeight for HUN placeholder and update translation
  [flexiglass] Fix HUN placeholder remaining visible after the Shade is opened and closed
  [flexiglass] Fix touch gesture interruption when dragging HUN
parents b2c477cc bdb8b938
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -44,4 +44,10 @@ interface HeadsUpRepository {

    /** Snooze the currently pinned HUN. */
    fun snooze()

    /** Unpin all currently pinned HUNs. */
    fun unpinAll(userUnPinned: Boolean)

    /** Release entries that were waiting for a shade expansion to complete. */
    fun releaseAfterExpansion()
}
+10 −0
Original line number Diff line number Diff line
@@ -148,6 +148,16 @@ constructor(
    fun snooze() {
        headsUpRepository.snooze()
    }

    /** Unpin all currently pinned HUNs. */
    fun unpinAll(userUnPinned: Boolean) {
        headsUpRepository.unpinAll(userUnPinned)
    }

    /** Notifies that the current scene transition is idle. */
    fun onTransitionIdle() {
        headsUpRepository.releaseAfterExpansion()
    }
}

class HeadsUpRowInteractor(repository: HeadsUpRowRepository)
+16 −3
Original line number Diff line number Diff line
@@ -1721,6 +1721,19 @@ public class NotificationStackScrollLayout
        if (mTopHeadsUpRow == null) {
            return 0;
        }
        ExpandableNotificationRow row = getTopHeadsUpRow();
        return row.getPinnedHeadsUpHeight();
    }

    private int getTopHeadsUpIntrinsicHeight() {
        if (mTopHeadsUpRow == null) {
            return 0;
        }
        ExpandableNotificationRow row = getTopHeadsUpRow();
        return row.getIntrinsicHeight();
    }

    private ExpandableNotificationRow getTopHeadsUpRow() {
        ExpandableNotificationRow row = mTopHeadsUpRow;
        if (row.isChildInGroup()) {
            final NotificationEntry groupSummary =
@@ -1729,7 +1742,7 @@ public class NotificationStackScrollLayout
                row = groupSummary.getRow();
            }
        }
        return row.getPinnedHeadsUpHeight();
        return row;
    }

    /**
@@ -2511,7 +2524,7 @@ public class NotificationStackScrollLayout

    @Override
    public int getTopHeadsUpHeight() {
        return getTopHeadsUpPinnedHeight();
        return getTopHeadsUpIntrinsicHeight();
    }

    /**
@@ -5732,7 +5745,7 @@ public class NotificationStackScrollLayout
        return mDisallowScrollingInThisMotion;
    }

    boolean isBeingDragged() {
    public boolean isBeingDragged() {
        return mIsBeingDragged;
    }

+0 −1
Original line number Diff line number Diff line
@@ -2053,7 +2053,6 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                hunWantsIt = mHeadsUpTouchHelper.onInterceptTouchEvent(ev);
                if (hunWantsIt) {
                    mView.startDraggingOnHun();
                    mHeadsUpManager.unpinAll(true);
                }
            }
            boolean swipeWantsIt = false;
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.stack.ui.viewbinder

import android.util.Log
import com.android.app.tracing.coroutines.flow.filter
import com.android.systemui.common.ui.ConfigurationState
import com.android.systemui.common.ui.view.onLayoutChanged
import com.android.systemui.dagger.SysUISingleton
@@ -86,6 +87,7 @@ constructor(
            }
            launch { viewModel.isScrollable.collect { view.setScrollingEnabled(it) } }
            launch { viewModel.isDozing.collect { isDozing -> view.setDozing(isDozing) } }
            launch { viewModel.shouldResetStackTop.filter { it }.collect { view.setStackTop(0f) } }

            launchAndDispose {
                view.setSyntheticScrollConsumer(viewModel.syntheticScrollConsumer)
Loading