Loading core/res/res/anim/rotation_animation_xfade_exit.xml +1 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,6 @@ <set xmlns:android="http://schemas.android.com/apk/res/android"> <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="500" android:duration="150" android:interpolator="@interpolator/decelerate_quad" /> </set> services/java/com/android/server/wm/AppWindowAnimator.java +10 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ package com.android.server.wm; import android.graphics.Matrix; import android.util.Slog; import android.util.TimeUtils; import android.view.Display; import android.view.Surface; import android.view.SurfaceControl; Loading @@ -30,6 +31,11 @@ public class AppWindowAnimator { // Protect with mAnimator. boolean freezingScreen; /** * How long we last kept the screen frozen. */ int lastFreezeDuration; // Offset to the window of all layers in the token, for use by // AppWindowToken animations. int animLayerAdjustment; Loading Loading @@ -287,6 +293,10 @@ public class AppWindowAnimator { pw.print(prefix); pw.print("freezingScreen="); pw.print(freezingScreen); pw.print(" allDrawn="); pw.print(allDrawn); pw.print(" animLayerAdjustment="); pw.println(animLayerAdjustment); if (lastFreezeDuration != 0) { pw.print(prefix); pw.print("lastFreezeDuration="); TimeUtils.formatDuration(lastFreezeDuration, pw); pw.println(); } if (animating || animation != null) { pw.print(prefix); pw.print("animating="); pw.println(animating); pw.print(prefix); pw.print("animation="); pw.println(animation); Loading services/java/com/android/server/wm/WindowAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public class WindowAnimator { int mAboveUniverseLayer = 0; int mBulkUpdateParams = 0; Object mLastWindowFreezeSource; SparseArray<DisplayContentsAnimator> mDisplayContentsAnimators = new SparseArray<WindowAnimator.DisplayContentsAnimator>(); Loading services/java/com/android/server/wm/WindowManagerService.java +45 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import android.app.AppOpsManager; import android.util.TimeUtils; import android.view.IWindowId; import com.android.internal.app.IBatteryStats; import com.android.internal.policy.PolicyManager; Loading Loading @@ -464,6 +465,9 @@ public class WindowManagerService extends IWindowManager.Stub boolean mTraversalScheduled = false; boolean mDisplayFrozen = false; long mDisplayFreezeTime = 0; int mLastDisplayFreezeDuration = 0; Object mLastFinishedFreezeSource = null; boolean mWaitingForConfig = false; boolean mWindowsFreezingScreen = false; boolean mClientFreezingScreen = false; Loading Loading @@ -582,6 +586,7 @@ public class WindowManagerService extends IWindowManager.Stub boolean mWallpaperForceHidingChanged = false; boolean mWallpaperMayChange = false; boolean mOrientationChangeComplete = true; Object mLastWindowFreezeSource = null; private Session mHoldScreen = null; private boolean mObscured = false; boolean mDimming = false; Loading Loading @@ -3590,7 +3595,10 @@ public class WindowManagerService extends IWindowManager.Stub synchronized(mWindowMap) { mCurConfiguration = new Configuration(config); if (mWaitingForConfig) { mWaitingForConfig = false; mLastFinishedFreezeSource = "new-config"; } performLayoutAndPlaceSurfacesLocked(); } } Loading Loading @@ -4209,6 +4217,7 @@ public class WindowManagerService extends IWindowManager.Stub w.mOrientationChanging = true; mInnerFields.mOrientationChangeComplete = false; } w.mLastFreezeDuration = 0; unfrozeWindows = true; w.mDisplayContent.layoutNeeded = true; } Loading @@ -4216,7 +4225,10 @@ public class WindowManagerService extends IWindowManager.Stub if (force || unfrozeWindows) { if (DEBUG_ORIENTATION) Slog.v(TAG, "No longer freezing: " + wtoken); wtoken.mAppAnimator.freezingScreen = false; wtoken.mAppAnimator.lastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); mAppsFreezingScreen--; mLastFinishedFreezeSource = wtoken; } if (unfreezeSurfaceNow) { if (unfrozeWindows) { Loading @@ -4242,6 +4254,7 @@ public class WindowManagerService extends IWindowManager.Stub if (!wtoken.hiddenRequested) { if (!wtoken.mAppAnimator.freezingScreen) { wtoken.mAppAnimator.freezingScreen = true; wtoken.mAppAnimator.lastFreezeDuration = 0; mAppsFreezingScreen++; if (mAppsFreezingScreen == 1) { startFreezingDisplayLocked(false, 0, 0); Loading Loading @@ -4750,6 +4763,7 @@ public class WindowManagerService extends IWindowManager.Stub synchronized(mWindowMap) { if (mClientFreezingScreen) { mClientFreezingScreen = false; mLastFinishedFreezeSource = "client"; final long origId = Binder.clearCallingIdentity(); try { stopFreezingDisplayLocked(); Loading Loading @@ -5742,6 +5756,7 @@ public class WindowManagerService extends IWindowManager.Stub w.mOrientationChanging = true; mInnerFields.mOrientationChangeComplete = false; } w.mLastFreezeDuration = 0; } for (int i=mRotationWatchers.size()-1; i>=0; i--) { Loading Loading @@ -6240,6 +6255,7 @@ public class WindowManagerService extends IWindowManager.Stub if (config == null && mWaitingForConfig) { // Nothing changed but we are waiting for something... stop that! mWaitingForConfig = false; mLastFinishedFreezeSource = "new-config"; performLayoutAndPlaceSurfacesLocked(); } return config; Loading Loading @@ -7036,6 +7052,8 @@ public class WindowManagerService extends IWindowManager.Stub WindowState w = windows.get(i); if (w.mOrientationChanging) { w.mOrientationChanging = false; w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); Slog.w(TAG, "Force clearing orientation change: " + w); } } Loading Loading @@ -7112,6 +7130,7 @@ public class WindowManagerService extends IWindowManager.Stub synchronized (mWindowMap) { if (mClientFreezingScreen) { mClientFreezingScreen = false; mLastFinishedFreezeSource = "client-timeout"; stopFreezingDisplayLocked(); } } Loading Loading @@ -8029,6 +8048,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION) Slog.v(TAG, "Changing surface while display frozen: " + w); w.mOrientationChanging = true; w.mLastFreezeDuration = 0; mInnerFields.mOrientationChangeComplete = false; if (!mWindowsFreezingScreen) { mWindowsFreezingScreen = true; Loading Loading @@ -8417,6 +8437,8 @@ public class WindowManagerService extends IWindowManager.Stub "Orientation not waiting for draw in " + w + ", surface " + winAnimator.mSurfaceControl); w.mOrientationChanging = false; w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); } } } Loading Loading @@ -8930,6 +8952,8 @@ public class WindowManagerService extends IWindowManager.Stub winAnimator.mSurfaceResized = false; } catch (RemoteException e) { win.mOrientationChanging = false; win.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); } mResizingWindows.remove(i); } Loading @@ -8940,6 +8964,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mInnerFields.mOrientationChangeComplete) { if (mWindowsFreezingScreen) { mWindowsFreezingScreen = false; mLastFinishedFreezeSource = mInnerFields.mLastWindowFreezeSource; mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT); } stopFreezingDisplayLocked(); Loading Loading @@ -9226,6 +9251,7 @@ public class WindowManagerService extends IWindowManager.Stub mInnerFields.mOrientationChangeComplete = false; } else { mInnerFields.mOrientationChangeComplete = true; mInnerFields.mLastWindowFreezeSource = mAnimator.mLastWindowFreezeSource; if (mWindowsFreezingScreen) { doRequest = true; } Loading Loading @@ -9498,6 +9524,8 @@ public class WindowManagerService extends IWindowManager.Stub mScreenFrozenLock.acquire(); mDisplayFrozen = true; mDisplayFreezeTime = SystemClock.elapsedRealtime(); mLastFinishedFreezeSource = null; mInputMonitor.freezeInputDispatchingLw(); Loading Loading @@ -9552,6 +9580,15 @@ public class WindowManagerService extends IWindowManager.Stub } mDisplayFrozen = false; mLastDisplayFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); StringBuilder sb = new StringBuilder(128); sb.append("Screen frozen for "); TimeUtils.formatDuration(mLastDisplayFreezeDuration, sb); if (mLastFinishedFreezeSource != null) { sb.append(" due to "); sb.append(mLastFinishedFreezeSource); } Slog.i(TAG, sb.toString()); mH.removeMessages(H.APP_FREEZE_TIMEOUT); mH.removeMessages(H.CLIENT_FREEZE_TIMEOUT); if (PROFILE_ORIENTATION) { Loading Loading @@ -10076,6 +10113,13 @@ public class WindowManagerService extends IWindowManager.Stub } pw.print(" mInTouchMode="); pw.print(mInTouchMode); pw.print(" mLayoutSeq="); pw.println(mLayoutSeq); pw.print(" mLastDisplayFreezeDuration="); TimeUtils.formatDuration(mLastDisplayFreezeDuration, pw); if ( mLastFinishedFreezeSource != null) { pw.print(" due to "); pw.print(mLastFinishedFreezeSource); } pw.println(); if (dumpAll) { pw.print(" mSystemDecorRect="); pw.print(mSystemDecorRect.toShortString()); pw.print(" mSystemDecorLayer="); pw.print(mSystemDecorLayer); Loading services/java/com/android/server/wm/WindowState.java +10 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import android.app.AppOpsManager; import android.os.RemoteCallbackList; import android.util.TimeUtils; import android.view.IWindowFocusObserver; import android.view.IWindowId; import com.android.server.input.InputWindowHandle; Loading Loading @@ -266,6 +267,11 @@ final class WindowState implements WindowManagerPolicy.WindowState { */ boolean mOrientationChanging; /** * How long we last kept the screen frozen. */ int mLastFreezeDuration; /** Is this window now (or just being) removed? */ boolean mRemoved; Loading Loading @@ -1387,6 +1393,10 @@ final class WindowState implements WindowManagerPolicy.WindowState { pw.print(" mAppFreezing="); pw.print(mAppFreezing); pw.print(" mTurnOnScreen="); pw.println(mTurnOnScreen); } if (mLastFreezeDuration != 0) { pw.print(prefix); pw.print("mLastFreezeDuration="); TimeUtils.formatDuration(mLastFreezeDuration, pw); pw.println(); } if (mHScale != 1 || mVScale != 1) { pw.print(prefix); pw.print("mHScale="); pw.print(mHScale); pw.print(" mVScale="); pw.println(mVScale); Loading Loading
core/res/res/anim/rotation_animation_xfade_exit.xml +1 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,6 @@ <set xmlns:android="http://schemas.android.com/apk/res/android"> <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="500" android:duration="150" android:interpolator="@interpolator/decelerate_quad" /> </set>
services/java/com/android/server/wm/AppWindowAnimator.java +10 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ package com.android.server.wm; import android.graphics.Matrix; import android.util.Slog; import android.util.TimeUtils; import android.view.Display; import android.view.Surface; import android.view.SurfaceControl; Loading @@ -30,6 +31,11 @@ public class AppWindowAnimator { // Protect with mAnimator. boolean freezingScreen; /** * How long we last kept the screen frozen. */ int lastFreezeDuration; // Offset to the window of all layers in the token, for use by // AppWindowToken animations. int animLayerAdjustment; Loading Loading @@ -287,6 +293,10 @@ public class AppWindowAnimator { pw.print(prefix); pw.print("freezingScreen="); pw.print(freezingScreen); pw.print(" allDrawn="); pw.print(allDrawn); pw.print(" animLayerAdjustment="); pw.println(animLayerAdjustment); if (lastFreezeDuration != 0) { pw.print(prefix); pw.print("lastFreezeDuration="); TimeUtils.formatDuration(lastFreezeDuration, pw); pw.println(); } if (animating || animation != null) { pw.print(prefix); pw.print("animating="); pw.println(animating); pw.print(prefix); pw.print("animation="); pw.println(animation); Loading
services/java/com/android/server/wm/WindowAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public class WindowAnimator { int mAboveUniverseLayer = 0; int mBulkUpdateParams = 0; Object mLastWindowFreezeSource; SparseArray<DisplayContentsAnimator> mDisplayContentsAnimators = new SparseArray<WindowAnimator.DisplayContentsAnimator>(); Loading
services/java/com/android/server/wm/WindowManagerService.java +45 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import android.app.AppOpsManager; import android.util.TimeUtils; import android.view.IWindowId; import com.android.internal.app.IBatteryStats; import com.android.internal.policy.PolicyManager; Loading Loading @@ -464,6 +465,9 @@ public class WindowManagerService extends IWindowManager.Stub boolean mTraversalScheduled = false; boolean mDisplayFrozen = false; long mDisplayFreezeTime = 0; int mLastDisplayFreezeDuration = 0; Object mLastFinishedFreezeSource = null; boolean mWaitingForConfig = false; boolean mWindowsFreezingScreen = false; boolean mClientFreezingScreen = false; Loading Loading @@ -582,6 +586,7 @@ public class WindowManagerService extends IWindowManager.Stub boolean mWallpaperForceHidingChanged = false; boolean mWallpaperMayChange = false; boolean mOrientationChangeComplete = true; Object mLastWindowFreezeSource = null; private Session mHoldScreen = null; private boolean mObscured = false; boolean mDimming = false; Loading Loading @@ -3590,7 +3595,10 @@ public class WindowManagerService extends IWindowManager.Stub synchronized(mWindowMap) { mCurConfiguration = new Configuration(config); if (mWaitingForConfig) { mWaitingForConfig = false; mLastFinishedFreezeSource = "new-config"; } performLayoutAndPlaceSurfacesLocked(); } } Loading Loading @@ -4209,6 +4217,7 @@ public class WindowManagerService extends IWindowManager.Stub w.mOrientationChanging = true; mInnerFields.mOrientationChangeComplete = false; } w.mLastFreezeDuration = 0; unfrozeWindows = true; w.mDisplayContent.layoutNeeded = true; } Loading @@ -4216,7 +4225,10 @@ public class WindowManagerService extends IWindowManager.Stub if (force || unfrozeWindows) { if (DEBUG_ORIENTATION) Slog.v(TAG, "No longer freezing: " + wtoken); wtoken.mAppAnimator.freezingScreen = false; wtoken.mAppAnimator.lastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); mAppsFreezingScreen--; mLastFinishedFreezeSource = wtoken; } if (unfreezeSurfaceNow) { if (unfrozeWindows) { Loading @@ -4242,6 +4254,7 @@ public class WindowManagerService extends IWindowManager.Stub if (!wtoken.hiddenRequested) { if (!wtoken.mAppAnimator.freezingScreen) { wtoken.mAppAnimator.freezingScreen = true; wtoken.mAppAnimator.lastFreezeDuration = 0; mAppsFreezingScreen++; if (mAppsFreezingScreen == 1) { startFreezingDisplayLocked(false, 0, 0); Loading Loading @@ -4750,6 +4763,7 @@ public class WindowManagerService extends IWindowManager.Stub synchronized(mWindowMap) { if (mClientFreezingScreen) { mClientFreezingScreen = false; mLastFinishedFreezeSource = "client"; final long origId = Binder.clearCallingIdentity(); try { stopFreezingDisplayLocked(); Loading Loading @@ -5742,6 +5756,7 @@ public class WindowManagerService extends IWindowManager.Stub w.mOrientationChanging = true; mInnerFields.mOrientationChangeComplete = false; } w.mLastFreezeDuration = 0; } for (int i=mRotationWatchers.size()-1; i>=0; i--) { Loading Loading @@ -6240,6 +6255,7 @@ public class WindowManagerService extends IWindowManager.Stub if (config == null && mWaitingForConfig) { // Nothing changed but we are waiting for something... stop that! mWaitingForConfig = false; mLastFinishedFreezeSource = "new-config"; performLayoutAndPlaceSurfacesLocked(); } return config; Loading Loading @@ -7036,6 +7052,8 @@ public class WindowManagerService extends IWindowManager.Stub WindowState w = windows.get(i); if (w.mOrientationChanging) { w.mOrientationChanging = false; w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); Slog.w(TAG, "Force clearing orientation change: " + w); } } Loading Loading @@ -7112,6 +7130,7 @@ public class WindowManagerService extends IWindowManager.Stub synchronized (mWindowMap) { if (mClientFreezingScreen) { mClientFreezingScreen = false; mLastFinishedFreezeSource = "client-timeout"; stopFreezingDisplayLocked(); } } Loading Loading @@ -8029,6 +8048,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION) Slog.v(TAG, "Changing surface while display frozen: " + w); w.mOrientationChanging = true; w.mLastFreezeDuration = 0; mInnerFields.mOrientationChangeComplete = false; if (!mWindowsFreezingScreen) { mWindowsFreezingScreen = true; Loading Loading @@ -8417,6 +8437,8 @@ public class WindowManagerService extends IWindowManager.Stub "Orientation not waiting for draw in " + w + ", surface " + winAnimator.mSurfaceControl); w.mOrientationChanging = false; w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); } } } Loading Loading @@ -8930,6 +8952,8 @@ public class WindowManagerService extends IWindowManager.Stub winAnimator.mSurfaceResized = false; } catch (RemoteException e) { win.mOrientationChanging = false; win.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); } mResizingWindows.remove(i); } Loading @@ -8940,6 +8964,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mInnerFields.mOrientationChangeComplete) { if (mWindowsFreezingScreen) { mWindowsFreezingScreen = false; mLastFinishedFreezeSource = mInnerFields.mLastWindowFreezeSource; mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT); } stopFreezingDisplayLocked(); Loading Loading @@ -9226,6 +9251,7 @@ public class WindowManagerService extends IWindowManager.Stub mInnerFields.mOrientationChangeComplete = false; } else { mInnerFields.mOrientationChangeComplete = true; mInnerFields.mLastWindowFreezeSource = mAnimator.mLastWindowFreezeSource; if (mWindowsFreezingScreen) { doRequest = true; } Loading Loading @@ -9498,6 +9524,8 @@ public class WindowManagerService extends IWindowManager.Stub mScreenFrozenLock.acquire(); mDisplayFrozen = true; mDisplayFreezeTime = SystemClock.elapsedRealtime(); mLastFinishedFreezeSource = null; mInputMonitor.freezeInputDispatchingLw(); Loading Loading @@ -9552,6 +9580,15 @@ public class WindowManagerService extends IWindowManager.Stub } mDisplayFrozen = false; mLastDisplayFreezeDuration = (int)(SystemClock.elapsedRealtime() - mDisplayFreezeTime); StringBuilder sb = new StringBuilder(128); sb.append("Screen frozen for "); TimeUtils.formatDuration(mLastDisplayFreezeDuration, sb); if (mLastFinishedFreezeSource != null) { sb.append(" due to "); sb.append(mLastFinishedFreezeSource); } Slog.i(TAG, sb.toString()); mH.removeMessages(H.APP_FREEZE_TIMEOUT); mH.removeMessages(H.CLIENT_FREEZE_TIMEOUT); if (PROFILE_ORIENTATION) { Loading Loading @@ -10076,6 +10113,13 @@ public class WindowManagerService extends IWindowManager.Stub } pw.print(" mInTouchMode="); pw.print(mInTouchMode); pw.print(" mLayoutSeq="); pw.println(mLayoutSeq); pw.print(" mLastDisplayFreezeDuration="); TimeUtils.formatDuration(mLastDisplayFreezeDuration, pw); if ( mLastFinishedFreezeSource != null) { pw.print(" due to "); pw.print(mLastFinishedFreezeSource); } pw.println(); if (dumpAll) { pw.print(" mSystemDecorRect="); pw.print(mSystemDecorRect.toShortString()); pw.print(" mSystemDecorLayer="); pw.print(mSystemDecorLayer); Loading
services/java/com/android/server/wm/WindowState.java +10 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import android.app.AppOpsManager; import android.os.RemoteCallbackList; import android.util.TimeUtils; import android.view.IWindowFocusObserver; import android.view.IWindowId; import com.android.server.input.InputWindowHandle; Loading Loading @@ -266,6 +267,11 @@ final class WindowState implements WindowManagerPolicy.WindowState { */ boolean mOrientationChanging; /** * How long we last kept the screen frozen. */ int mLastFreezeDuration; /** Is this window now (or just being) removed? */ boolean mRemoved; Loading Loading @@ -1387,6 +1393,10 @@ final class WindowState implements WindowManagerPolicy.WindowState { pw.print(" mAppFreezing="); pw.print(mAppFreezing); pw.print(" mTurnOnScreen="); pw.println(mTurnOnScreen); } if (mLastFreezeDuration != 0) { pw.print(prefix); pw.print("mLastFreezeDuration="); TimeUtils.formatDuration(mLastFreezeDuration, pw); pw.println(); } if (mHScale != 1 || mVScale != 1) { pw.print(prefix); pw.print("mHScale="); pw.print(mHScale); pw.print(" mVScale="); pw.println(mVScale); Loading