1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Use evaluteGBDeviceEvent to send events to the app/android system, instead of calling directly the handle ufunctions.

This commit is contained in:
Sebastian Kranz 2018-07-13 10:35:18 +02:00
parent f0174d904a
commit 99bdb4a30a
2 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,7 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
}
}
protected void handleGBDeviceEvent(GBDeviceEventMusicControl musicEvent) {
private void handleGBDeviceEvent(GBDeviceEventMusicControl musicEvent) {
Context context = getContext();
LOG.info("Got event for MUSIC_CONTROL");
Intent musicIntent = new Intent(GBMusicControlReceiver.ACTION_MUSICCONTROL);

View File

@ -789,7 +789,7 @@ public class ZeTimeDeviceSupport extends AbstractBTLEDeviceSupport {
{
batteryCmd.state = BatteryState.BATTERY_NORMAL;
}
handleGBDeviceEvent(batteryCmd);
evaluateGBDeviceEvent(batteryCmd);
}
private void handleDeviceInfo(byte[] value) {
@ -801,7 +801,7 @@ public class ZeTimeDeviceSupport extends AbstractBTLEDeviceSupport {
} else{
versionCmd.hwVersion = new String(string);
}
handleGBDeviceEvent(versionCmd);
evaluateGBDeviceEvent(versionCmd);
}
private void handleActivityFetching(byte[] msg)
@ -1057,7 +1057,7 @@ public class ZeTimeDeviceSupport extends AbstractBTLEDeviceSupport {
}
break;
}
handleGBDeviceEvent(musicCmd);
evaluateGBDeviceEvent(musicCmd);
} else {
if (music != null) {
music[2] = ZeTimeConstants.CMD_REQUEST_RESPOND;