Loading
Mark children as detached instead of actually detaching them.
When detachChildren is called, mark children as detached instead of removing them from the client. This is so the children can be re-attached again when they're reparented. Check if layer is detached before copying currentState to drawingState so detached layers aren't updated. Also check if layer is detached before removing the layer since they should no longer be reachable if they're detached. Test: DetachChildrenThenAttach Bug: 111297488 Change-Id: I31b9eb1398f02e9d68dd3f7a1f231e1cef9fb0f8