Throw ISE when adding a non-public non-static fragment class instance to a transaction

Also fix a test that had a private fragment and breaks with this change

Bug: 25925078
Change-Id: Ib9a2df99f4bf668cd9f650b890f9a3d44100a824
3 files changed