Loading packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +4 −3 Original line number Diff line number Diff line Loading @@ -616,10 +616,11 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener if (!mFirstScreenful && tasks.size() == 0) { return; } mNumItemsWaitingForThumbnailsAndIcons = mFirstScreenful ? tasks.size() : mRecentTaskDescriptions.size(); mNumItemsWaitingForThumbnailsAndIcons = mFirstScreenful ? tasks.size() : mRecentTaskDescriptions == null ? 0 : mRecentTaskDescriptions.size(); if (mRecentTaskDescriptions == null) { mRecentTaskDescriptions = new ArrayList(tasks); mRecentTaskDescriptions = new ArrayList<TaskDescription>(tasks); } else { mRecentTaskDescriptions.addAll(tasks); } Loading services/java/com/android/server/wm/WindowAnimator.java +18 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import com.android.internal.policy.impl.PhoneWindowManager; * on behalf of WindowManagerService. */ public class WindowAnimator { private static final String TAG = "WindowAnimations"; private static final String TAG = "WindowAnimator"; final WindowManagerService mService; final Context mContext; Loading Loading @@ -67,8 +67,24 @@ public class WindowAnimator { final int NAT = mService.mAppTokens.size(); for (i=0; i<NAT; i++) { final AppWindowToken appToken = mService.mAppTokens.get(i); final boolean wasAnimating = appToken.animation != null; if (appToken.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) { mAnimating = true; } else if (wasAnimating) { // stopped animating, do one more pass through the layout mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } final int NEAT = mService.mExitingAppTokens.size(); for (i=0; i<NEAT; i++) { final AppWindowToken appToken = mService.mExitingAppTokens.get(i); final boolean wasAnimating = appToken.animation != null; if (appToken.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) { mAnimating = true; } else if (wasAnimating) { // stopped animating, do one more pass through the layout mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } Loading Loading @@ -526,6 +542,7 @@ public class WindowAnimator { } void animate() { mPendingLayoutChanges = 0; mCurrentTime = SystemClock.uptimeMillis(); // Update animations of all applications, including those Loading services/java/com/android/server/wm/WindowManagerService.java +29 −20 Original line number Diff line number Diff line Loading @@ -608,6 +608,9 @@ public class WindowManagerService extends IWindowManager.Stub } LayoutAndSurfaceFields mInnerFields = new LayoutAndSurfaceFields(); /** Only do a maximum of 6 repeated layouts. After that quit */ private int mLayoutRepeatCount; private final class AnimationRunnable implements Runnable { @Override public void run() { Loading Loading @@ -1917,7 +1920,7 @@ public class WindowManagerService extends IWindowManager.Stub rawChanged = true; } if (rawChanged && (wallpaperWin.getAttrs().privateFlags & if (rawChanged && (wallpaperWin.mAttrs.privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS) != 0) { try { if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset " Loading Loading @@ -2316,7 +2319,7 @@ public class WindowManagerService extends IWindowManager.Stub if (wasVisible) { int transit = WindowManagerPolicy.TRANSIT_EXIT; if (win.getAttrs().type == TYPE_APPLICATION_STARTING) { if (win.mAttrs.type == TYPE_APPLICATION_STARTING) { transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE; } // Try starting an animation. Loading Loading @@ -2790,7 +2793,7 @@ public class WindowManagerService extends IWindowManager.Stub // Try starting an animation; if there isn't one, we // can destroy the surface right away. int transit = WindowManagerPolicy.TRANSIT_EXIT; if (win.getAttrs().type == TYPE_APPLICATION_STARTING) { if (win.mAttrs.type == TYPE_APPLICATION_STARTING) { transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE; } if (!win.mSurfacePendingDestroy && win.isWinVisibleLw() && Loading Loading @@ -7575,10 +7578,25 @@ public class WindowManagerService extends IWindowManager.Stub } else { mInLayout = false; } if (mLayoutNeeded) { if (++mLayoutRepeatCount < 6) { requestTraversalLocked(); } else { Slog.e(TAG, "Performed 6 layouts in a row. Skipping"); mLayoutRepeatCount = 0; } } else { mLayoutRepeatCount = 0; } if (mAnimator.mAnimating) { // Do this even if requestTraversalLocked was called above so we get a frame drawn // at the proper time as well as the one drawn early. scheduleAnimationLocked(); } if (mWindowsChanged && !mWindowChangeListeners.isEmpty()) { mH.removeMessages(H.REPORT_WINDOWS_CHANGE); mH.sendMessage(mH.obtainMessage(H.REPORT_WINDOWS_CHANGE)); Loading Loading @@ -8366,6 +8384,7 @@ public class WindowManagerService extends IWindowManager.Stub mLayoutNeeded = true; } } if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) { if (DEBUG_LAYOUT) Slog.v(TAG, "Computing new config from layout"); if (updateOrientationFromAppTokensLocked(true)) { Loading @@ -8373,6 +8392,7 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION); } } if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { mLayoutNeeded = true; } Loading Loading @@ -8584,8 +8604,6 @@ public class WindowManagerService extends IWindowManager.Stub } } boolean needRelayout = false; if (!mAnimator.mAnimating && mAppTransitionRunning) { // We have finished the animation of an app transition. To do // this, we have delayed a lot of operations like showing and Loading @@ -8594,7 +8612,7 @@ public class WindowManagerService extends IWindowManager.Stub // be out of sync with it. So here we will just rebuild the // entire app window list. Fun! mAppTransitionRunning = false; needRelayout = true; mLayoutNeeded = true; rebuildAppWindowListLocked(); assignLayersLocked(); // Clear information about apps that were moving. Loading @@ -8605,19 +8623,10 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.REPORT_LOSING_FOCUS); } if (wallpaperDestroyed) { needRelayout = adjustWallpaperWindowsLocked() != 0; mLayoutNeeded |= adjustWallpaperWindowsLocked() != 0; } if ((mPendingLayoutChanges & ( WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER | ADJUST_WALLPAPER_LAYERS_CHANGED | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG | WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT)) != 0) { needRelayout = true; } if (needRelayout) { requestTraversalLocked(); } else if (mAnimator.mAnimating) { scheduleAnimationLocked(); if (mPendingLayoutChanges != 0) { mLayoutNeeded = true; } // Finally update all input windows now that the window changes have stabilized. Loading Loading @@ -8660,7 +8669,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (mInnerFields.mOrientationChangeComplete && !needRelayout && if (mInnerFields.mOrientationChangeComplete && !mLayoutNeeded && !mInnerFields.mUpdateRotation) { checkDrawnWindowsLocked(); } Loading Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +4 −3 Original line number Diff line number Diff line Loading @@ -616,10 +616,11 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener if (!mFirstScreenful && tasks.size() == 0) { return; } mNumItemsWaitingForThumbnailsAndIcons = mFirstScreenful ? tasks.size() : mRecentTaskDescriptions.size(); mNumItemsWaitingForThumbnailsAndIcons = mFirstScreenful ? tasks.size() : mRecentTaskDescriptions == null ? 0 : mRecentTaskDescriptions.size(); if (mRecentTaskDescriptions == null) { mRecentTaskDescriptions = new ArrayList(tasks); mRecentTaskDescriptions = new ArrayList<TaskDescription>(tasks); } else { mRecentTaskDescriptions.addAll(tasks); } Loading
services/java/com/android/server/wm/WindowAnimator.java +18 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import com.android.internal.policy.impl.PhoneWindowManager; * on behalf of WindowManagerService. */ public class WindowAnimator { private static final String TAG = "WindowAnimations"; private static final String TAG = "WindowAnimator"; final WindowManagerService mService; final Context mContext; Loading Loading @@ -67,8 +67,24 @@ public class WindowAnimator { final int NAT = mService.mAppTokens.size(); for (i=0; i<NAT; i++) { final AppWindowToken appToken = mService.mAppTokens.get(i); final boolean wasAnimating = appToken.animation != null; if (appToken.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) { mAnimating = true; } else if (wasAnimating) { // stopped animating, do one more pass through the layout mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } final int NEAT = mService.mExitingAppTokens.size(); for (i=0; i<NEAT; i++) { final AppWindowToken appToken = mService.mExitingAppTokens.get(i); final boolean wasAnimating = appToken.animation != null; if (appToken.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) { mAnimating = true; } else if (wasAnimating) { // stopped animating, do one more pass through the layout mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } Loading Loading @@ -526,6 +542,7 @@ public class WindowAnimator { } void animate() { mPendingLayoutChanges = 0; mCurrentTime = SystemClock.uptimeMillis(); // Update animations of all applications, including those Loading
services/java/com/android/server/wm/WindowManagerService.java +29 −20 Original line number Diff line number Diff line Loading @@ -608,6 +608,9 @@ public class WindowManagerService extends IWindowManager.Stub } LayoutAndSurfaceFields mInnerFields = new LayoutAndSurfaceFields(); /** Only do a maximum of 6 repeated layouts. After that quit */ private int mLayoutRepeatCount; private final class AnimationRunnable implements Runnable { @Override public void run() { Loading Loading @@ -1917,7 +1920,7 @@ public class WindowManagerService extends IWindowManager.Stub rawChanged = true; } if (rawChanged && (wallpaperWin.getAttrs().privateFlags & if (rawChanged && (wallpaperWin.mAttrs.privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS) != 0) { try { if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset " Loading Loading @@ -2316,7 +2319,7 @@ public class WindowManagerService extends IWindowManager.Stub if (wasVisible) { int transit = WindowManagerPolicy.TRANSIT_EXIT; if (win.getAttrs().type == TYPE_APPLICATION_STARTING) { if (win.mAttrs.type == TYPE_APPLICATION_STARTING) { transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE; } // Try starting an animation. Loading Loading @@ -2790,7 +2793,7 @@ public class WindowManagerService extends IWindowManager.Stub // Try starting an animation; if there isn't one, we // can destroy the surface right away. int transit = WindowManagerPolicy.TRANSIT_EXIT; if (win.getAttrs().type == TYPE_APPLICATION_STARTING) { if (win.mAttrs.type == TYPE_APPLICATION_STARTING) { transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE; } if (!win.mSurfacePendingDestroy && win.isWinVisibleLw() && Loading Loading @@ -7575,10 +7578,25 @@ public class WindowManagerService extends IWindowManager.Stub } else { mInLayout = false; } if (mLayoutNeeded) { if (++mLayoutRepeatCount < 6) { requestTraversalLocked(); } else { Slog.e(TAG, "Performed 6 layouts in a row. Skipping"); mLayoutRepeatCount = 0; } } else { mLayoutRepeatCount = 0; } if (mAnimator.mAnimating) { // Do this even if requestTraversalLocked was called above so we get a frame drawn // at the proper time as well as the one drawn early. scheduleAnimationLocked(); } if (mWindowsChanged && !mWindowChangeListeners.isEmpty()) { mH.removeMessages(H.REPORT_WINDOWS_CHANGE); mH.sendMessage(mH.obtainMessage(H.REPORT_WINDOWS_CHANGE)); Loading Loading @@ -8366,6 +8384,7 @@ public class WindowManagerService extends IWindowManager.Stub mLayoutNeeded = true; } } if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) { if (DEBUG_LAYOUT) Slog.v(TAG, "Computing new config from layout"); if (updateOrientationFromAppTokensLocked(true)) { Loading @@ -8373,6 +8392,7 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION); } } if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { mLayoutNeeded = true; } Loading Loading @@ -8584,8 +8604,6 @@ public class WindowManagerService extends IWindowManager.Stub } } boolean needRelayout = false; if (!mAnimator.mAnimating && mAppTransitionRunning) { // We have finished the animation of an app transition. To do // this, we have delayed a lot of operations like showing and Loading @@ -8594,7 +8612,7 @@ public class WindowManagerService extends IWindowManager.Stub // be out of sync with it. So here we will just rebuild the // entire app window list. Fun! mAppTransitionRunning = false; needRelayout = true; mLayoutNeeded = true; rebuildAppWindowListLocked(); assignLayersLocked(); // Clear information about apps that were moving. Loading @@ -8605,19 +8623,10 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.REPORT_LOSING_FOCUS); } if (wallpaperDestroyed) { needRelayout = adjustWallpaperWindowsLocked() != 0; mLayoutNeeded |= adjustWallpaperWindowsLocked() != 0; } if ((mPendingLayoutChanges & ( WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER | ADJUST_WALLPAPER_LAYERS_CHANGED | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG | WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT)) != 0) { needRelayout = true; } if (needRelayout) { requestTraversalLocked(); } else if (mAnimator.mAnimating) { scheduleAnimationLocked(); if (mPendingLayoutChanges != 0) { mLayoutNeeded = true; } // Finally update all input windows now that the window changes have stabilized. Loading Loading @@ -8660,7 +8669,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (mInnerFields.mOrientationChangeComplete && !needRelayout && if (mInnerFields.mOrientationChangeComplete && !mLayoutNeeded && !mInnerFields.mUpdateRotation) { checkDrawnWindowsLocked(); } Loading