Loading services/java/com/android/server/wm/WindowManagerService.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -226,6 +226,11 @@ public class WindowManagerService extends IWindowManager.Stub */ */ static final int DEFAULT_FADE_IN_OUT_DURATION = 400; static final int DEFAULT_FADE_IN_OUT_DURATION = 400; /** * Frame rate. TODO: Replace with Display.getRefreshRate() when that is reliable. */ static final int FRAME_RATE = 48; /** /** * If true, the window manager will do its own custom freezing and general * If true, the window manager will do its own custom freezing and general * management of the screen during rotation. * management of the screen during rotation. Loading Loading @@ -8682,7 +8687,7 @@ public class WindowManagerService extends IWindowManager.Stub if (needRelayout) { if (needRelayout) { requestAnimationLocked(0); requestAnimationLocked(0); } else if (animating) { } else if (animating) { requestAnimationLocked(currentTime+(1000/60)-SystemClock.uptimeMillis()); requestAnimationLocked(currentTime+(1000/FRAME_RATE)-SystemClock.uptimeMillis()); } } // Finally update all input windows now that the window changes have stabilized. // Finally update all input windows now that the window changes have stabilized. Loading Loading
services/java/com/android/server/wm/WindowManagerService.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -226,6 +226,11 @@ public class WindowManagerService extends IWindowManager.Stub */ */ static final int DEFAULT_FADE_IN_OUT_DURATION = 400; static final int DEFAULT_FADE_IN_OUT_DURATION = 400; /** * Frame rate. TODO: Replace with Display.getRefreshRate() when that is reliable. */ static final int FRAME_RATE = 48; /** /** * If true, the window manager will do its own custom freezing and general * If true, the window manager will do its own custom freezing and general * management of the screen during rotation. * management of the screen during rotation. Loading Loading @@ -8682,7 +8687,7 @@ public class WindowManagerService extends IWindowManager.Stub if (needRelayout) { if (needRelayout) { requestAnimationLocked(0); requestAnimationLocked(0); } else if (animating) { } else if (animating) { requestAnimationLocked(currentTime+(1000/60)-SystemClock.uptimeMillis()); requestAnimationLocked(currentTime+(1000/FRAME_RATE)-SystemClock.uptimeMillis()); } } // Finally update all input windows now that the window changes have stabilized. // Finally update all input windows now that the window changes have stabilized. Loading