From fae20fe4b7ffb8cce73f93c6f20ee62487f6e46c Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Wed, 6 Feb 2013 15:35:52 -0800 Subject: [PATCH] Don't call requestLayout from onLayout Doing a layout within a layout can lead to various problems, so it should be avoided. There's some logging that warns of this, which got triggered by CommonControllerOverlay. I don't know what problem this code was originally trying to solve, but it doesn't seem to be necessary anymore. The line in question was originally introduced in change 209a9163d4e8cee0bfe162ae598ef40e6051479c, in Oct 2011. Change-Id: I1402a842df59df31b69ad981337ea1c8630103df --- src/com/android/gallery3d/app/CommonControllerOverlay.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/com/android/gallery3d/app/CommonControllerOverlay.java b/src/com/android/gallery3d/app/CommonControllerOverlay.java index 089872fa5..a5aa805ef 100644 --- a/src/com/android/gallery3d/app/CommonControllerOverlay.java +++ b/src/com/android/gallery3d/app/CommonControllerOverlay.java @@ -274,10 +274,6 @@ public abstract class CommonControllerOverlay extends FrameLayout implements mBackground.layout(0, y - mTimeBar.getBarHeight(), w, y); mTimeBar.layout(pl, y - mTimeBar.getPreferredHeight(), w - pr, y); - // Needed, otherwise the framework will not re-layout in case only the - // padding is changed - mTimeBar.requestLayout(); - // Put the play/pause/next/ previous button in the center of the screen layoutCenteredView(mPlayPauseReplayView, 0, 0, w, h); -- 2.11.0