Example #1
0
 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);
 }
Example #2
0
 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);
         }
     }));
 }