mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Merge "Suppress bubble animation when IME is visible" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
013a4121be
@@ -67,7 +67,6 @@ import com.android.launcher3.R;
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.icons.BubbleIconFactory;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest;
|
||||
import com.android.launcher3.taskbar.TaskbarControllers;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.Executors.SimpleThreadFactory;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
@@ -148,6 +147,7 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
private BubbleBarItem mSelectedBubble;
|
||||
private BubbleBarOverflow mOverflowBubble;
|
||||
|
||||
private ImeVisibilityChecker mImeVisibilityChecker;
|
||||
private BubbleBarViewController mBubbleBarViewController;
|
||||
private BubbleStashController mBubbleStashController;
|
||||
private BubbleStashedHandleViewController mBubbleStashedHandleViewController;
|
||||
@@ -216,7 +216,10 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
mSystemUiProxy.setBubblesListener(null);
|
||||
}
|
||||
|
||||
public void init(TaskbarControllers controllers, BubbleControllers bubbleControllers) {
|
||||
/** Initializes controllers. */
|
||||
public void init(BubbleControllers bubbleControllers,
|
||||
ImeVisibilityChecker imeVisibilityChecker) {
|
||||
mImeVisibilityChecker = imeVisibilityChecker;
|
||||
mBubbleBarViewController = bubbleControllers.bubbleBarViewController;
|
||||
mBubbleStashController = bubbleControllers.bubbleStashController;
|
||||
mBubbleStashedHandleViewController = bubbleControllers.bubbleStashedHandleViewController;
|
||||
@@ -321,7 +324,8 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
// enabling gesture nav. also suppress animation if the bubble bar is hidden for sysui e.g.
|
||||
// the shade is open, or we're locked.
|
||||
final boolean suppressAnimation =
|
||||
update.initialState || mBubbleBarViewController.isHiddenForSysui();
|
||||
update.initialState || mBubbleBarViewController.isHiddenForSysui()
|
||||
|| mImeVisibilityChecker.isImeVisible();
|
||||
|
||||
BubbleBarBubble bubbleToSelect = null;
|
||||
if (!update.removedBubbles.isEmpty()) {
|
||||
@@ -667,4 +671,10 @@ public class BubbleBarController extends IBubblesListener.Stub {
|
||||
displayBounds.bottom = displaySize.y - translation;
|
||||
return displayBounds;
|
||||
}
|
||||
|
||||
/** Interface for checking whether the IME is visible. */
|
||||
public interface ImeVisibilityChecker {
|
||||
/** Whether the IME is visible. */
|
||||
boolean isImeVisible();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ public class BubbleControllers {
|
||||
* in constructors for now, as some controllers may still be waiting for init().
|
||||
*/
|
||||
public void init(TaskbarControllers taskbarControllers) {
|
||||
bubbleBarController.init(taskbarControllers, this);
|
||||
bubbleBarController.init(this,
|
||||
taskbarControllers.navbarButtonsViewController::isImeVisible);
|
||||
bubbleBarViewController.init(taskbarControllers, this);
|
||||
bubbleStashedHandleViewController.init(taskbarControllers, this);
|
||||
bubbleStashController.init(taskbarControllers, this);
|
||||
|
||||
Reference in New Issue
Block a user