Throw an exception before creating bad child fragment manager.

Bug 34183840

When accessing a fragment's child fragment manager prior to
its being attached, it will forever be in a bad state. This
CL throws an exception when that happens to warn the developer
not to do that.

The original bug came from a restored fragment listed in "active"
having its child fragment manager being accessed. The restored
fragment may not have been attached if it is only in the back
stack.

Test: gradlew connectedCheck in fragments/
Change-Id: I2304ab56bc72ae675c0cde0fc83dac6221ae615e
1 file changed