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

Commit bd80ec63 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "When opening from locked shade, wait for the shade to unlock before...

Merge "When opening from locked shade, wait for the shade to unlock before expanding." into rvc-dev am: f1f28c8e am: e6a7a0e1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11934834

Change-Id: Id3285fdbfabd11d5645049e2784d66e558f80db1
parents ad6498c5 e6a7a0e1
Loading
Loading
Loading
Loading
+33 −12
Original line number Original line Diff line number Diff line
@@ -183,6 +183,12 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
    // Only load overflow data from disk once
    // Only load overflow data from disk once
    private boolean mOverflowDataLoaded = false;
    private boolean mOverflowDataLoaded = false;


    /**
     * When the shade status changes to SHADE (from anything but SHADE, like LOCKED) we'll select
     * this bubble and expand the stack.
     */
    @Nullable private NotificationEntry mNotifEntryToExpandOnShadeUnlock;

    private final NotificationInterruptStateProvider mNotificationInterruptStateProvider;
    private final NotificationInterruptStateProvider mNotificationInterruptStateProvider;
    private IStatusBarService mBarService;
    private IStatusBarService mBarService;
    private WindowManager mWindowManager;
    private WindowManager mWindowManager;
@@ -295,6 +301,12 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
            if (shouldCollapse) {
            if (shouldCollapse) {
                collapseStack();
                collapseStack();
            }
            }

            if (mNotifEntryToExpandOnShadeUnlock != null) {
                expandStackAndSelectBubble(mNotifEntryToExpandOnShadeUnlock);
                mNotifEntryToExpandOnShadeUnlock = null;
            }

            updateStack();
            updateStack();
        }
        }
    }
    }
@@ -935,6 +947,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
     * @param entry the notification for the bubble to be selected
     * @param entry the notification for the bubble to be selected
     */
     */
    public void expandStackAndSelectBubble(NotificationEntry entry) {
    public void expandStackAndSelectBubble(NotificationEntry entry) {
        if (mStatusBarStateListener.getCurrentState() == SHADE) {
            mNotifEntryToExpandOnShadeUnlock = null;

            String key = entry.getKey();
            String key = entry.getKey();
            Bubble bubble = mBubbleData.getBubbleInStackWithKey(key);
            Bubble bubble = mBubbleData.getBubbleInStackWithKey(key);
            if (bubble != null) {
            if (bubble != null) {
@@ -950,6 +965,12 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
                    setIsBubble(entry, true /* isBubble */, true /* autoExpand */);
                    setIsBubble(entry, true /* isBubble */, true /* autoExpand */);
                }
                }
            }
            }
        } else {
            // Wait until we're unlocked to expand, so that the user can see the expand animation
            // and also to work around bugs with expansion animation + shade unlock happening at the
            // same time.
            mNotifEntryToExpandOnShadeUnlock = entry;
        }
    }
    }


    /**
    /**