am a1730fa4: Merge "Debug code for window transition crash" into jb-mr1-dev
* commit 'a1730fa4f18adfb044645163a6e7bb1d405c593f': Debug code for window transition crash
This commit is contained in:
@@ -164,13 +164,6 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
|||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
convertView = createView(parent);
|
convertView = createView(parent);
|
||||||
if (convertView.getParent() != null) {
|
|
||||||
throw new RuntimeException("Recycled child has parent");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (convertView.getParent() != null) {
|
|
||||||
throw new RuntimeException("Recycled child has parent");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ViewHolder holder = (ViewHolder) convertView.getTag();
|
ViewHolder holder = (ViewHolder) convertView.getTag();
|
||||||
|
|
||||||
@@ -600,6 +593,9 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
|||||||
usingDrawingCache = true;
|
usingDrawingCache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bm == null) {
|
||||||
|
throw new RuntimeException("Recents thumbnail is null");
|
||||||
|
}
|
||||||
ActivityOptions opts = ActivityOptions.makeThumbnailScaleUpAnimation(
|
ActivityOptions opts = ActivityOptions.makeThumbnailScaleUpAnimation(
|
||||||
holder.thumbnailViewImage, bm, 0, 0, null);
|
holder.thumbnailViewImage, bm, 0, 0, null);
|
||||||
|
|
||||||
|
|||||||
@@ -488,11 +488,18 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_width);
|
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_width);
|
||||||
float thumbHeight = res
|
float thumbHeight = res
|
||||||
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height);
|
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height);
|
||||||
|
if (first == null) {
|
||||||
|
throw new RuntimeException("Recents thumbnail is null");
|
||||||
|
}
|
||||||
if (first.getWidth() != thumbWidth || first.getHeight() != thumbHeight) {
|
if (first.getWidth() != thumbWidth || first.getHeight() != thumbHeight) {
|
||||||
first = Bitmap.createScaledBitmap(first, (int) thumbWidth, (int) thumbHeight,
|
first = Bitmap.createScaledBitmap(first, (int) thumbWidth, (int) thumbHeight,
|
||||||
true);
|
true);
|
||||||
|
if (first == null) {
|
||||||
|
throw new RuntimeException("Recents thumbnail is null");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
mDisplay.getMetrics(dm);
|
mDisplay.getMetrics(dm);
|
||||||
// calculate it here, but consider moving it elsewhere
|
// calculate it here, but consider moving it elsewhere
|
||||||
@@ -521,8 +528,7 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
+ thumbBgPadding + thumbLeftMargin);
|
+ thumbBgPadding + thumbLeftMargin);
|
||||||
y = (int) (dm.heightPixels
|
y = (int) (dm.heightPixels
|
||||||
- res.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height) - thumbBgPadding);
|
- res.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height) - thumbBgPadding);
|
||||||
} else { // if (config.orientation ==
|
} else { // if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||||
// Configuration.ORIENTATION_LANDSCAPE) {
|
|
||||||
float thumbTopMargin = res
|
float thumbTopMargin = res
|
||||||
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_top_margin);
|
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_top_margin);
|
||||||
float thumbBgPadding = res
|
float thumbBgPadding = res
|
||||||
|
|||||||
Reference in New Issue
Block a user