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

Commit 5a3a0925 authored by Mady Mellor's avatar Mady Mellor
Browse files

Rename DISMISS_USER_REMOVED to DISMISS_USER_ACCOUNT_REMOVED

Makes it clear that this is about the account being removed not that
the user removed the bubble.

Test: treehugger
Bug: 333915922
Change-Id: Ic091726d5c0221ba06ecaa7f548a3618e93b3161
parent 98ab960b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ public class BubbleData {
        List<Bubble> removedBubbles = filterAllBubbles(bubble ->
                userId == bubble.getUser().getIdentifier());
        for (Bubble b : removedBubbles) {
            doRemove(b.getKey(), Bubbles.DISMISS_USER_REMOVED);
            doRemove(b.getKey(), Bubbles.DISMISS_USER_ACCOUNT_REMOVED);
        }
        if (!removedBubbles.isEmpty()) {
            dispatchPendingChanges();
@@ -678,7 +678,7 @@ public class BubbleData {
                || reason == Bubbles.DISMISS_SHORTCUT_REMOVED
                || reason == Bubbles.DISMISS_PACKAGE_REMOVED
                || reason == Bubbles.DISMISS_USER_CHANGED
                || reason == Bubbles.DISMISS_USER_REMOVED;
                || reason == Bubbles.DISMISS_USER_ACCOUNT_REMOVED;

        int indexToRemove = indexForKey(key);
        if (indexToRemove == -1) {
+2 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public interface Bubbles {
            DISMISS_NOTIF_CANCEL, DISMISS_ACCESSIBILITY_ACTION, DISMISS_NO_LONGER_BUBBLE,
            DISMISS_USER_CHANGED, DISMISS_GROUP_CANCELLED, DISMISS_INVALID_INTENT,
            DISMISS_OVERFLOW_MAX_REACHED, DISMISS_SHORTCUT_REMOVED, DISMISS_PACKAGE_REMOVED,
            DISMISS_NO_BUBBLE_UP, DISMISS_RELOAD_FROM_DISK, DISMISS_USER_REMOVED,
            DISMISS_NO_BUBBLE_UP, DISMISS_RELOAD_FROM_DISK, DISMISS_USER_ACCOUNT_REMOVED,
            DISMISS_SWITCH_TO_STACK})
    @Target({FIELD, LOCAL_VARIABLE, PARAMETER})
    @interface DismissReason {
@@ -82,7 +82,7 @@ public interface Bubbles {
    int DISMISS_PACKAGE_REMOVED = 13;
    int DISMISS_NO_BUBBLE_UP = 14;
    int DISMISS_RELOAD_FROM_DISK = 15;
    int DISMISS_USER_REMOVED = 16;
    int DISMISS_USER_ACCOUNT_REMOVED = 16;
    int DISMISS_SWITCH_TO_STACK = 17;

    /** Returns a binder that can be passed to an external process to manipulate Bubbles. */
+2 −2
Original line number Diff line number Diff line
@@ -1170,9 +1170,9 @@ public class BubbleDataTest extends ShellTestCase {
        // Verify the update has the removals.
        BubbleData.Update update = mUpdateCaptor.getValue();
        assertThat(update.removedBubbles.get(0)).isEqualTo(
                Pair.create(mBubbleA2, Bubbles.DISMISS_USER_REMOVED));
                Pair.create(mBubbleA2, Bubbles.DISMISS_USER_ACCOUNT_REMOVED));
        assertThat(update.removedBubbles.get(1)).isEqualTo(
                Pair.create(mBubbleA1, Bubbles.DISMISS_USER_REMOVED));
                Pair.create(mBubbleA1, Bubbles.DISMISS_USER_ACCOUNT_REMOVED));

        // Verify no A bubbles in active or overflow.
        assertBubbleListContains(mBubbleC1, mBubbleB3);