Search in sources :

Example 1 with WidgetsPutRequest

use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.WidgetsPutRequest in project Gadgetbridge by Freeyourgadget.

the class FossilHRWatchAdapter method uploadWidgets.

private void uploadWidgets() {
    ArrayList<Widget> systemWidgets = new ArrayList<>(widgets.size());
    for (Widget widget : widgets) {
        if (!(widget instanceof CustomWidget) && !widget.getWidgetType().isCustom())
            systemWidgets.add(widget);
    }
    queueWrite(new WidgetsPutRequest(systemWidgets.toArray(new Widget[0]), this));
}
Also used : CustomWidget(nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.CustomWidget) Widget(nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.Widget) ArrayList(java.util.ArrayList) WidgetsPutRequest(nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.WidgetsPutRequest) CustomWidget(nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.CustomWidget)

Aggregations

ArrayList (java.util.ArrayList)1 CustomWidget (nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.CustomWidget)1 Widget (nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.Widget)1 WidgetsPutRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.widget.WidgetsPutRequest)1