mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Animate bubble bar location changes
When it is not the initial bubble data, animate bubble bar location change. Bug: 313661121 Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT Test: manual, move expanded view from one side to the other, observe the location change animates Change-Id: I52117a31d02e7160ca1d3dc3e724bda2e38f6cbf
This commit is contained in:
@@ -156,6 +156,7 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
* {@link BubbleBarBubble}s so that it can be used to update the views.
|
||||
*/
|
||||
private static class BubbleBarViewUpdate {
|
||||
final boolean initialState;
|
||||
boolean expandedChanged;
|
||||
boolean expanded;
|
||||
boolean shouldShowEducation;
|
||||
@@ -172,6 +173,7 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
List<BubbleBarBubble> currentBubbles;
|
||||
|
||||
BubbleBarViewUpdate(BubbleBarUpdate update) {
|
||||
initialState = update.initialState;
|
||||
expandedChanged = update.expandedChanged;
|
||||
expanded = update.expanded;
|
||||
shouldShowEducation = update.shouldShowEducation;
|
||||
@@ -405,7 +407,9 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
}
|
||||
if (update.bubbleBarLocation != null) {
|
||||
if (update.bubbleBarLocation != mBubbleBarViewController.getBubbleBarLocation()) {
|
||||
mBubbleBarViewController.setBubbleBarLocation(update.bubbleBarLocation);
|
||||
// Animate when receiving updates. Skip it if we received the initial state.
|
||||
boolean animate = !update.initialState;
|
||||
mBubbleBarViewController.setBubbleBarLocation(update.bubbleBarLocation, animate);
|
||||
mBubbleStashController.setBubbleBarLocation(update.bubbleBarLocation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user