From 776a50da259233988b97b952836c7bc5b1a25106 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Mon, 1 Jan 2024 11:59:26 +0100 Subject: [PATCH] [androiddebugbridge] Use core channel updates (#554) * [androiddebugbridge] Use core channel updates Signed-off-by: Jan N. Klug (cherry picked from commit 6dad51abbb7fbb868841651eb6a00731f5880fb4) --- .../pom.xml | 6 ------ .../src/main/feature/feature.xml | 1 - .../internal/AndroidDebugBridgeHandler.java | 4 ++-- .../main/resources/OH-INF/update/instructions.xml | 14 ++++++++++++++ .../src/main/resources/update/android.update | 1 - 5 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/OH-INF/update/instructions.xml delete mode 100644 bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/update/android.update diff --git a/bundles/org.smarthomej.binding.androiddebugbridge/pom.xml b/bundles/org.smarthomej.binding.androiddebugbridge/pom.xml index 47be60ad6e..d0bb876fee 100644 --- a/bundles/org.smarthomej.binding.androiddebugbridge/pom.xml +++ b/bundles/org.smarthomej.binding.androiddebugbridge/pom.xml @@ -15,12 +15,6 @@ SmartHome/J Add-ons :: Bundles :: Android Debug Bridge Binding - - org.smarthomej.addons.bundles - org.smarthomej.commons - ${project.version} - provided - com.tananaev adblib diff --git a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/feature/feature.xml b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/feature/feature.xml index 832234d015..c5e733c072 100644 --- a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/feature/feature.xml +++ b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/feature/feature.xml @@ -2,7 +2,6 @@ openhab-runtime-base - mvn:org.smarthomej.addons.bundles/org.smarthomej.commons/${project.version} mvn:org.smarthomej.addons.bundles/org.smarthomej.binding.androiddebugbridge/${project.version} diff --git a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/java/org/smarthomej/binding/androiddebugbridge/internal/AndroidDebugBridgeHandler.java b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/java/org/smarthomej/binding/androiddebugbridge/internal/AndroidDebugBridgeHandler.java index f072e2ba6b..5b936ce622 100644 --- a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/java/org/smarthomej/binding/androiddebugbridge/internal/AndroidDebugBridgeHandler.java +++ b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/java/org/smarthomej/binding/androiddebugbridge/internal/AndroidDebugBridgeHandler.java @@ -38,13 +38,13 @@ import org.openhab.core.thing.Thing; import org.openhab.core.thing.ThingStatus; import org.openhab.core.thing.ThingStatusDetail; +import org.openhab.core.thing.binding.BaseThingHandler; import org.openhab.core.types.Command; import org.openhab.core.types.CommandOption; import org.openhab.core.types.RefreshType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.smarthomej.binding.androiddebugbridge.internal.AndroidDebugBridgeDevice.VolumeInfo; -import org.smarthomej.commons.UpdatingBaseThingHandler; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; @@ -56,7 +56,7 @@ * @author Miguel Álvarez - Initial contribution */ @NonNullByDefault -public class AndroidDebugBridgeHandler extends UpdatingBaseThingHandler { +public class AndroidDebugBridgeHandler extends BaseThingHandler { public static final String KEY_EVENT_PLAY = "126"; public static final String KEY_EVENT_PAUSE = "127"; diff --git a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/OH-INF/update/instructions.xml new file mode 100644 index 0000000000..3377d23299 --- /dev/null +++ b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/OH-INF/update/instructions.xml @@ -0,0 +1,14 @@ + + + + + + + androiddebugbridge:start-intent-channel + + + + + diff --git a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/update/android.update b/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/update/android.update deleted file mode 100644 index 531616e4f9..0000000000 --- a/bundles/org.smarthomej.binding.androiddebugbridge/src/main/resources/update/android.update +++ /dev/null @@ -1 +0,0 @@ -1;ADD_CHANNEL;start-intent,String,androiddebugbridge:start-intent-channel