• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

frameworks/base


Commit MetaInfo

修订版1efec9431d3d95480004966d00c694af0806b3b0 (tree)
时间2020-06-11 18:56:23
作者utzcoz <utzcoz@outl...>
Commiterutzcoz

Log Message

Trigger resize when window from freeform to fullscreen

It will fix blankscreen when changing freeform window to fullscreen.

Signed-off-by: utzcoz <utzcoz@outlook.com>

更改概述

差异

--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -620,6 +620,15 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
620620 }
621621 }
622622
623+ // region @boringdroid
624+ // Current logic, if we change windowing mode from freeform to fullscreen, getOverrideBounds() will
625+ // return empty, the same as mTmpRect2, which doesn't trigger resize for window. So if current mode
626+ // is freeform, and new mode is fullscreen, we should resize window forcibly to avoid rigid
627+ // rendering problem.
628+ if (mTmpRect2.isEmpty() && currentMode == WINDOWING_MODE_FREEFORM) {
629+ resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */);
630+ }
631+ // endregion
623632 if (!Objects.equals(getOverrideBounds(), mTmpRect2)) {
624633 resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */);
625634 }