Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fe04dcf authored by Suphon Thanakornpakapong's avatar Suphon Thanakornpakapong Committed by Fahim Salam Chowdhury
Browse files

remove unwanted import

parent 2cdce259
Loading
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import java.util.Date;
import foundation.e.blisslauncher.R;
import foundation.e.blisslauncher.core.Preferences;
import foundation.e.blisslauncher.core.utils.Constants;
import foundation.e.blisslauncher.core.utils.PackageManagerUtils;
import lineageos.weather.LineageWeatherManager;
import lineageos.weather.WeatherInfo;
import lineageos.weather.WeatherLocation;
@@ -60,7 +59,7 @@ public class WeatherUpdateService extends Service {
    private static final long LOCATION_REQUEST_TIMEOUT = 5L * 60L * 1000L;
    // request for at most 5 minutes
    private static final long OUTDATED_LOCATION_THRESHOLD_MILLIS = 10L * 60L * 1000L; // 10 minutes
    private static final float LOCATION_ACCURACY_THRESHOLD_METERS = 50000;
    private static final float LOCATION_ACCURACY_THRESHOLD_METERS = 5000;

    private WorkerThread mWorkerThread;
    private Handler mHandler;
@@ -69,8 +68,7 @@ public class WeatherUpdateService extends Service {

    static {
        sLocationCriteria = new Criteria();
        sLocationCriteria.setPowerRequirement(Criteria.POWER_LOW);
        sLocationCriteria.setAccuracy(Criteria.ACCURACY_COARSE);
        sLocationCriteria.setAccuracy(Criteria.ACCURACY_FINE);
        sLocationCriteria.setCostAllowed(false);
    }

@@ -323,7 +321,7 @@ public class WeatherUpdateService extends Service {
            }catch (SecurityException e){
                e.printStackTrace();
            }
            if (D) Log.v(TAG, "Current location is " + location);
            if (D) Log.v(TAG, "Current location is " + location + ", accuracy: " + location.getAccuracy());

            if (location != null && location.getAccuracy() > LOCATION_ACCURACY_THRESHOLD_METERS) {
                if (D) Log.d(TAG, "Ignoring inaccurate location");
@@ -343,11 +341,6 @@ public class WeatherUpdateService extends Service {
                String locationProvider = lm.getBestProvider(sLocationCriteria, true);
                if (TextUtils.isEmpty(locationProvider)) {
                    Log.e(TAG, "No available location providers matching criteria.");
                } else if (PackageManagerUtils.isAppInstalled(mContext, "com.google.android.gms")
                        && locationProvider.equals(LocationManager.GPS_PROVIDER)) {
                    // Since Google Play services is available,
                    // let's conserve battery power and not depend on the device's GPS.
                    Log.i(TAG, "Google Play Services available; Ignoring GPS provider.");
                } else {
                    WeatherLocationListener.registerIfNeeded(mContext, locationProvider);
                }