Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +14 −4 Original line number Diff line number Diff line Loading @@ -183,10 +183,20 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mRelayoutParams.mCaptionHeightId = getCaptionHeightId(); mRelayoutParams.mShadowRadiusId = shadowRadiusID; mRelayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw; mRelayoutParams.mWindowDecorConfig = DesktopTasksController.isDesktopDensityOverrideSet() ? mContext.getResources().getConfiguration() // Use system context : mTaskInfo.configuration; // Use task configuration // The configuration used to lay out the window decoration. The system context's config is // used when the task density has been overridden to a custom density so that the resources // and views of the decoration aren't affected and match the rest of the System UI, if not // then just use the task's configuration. A copy is made instead of using the original // reference so that the configuration isn't mutated on config changes and diff checks can // be made in WindowDecoration#relayout using the pre/post-relayout configuration. // See b/301119301. // TODO(b/301119301): consider moving the config data needed for diffs to relayout params // instead of using a whole Configuration as a parameter. final Configuration windowDecorConfig = new Configuration(); windowDecorConfig.setTo(DesktopTasksController.isDesktopDensityOverrideSet() ? mContext.getResources().getConfiguration() // Use system context. : mTaskInfo.configuration); // Use task configuration. mRelayoutParams.mWindowDecorConfig = windowDecorConfig; mRelayoutParams.mCornerRadius = (int) ScreenDecorationsUtils.getWindowCornerRadius(mContext); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +2 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final int oldDensityDpi = mWindowDecorConfig.densityDpi; mWindowDecorConfig = params.mWindowDecorConfig != null ? params.mWindowDecorConfig : mTaskInfo.getConfiguration(); if (oldDensityDpi != mWindowDecorConfig.densityDpi final int newDensityDpi = mWindowDecorConfig.densityDpi; if (oldDensityDpi != newDensityDpi || mDisplay == null || mDisplay.getDisplayId() != mTaskInfo.displayId || oldLayoutResId != mLayoutResId) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +14 −4 Original line number Diff line number Diff line Loading @@ -183,10 +183,20 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mRelayoutParams.mCaptionHeightId = getCaptionHeightId(); mRelayoutParams.mShadowRadiusId = shadowRadiusID; mRelayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw; mRelayoutParams.mWindowDecorConfig = DesktopTasksController.isDesktopDensityOverrideSet() ? mContext.getResources().getConfiguration() // Use system context : mTaskInfo.configuration; // Use task configuration // The configuration used to lay out the window decoration. The system context's config is // used when the task density has been overridden to a custom density so that the resources // and views of the decoration aren't affected and match the rest of the System UI, if not // then just use the task's configuration. A copy is made instead of using the original // reference so that the configuration isn't mutated on config changes and diff checks can // be made in WindowDecoration#relayout using the pre/post-relayout configuration. // See b/301119301. // TODO(b/301119301): consider moving the config data needed for diffs to relayout params // instead of using a whole Configuration as a parameter. final Configuration windowDecorConfig = new Configuration(); windowDecorConfig.setTo(DesktopTasksController.isDesktopDensityOverrideSet() ? mContext.getResources().getConfiguration() // Use system context. : mTaskInfo.configuration); // Use task configuration. mRelayoutParams.mWindowDecorConfig = windowDecorConfig; mRelayoutParams.mCornerRadius = (int) ScreenDecorationsUtils.getWindowCornerRadius(mContext); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +2 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final int oldDensityDpi = mWindowDecorConfig.densityDpi; mWindowDecorConfig = params.mWindowDecorConfig != null ? params.mWindowDecorConfig : mTaskInfo.getConfiguration(); if (oldDensityDpi != mWindowDecorConfig.densityDpi final int newDensityDpi = mWindowDecorConfig.densityDpi; if (oldDensityDpi != newDensityDpi || mDisplay == null || mDisplay.getDisplayId() != mTaskInfo.displayId || oldLayoutResId != mLayoutResId) { Loading