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:
parent
f0174d904a
commit
99bdb4a30a
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user