From 45054bbcd93933746d66532d452453d38346d647 Mon Sep 17 00:00:00 2001
From: mkusnierz <>
Date: Wed, 23 Oct 2019 22:07:38 +0200
Subject: [PATCH] Extracted some commons for Lenovo watches
---
app/src/main/AndroidManifest.xml | 4 +-
.../adapter/GBDeviceAdapterv2.java | 10 +---
.../LenovoWatchCalibrationActivity.java} | 22 ++++----
.../LenovoWatchConstants.java} | 39 +++----------
.../LenovoWatchPairingActivity.java} | 6 +-
.../watchxplus/WatchXPlusConstants.java | 55 +++++++++++++++++++
.../WatchXPlusDeviceCoordinator.java | 5 +-
.../service/DeviceSupportFactory.java | 2 +-
.../operations/InitOperation.java | 5 +-
.../watchxplus/WatchXPlusDeviceSupport.java | 6 +-
.../gadgetbridge/util/DeviceHelper.java | 2 +-
11 files changed, 91 insertions(+), 65 deletions(-)
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/{watchxplus/WatchXPlusCalibrationActivity.java => lenovo/LenovoWatchCalibrationActivity.java} (80%)
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/{watchxplus/WatchXPlusConstants.java => lenovo/LenovoWatchConstants.java} (65%)
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/{watchxplus/WatchXPlusPairingActivity.java => lenovo/LenovoWatchPairingActivity.java} (95%)
create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusConstants.java
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/{ => lenovo}/watchxplus/WatchXPlusDeviceCoordinator.java (95%)
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/{watchxplus => lenovo}/operations/InitOperation.java (93%)
rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/{ => lenovo}/watchxplus/WatchXPlusDeviceSupport.java (99%)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1d5f5afc4..e1e1d26f9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -407,10 +407,10 @@
android:name=".devices.watch9.Watch9CalibrationActivity"
android:label="@string/title_activity_watch9_calibration" />
. */
-package nodomain.freeyourgadget.gadgetbridge.devices.watchxplus;
+package nodomain.freeyourgadget.gadgetbridge.devices.lenovo;
import android.content.Intent;
import android.os.Bundle;
@@ -28,7 +28,7 @@ import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractGBActivity;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
-public class WatchXPlusCalibrationActivity extends AbstractGBActivity {
+public class LenovoWatchCalibrationActivity extends AbstractGBActivity {
private static final String STATE_DEVICE = "stateDevice";
GBDevice device;
@@ -61,7 +61,7 @@ public class WatchXPlusCalibrationActivity extends AbstractGBActivity {
holdCalibration = new Runnable() {
@Override
public void run() {
- LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(WatchXPlusConstants.ACTION_CALIBRATION_HOLD));
+ LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(LenovoWatchConstants.ACTION_CALIBRATION_HOLD));
handler.postDelayed(this, 10000);
}
};
@@ -81,10 +81,10 @@ public class WatchXPlusCalibrationActivity extends AbstractGBActivity {
public void onClick(View v) {
btCalibrate.setEnabled(false);
handler.removeCallbacks(holdCalibration);
- Intent calibrationData = new Intent(WatchXPlusConstants.ACTION_CALIBRATION_SEND);
- calibrationData.putExtra(WatchXPlusConstants.VALUE_CALIBRATION_HOUR, pickerHour.getValue());
- calibrationData.putExtra(WatchXPlusConstants.VALUE_CALIBRATION_MINUTE, pickerMinute.getValue());
- calibrationData.putExtra(WatchXPlusConstants.VALUE_CALIBRATION_SECOND, pickerSecond.getValue());
+ Intent calibrationData = new Intent(LenovoWatchConstants.ACTION_CALIBRATION_SEND);
+ calibrationData.putExtra(LenovoWatchConstants.VALUE_CALIBRATION_HOUR, pickerHour.getValue());
+ calibrationData.putExtra(LenovoWatchConstants.VALUE_CALIBRATION_MINUTE, pickerMinute.getValue());
+ calibrationData.putExtra(LenovoWatchConstants.VALUE_CALIBRATION_SECOND, pickerSecond.getValue());
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(calibrationData);
finish();
}
@@ -106,8 +106,8 @@ public class WatchXPlusCalibrationActivity extends AbstractGBActivity {
@Override
protected void onStart() {
super.onStart();
- Intent calibration = new Intent(WatchXPlusConstants.ACTION_CALIBRATION);
- calibration.putExtra(WatchXPlusConstants.ACTION_ENABLE, true);
+ Intent calibration = new Intent(LenovoWatchConstants.ACTION_CALIBRATION);
+ calibration.putExtra(LenovoWatchConstants.ACTION_ENABLE, true);
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(calibration);
handler.postDelayed(holdCalibration, 1000);
}
@@ -115,8 +115,8 @@ public class WatchXPlusCalibrationActivity extends AbstractGBActivity {
@Override
protected void onStop() {
super.onStop();
- Intent calibration = new Intent(WatchXPlusConstants.ACTION_CALIBRATION);
- calibration.putExtra(WatchXPlusConstants.ACTION_ENABLE, false);
+ Intent calibration = new Intent(LenovoWatchConstants.ACTION_CALIBRATION);
+ calibration.putExtra(LenovoWatchConstants.ACTION_ENABLE, false);
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(calibration);
handler.removeCallbacks(holdCalibration);
}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusConstants.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchConstants.java
similarity index 65%
rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusConstants.java
rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchConstants.java
index b79d032ad..81365035c 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusConstants.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchConstants.java
@@ -14,22 +14,9 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see . */
-package nodomain.freeyourgadget.gadgetbridge.devices.watchxplus;
+package nodomain.freeyourgadget.gadgetbridge.devices.lenovo;
-import java.util.UUID;
-
-public final class WatchXPlusConstants {
- public static final UUID UUID_SERVICE_WATCHXPLUS = UUID.fromString("0000a800-0000-1000-8000-00805f9b34fb");
-
- public static final UUID UUID_UNKNOWN_DESCRIPTOR = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
-
- public static final UUID UUID_CHARACTERISTIC_WRITE = UUID.fromString("0000a801-0000-1000-8000-00805f9b34fb");
- public static final UUID UUID_CHARACTERISTIC_UNKNOWN_2 = UUID.fromString("0000a802-0000-1000-8000-00805f9b34fb");
- public static final UUID UUID_CHARACTERISTIC_UNKNOWN_3 = UUID.fromString("0000a803-0000-1000-8000-00805f9b34fb");
- public static final UUID UUID_CHARACTERISTIC_UNKNOWN_4 = UUID.fromString("0000a804-0000-1000-8000-00805f9b34fb");
-
- public static final int NOTIFICATION_CHANNEL_DEFAULT = 0;
- public static final int NOTIFICATION_CHANNEL_PHONE_CALL = 10;
+public class LenovoWatchConstants {
public static final byte RESPONSE = 0x13;
public static final byte REQUEST = 0x31;
@@ -54,14 +41,9 @@ public final class WatchXPlusConstants {
public static final byte[] CMD_AUTHORIZATION_TASK = new byte[]{0x01, 0x05};
public static final byte[] CMD_TIME_SETTINGS = new byte[]{0x01, 0x08};
public static final byte[] CMD_ALARM_SETTINGS = new byte[]{0x01, 0x0A};
- public static final byte[] CMD_WEATHER_SET = new byte[]{0x01, 0x10};
public static final byte[] CMD_BATTERY_INFO = new byte[]{0x01, 0x14};
- public static final byte[] CMD_RETRIEVE_DATA = new byte[]{(byte)0xF0, 0x10};
- public static final byte[] CMD_RETRIEVE_DATA_DETAILS = new byte[]{(byte)0xF0, 0x11};
- public static final byte[] HEART_RATE_DATA_TYPE = new byte[]{0x00, 0x02};
public static final byte[] CMD_NOTIFICATION_TASK = new byte[]{0x03, 0x01};
- public static final byte[] CMD_NOTIFICATION_TEXT_TASK = new byte[]{0x03, 0x06};
public static final byte[] CMD_NOTIFICATION_SETTINGS = new byte[]{0x03, 0x02};
public static final byte[] CMD_CALIBRATION_INIT_TASK = new byte[]{0x03, 0x31};
public static final byte[] CMD_CALIBRATION_TASK = new byte[]{0x03, 0x33, 0x01};
@@ -69,34 +51,29 @@ public final class WatchXPlusConstants {
public static final byte[] CMD_DO_NOT_DISTURB_SETTINGS = new byte[]{0x03, 0x61};
public static final byte[] CMD_FITNESS_GOAL_SETTINGS = new byte[]{0x10, 0x02};
- public static final byte[] CMD_DAY_STEPS_INFO = new byte[]{0x10, 0x03};
public static final byte[] RESP_AUTHORIZATION_TASK = new byte[]{0x01, 0x01, 0x05};
public static final byte[] RESP_BUTTON_INDICATOR = new byte[]{0x04, 0x03, 0x11};
public static final byte[] RESP_ALARM_INDICATOR = new byte[]{-0x80, 0x01, 0x0A};
- public static final byte[] RESP_DAY_STEPS_INDICATOR = new byte[]{0x08, 0x10, 0x03};
- public static final byte[] RESP_HEARTRATE = new byte[]{-0x80, 0x15, 0x03};
public static final byte[] RESP_FIRMWARE_INFO = new byte[]{0x08, 0x01, 0x02};
public static final byte[] RESP_TIME_SETTINGS = new byte[]{0x08, 0x01, 0x08};
public static final byte[] RESP_BATTERY_INFO = new byte[]{0x08, 0x01, 0x14};
public static final byte[] RESP_NOTIFICATION_SETTINGS = new byte[]{0x01, 0x03, 0x02};
- public static final byte[] RESP_HEART_RATE_DATA = new byte[]{0x08, (byte)0xF0, 0x10};
- public static final byte[] RESP_HEART_RATE_DATA_DETAILS = new byte[]{0x08, (byte)0xF0, 0x11};
public static final String ACTION_ENABLE = "action.watch9.enable";
public static final String ACTION_CALIBRATION
- = "nodomain.freeyourgadget.gadgetbridge.devices.action.watchxplus.start_calibration";
+ = "nodomain.freeyourgadget.gadgetbridge.devices.action.lenovowatch.start_calibration";
public static final String ACTION_CALIBRATION_SEND
- = "nodomain.freeyourgadget.gadgetbridge.devices.action.watchxplus.send_calibration";
+ = "nodomain.freeyourgadget.gadgetbridge.devices.action.lenovowatch.send_calibration";
public static final String ACTION_CALIBRATION_HOLD
- = "nodomain.freeyourgadget.gadgetbridge.devices.action.watchxplus.keep_calibrating";
+ = "nodomain.freeyourgadget.gadgetbridge.devices.action.lenovowatch.keep_calibrating";
public static final String VALUE_CALIBRATION_HOUR
- = "value.watch9.calibration_hour";
+ = "value.lenovowatch.calibration_hour";
public static final String VALUE_CALIBRATION_MINUTE
- = "value.watch9.calibration_minute";
+ = "value.lenovowatch.calibration_minute";
public static final String VALUE_CALIBRATION_SECOND
- = "value.watch9.calibration_second";
+ = "value.lenovowatch.calibration_second";
}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusPairingActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchPairingActivity.java
similarity index 95%
rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusPairingActivity.java
rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchPairingActivity.java
index 79b209c51..2b6f795ae 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusPairingActivity.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/LenovoWatchPairingActivity.java
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see . */
-package nodomain.freeyourgadget.gadgetbridge.devices.watchxplus;
+package nodomain.freeyourgadget.gadgetbridge.devices.lenovo;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -40,8 +40,8 @@ import nodomain.freeyourgadget.gadgetbridge.util.AndroidUtils;
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
-public class WatchXPlusPairingActivity extends AbstractGBActivity {
- private static final Logger LOG = LoggerFactory.getLogger(WatchXPlusPairingActivity.class);
+public class LenovoWatchPairingActivity extends AbstractGBActivity {
+ private static final Logger LOG = LoggerFactory.getLogger(LenovoWatchPairingActivity.class);
private static final String STATE_DEVICE_CANDIDATE = "stateDeviceCandidate";
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusConstants.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusConstants.java
new file mode 100644
index 000000000..afaac3955
--- /dev/null
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusConstants.java
@@ -0,0 +1,55 @@
+/* Copyright (C) 2018-2019 maxirnilian
+
+ This file is part of Gadgetbridge.
+
+ Gadgetbridge is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Gadgetbridge is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see . */
+package nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus;
+
+import java.util.UUID;
+
+import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.LenovoWatchConstants;
+
+public final class WatchXPlusConstants extends LenovoWatchConstants {
+ public static final UUID UUID_SERVICE_WATCHXPLUS = UUID.fromString("0000a800-0000-1000-8000-00805f9b34fb");
+
+ public static final UUID UUID_UNKNOWN_DESCRIPTOR = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
+
+ public static final UUID UUID_CHARACTERISTIC_WRITE = UUID.fromString("0000a801-0000-1000-8000-00805f9b34fb");
+ public static final UUID UUID_CHARACTERISTIC_UNKNOWN_2 = UUID.fromString("0000a802-0000-1000-8000-00805f9b34fb");
+ public static final UUID UUID_CHARACTERISTIC_UNKNOWN_3 = UUID.fromString("0000a803-0000-1000-8000-00805f9b34fb");
+ public static final UUID UUID_CHARACTERISTIC_UNKNOWN_4 = UUID.fromString("0000a804-0000-1000-8000-00805f9b34fb");
+
+ public static final int NOTIFICATION_CHANNEL_DEFAULT = 0;
+ public static final int NOTIFICATION_CHANNEL_PHONE_CALL = 10;
+
+ public static final byte[] CMD_WEATHER_SET = new byte[]{0x01, 0x10};
+ public static final byte[] CMD_RETRIEVE_DATA = new byte[]{(byte)0xF0, 0x10};
+ public static final byte[] CMD_RETRIEVE_DATA_DETAILS = new byte[]{(byte)0xF0, 0x11};
+ public static final byte[] HEART_RATE_DATA_TYPE = new byte[]{0x00, 0x02};
+
+ public static final byte[] CMD_NOTIFICATION_TEXT_TASK = new byte[]{0x03, 0x06};
+ public static final byte[] CMD_NOTIFICATION_SETTINGS = new byte[]{0x03, 0x02};
+ public static final byte[] CMD_DO_NOT_DISTURB_SETTINGS = new byte[]{0x03, 0x61};
+
+ public static final byte[] CMD_FITNESS_GOAL_SETTINGS = new byte[]{0x10, 0x02};
+ public static final byte[] CMD_DAY_STEPS_INFO = new byte[]{0x10, 0x03};
+
+ public static final byte[] RESP_AUTHORIZATION_TASK = new byte[]{0x01, 0x01, 0x05};
+ public static final byte[] RESP_DAY_STEPS_INDICATOR = new byte[]{0x08, 0x10, 0x03};
+ public static final byte[] RESP_HEARTRATE = new byte[]{-0x80, 0x15, 0x03};
+
+ public static final byte[] RESP_HEART_RATE_DATA = new byte[]{0x08, (byte)0xF0, 0x10};
+ public static final byte[] RESP_HEART_RATE_DATA_DETAILS = new byte[]{0x08, (byte)0xF0, 0x11};
+
+}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusDeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusDeviceCoordinator.java
similarity index 95%
rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusDeviceCoordinator.java
rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusDeviceCoordinator.java
index 121c505f0..ce2376871 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/watchxplus/WatchXPlusDeviceCoordinator.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/lenovo/watchxplus/WatchXPlusDeviceCoordinator.java
@@ -1,4 +1,4 @@
-package nodomain.freeyourgadget.gadgetbridge.devices.watchxplus;
+package nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus;
import android.annotation.TargetApi;
import android.app.Activity;
@@ -18,6 +18,7 @@ import nodomain.freeyourgadget.gadgetbridge.GBException;
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
+import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.LenovoWatchPairingActivity;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
@@ -70,7 +71,7 @@ public class WatchXPlusDeviceCoordinator extends AbstractDeviceCoordinator {
@Nullable
@Override
public Class extends Activity> getPairingActivity() {
- return WatchXPlusPairingActivity.class;
+ return LenovoWatchPairingActivity.class;
}
@Override
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceSupportFactory.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceSupportFactory.java
index dba93c3aa..2d7584545 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceSupportFactory.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceSupportFactory.java
@@ -52,7 +52,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleSupport
import nodomain.freeyourgadget.gadgetbridge.service.devices.roidmi.RoidmiSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.VibratissimoSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
-import nodomain.freeyourgadget.gadgetbridge.service.devices.watchxplus.WatchXPlusDeviceSupport;
+import nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.watchxplus.WatchXPlusDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/operations/InitOperation.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/operations/InitOperation.java
similarity index 93%
rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/operations/InitOperation.java
rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/operations/InitOperation.java
index f0b3333a1..f59b66f4e 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/operations/InitOperation.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/operations/InitOperation.java
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see . */
-package nodomain.freeyourgadget.gadgetbridge.service.devices.watchxplus.operations;
+package nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.operations;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
@@ -31,8 +31,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEOperation;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateAction;
-import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
-import nodomain.freeyourgadget.gadgetbridge.service.devices.watchxplus.WatchXPlusDeviceSupport;
+import nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.watchxplus.WatchXPlusDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/WatchXPlusDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java
similarity index 99%
rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/WatchXPlusDeviceSupport.java
rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java
index dc21d8618..77f04eff8 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/watchxplus/WatchXPlusDeviceSupport.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see . */
-package nodomain.freeyourgadget.gadgetbridge.service.devices.watchxplus;
+package nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.watchxplus;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
@@ -42,7 +42,7 @@ import java.util.UUID;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventBatteryInfo;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventVersionInfo;
-import nodomain.freeyourgadget.gadgetbridge.devices.watchxplus.WatchXPlusConstants;
+import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus.WatchXPlusConstants;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.ActivityUser;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
@@ -59,7 +59,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateAction;
-import nodomain.freeyourgadget.gadgetbridge.service.devices.watchxplus.operations.InitOperation;
+import nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.operations.InitOperation;
import nodomain.freeyourgadget.gadgetbridge.util.AlarmUtils;
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java
index f83c00535..c3a9ede3e 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java
@@ -68,7 +68,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.roidmi.Roidmi1Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.roidmi.Roidmi3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.vibratissimo.VibratissimoCoordinator;
-import nodomain.freeyourgadget.gadgetbridge.devices.watchxplus.WatchXPlusDeviceCoordinator;
+import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus.WatchXPlusDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.watch9.Watch9DeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xwatch.XWatchCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.zetime.ZeTimeCoordinator;