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.

Change-Id: Ifff19d4b5b063fe4e296d89d9136040cd6c8ba96