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

Commit 03fa255e authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Don't keep app bubbles on top" into main

parents cfd88e18 f146ca64
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -637,7 +637,7 @@ public class Bubble implements BubbleViewProvider {
     * @return the last time this bubble was updated or accessed, whichever is most recent.
     */
    long getLastActivity() {
        return isAppBubble() ? Long.MAX_VALUE : Math.max(mLastUpdated, mLastAccessed);
        return Math.max(mLastUpdated, mLastAccessed);
    }

    /**
+16 −0
Original line number Diff line number Diff line
@@ -220,6 +220,22 @@ public class BubbleDataTest extends ShellTestCase {
        assertSelectionChangedTo(mBubbleA1);
    }

    @Test
    public void testAddAppBubble_setsTime() {
        // Setup
        mBubbleData.setListener(mListener);

        // Test
        assertThat(mAppBubble.getLastActivity()).isEqualTo(0);
        setCurrentTime(1000);
        mBubbleData.notificationEntryUpdated(mAppBubble, true /* suppressFlyout*/,
                false /* showInShade */);

        // Verify
        assertThat(mBubbleData.getBubbleInStackWithKey(mAppBubble.getKey())).isEqualTo(mAppBubble);
        assertThat(mAppBubble.getLastActivity()).isEqualTo(1000);
    }

    @Test
    public void testRemoveBubble() {
        // Setup