Ejemplo n.º 1
0
 @Override
 protected void asyncPerform(ActionContext<? extends Application> context) throws Throwable {
   final Application app = context.getApp();
   statistics =
       new StorageStatisticsCollector(
               app.getDbHelper().getReadOnlyDatabase(),
               app.getSettings().getDatabaseStorageProvider(),
               app.getSettings().getContentStorageProvider())
           .getStorageStatistics();
 }
Ejemplo n.º 2
0
 @Override
 public boolean onFired(ActionContext<? extends Application> context) {
   if (context.getApp().checkInternetAvailableAndRequired(context.getActivity())) {
     try {
       final SyncService service = syncServiceProxy.getService();
       if (service != null) {
         doSync(context, service);
       }
     } catch (IllegalStateException ex) {
       cancelSync(context);
     }
   }
   return true;
 }