Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/AnimationThread.java +4 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,10 @@ public abstract class AnimationThread extends Thread { mListener.done(Status.SUCCESS.createResult()); } catch (Throwable throwable) { Bridge.getLog().error(null, "Error playing animation", throwable); // can't use Bridge.getLog() as the exception might be thrown outside // of an acquire/release block. mSession.getLog().error(null, "Error playing animation", throwable); mListener.done(Status.ERROR_UNKNOWN.createResult("Error playing animation", throwable)); } finally { postAnimation(); Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +21 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.ide.common.rendering.api.Result.Status.SUCCESS; import com.android.ide.common.rendering.api.IAnimationListener; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.Params; import com.android.ide.common.rendering.api.RenderSession; import com.android.ide.common.rendering.api.ResourceDensity; Loading Loading @@ -654,14 +655,20 @@ public class RenderSessionImpl { previousParent.setLayoutTransition(removeTransition); // no fade-out removeTransition.setAnimator(LayoutTransition.DISAPPEARING, null); // FIXME: set a non-null do-nothing Animator. // setting a null animator doesn't work because the child gets its parent // set to null too late. //removeTransition.setAnimator(LayoutTransition.DISAPPEARING, null); // now for the new parent, if different if (previousParent != newParentView) { LayoutTransition addTransition = new LayoutTransition(); // no fade-in addTransition.setAnimator(LayoutTransition.APPEARING, null); // FIXME: set a non-null do-nothing Animator. // setting a null animator doesn't work because the child gets its parent // set to null too late. //addTransition.setAnimator(LayoutTransition.APPEARING, null); newParentView.setLayoutTransition(addTransition); } Loading Loading @@ -826,6 +833,18 @@ public class RenderSessionImpl { } } /** * Returns the log associated with the session. * @return the log or null if there are none. */ public LayoutLog getLog() { if (mParams != null) { return mParams.getLog(); } return null; } /** * Checks that the lock is owned by the current thread and that the current context is the one * from this scene. Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/AnimationThread.java +4 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,10 @@ public abstract class AnimationThread extends Thread { mListener.done(Status.SUCCESS.createResult()); } catch (Throwable throwable) { Bridge.getLog().error(null, "Error playing animation", throwable); // can't use Bridge.getLog() as the exception might be thrown outside // of an acquire/release block. mSession.getLog().error(null, "Error playing animation", throwable); mListener.done(Status.ERROR_UNKNOWN.createResult("Error playing animation", throwable)); } finally { postAnimation(); Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +21 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.ide.common.rendering.api.Result.Status.SUCCESS; import com.android.ide.common.rendering.api.IAnimationListener; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.Params; import com.android.ide.common.rendering.api.RenderSession; import com.android.ide.common.rendering.api.ResourceDensity; Loading Loading @@ -654,14 +655,20 @@ public class RenderSessionImpl { previousParent.setLayoutTransition(removeTransition); // no fade-out removeTransition.setAnimator(LayoutTransition.DISAPPEARING, null); // FIXME: set a non-null do-nothing Animator. // setting a null animator doesn't work because the child gets its parent // set to null too late. //removeTransition.setAnimator(LayoutTransition.DISAPPEARING, null); // now for the new parent, if different if (previousParent != newParentView) { LayoutTransition addTransition = new LayoutTransition(); // no fade-in addTransition.setAnimator(LayoutTransition.APPEARING, null); // FIXME: set a non-null do-nothing Animator. // setting a null animator doesn't work because the child gets its parent // set to null too late. //addTransition.setAnimator(LayoutTransition.APPEARING, null); newParentView.setLayoutTransition(addTransition); } Loading Loading @@ -826,6 +833,18 @@ public class RenderSessionImpl { } } /** * Returns the log associated with the session. * @return the log or null if there are none. */ public LayoutLog getLog() { if (mParams != null) { return mParams.getLog(); } return null; } /** * Checks that the lock is owned by the current thread and that the current context is the one * from this scene. Loading