Skip to content

Commit 7dfcb01

Browse files
author
Craig Mautner
committed
Increase window freeze timeout for bigger screens.
More pixels take longer. Timeout was occurring before Status and Navigation Bars were finished drawing causing them to animate in during rotations. Bug 7307718 fixed. Change-Id: Iccf27b6172d0c9831690cc2fcf93027a40b705d8
1 parent f1b246d commit 7dfcb01

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ public class WindowManagerService extends IWindowManager.Stub
264264
*/
265265
static final int DEFAULT_FADE_IN_OUT_DURATION = 400;
266266

267+
/** Amount of time (in milliseconds) to delay before declaring a window freeze timeout. */
268+
static final int WINDOW_FREEZE_TIMEOUT_DURATION = 3000;
269+
267270
/**
268271
* If true, the window manager will do its own custom freezing and general
269272
* management of the screen during rotation.
@@ -6021,7 +6024,8 @@ public boolean updateRotationUncheckedLocked(boolean inTransaction) {
60216024

60226025
mWindowsFreezingScreen = true;
60236026
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
6024-
mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT), 2000);
6027+
mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT),
6028+
WINDOW_FREEZE_TIMEOUT_DURATION);
60256029
mWaitingForConfig = true;
60266030
getDefaultDisplayContentLocked().layoutNeeded = true;
60276031
startFreezingDisplayLocked(inTransaction, 0, 0);
@@ -8383,7 +8387,7 @@ void makeWindowFreezingScreenIfNeededLocked(WindowState w) {
83838387
// when we first froze the display.
83848388
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
83858389
mH.sendMessageDelayed(mH.obtainMessage(
8386-
H.WINDOW_FREEZE_TIMEOUT), 2000);
8390+
H.WINDOW_FREEZE_TIMEOUT), WINDOW_FREEZE_TIMEOUT_DURATION);
83878391
}
83888392
}
83898393
}

0 commit comments

Comments
 (0)