mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei: replace magic numbers with constants
This commit is contained in:
+1
-1
@@ -600,7 +600,7 @@ public class AsynchronousResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleWeatherCheck(HuaweiPacket response) {
|
private void handleWeatherCheck(HuaweiPacket response) {
|
||||||
if (response.serviceId == Weather.id && response.commandId == 0x04) {
|
if (response.serviceId == Weather.id && response.commandId == Weather.WeatherDeviceRequest.id) {
|
||||||
support.huaweiWeatherManager.handleAsyncMessage(response);
|
support.huaweiWeatherManager.handleAsyncMessage(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ public class SendWeatherDeviceRequest extends Request {
|
|||||||
public SendWeatherDeviceRequest(HuaweiSupportProvider support) {
|
public SendWeatherDeviceRequest(HuaweiSupportProvider support) {
|
||||||
super(support);
|
super(support);
|
||||||
this.serviceId = Weather.id;
|
this.serviceId = Weather.id;
|
||||||
this.commandId = 0x04;
|
this.commandId = Weather.WeatherDeviceRequest.id;
|
||||||
this.addToResponse = false; // Handled in async response
|
this.addToResponse = false; // Handled in async response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user