internal static void SyncService(Service service) { if (ServiceManager.IsRunning(service)) { Utils.DebugPrint("Refreshing service contacts..."); service.RefreshPhoneBookContacts(); } else { Utils.DebugPrint("Force refreshing service " + service.Information.ServiceName + " isn't possible. Why? It isn't running!"); } Utils.DebugPrint("Finished refreshing service contacts. Calling contacts update and bubble group update."); BubbleGroupUpdater.Update(service); }
public static Task ForceUpdate(Service service) { return(Task.Factory.StartNew(() => { Utils.DebugPrint("Querying phone contacts..."); _phoneBookContacts = Platform.GetPhoneBookContacts(); if (service != null) { if (ServiceManager.IsRunning(service)) { Utils.DebugPrint("Refreshing service contacts..."); service.RefreshPhoneBookContacts(); } else { Utils.DebugPrint("Force refreshing service " + service.Information.ServiceName + " isn't possible. Why? It isn't running!"); } Utils.DebugPrint("Finished refreshing service contacts. Calling contacts update and bubble group update."); BubbleGroupUpdater.Update(service); } })); }