[Taskbar Performance] Avoid calling notifyUpdateLayoutParams in code logic specifically for unfolded taskbar when folded

Bug: 355968858
Test: https://android-build.corp.google.com/abtd/run/L59700030005634589/?referrer=email
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: I27ee8aefa7dbb42028de4c2de617c0deac4452e8
This commit is contained in:
Tracy Zhou
2024-08-03 22:14:18 -07:00
parent 785f8c1f03
commit 2cfc2e1b1c
2 changed files with 7 additions and 3 deletions
@@ -1134,6 +1134,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
* window.
*/
public void setTaskbarWindowFocusable(boolean focusable) {
if (isPhoneMode()) {
return;
}
if (focusable) {
mWindowLayoutParams.flags &= ~FLAG_NOT_FOCUSABLE;
} else {
@@ -1146,7 +1149,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
* Applies forcibly show flag to taskbar window iff transient taskbar is unstashed.
*/
public void applyForciblyShownFlagWhileTransientTaskbarUnstashed(boolean shouldForceShow) {
if (!DisplayController.isTransientTaskbar(this)) {
if (!DisplayController.isTransientTaskbar(this) || isPhoneMode()) {
return;
}
if (shouldForceShow) {
@@ -1689,7 +1692,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
* @param exclude {@code true} then the magnification region computation will omit the window.
*/
public void excludeFromMagnificationRegion(boolean exclude) {
if (mIsExcludeFromMagnificationRegion == exclude) {
if (mIsExcludeFromMagnificationRegion == exclude || isPhoneMode()) {
return;
}