mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Add missing mutability flags to PendingIntents
This commit is contained in:
parent
8899187ee4
commit
5c3b76b838
@ -38,6 +38,7 @@ import nodomain.freeyourgadget.gadgetbridge.BuildConfig;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Weather;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.PendingIntentUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
import static cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit.FAHRENHEIT;
|
||||
@ -103,7 +104,7 @@ public class CMWeatherReceiver extends BroadcastReceiver implements CMWeatherMan
|
||||
if (enable) {
|
||||
Intent intent = new Intent("GB_UPDATE_WEATHER");
|
||||
intent.setPackage(BuildConfig.APPLICATION_ID);
|
||||
mPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
|
||||
mPendingIntent = PendingIntentUtils.getBroadcast(mContext, 0, intent, 0, false);
|
||||
am.setInexactRepeating(AlarmManager.RTC_WAKEUP, Calendar.getInstance().getTimeInMillis() + 10000, AlarmManager.INTERVAL_HOUR, mPendingIntent);
|
||||
} else {
|
||||
am.cancel(mPendingIntent);
|
||||
|
@ -49,6 +49,7 @@ import nodomain.freeyourgadget.gadgetbridge.BuildConfig;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Weather;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.PendingIntentUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@ -107,7 +108,7 @@ public class LineageOsWeatherReceiver extends BroadcastReceiver implements Linea
|
||||
if (enable) {
|
||||
Intent intent = new Intent("GB_UPDATE_WEATHER");
|
||||
intent.setPackage(BuildConfig.APPLICATION_ID);
|
||||
mPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
|
||||
mPendingIntent = PendingIntentUtils.getBroadcast(mContext, 0, intent, 0, false);
|
||||
am.setInexactRepeating(AlarmManager.RTC_WAKEUP, Calendar.getInstance().getTimeInMillis() + 10000, AlarmManager.INTERVAL_HOUR, mPendingIntent);
|
||||
} else {
|
||||
am.cancel(mPendingIntent);
|
||||
|
@ -34,6 +34,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateA
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.um25.Data.CaptureGroup;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.um25.Data.MeasurementData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.PendingIntentUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
|
||||
|
||||
public class UM25Support extends UM25BaseSupport {
|
||||
@ -194,7 +195,7 @@ public class UM25Support extends UM25BaseSupport {
|
||||
.setSmallIcon(R.drawable.ic_notification_low_battery)
|
||||
.setContentTitle("USB current")
|
||||
.setContentText("USB current below threshold")
|
||||
.setContentIntent(PendingIntent.getActivity(getContext(), 0, activityIntent, PendingIntent.FLAG_CANCEL_CURRENT))
|
||||
.setContentIntent(PendingIntentUtils.getActivity(getContext(), 0, activityIntent, PendingIntent.FLAG_CANCEL_CURRENT, false))
|
||||
.build();
|
||||
|
||||
GB.notify(
|
||||
|
Loading…
Reference in New Issue
Block a user