Check fragment visibility correctly.

Does not fix any existing bug. However, noticed in bug 7996654 that
isVisible() does not take window focus into account, so identifying
other cases where we check for fragment visiblity and fixing.

Bug: 8000069 Check instances of isVisible to avoid future bugs

Change-Id: I99d8606b69abb69b77c93ce1418ff2ff66ec65ee
1 file changed