Merge "Only call setHasTransientState in captureHierarchy." into lmp-dev