Commit 8e4bd572 authored by Bartek Fabiszewski's avatar Bartek Fabiszewski
Browse files

Start JobIntentService with enqueueWork

parent d882f2e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class ExternalCommandReceiver extends BroadcastReceiver {
    private void uploadData(Context context) {
        if (DbAccess.needsSync(context)) {
            Intent intent = new Intent(context, WebSyncService.class);
            context.startService(intent);
            WebSyncService.enqueueWork(context, intent);
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public class LoggerService extends Service {
            syncIntent = new Intent(getApplicationContext(), WebSyncService.class);

            if (locationHelper.isLiveSync() && DbAccess.needsSync(this)) {
                WebSyncService.enqueueWork(this, syncIntent);
                WebSyncService.enqueueWork(getApplicationContext(), syncIntent);
            }
            return true;
        } catch (LocationHelper.LoggerException e) {
@@ -315,7 +315,7 @@ public class LoggerService extends Service {
                DbAccess.writeLocation(LoggerService.this, location);
                sendBroadcast(BROADCAST_LOCATION_UPDATED);
                if (locationHelper.isLiveSync()) {
                    startService(syncIntent);
                    WebSyncService.enqueueWork(getApplicationContext(), syncIntent);
                }
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ public class MainActivity extends AppCompatActivity
            if (data != null) {
                Intent intent = new Intent(MainActivity.this, GpxExportService.class);
                intent.setData(data.getData());
                GpxExportService.enqueueWork(this, intent);
                GpxExportService.enqueueWork(MainActivity.this, intent);
                showToast(getString(R.string.export_started));
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ public class MainFragment extends Fragment {
            showToast(getString(R.string.provide_user_pass_url));
        } else if (DbAccess.needsSync(context)) {
            Intent syncIntent = new Intent(context, WebSyncService.class);
            context.startService(syncIntent);
            WebSyncService.enqueueWork(context, syncIntent);
            showToast(getString(R.string.uploading_started));
            isUploading = true;
        } else {