// Path: app/src/main/java/net/fabiszewski/ulogger/LoggerTask.java
// static final int E_DISABLED = 2;
// 
// Path: app/src/main/java/net/fabiszewski/ulogger/LoggerTask.java
// static final int E_PERMISSION = 1;
// 
// Path: app/src/main/java/net/fabiszewski/ulogger/MainActivity.java
// public final static String UPDATED_PREFS = "extra_updated_prefs";


import static net.fabiszewski.ulogger.LoggerTask.E_DISABLED;
import static net.fabiszewski.ulogger.LoggerTask.E_PERMISSION;
import static net.fabiszewski.ulogger.MainActivity.UPDATED_PREFS;
import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;

            syncIntent = new Intent(getApplicationContext(), WebSyncService.class);

            if (locationHelper.isLiveSync() && DbAccess.needsSync(this)) {
                getApplicationContext().startService(syncIntent);
            }
            return true;
        } catch (LocationHelper.LoggerException e) {
            int errorCode = e.getCode();
            if (errorCode == E_DISABLED) {
                sendBroadcast(BROADCAST_LOCATION_DISABLED);
            } else if (errorCode == E_PERMISSION) {
                sendBroadcast(BROADCAST_LOCATION_PERMISSION_DENIED);
            }
        }
        return false;
    }

    /**
     * Start foreground service
     *
     * @param intent Intent
     * @param flags Flags
     * @param startId Unique id
     * @return Always returns START_STICKY
     */
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        if (Logger.DEBUG) { Log.d(TAG, "[onStartCommand]"); }

// Path: app/src/main/java/net/fabiszewski/ulogger/LoggerTask.java
// static final int E_DISABLED = 2;
// 
// Path: app/src/main/java/net/fabiszewski/ulogger/LoggerTask.java
// static final int E_PERMISSION = 1;
// 
// Path: app/src/main/java/net/fabiszewski/ulogger/MainActivity.java
// public final static String UPDATED_PREFS = "extra_updated_prefs";


// Path: app/src/main/java/net/fabiszewski/ulogger/LoggerService.java
import static net.fabiszewski.ulogger.LoggerTask.E_DISABLED;
import static net.fabiszewski.ulogger.LoggerTask.E_PERMISSION;
import static net.fabiszewski.ulogger.MainActivity.UPDATED_PREFS;
import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;


            syncIntent = new Intent(getApplicationContext(), WebSyncService.class);

            if (locationHelper.isLiveSync() && DbAccess.needsSync(this)) {
                getApplicationContext().startService(syncIntent);
            }
            return true;
        } catch (LocationHelper.LoggerException e) {
            int errorCode = e.getCode();
            if (errorCode == E_DISABLED) {
                sendBroadcast(BROADCAST_LOCATION_DISABLED);
            } else if (errorCode == E_PERMISSION) {
                sendBroadcast(BROADCAST_LOCATION_PERMISSION_DENIED);
            }
        }
        return false;
    }

    /**
     * Start foreground service
     *
     * @param intent Intent
     * @param flags Flags
     * @param startId Unique id
     * @return Always returns START_STICKY
     */
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        if (Logger.DEBUG) { Log.d(TAG, "[onStartCommand]"); }

        if (intent != null && intent.getBooleanExtra(UPDATED_PREFS, false)) {