Fix possible sync from detached fragment

The call to refresh did not check whether the current fragment was
 attached before trying a force update, causing a possible NPE in
 SyncTime.clear with a null context.

PS2: Fix unwanted extra syncs

Change-Id: Ifff19d4b5b063fe4e296d89d9136040cd6c8ba96