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

Commit ef388b9e authored by Ben Lin's avatar Ben Lin
Browse files

DesktopmodeWindowDecorViewModel: Use Display Context.

Instead of using the default Context supplied, use the displayContext
from DisplayController associated with the TaskInfo's displayId.

Bug: 382023296
Test: Build
Flag: com.android.window.flags.enable_bug_fixes_for_secondary_display
Change-Id: I5493598ea4bce49c6b53a67526dd622abdc785d1
parent 1bcf9a90
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1618,7 +1618,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
        }
        final DesktopModeWindowDecoration windowDecoration =
                mDesktopModeWindowDecorFactory.create(
                        mContext,
                        Flags.enableBugFixesForSecondaryDisplay()
                                ? mDisplayController.getDisplayContext(taskInfo.displayId)
                                : mContext,
                        mContext.createContextAsUser(UserHandle.of(taskInfo.userId), 0 /* flags */),
                        mDisplayController,
                        mSplitScreenController,