Merge "Fix hotseat layout on device rotation." into main
This commit is contained in:
commit
90c4e9e62b
3 files changed
+20
-9
No files matched your search
@@ -33,6 +33,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.Hotseat;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.AnimatedFloat;
|
||||
@@ -83,6 +84,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
private final DeviceProfile.OnDeviceProfileChangeListener mOnDeviceProfileChangeListener =
|
||||
dp -> {
|
||||
onStashedInAppChanged(dp);
|
||||
adjustHotseatForBubbleBar();
|
||||
if (mControllers != null && mControllers.taskbarViewController != null) {
|
||||
mControllers.taskbarViewController.onRotationChanged(dp);
|
||||
}
|
||||
@@ -263,6 +265,14 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
}
|
||||
}
|
||||
|
||||
private void adjustHotseatForBubbleBar() {
|
||||
Hotseat hotseat = mLauncher.getHotseat();
|
||||
if (mControllers.bubbleControllers.isEmpty() || hotseat == null) return;
|
||||
boolean hiddenForBubbles =
|
||||
mControllers.bubbleControllers.get().bubbleBarViewController.isHiddenForNoBubbles();
|
||||
hotseat.post(() -> adjustHotseatForBubbleBar(!hiddenForBubbles));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Taskbar animation when going from an app to Launcher as part of recents transition.
|
||||
* @param toState If known, the state we will end up in when reaching Launcher.
|
||||
|
||||
@@ -221,10 +221,13 @@ public class TaskbarControllers {
|
||||
uiController = newUiController;
|
||||
uiController.init(this);
|
||||
uiController.updateStateForSysuiFlags(mSharedState.sysuiStateFlags);
|
||||
// if bubble controllers are present take bubble bar location, else set it to null
|
||||
// if bubble controllers are present configure the UI controller
|
||||
bubbleControllers.ifPresentOrElse(bubbleControllers -> {
|
||||
BubbleBarLocation location =
|
||||
bubbleControllers.bubbleBarViewController.getBubbleBarLocation();
|
||||
boolean hiddenForBubbles =
|
||||
bubbleControllers.bubbleBarViewController.isHiddenForNoBubbles();
|
||||
uiController.adjustHotseatForBubbleBar(!hiddenForBubbles);
|
||||
uiController.onBubbleBarLocationUpdated(location);
|
||||
}, () -> uiController.onBubbleBarLocationUpdated(null));
|
||||
// Notify that the ui controller has changed
|
||||
|
||||
Reference in new issue
Block a user