Merge "Fix bug where thumbnails flashed more often in Recents" into jb-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6dee0a0fe6
@ -211,6 +211,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
boolean mHasHadWindowFocus;
|
||||
boolean mLastWasImTarget;
|
||||
boolean mWindowsAnimating;
|
||||
boolean mDrawDuringWindowsAnimating;
|
||||
boolean mIsDrawing;
|
||||
int mLastSystemUiVisibility;
|
||||
int mClientWindowLayoutFlags;
|
||||
@ -1396,8 +1397,10 @@ public final class ViewRootImpl implements ViewParent,
|
||||
|
||||
final int surfaceGenerationId = mSurface.getGenerationId();
|
||||
relayoutResult = relayoutWindow(params, viewVisibility, insetsPending);
|
||||
mWindowsAnimating |=
|
||||
(relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0;
|
||||
if (!mDrawDuringWindowsAnimating) {
|
||||
mWindowsAnimating |=
|
||||
(relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0;
|
||||
}
|
||||
|
||||
if (DEBUG_LAYOUT) Log.v(TAG, "relayout: frame=" + frame.toShortString()
|
||||
+ " overscan=" + mPendingOverscanInsets.toShortString()
|
||||
@ -2572,6 +2575,16 @@ public final class ViewRootImpl implements ViewParent,
|
||||
displayLists.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public void setDrawDuringWindowsAnimating(boolean value) {
|
||||
mDrawDuringWindowsAnimating = value;
|
||||
if (value) {
|
||||
handleDispatchDoneAnimating();
|
||||
}
|
||||
}
|
||||
|
||||
boolean scrollToRectOrFocus(Rect rectangle, boolean immediate) {
|
||||
final View.AttachInfo attachInfo = mAttachInfo;
|
||||
final Rect ci = attachInfo.mContentInsets;
|
||||
|
@ -46,6 +46,7 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewPropertyAnimator;
|
||||
import android.view.ViewRootImpl;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
@ -365,6 +366,14 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
||||
}
|
||||
}
|
||||
|
||||
protected void onAttachedToWindow () {
|
||||
super.onAttachedToWindow();
|
||||
final ViewRootImpl root = getViewRootImpl();
|
||||
if (root != null) {
|
||||
root.setDrawDuringWindowsAnimating(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onUiHidden() {
|
||||
mCallUiHiddenBeforeNextReload = false;
|
||||
if (!mShowing && mRecentTaskDescriptions != null) {
|
||||
@ -562,7 +571,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
||||
!mRecentTasksLoader.isFirstScreenful()) {
|
||||
int timeSinceWindowAnimation =
|
||||
(int) (System.currentTimeMillis() - mWindowAnimationStartTime);
|
||||
final int minStartDelay = 125;
|
||||
final int minStartDelay = 150;
|
||||
final int startDelay = Math.max(0, Math.min(
|
||||
minStartDelay - timeSinceWindowAnimation, minStartDelay));
|
||||
final int duration = 250;
|
||||
|
Reference in New Issue
Block a user