// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_DISABLED                = 0;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OUTOFSERVICE            = 1;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_TEMPORARYUNAVAILABLE    = 2;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_SEARCHING               = 3;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_STABILIZING             = 4;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OK                      = 5;


import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import java.util.Locale;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_DISABLED;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OUTOFSERVICE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_TEMPORARYUNAVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_SEARCHING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_STABILIZING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OK;
            flGPSFix.getViewTreeObserver().removeOnGlobalLayoutListener(viewTreeObserverOnGLL);
        }

        EventBus.getDefault().unregister(this);
        super.onPause();
    }

    /**
     * The EventBus receiver for Short Messages.
     */
    @Subscribe (threadMode = ThreadMode.MAIN)
    public void onEvent(Short msg) {
        if (msg == EventBusMSG.UPDATE_FIX) {
            update();
        }
    }

    /**
     * Updates the user interface of the fragment.
     * It takes care of visibility and value of each tile, messages, and GPS Status widgets.
     */
    public void update() {
        //Log.w("myApp", "[#] FragmentGPSFix.java - Update");
        location = gpsApp.getCurrentLocationExtended();
        AltitudeManualCorrection = gpsApp.getPrefAltitudeCorrection();
        prefDirections = gpsApp.getPrefShowDirections();
        GPSStatus = gpsApp.getGPSStatus();
        EGMAltitudeCorrection = gpsApp.getPrefEGM96AltitudeCorrection();
        isBackgroundActivityRestricted = gpsApp.isBackgroundActivityRestricted();
        if (isAdded()) {
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_DISABLED                = 0;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OUTOFSERVICE            = 1;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_TEMPORARYUNAVAILABLE    = 2;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_SEARCHING               = 3;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_STABILIZING             = 4;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OK                      = 5;


// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/FragmentGPSFix.java
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import java.util.Locale;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_DISABLED;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OUTOFSERVICE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_TEMPORARYUNAVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_SEARCHING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_STABILIZING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OK;

            flGPSFix.getViewTreeObserver().removeOnGlobalLayoutListener(viewTreeObserverOnGLL);
        }

        EventBus.getDefault().unregister(this);
        super.onPause();
    }

    /**
     * The EventBus receiver for Short Messages.
     */
    @Subscribe (threadMode = ThreadMode.MAIN)
    public void onEvent(Short msg) {
        if (msg == EventBusMSG.UPDATE_FIX) {
            update();
        }
    }

    /**
     * Updates the user interface of the fragment.
     * It takes care of visibility and value of each tile, messages, and GPS Status widgets.
     */
    public void update() {
        //Log.w("myApp", "[#] FragmentGPSFix.java - Update");
        location = gpsApp.getCurrentLocationExtended();
        AltitudeManualCorrection = gpsApp.getPrefAltitudeCorrection();
        prefDirections = gpsApp.getPrefShowDirections();
        GPSStatus = gpsApp.getGPSStatus();
        EGMAltitudeCorrection = gpsApp.getPrefEGM96AltitudeCorrection();
        isBackgroundActivityRestricted = gpsApp.isBackgroundActivityRestricted();
        if (isAdded()) {
            if ((location != null) && (GPSStatus == GPS_OK)) {