Merge "Notify system to report the rounded corners that task bar draws"
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index dfbc519..87de596 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -212,6 +212,8 @@
mWindowLayoutParams.providedInternalImeInsets = Insets.of(0,
getDefaultTaskbarWindowHeight() - mTaskbarHeightForIme, 0, 0);
+ mWindowLayoutParams.insetsRoundedCornerFrame = true;
+
// Initialize controllers after all are constructed.
mControllers.init(sharedState);
updateSysuiStateFlags(sharedState.sysuiStateFlags, true /* fromInit */);
@@ -446,6 +448,18 @@
}
/**
+ * Notify system to inset the rounded corner frame based on the task bar insets.
+ */
+ public void updateInsetRoundedCornerFrame(boolean shouldInsetsRoundedCorner) {
+ if (!mDragLayer.isAttachedToWindow()
+ || mWindowLayoutParams.insetsRoundedCornerFrame == shouldInsetsRoundedCorner) {
+ return;
+ }
+ mWindowLayoutParams.insetsRoundedCornerFrame = shouldInsetsRoundedCorner;
+ mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
+ }
+
+ /**
* Updates the TaskbarContainer height (pass {@link #getDefaultTaskbarWindowHeight()} to reset).
*/
public void setTaskbarWindowHeight(int height) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
index 5c31e05..8308d75 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
@@ -535,6 +535,7 @@
private void notifyStashChange(boolean visible, boolean stashed) {
mSystemUiProxy.notifyTaskbarStatus(visible, stashed);
+ mControllers.taskbarActivityContext.updateInsetRoundedCornerFrame(visible && !stashed);
mControllers.rotationButtonController.onTaskbarStateChange(visible, stashed);
}