From 00d3a9ce18a1be07f60cd144144a8115688ad529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Fri, 4 Oct 2024 22:56:39 +0100 Subject: [PATCH] Fix linter errors --- .../gadgetbridge/service/AbstractDeviceSupport.java | 3 +++ .../devices/qhybrid/adapter/fossil/FossilWatchAdapter.java | 1 + .../devices/qhybrid/adapter/misfit/MisfitWatchAdapter.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/AbstractDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/AbstractDeviceSupport.java index 0a432a70e..ad7839803 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/AbstractDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/AbstractDeviceSupport.java @@ -257,14 +257,17 @@ public abstract class AbstractDeviceSupport implements DeviceSupport { break; case VIBRATE: final Intent intentVibrate = new Intent(FindPhoneActivity.ACTION_VIBRATE); + intentVibrate.setPackage(BuildConfig.APPLICATION_ID); LocalBroadcastManager.getInstance(context).sendBroadcast(intentVibrate); break; case RING: final Intent intentRing = new Intent(FindPhoneActivity.ACTION_RING); + intentRing.setPackage(BuildConfig.APPLICATION_ID); LocalBroadcastManager.getInstance(context).sendBroadcast(intentRing); break; case STOP: final Intent intentStop = new Intent(FindPhoneActivity.ACTION_FOUND); + intentStop.setPackage(BuildConfig.APPLICATION_ID); LocalBroadcastManager.getInstance(context).sendBroadcast(intentStop); break; default: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java index 4bc4ad267..91d5a8783 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java @@ -761,6 +761,7 @@ public class FossilWatchAdapter extends WatchAdapter { log("Button press on button " + button); Intent i = new Intent(QHYBRID_EVENT_BUTTON_PRESS); + i.setPackage(BuildConfig.APPLICATION_ID); i.putExtra("BUTTON", button); getContext().sendBroadcast(i); } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/misfit/MisfitWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/misfit/MisfitWatchAdapter.java index 2c5fa8136..7c14fa7fb 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/misfit/MisfitWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/misfit/MisfitWatchAdapter.java @@ -46,6 +46,7 @@ import java.util.NoSuchElementException; import java.util.Queue; import java.util.TimeZone; +import nodomain.freeyourgadget.gadgetbridge.BuildConfig; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventBatteryInfo; import nodomain.freeyourgadget.gadgetbridge.devices.DeviceManager; import nodomain.freeyourgadget.gadgetbridge.devices.qhybrid.NotificationConfiguration; @@ -342,6 +343,7 @@ public class MisfitWatchAdapter extends WatchAdapter { logger.debug("Button press on button " + button); Intent i = new Intent(QHYBRID_EVENT_BUTTON_PRESS); + i.setPackage(BuildConfig.APPLICATION_ID); i.putExtra("BUTTON", button); //ByteBuffer buffer = ByteBuffer.allocate(16);