vpn: check fragment is visible before adding prefs

As VPN settings listens to network events it may get woken up again
while it's in the background.

Bug: 23596799
Change-Id: If6e07493da447d7ded324ff86b6e7d57c5c615e3
1 file changed