Loading packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +10 −4 Original line number Diff line number Diff line Loading @@ -73,10 +73,16 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView return mLinearLayout.getWidth() - getWidth(); } private void addToRecycledViews(View v) { if (mRecycledViews.size() < mNumItemsInOneScreenful) { mRecycledViews.add(v); } } private void update() { for (int i = 0; i < mLinearLayout.getChildCount(); i++) { View v = mLinearLayout.getChildAt(i); mRecycledViews.add(v); addToRecycledViews(v); mAdapter.recycleView(v); } LayoutTransition transitioner = getLayoutTransition(); Loading Loading @@ -187,7 +193,7 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView } public void onChildDismissed(View v) { mRecycledViews.add(v); addToRecycledViews(v); mLinearLayout.removeView(v); if (v.getParent() != null) { throw new RuntimeException("Recycled child has parent"); Loading Loading @@ -362,13 +368,13 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView child.measure(childWidthMeasureSpec, childheightMeasureSpec); mNumItemsInOneScreenful = (int) FloatMath.ceil(dm.widthPixels / (float) child.getMeasuredWidth()); mRecycledViews.add(child); addToRecycledViews(child); if (child.getParent() != null) { throw new RuntimeException("First recycled child has parent"); } for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) { mRecycledViews.add(mAdapter.createView(mLinearLayout)); addToRecycledViews(mAdapter.createView(mLinearLayout)); if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) { throw new RuntimeException("Recycled child has parent"); } Loading packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -78,9 +78,10 @@ public class RecentsScrollViewPerformanceHelper { public void addViewCallback(View newLinearLayoutChild) { if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) { final View view = newLinearLayoutChild; view.setDrawingCacheEnabled(true); view.buildDrawingCache(); final RecentsPanelView.ViewHolder holder = (RecentsPanelView.ViewHolder) newLinearLayoutChild.getTag(); holder.labelView.setDrawingCacheEnabled(true); holder.labelView.buildDrawingCache(); } } Loading packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java +10 −4 Original line number Diff line number Diff line Loading @@ -74,10 +74,16 @@ public class RecentsVerticalScrollView extends ScrollView return mLinearLayout.getHeight() - getHeight(); } private void addToRecycledViews(View v) { if (mRecycledViews.size() < mNumItemsInOneScreenful) { mRecycledViews.add(v); } } private void update() { for (int i = 0; i < mLinearLayout.getChildCount(); i++) { View v = mLinearLayout.getChildAt(i); mRecycledViews.add(v); addToRecycledViews(v); mAdapter.recycleView(v); } LayoutTransition transitioner = getLayoutTransition(); Loading Loading @@ -203,7 +209,7 @@ public class RecentsVerticalScrollView extends ScrollView } public void onChildDismissed(View v) { mRecycledViews.add(v); addToRecycledViews(v); mLinearLayout.removeView(v); if (v.getParent() != null) { throw new RuntimeException("Recycled child has parent"); Loading Loading @@ -380,13 +386,13 @@ public class RecentsVerticalScrollView extends ScrollView child.measure(childWidthMeasureSpec, childheightMeasureSpec); mNumItemsInOneScreenful = (int) FloatMath.ceil(dm.heightPixels / (float) child.getMeasuredHeight()); mRecycledViews.add(child); addToRecycledViews(child); if (child.getParent() != null) { throw new RuntimeException("First recycled child has parent"); } for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) { mRecycledViews.add(mAdapter.createView(mLinearLayout)); addToRecycledViews(mAdapter.createView(mLinearLayout)); if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) { throw new RuntimeException("Recycled child has parent"); } Loading Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +10 −4 Original line number Diff line number Diff line Loading @@ -73,10 +73,16 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView return mLinearLayout.getWidth() - getWidth(); } private void addToRecycledViews(View v) { if (mRecycledViews.size() < mNumItemsInOneScreenful) { mRecycledViews.add(v); } } private void update() { for (int i = 0; i < mLinearLayout.getChildCount(); i++) { View v = mLinearLayout.getChildAt(i); mRecycledViews.add(v); addToRecycledViews(v); mAdapter.recycleView(v); } LayoutTransition transitioner = getLayoutTransition(); Loading Loading @@ -187,7 +193,7 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView } public void onChildDismissed(View v) { mRecycledViews.add(v); addToRecycledViews(v); mLinearLayout.removeView(v); if (v.getParent() != null) { throw new RuntimeException("Recycled child has parent"); Loading Loading @@ -362,13 +368,13 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView child.measure(childWidthMeasureSpec, childheightMeasureSpec); mNumItemsInOneScreenful = (int) FloatMath.ceil(dm.widthPixels / (float) child.getMeasuredWidth()); mRecycledViews.add(child); addToRecycledViews(child); if (child.getParent() != null) { throw new RuntimeException("First recycled child has parent"); } for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) { mRecycledViews.add(mAdapter.createView(mLinearLayout)); addToRecycledViews(mAdapter.createView(mLinearLayout)); if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) { throw new RuntimeException("Recycled child has parent"); } Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsScrollViewPerformanceHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -78,9 +78,10 @@ public class RecentsScrollViewPerformanceHelper { public void addViewCallback(View newLinearLayoutChild) { if (mSoftwareRendered && OPTIMIZE_SW_RENDERED_RECENTS) { final View view = newLinearLayoutChild; view.setDrawingCacheEnabled(true); view.buildDrawingCache(); final RecentsPanelView.ViewHolder holder = (RecentsPanelView.ViewHolder) newLinearLayoutChild.getTag(); holder.labelView.setDrawingCacheEnabled(true); holder.labelView.buildDrawingCache(); } } Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java +10 −4 Original line number Diff line number Diff line Loading @@ -74,10 +74,16 @@ public class RecentsVerticalScrollView extends ScrollView return mLinearLayout.getHeight() - getHeight(); } private void addToRecycledViews(View v) { if (mRecycledViews.size() < mNumItemsInOneScreenful) { mRecycledViews.add(v); } } private void update() { for (int i = 0; i < mLinearLayout.getChildCount(); i++) { View v = mLinearLayout.getChildAt(i); mRecycledViews.add(v); addToRecycledViews(v); mAdapter.recycleView(v); } LayoutTransition transitioner = getLayoutTransition(); Loading Loading @@ -203,7 +209,7 @@ public class RecentsVerticalScrollView extends ScrollView } public void onChildDismissed(View v) { mRecycledViews.add(v); addToRecycledViews(v); mLinearLayout.removeView(v); if (v.getParent() != null) { throw new RuntimeException("Recycled child has parent"); Loading Loading @@ -380,13 +386,13 @@ public class RecentsVerticalScrollView extends ScrollView child.measure(childWidthMeasureSpec, childheightMeasureSpec); mNumItemsInOneScreenful = (int) FloatMath.ceil(dm.heightPixels / (float) child.getMeasuredHeight()); mRecycledViews.add(child); addToRecycledViews(child); if (child.getParent() != null) { throw new RuntimeException("First recycled child has parent"); } for (int i = 0; i < mNumItemsInOneScreenful - 1; i++) { mRecycledViews.add(mAdapter.createView(mLinearLayout)); addToRecycledViews(mAdapter.createView(mLinearLayout)); if (mRecycledViews.get(mRecycledViews.size() - 1).getParent() != null) { throw new RuntimeException("Recycled child has parent"); } Loading