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

Unverified Commit 63cf156c authored by Jonathan Klee's avatar Jonathan Klee Committed by Yash-Garg
Browse files

Merge branch '5518-rework-weather-widget' into 'master'

Refactorize weather widget implementation

See merge request !128
parents ec989cff d2863ae5
Loading
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -72,11 +72,6 @@ android {

    flavorDimensions.add("api")
    productFlavors {
        create("apiNougat") {
            dimension = "api"
            minSdk = 24
        }

        create("apiOreo") {
            dimension = "api"
            minSdk = 26
@@ -138,7 +133,6 @@ android {
}

dependencies {
    "apiNougatImplementation"("org.cyanogenmod:platform.sdk:6.0")
    "apiOreoImplementation"(files("libs/lineage-sdk-oreo.jar"))
    "apiQImplementation"(files("libs/lineage-sdk-q.jar"))
    "apiRImplementation"(files("libs/lineage-sdk-r.jar"))
@@ -184,4 +178,7 @@ dependencies {

    // elib
    implementation(libs.elib)

    // workmanager
    implementation(libs.workmanager)
}
+0 −4
Original line number Diff line number Diff line
@@ -399,11 +399,7 @@ public class WeatherUpdateService extends Service {
            finishedIntent.putExtra(EXTRA_UPDATE_CANCELLED, updateCancelled);
            mContext.sendBroadcast(finishedIntent);

            if (D)
                Log.d(TAG, "RELEASING WAKELOCK");
            mWakeLock.release();
            mIsProcessingWeatherUpdate = false;
            mContext.stopService(new Intent(mContext, WeatherUpdateService.class));
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
        <ListPreference
            android:key="weather_refresh_interval"
            android:dependency="weather_source"
            android:defaultValue="60"
            android:defaultValue="15"
            android:summary="%s"
            android:entries="@array/weather_interval_entries"
            android:entryValues="@array/weather_interval_values"
+0 −8
Original line number Diff line number Diff line
@@ -34,14 +34,6 @@ public class DeviceStatusService extends Service {
                } else {
                    context.stopService(i);
                }
            } else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
                if (D)
                    Log.d(TAG, "onDisplayOff: Cancel pending update");
                WeatherUpdateService.cancelUpdates(context);
            } else if (Intent.ACTION_SCREEN_ON.equals(action)) {
                if (D)
                    Log.d(TAG, "onDisplayOn: Reschedule update");
                WeatherUpdateService.scheduleNextUpdate(context, false);
            }
        }
    };
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ public class ForecastBuilder {
            return;
        }

        smallPanel.setVisibility(View.VISIBLE);
        TimeZone MyTimezone = TimeZone.getDefault();
        Calendar calendar = new GregorianCalendar(MyTimezone);
        int weatherTempUnit = w.getTemperatureUnit();
Loading