Avoid the exception when UI shows the fragment

Bug: 290145058
Test: build pass.
Change-Id: Ic8d084cc98c3d0094d816e43fed57fb10446462d
1 file changed