Improve stability on pre draw detector

Due to there are some logs report activity is null when remove
predraw listener, it should check activity is null or not and
we should remove predraw listener when fragment view destroy
too.

Bug: 129250021
Test: atest DocumentsUIGoogleTests
Change-Id: I1ab123a8165d5fef419b9bf0fe828fd8a0b9afa0
1 file changed