Loading core/java/com/android/internal/widget/NonClientDecorView.java +14 −10 Original line number Original line Diff line number Diff line Loading @@ -519,20 +519,24 @@ public class NonClientDecorView extends LinearLayout // inaccessible. For that case we remember the previous metrics to avoid flashes. // inaccessible. For that case we remember the previous metrics to avoid flashes. View caption = getChildAt(0); View caption = getChildAt(0); View content = getChildAt(1); View content = getChildAt(1); if (content != null && caption != null) { if (caption != null && content != null) { mLastContentWidth = content.getWidth(); int captionHeight = caption.getHeight(); mLastContentHeight = content.getHeight(); int contentWidth = content.getWidth(); mLastCaptionHeight = caption.getHeight(); int contentHeight = content.getHeight(); // Get the draw position within our surface (shadow offsets). // Get the draw position within our surface. int[] surfaceOrigin = new int[2]; int[] surfaceOrigin = new int[2]; surfaceOrigin[0] = 0; surfaceOrigin[0] = 0; surfaceOrigin[1] = 0; surfaceOrigin[1] = 0; // Get the shadow offsets. getLocationInSurface(surfaceOrigin); getLocationInSurface(surfaceOrigin); // Only update if a layout has already be performed (which might not be after a // relayout. Otherwise use the previous values for the content. if (captionHeight != 0 && contentWidth != 0 && contentHeight != 0) { mLastCaptionHeight = captionHeight; mLastXOffset = surfaceOrigin[0]; mLastXOffset = surfaceOrigin[0]; mLastYOffset = surfaceOrigin[1]; mLastYOffset = surfaceOrigin[1]; mLastContentWidth = contentWidth; mLastContentHeight = contentHeight; } } } // Since the surface is spanning the entire screen, we have to add the start offset of // Since the surface is spanning the entire screen, we have to add the start offset of Loading Loading
core/java/com/android/internal/widget/NonClientDecorView.java +14 −10 Original line number Original line Diff line number Diff line Loading @@ -519,20 +519,24 @@ public class NonClientDecorView extends LinearLayout // inaccessible. For that case we remember the previous metrics to avoid flashes. // inaccessible. For that case we remember the previous metrics to avoid flashes. View caption = getChildAt(0); View caption = getChildAt(0); View content = getChildAt(1); View content = getChildAt(1); if (content != null && caption != null) { if (caption != null && content != null) { mLastContentWidth = content.getWidth(); int captionHeight = caption.getHeight(); mLastContentHeight = content.getHeight(); int contentWidth = content.getWidth(); mLastCaptionHeight = caption.getHeight(); int contentHeight = content.getHeight(); // Get the draw position within our surface (shadow offsets). // Get the draw position within our surface. int[] surfaceOrigin = new int[2]; int[] surfaceOrigin = new int[2]; surfaceOrigin[0] = 0; surfaceOrigin[0] = 0; surfaceOrigin[1] = 0; surfaceOrigin[1] = 0; // Get the shadow offsets. getLocationInSurface(surfaceOrigin); getLocationInSurface(surfaceOrigin); // Only update if a layout has already be performed (which might not be after a // relayout. Otherwise use the previous values for the content. if (captionHeight != 0 && contentWidth != 0 && contentHeight != 0) { mLastCaptionHeight = captionHeight; mLastXOffset = surfaceOrigin[0]; mLastXOffset = surfaceOrigin[0]; mLastYOffset = surfaceOrigin[1]; mLastYOffset = surfaceOrigin[1]; mLastContentWidth = contentWidth; mLastContentHeight = contentHeight; } } } // Since the surface is spanning the entire screen, we have to add the start offset of // Since the surface is spanning the entire screen, we have to add the start offset of Loading