Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19059dd1 authored by Ben Lin's avatar Ben Lin
Browse files

CaptionWindowDecor: Don't show for PINNED tasks.

Bug: 360155688
Test: Manual; open Youtube, minimize to enter PiP - no longer see
caption bar
Flag: EXEMPT bug fix

Change-Id: I2ad98aeb1a7753490892e7d1f8565f64fb39cd28
parent 81faef45
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.windowdecor;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.content.pm.PackageManager.FEATURE_PC;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS;
import static android.view.WindowManager.TRANSIT_CHANGE;
@@ -174,6 +175,11 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {

        if (decoration == null) return;

        if (!shouldShowWindowDecor(taskInfo)) {
            destroyWindowDecoration(taskInfo);
            return;
        }

        decoration.relayout(taskInfo);
        setupCaptionColor(taskInfo, decoration);
    }
@@ -250,6 +256,9 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
        if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) {
            return true;
        }
        if (taskInfo.getWindowingMode() == WINDOWING_MODE_PINNED) {
            return false;
        }
        if (taskInfo.getActivityType() != ACTIVITY_TYPE_STANDARD) {
            return false;
        }