Only store the state of a fragment if it is added.

Attemtping to save a Fragment that is not added to FragmentManager
throws an IllegalStateException.

Bug: 194481
Change-Id: I0f2c52dce3504175fad38ebf11d2690b4c26f696
2 files changed